C++: Fix bug in findMatchingDefinition.
C++: Fix bug in findMatchingDefinition.

In strict mode, don't give up after the first Document with candidates.

Change-Id: I62ba59708a3501b31f79d979b1a85bede875eccb
Reviewed-on: http://codereview.qt-project.org/5142
Reviewed-by: Leandro T. C. Melo <8f144cd741810d8c7b648cacf5b9b2f4e2ebcc1b@nokia.com>

xianian/qt-creator,bakaiadam/collaborative_qt_creator,malikcjm/qtcreator,ostash/qt-creator-i18n-uk,farseerri/git_code,xianian/qt-creator,darksylinc/qt-creator,jonnor/qt-creator,KDAB/KDAB-Creator,colede/qtcreator,duythanhphan/qt-creator,azat/qtcreator,azat/qtcreator,omniacreator/qtcreator,farseerri/git_code,amyvmiwei/qt-creator,Distrotech/qtcreator,KDE/android-qt-creator,kuba1/qtcreator,AltarBeastiful/qt-creator,farseerri/git_code,martyone/sailfish-qtcreator,amyvmiwei/qt-creator,maui-packages/qt-creator,darksylinc/qt-creator,Distrotech/qtcreator,farseerri/git_code,xianian/qt-creator,azat/qtcreator,ostash/qt-creator-i18n-uk,xianian/qt-creator,jonnor/qt-creator,amyvmiwei/qt-creator,xianian/qt-creator,KDE/android-qt-creator,KDE/android-qt-creator,duythanhphan/qt-creator,kuba1/qtcreator,danimo/qt-creator,hdweiss/qt-creator-visualizer,KDE/android-qt-creator,syntheticpp/qt-creator,azat/qtcreator,farseerri/git_code,xianian/qt-creator,azat/qtcreator,KDE/android-qt-creator,maui-packages/qt-creator,syntheticpp/qt-creator,kuba1/qtcreator,KDE/android-qt-creator,amyvmiwei/qt-creator,hdweiss/qt-creator-visualizer,danimo/qt-creator,omniacreator/qtcreator,AltarBeastiful/qt-creator,maui-packages/qt-creator,colede/qtcreator,farseerri/git_code,Distrotech/qtcreator,darksylinc/qt-creator,syntheticpp/qt-creator,danimo/qt-creator,syntheticpp/qt-creator,bakaiadam/collaborative_qt_creator,richardmg/qtcreator,azat/qtcreator,ostash/qt-creator-i18n-uk,malikcjm/qtcreator,colede/qtcreator,bakaiadam/collaborative_qt_creator,malikcjm/qtcreator,KDAB/KDAB-Creator,richardmg/qtcreator,AltarBeastiful/qt-creator,amyvmiwei/qt-creator,KDE/android-qt-creator,martyone/sailfish-qtcreator,hdweiss/qt-creator-visualizer,Distrotech/qtcreator,malikcjm/qtcreator,ostash/qt-creator-i18n-uk,hdweiss/qt-creator-visualizer,omniacreator/qtcreator,darksylinc/qt-creator,amyvmiwei/qt-creator,xianian/qt-creator,Distrotech/qtcreator,hdweiss/qt-creator-visualizer,danimo/qt-creator,Distrotech/qtcreator,omniacreator/qtcreator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,kuba1/qtcreator,AltarBeastiful/qt-creator,syntheticpp/qt-creator,bakaiadam/collaborative_qt_creator,malikcjm/qtcreator,bakaiadam/collaborative_qt_creator,kuba1/qtcreator,danimo/qt-creator,martyone/sailfish-qtcreator,maui-packages/qt-creator,kuba1/qtcreator,richardmg/qtcreator,kuba1/qtcreator,KDAB/KDAB-Creator,omniacreator/qtcreator,martyone/sailfish-qtcreator,ostash/qt-creator-i18n-uk,AltarBeastiful/qt-creator,maui-packages/qt-creator,danimo/qt-creator,duythanhphan/qt-creator,duythanhphan/qt-creator,syntheticpp/qt-creator,malikcjm/qtcreator,hdweiss/qt-creator-visualizer,kuba1/qtcreator,darksylinc/qt-creator,KDAB/KDAB-Creator,richardmg/qtcreator,farseerri/git_code,jonnor/qt-creator,ostash/qt-creator-i18n-uk,AltarBeastiful/qt-creator,xianian/qt-creator,martyone/sailfish-qtcreator,danimo/qt-creator,danimo/qt-creator,KDE/android-qt-creator,syntheticpp/qt-creator,darksylinc/qt-creator,duythanhphan/qt-creator,jonnor/qt-creator,colede/qtcreator,richardmg/qtcreator,colede/qtcreator,bakaiadam/collaborative_qt_creator,omniacreator/qtcreator,darksylinc/qt-creator,malikcjm/qtcreator,KDAB/KDAB-Creator,farseerri/git_code,danimo/qt-creator,omniacreator/qtcreator,jonnor/qt-creator,colede/qtcreator,richardmg/qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,KDAB/KDAB-Creator,amyvmiwei/qt-creator,maui-packages/qt-creator,amyvmiwei/qt-creator,kuba1/qtcreator,Distrotech/qtcreator,maui-packages/qt-creator,jonnor/qt-creator,colede/qtcreator,AltarBeastiful/qt-creator,duythanhphan/qt-creator,AltarBeastiful/qt-creator,darksylinc/qt-creator,bakaiadam/collaborative_qt_creator,richardmg/qtcreator,duythanhphan/qt-creator,martyone/sailfish-qtcreator,ostash/qt-creator-i18n-uk