Make sure the BackwardScanner has tokenized before asking for a string.
Make sure the BackwardScanner has tokenized before asking for a string.

The problem was that for

Foo::Foo
(|)

when the user triggers completion at |, startOfLine() returns a token
that's not on the current line and not yet tokenized by that instance
of the BackwardScanner.

As a fix I explicitly ask the instance to tokenize up to the given
index.

Task-number: QTCREATORBUG-673
Reviewed-by: Roberto Raggi

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