forked from qt-creator/qt-creator
Mini project selector: Fix position of new projects
Change-Id: I01ed1ff0a07ef25a485f63e3ddbf7bb9afe26043 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -237,12 +237,14 @@ void ProjectListWidget::addProject(Project *project)
|
||||
m_ignoreIndexChange = true;
|
||||
|
||||
QString sortName = fullName(project);
|
||||
int pos = 0;
|
||||
int pos = count();
|
||||
for (int i=0; i < count(); ++i) {
|
||||
Project *p = item(i)->data(Qt::UserRole).value<Project*>();
|
||||
QString itemSortName = fullName(p);
|
||||
if (itemSortName > sortName)
|
||||
if (itemSortName > sortName) {
|
||||
pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool useFullName = false;
|
||||
|
||||
Reference in New Issue
Block a user