QmlDesigner: introduce DisableItemLibraryUpdateTimer

This is a temporary change to enable better tracing of a bug
which we have for a long time.
Be aware if this is set it can be slow down importing or open
bigger projects/files in the QtQuick DesignMode.

add this under the category [QML] to your settings file:
Designer\DisableItemLibraryUpdateTimer=true

Change-Id: I0919fe18e358e68905eb4a7f4849c6841f26a10d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Tim Jenssen
2020-03-25 19:28:24 +01:00
parent ca82019cf0
commit 91d6214b58
2 changed files with 6 additions and 1 deletions

View File

@@ -293,7 +293,11 @@ void ItemLibraryWidget::setSearchFilter(const QString &searchFilter)
void ItemLibraryWidget::delayedUpdateModel()
{
m_compressionTimer.start();
static bool disableTimer = DesignerSettings::getValue(DesignerSettingsKey::DISABLE_ITEM_LIBRARY_UPDATE_TIMER).toBool();
if (disableTimer)
updateModel();
else
m_compressionTimer.start();
}
void ItemLibraryWidget::setModel(Model *model)

View File

@@ -67,6 +67,7 @@ const char STANDALONE_MODE[] = "StandAloneMode";
const char ENABLE_TIMELINEVIEW[] = "EnableTimelineView";
const char SIMPLE_COLOR_PALETTE_CONTENT[] = "SimpleColorPaletteContent";
const char ALWAYS_DESIGN_MODE[] = "AlwaysDesignMode";
const char DISABLE_ITEM_LIBRARY_UPDATE_TIMER[] = "DisableItemLibraryUpdateTimer";
}
class DesignerSettings : public QHash<QByteArray, QVariant>