Commit 32b1deac authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.itemLibrary: improve speed of import changes

removing first and adding afterwards is significanty faster, since
the big component plugin is absent after the remove.
parent 99922ffa
...@@ -364,6 +364,7 @@ void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag) ...@@ -364,6 +364,7 @@ void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag)
return; return;
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
block = true; block = true;
if (flag == QtBasic) { if (flag == QtBasic) {
removeImport(QLatin1String("com.meego")); removeImport(QLatin1String("com.meego"));
...@@ -372,14 +373,14 @@ void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag) ...@@ -372,14 +373,14 @@ void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag)
emit meegoChecked(false); emit meegoChecked(false);
emit symbianChecked(false); emit symbianChecked(false);
} else if (flag == Symbian) { } else if (flag == Symbian) {
addImport(QLatin1String("Qt.labs.Symbian"), QLatin1String("1.0"));
removeImport(QLatin1String("com.meego")); removeImport(QLatin1String("com.meego"));
addImport(QLatin1String("Qt.labs.Symbian"), QLatin1String("1.0"));
emit qtBasicOnlyChecked(false); emit qtBasicOnlyChecked(false);
emit meegoChecked(false); emit meegoChecked(false);
emit symbianChecked(true); emit symbianChecked(true);
} else if (flag == Meego) { } else if (flag == Meego) {
addImport(QLatin1String("com.meego"), QLatin1String("1.0"));
removeImport(QLatin1String("Qt.labs.Symbian")); removeImport(QLatin1String("Qt.labs.Symbian"));
addImport(QLatin1String("com.meego"), QLatin1String("1.0"));
emit qtBasicOnlyChecked(false); emit qtBasicOnlyChecked(false);
emit meegoChecked(true); emit meegoChecked(true);
emit symbianChecked(false); emit symbianChecked(false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment