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:
@@ -54,7 +54,7 @@ using namespace Core;
|
||||
using namespace Core::Internal;
|
||||
|
||||
CommandMappings::CommandMappings(QObject *parent)
|
||||
: IOptionsPage(parent)
|
||||
: IOptionsPage(parent), m_page(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -140,7 +140,10 @@ void CommandMappings::setTargetHeader(const QString &s)
|
||||
|
||||
void CommandMappings::finish()
|
||||
{
|
||||
if (!m_page) // page was never shown
|
||||
return;
|
||||
delete m_page;
|
||||
m_page = 0;
|
||||
}
|
||||
|
||||
void CommandMappings::commandChanged(QTreeWidgetItem *current)
|
||||
|
||||
Reference in New Issue
Block a user