forked from qt-creator/qt-creator
Delay widget creation of options pages till their category is shown
Also add the alternative way: IOptionsPageProvider, which states a category, and is asked for a list of options pages for that category when it is shown. Task-number: QTCREATORBUG-3131
This commit is contained in:
@@ -186,7 +186,6 @@ FormEditorW::FormEditorW() :
|
||||
|
||||
foreach (QDesignerOptionsPageInterface *designerPage, m_formeditor->optionsPages()) {
|
||||
SettingsPage *settingsPage = new SettingsPage(designerPage);
|
||||
ExtensionSystem::PluginManager::instance()->addObject(settingsPage);
|
||||
m_settingsPages.append(settingsPage);
|
||||
}
|
||||
|
||||
@@ -213,10 +212,8 @@ FormEditorW::~FormEditorW()
|
||||
}
|
||||
|
||||
delete m_formeditor;
|
||||
foreach (SettingsPage *settingsPage, m_settingsPages) {
|
||||
ExtensionSystem::PluginManager::instance()->removeObject(settingsPage);
|
||||
delete settingsPage;
|
||||
}
|
||||
qDeleteAll(m_settingsPages);
|
||||
m_settingsPages.clear();
|
||||
delete m_integration;
|
||||
|
||||
m_self = 0;
|
||||
@@ -389,6 +386,11 @@ void FormEditorW::initDesignerSubWindows()
|
||||
m_designerSubWindows[ActionEditorSubWindow] = ae;
|
||||
}
|
||||
|
||||
QList<Core::IOptionsPage *> FormEditorW::optionsPages() const
|
||||
{
|
||||
return m_settingsPages;
|
||||
}
|
||||
|
||||
void FormEditorW::ensureInitStage(InitializationStage s)
|
||||
{
|
||||
if (Designer::Constants::Internal::debug)
|
||||
|
||||
Reference in New Issue
Block a user