ProjectNodes: Do not try to sort directories not yet mapped
ProjectNodes: Do not try to sort directories not yet mapped

Do not try to sort directories that were not yet mapped into the
FlatModel. This avoids an assert where QModelIndex is out of range
(-1) because the data for that directory is not yet available in
the model.

Do not bother to map the data, just forget the request to sort in
this case as the data will be sorted when it gets mapped anyway.

Task-number: QBS-521
Change-Id: I19de7513405e6a0b84c988a2a86f763e3135811d
Reviewed-by: Daniel Teske <d8a411aec9a206efedb4d45b75fe8d13f1e2b628@digia.com>

colede/qtcreator,Distrotech/qtcreator,amyvmiwei/qt-creator,farseerri/git_code,xianian/qt-creator,Distrotech/qtcreator,xianian/qt-creator,maui-packages/qt-creator,martyone/sailfish-qtcreator,farseerri/git_code,danimo/qt-creator,omniacreator/qtcreator,xianian/qt-creator,danimo/qt-creator,kuba1/qtcreator,maui-packages/qt-creator,kuba1/qtcreator,farseerri/git_code,omniacreator/qtcreator,kuba1/qtcreator,farseerri/git_code,danimo/qt-creator,martyone/sailfish-qtcreator,darksylinc/qt-creator,martyone/sailfish-qtcreator,danimo/qt-creator,kuba1/qtcreator,kuba1/qtcreator,AltarBeastiful/qt-creator,kuba1/qtcreator,colede/qtcreator,omniacreator/qtcreator,AltarBeastiful/qt-creator,maui-packages/qt-creator,Distrotech/qtcreator,amyvmiwei/qt-creator,colede/qtcreator,martyone/sailfish-qtcreator,colede/qtcreator,AltarBeastiful/qt-creator,colede/qtcreator,amyvmiwei/qt-creator,colede/qtcreator,danimo/qt-creator,xianian/qt-creator,amyvmiwei/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,omniacreator/qtcreator,omniacreator/qtcreator,danimo/qt-creator,AltarBeastiful/qt-creator,omniacreator/qtcreator,maui-packages/qt-creator,amyvmiwei/qt-creator,xianian/qt-creator,xianian/qt-creator,Distrotech/qtcreator,AltarBeastiful/qt-creator,farseerri/git_code,AltarBeastiful/qt-creator,amyvmiwei/qt-creator,darksylinc/qt-creator,farseerri/git_code,maui-packages/qt-creator,darksylinc/qt-creator,kuba1/qtcreator,kuba1/qtcreator,darksylinc/qt-creator,Distrotech/qtcreator,farseerri/git_code,amyvmiwei/qt-creator,maui-packages/qt-creator,xianian/qt-creator,amyvmiwei/qt-creator,farseerri/git_code,maui-packages/qt-creator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,omniacreator/qtcreator,Distrotech/qtcreator,xianian/qt-creator,darksylinc/qt-creator,danimo/qt-creator,darksylinc/qt-creator,AltarBeastiful/qt-creator,martyone/sailfish-qtcreator,danimo/qt-creator,kuba1/qtcreator,danimo/qt-creator,darksylinc/qt-creator,Distrotech/qtcreator,darksylinc/qt-creator,AltarBeastiful/qt-creator,colede/qtcreator