forked from qt-creator/qt-creator
ProjectExplorer: Consolidate creation of KitAspect's "Manage..."
Change-Id: I001a21f41bcd5ff0614bdf98893b56137c06546f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -120,10 +120,10 @@ private:
|
|||||||
class CMakeKitAspectImpl final : public KitAspect
|
class CMakeKitAspectImpl final : public KitAspect
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMakeKitAspectImpl(Kit *kit, const KitAspectFactory *factory) : KitAspect(kit, factory),
|
CMakeKitAspectImpl(Kit *kit, const KitAspectFactory *factory)
|
||||||
m_comboBox(createSubWidget<QComboBox>()),
|
: KitAspect(kit, factory), m_comboBox(createSubWidget<QComboBox>())
|
||||||
m_manageButton(createManageButton(Constants::Settings::TOOLS_ID))
|
|
||||||
{
|
{
|
||||||
|
setManagingPage(Constants::Settings::TOOLS_ID);
|
||||||
m_comboBox->setSizePolicy(QSizePolicy::Ignored, m_comboBox->sizePolicy().verticalPolicy());
|
m_comboBox->setSizePolicy(QSizePolicy::Ignored, m_comboBox->sizePolicy().verticalPolicy());
|
||||||
m_comboBox->setEnabled(false);
|
m_comboBox->setEnabled(false);
|
||||||
m_comboBox->setToolTip(factory->description());
|
m_comboBox->setToolTip(factory->description());
|
||||||
@@ -142,7 +142,6 @@ public:
|
|||||||
~CMakeKitAspectImpl() override
|
~CMakeKitAspectImpl() override
|
||||||
{
|
{
|
||||||
delete m_comboBox;
|
delete m_comboBox;
|
||||||
delete m_manageButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -153,7 +152,6 @@ private:
|
|||||||
{
|
{
|
||||||
addMutableAction(m_comboBox);
|
addMutableAction(m_comboBox);
|
||||||
builder.addItem(m_comboBox);
|
builder.addItem(m_comboBox);
|
||||||
builder.addItem(m_manageButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void refresh() override
|
void refresh() override
|
||||||
@@ -213,7 +211,6 @@ private:
|
|||||||
|
|
||||||
Guard m_ignoreChanges;
|
Guard m_ignoreChanges;
|
||||||
QComboBox *m_comboBox;
|
QComboBox *m_comboBox;
|
||||||
QWidget *m_manageButton;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CMakeKitAspectFactory::CMakeKitAspectFactory()
|
CMakeKitAspectFactory::CMakeKitAspectFactory()
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ public:
|
|||||||
DebuggerKitAspectImpl(Kit *workingCopy, const KitAspectFactory *factory)
|
DebuggerKitAspectImpl(Kit *workingCopy, const KitAspectFactory *factory)
|
||||||
: KitAspect(workingCopy, factory)
|
: KitAspect(workingCopy, factory)
|
||||||
{
|
{
|
||||||
|
setManagingPage(ProjectExplorer::Constants::DEBUGGER_SETTINGS_PAGE_ID);
|
||||||
|
|
||||||
m_comboBox = createSubWidget<QComboBox>();
|
m_comboBox = createSubWidget<QComboBox>();
|
||||||
m_comboBox->setSizePolicy(QSizePolicy::Ignored, m_comboBox->sizePolicy().verticalPolicy());
|
m_comboBox->setSizePolicy(QSizePolicy::Ignored, m_comboBox->sizePolicy().verticalPolicy());
|
||||||
m_comboBox->setEnabled(true);
|
m_comboBox->setEnabled(true);
|
||||||
@@ -56,13 +58,11 @@ public:
|
|||||||
m_kit->setValue(DebuggerKitAspect::id(), id);
|
m_kit->setValue(DebuggerKitAspect::id(), id);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_manageButton = createManageButton(ProjectExplorer::Constants::DEBUGGER_SETTINGS_PAGE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~DebuggerKitAspectImpl() override
|
~DebuggerKitAspectImpl() override
|
||||||
{
|
{
|
||||||
delete m_comboBox;
|
delete m_comboBox;
|
||||||
delete m_manageButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -70,12 +70,11 @@ private:
|
|||||||
{
|
{
|
||||||
addMutableAction(m_comboBox);
|
addMutableAction(m_comboBox);
|
||||||
parent.addItem(m_comboBox);
|
parent.addItem(m_comboBox);
|
||||||
parent.addItem(m_manageButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeReadOnly() override
|
void makeReadOnly() override
|
||||||
{
|
{
|
||||||
m_manageButton->setEnabled(false);
|
KitAspect::makeReadOnly();
|
||||||
m_comboBox->setEnabled(false);
|
m_comboBox->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +123,6 @@ private:
|
|||||||
|
|
||||||
Guard m_ignoreChanges;
|
Guard m_ignoreChanges;
|
||||||
QComboBox *m_comboBox;
|
QComboBox *m_comboBox;
|
||||||
QWidget *m_manageButton;
|
|
||||||
};
|
};
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ ToolKitAspectWidget::ToolKitAspectWidget(ProjectExplorer::Kit *kit,
|
|||||||
ToolType type)
|
ToolType type)
|
||||||
: ProjectExplorer::KitAspect(kit, factory)
|
: ProjectExplorer::KitAspect(kit, factory)
|
||||||
, m_toolsComboBox(createSubWidget<QComboBox>())
|
, m_toolsComboBox(createSubWidget<QComboBox>())
|
||||||
, m_manageButton(createManageButton(Constants::SettingsPage::TOOLS_ID))
|
|
||||||
, m_type{type}
|
, m_type{type}
|
||||||
{
|
{
|
||||||
|
setManagingPage(Constants::SettingsPage::TOOLS_ID);
|
||||||
|
|
||||||
m_toolsComboBox->setSizePolicy(QSizePolicy::Ignored,
|
m_toolsComboBox->setSizePolicy(QSizePolicy::Ignored,
|
||||||
m_toolsComboBox->sizePolicy().verticalPolicy());
|
m_toolsComboBox->sizePolicy().verticalPolicy());
|
||||||
m_toolsComboBox->setEnabled(false);
|
m_toolsComboBox->setEnabled(false);
|
||||||
@@ -37,7 +38,6 @@ ToolKitAspectWidget::ToolKitAspectWidget(ProjectExplorer::Kit *kit,
|
|||||||
ToolKitAspectWidget::~ToolKitAspectWidget()
|
ToolKitAspectWidget::~ToolKitAspectWidget()
|
||||||
{
|
{
|
||||||
delete m_toolsComboBox;
|
delete m_toolsComboBox;
|
||||||
delete m_manageButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolKitAspectWidget::addTool(const MesonTools::Tool_t &tool)
|
void ToolKitAspectWidget::addTool(const MesonTools::Tool_t &tool)
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ private:
|
|||||||
{
|
{
|
||||||
addMutableAction(m_toolsComboBox);
|
addMutableAction(m_toolsComboBox);
|
||||||
parent.addItem(m_toolsComboBox);
|
parent.addItem(m_toolsComboBox);
|
||||||
parent.addItem(m_manageButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void refresh() override
|
void refresh() override
|
||||||
@@ -58,7 +57,6 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
QComboBox *m_toolsComboBox;
|
QComboBox *m_toolsComboBox;
|
||||||
QWidget *m_manageButton;
|
|
||||||
ToolType m_type;
|
ToolType m_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -227,13 +227,12 @@ public:
|
|||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
|
|
||||||
m_manageButton = createManageButton(Constants::TOOLCHAIN_SETTINGS_PAGE_ID);
|
setManagingPage(Constants::TOOLCHAIN_SETTINGS_PAGE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
~ToolChainKitAspectImpl() override
|
~ToolChainKitAspectImpl() override
|
||||||
{
|
{
|
||||||
delete m_mainWidget;
|
delete m_mainWidget;
|
||||||
delete m_manageButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -241,7 +240,6 @@ private:
|
|||||||
{
|
{
|
||||||
addMutableAction(m_mainWidget);
|
addMutableAction(m_mainWidget);
|
||||||
builder.addItem(m_mainWidget);
|
builder.addItem(m_mainWidget);
|
||||||
builder.addItem(m_manageButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void refresh() override
|
void refresh() override
|
||||||
@@ -313,7 +311,6 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
QWidget *m_mainWidget = nullptr;
|
QWidget *m_mainWidget = nullptr;
|
||||||
QWidget *m_manageButton = nullptr;
|
|
||||||
QHash<Id, QComboBox *> m_languageComboboxMap;
|
QHash<Id, QComboBox *> m_languageComboboxMap;
|
||||||
Guard m_ignoreChanges;
|
Guard m_ignoreChanges;
|
||||||
bool m_isReadOnly = false;
|
bool m_isReadOnly = false;
|
||||||
@@ -869,11 +866,11 @@ public:
|
|||||||
m_comboBox(createSubWidget<QComboBox>()),
|
m_comboBox(createSubWidget<QComboBox>()),
|
||||||
m_model(new DeviceManagerModel(DeviceManager::instance()))
|
m_model(new DeviceManagerModel(DeviceManager::instance()))
|
||||||
{
|
{
|
||||||
|
setManagingPage(Constants::DEVICE_SETTINGS_PAGE_ID);
|
||||||
m_comboBox->setSizePolicy(QSizePolicy::Preferred,
|
m_comboBox->setSizePolicy(QSizePolicy::Preferred,
|
||||||
m_comboBox->sizePolicy().verticalPolicy());
|
m_comboBox->sizePolicy().verticalPolicy());
|
||||||
m_comboBox->setModel(m_model);
|
m_comboBox->setModel(m_model);
|
||||||
m_comboBox->setMinimumContentsLength(16); // Don't stretch too much for Kit Page
|
m_comboBox->setMinimumContentsLength(16); // Don't stretch too much for Kit Page
|
||||||
m_manageButton = createManageButton(Constants::DEVICE_SETTINGS_PAGE_ID);
|
|
||||||
refresh();
|
refresh();
|
||||||
m_comboBox->setToolTip(factory->description());
|
m_comboBox->setToolTip(factory->description());
|
||||||
|
|
||||||
@@ -889,7 +886,6 @@ public:
|
|||||||
{
|
{
|
||||||
delete m_comboBox;
|
delete m_comboBox;
|
||||||
delete m_model;
|
delete m_model;
|
||||||
delete m_manageButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -897,7 +893,6 @@ private:
|
|||||||
{
|
{
|
||||||
addMutableAction(m_comboBox);
|
addMutableAction(m_comboBox);
|
||||||
builder.addItem(m_comboBox);
|
builder.addItem(m_comboBox);
|
||||||
builder.addItem(m_manageButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeReadOnly() override { m_comboBox->setEnabled(false); }
|
void makeReadOnly() override { m_comboBox->setEnabled(false); }
|
||||||
@@ -929,7 +924,6 @@ private:
|
|||||||
|
|
||||||
Guard m_ignoreChanges;
|
Guard m_ignoreChanges;
|
||||||
QComboBox *m_comboBox;
|
QComboBox *m_comboBox;
|
||||||
QWidget *m_manageButton;
|
|
||||||
DeviceManagerModel *m_model;
|
DeviceManagerModel *m_model;
|
||||||
Id m_selectedId;
|
Id m_selectedId;
|
||||||
};
|
};
|
||||||
@@ -1153,9 +1147,9 @@ public:
|
|||||||
m_comboBox(createSubWidget<QComboBox>()),
|
m_comboBox(createSubWidget<QComboBox>()),
|
||||||
m_model(new DeviceManagerModel(DeviceManager::instance()))
|
m_model(new DeviceManagerModel(DeviceManager::instance()))
|
||||||
{
|
{
|
||||||
|
setManagingPage(Constants::DEVICE_SETTINGS_PAGE_ID);
|
||||||
m_comboBox->setSizePolicy(QSizePolicy::Ignored, m_comboBox->sizePolicy().verticalPolicy());
|
m_comboBox->setSizePolicy(QSizePolicy::Ignored, m_comboBox->sizePolicy().verticalPolicy());
|
||||||
m_comboBox->setModel(m_model);
|
m_comboBox->setModel(m_model);
|
||||||
m_manageButton = createManageButton(Constants::DEVICE_SETTINGS_PAGE_ID);
|
|
||||||
refresh();
|
refresh();
|
||||||
m_comboBox->setToolTip(factory->description());
|
m_comboBox->setToolTip(factory->description());
|
||||||
|
|
||||||
@@ -1171,7 +1165,6 @@ public:
|
|||||||
{
|
{
|
||||||
delete m_comboBox;
|
delete m_comboBox;
|
||||||
delete m_model;
|
delete m_model;
|
||||||
delete m_manageButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -1179,7 +1172,6 @@ private:
|
|||||||
{
|
{
|
||||||
addMutableAction(m_comboBox);
|
addMutableAction(m_comboBox);
|
||||||
builder.addItem(m_comboBox);
|
builder.addItem(m_comboBox);
|
||||||
builder.addItem(m_manageButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeReadOnly() override { m_comboBox->setEnabled(false); }
|
void makeReadOnly() override { m_comboBox->setEnabled(false); }
|
||||||
@@ -1219,7 +1211,6 @@ private:
|
|||||||
|
|
||||||
Guard m_ignoreChanges;
|
Guard m_ignoreChanges;
|
||||||
QComboBox *m_comboBox;
|
QComboBox *m_comboBox;
|
||||||
QWidget *m_manageButton;
|
|
||||||
DeviceManagerModel *m_model;
|
DeviceManagerModel *m_model;
|
||||||
Id m_selectedId;
|
Id m_selectedId;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -772,6 +772,17 @@ KitAspect::~KitAspect()
|
|||||||
delete m_mutableAction;
|
delete m_mutableAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KitAspect::makeStickySubWidgetsReadOnly()
|
||||||
|
{
|
||||||
|
if (!m_kit->isSticky(m_factory->id()))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_manageButton)
|
||||||
|
m_manageButton->setEnabled(false);
|
||||||
|
|
||||||
|
makeReadOnly();
|
||||||
|
}
|
||||||
|
|
||||||
void KitAspect::addToLayout(Layouting::LayoutItem &parentItem)
|
void KitAspect::addToLayout(Layouting::LayoutItem &parentItem)
|
||||||
{
|
{
|
||||||
auto label = createSubWidget<QLabel>(m_factory->displayName() + ':');
|
auto label = createSubWidget<QLabel>(m_factory->displayName() + ':');
|
||||||
@@ -782,6 +793,13 @@ void KitAspect::addToLayout(Layouting::LayoutItem &parentItem)
|
|||||||
|
|
||||||
parentItem.addItem(label);
|
parentItem.addItem(label);
|
||||||
addToLayoutImpl(parentItem);
|
addToLayoutImpl(parentItem);
|
||||||
|
if (m_managingPageId.isValid()) {
|
||||||
|
m_manageButton = createSubWidget<QPushButton>(msgManage());
|
||||||
|
connect(m_manageButton, &QPushButton::clicked, [this] {
|
||||||
|
Core::ICore::showOptionsDialog(m_managingPageId);
|
||||||
|
});
|
||||||
|
parentItem.addItem(m_manageButton);
|
||||||
|
}
|
||||||
parentItem.addItem(Layouting::br);
|
parentItem.addItem(Layouting::br);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -792,15 +810,6 @@ void KitAspect::addMutableAction(QWidget *child)
|
|||||||
child->setContextMenuPolicy(Qt::ActionsContextMenu);
|
child->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *KitAspect::createManageButton(Id pageId)
|
|
||||||
{
|
|
||||||
auto button = createSubWidget<QPushButton>(msgManage());
|
|
||||||
connect(button, &QPushButton::clicked, this, [pageId] {
|
|
||||||
Core::ICore::showOptionsDialog(pageId);
|
|
||||||
});
|
|
||||||
return button;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString KitAspect::msgManage()
|
QString KitAspect::msgManage()
|
||||||
{
|
{
|
||||||
return Tr::tr("Manage...");
|
return Tr::tr("Manage...");
|
||||||
|
|||||||
@@ -108,7 +108,6 @@ public:
|
|||||||
KitAspect(Kit *kit, const KitAspectFactory *factory);
|
KitAspect(Kit *kit, const KitAspectFactory *factory);
|
||||||
~KitAspect();
|
~KitAspect();
|
||||||
|
|
||||||
virtual void makeReadOnly() = 0;
|
|
||||||
virtual void refresh() = 0;
|
virtual void refresh() = 0;
|
||||||
|
|
||||||
void addToLayout(Layouting::LayoutItem &parentItem) override;
|
void addToLayout(Layouting::LayoutItem &parentItem) override;
|
||||||
@@ -119,14 +118,19 @@ public:
|
|||||||
const KitAspectFactory *factory() const { return m_factory; }
|
const KitAspectFactory *factory() const { return m_factory; }
|
||||||
QAction *mutableAction() const { return m_mutableAction; }
|
QAction *mutableAction() const { return m_mutableAction; }
|
||||||
void addMutableAction(QWidget *child);
|
void addMutableAction(QWidget *child);
|
||||||
QWidget *createManageButton(Utils::Id pageId);
|
void setManagingPage(Utils::Id pageId) { m_managingPageId = pageId; }
|
||||||
|
|
||||||
|
void makeStickySubWidgetsReadOnly();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void makeReadOnly() {}
|
||||||
virtual void addToLayoutImpl(Layouting::LayoutItem &parentItem) = 0;
|
virtual void addToLayoutImpl(Layouting::LayoutItem &parentItem) = 0;
|
||||||
|
|
||||||
Kit *m_kit;
|
Kit *m_kit;
|
||||||
const KitAspectFactory *m_factory;
|
const KitAspectFactory *m_factory;
|
||||||
QAction *m_mutableAction = nullptr;
|
QAction *m_mutableAction = nullptr;
|
||||||
|
Utils::Id m_managingPageId;
|
||||||
|
QPushButton *m_manageButton = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT KitManager final : public QObject
|
class PROJECTEXPLORER_EXPORT KitManager final : public QObject
|
||||||
|
|||||||
@@ -222,10 +222,8 @@ void KitManagerConfigWidget::updateVisibility()
|
|||||||
|
|
||||||
void KitManagerConfigWidget::makeStickySubWidgetsReadOnly()
|
void KitManagerConfigWidget::makeStickySubWidgetsReadOnly()
|
||||||
{
|
{
|
||||||
for (KitAspect *aspect : std::as_const(m_kitAspects)) {
|
for (KitAspect *aspect : std::as_const(m_kitAspects))
|
||||||
if (aspect->kit()->isSticky(aspect->factory()->id()))
|
aspect->makeStickySubWidgetsReadOnly();
|
||||||
aspect->makeReadOnly();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Kit *KitManagerConfigWidget::workingCopy() const
|
Kit *KitManagerConfigWidget::workingCopy() const
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ public:
|
|||||||
PythonKitAspectImpl(Kit *kit, const KitAspectFactory *kitInfo)
|
PythonKitAspectImpl(Kit *kit, const KitAspectFactory *kitInfo)
|
||||||
: KitAspect(kit, kitInfo)
|
: KitAspect(kit, kitInfo)
|
||||||
{
|
{
|
||||||
|
setManagingPage(Constants::C_PYTHONOPTIONS_PAGE_ID);
|
||||||
|
|
||||||
m_comboBox = createSubWidget<QComboBox>();
|
m_comboBox = createSubWidget<QComboBox>();
|
||||||
m_comboBox->setSizePolicy(QSizePolicy::Ignored, m_comboBox->sizePolicy().verticalPolicy());
|
m_comboBox->setSizePolicy(QSizePolicy::Ignored, m_comboBox->sizePolicy().verticalPolicy());
|
||||||
|
|
||||||
@@ -38,13 +40,10 @@ public:
|
|||||||
|
|
||||||
PythonKitAspect::setPython(m_kit, m_comboBox->currentData().toString());
|
PythonKitAspect::setPython(m_kit, m_comboBox->currentData().toString());
|
||||||
});
|
});
|
||||||
|
|
||||||
m_manageButton = createManageButton(Constants::C_PYTHONOPTIONS_PAGE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeReadOnly() override
|
void makeReadOnly() override
|
||||||
{
|
{
|
||||||
m_manageButton->setEnabled(false);
|
|
||||||
m_comboBox->setEnabled(false);
|
m_comboBox->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,13 +70,11 @@ protected:
|
|||||||
{
|
{
|
||||||
addMutableAction(m_comboBox);
|
addMutableAction(m_comboBox);
|
||||||
parent.addItem(m_comboBox);
|
parent.addItem(m_comboBox);
|
||||||
parent.addItem(m_manageButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Guard m_ignoreChanges;
|
Guard m_ignoreChanges;
|
||||||
QComboBox *m_comboBox = nullptr;
|
QComboBox *m_comboBox = nullptr;
|
||||||
QWidget *m_manageButton = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PythonKitAspectFactory : public KitAspectFactory
|
class PythonKitAspectFactory : public KitAspectFactory
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ class QtKitAspectImpl final : public KitAspect
|
|||||||
public:
|
public:
|
||||||
QtKitAspectImpl(Kit *k, const KitAspectFactory *ki) : KitAspect(k, ki)
|
QtKitAspectImpl(Kit *k, const KitAspectFactory *ki) : KitAspect(k, ki)
|
||||||
{
|
{
|
||||||
|
setManagingPage(Constants::QTVERSION_SETTINGS_PAGE_ID);
|
||||||
|
|
||||||
m_combo = createSubWidget<QComboBox>();
|
m_combo = createSubWidget<QComboBox>();
|
||||||
m_combo->setSizePolicy(QSizePolicy::Ignored, m_combo->sizePolicy().verticalPolicy());
|
m_combo->setSizePolicy(QSizePolicy::Ignored, m_combo->sizePolicy().verticalPolicy());
|
||||||
|
|
||||||
m_manageButton = createManageButton(Constants::QTVERSION_SETTINGS_PAGE_ID);
|
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
m_combo->setToolTip(ki->description());
|
m_combo->setToolTip(ki->description());
|
||||||
|
|
||||||
@@ -57,7 +57,6 @@ public:
|
|||||||
~QtKitAspectImpl() final
|
~QtKitAspectImpl() final
|
||||||
{
|
{
|
||||||
delete m_combo;
|
delete m_combo;
|
||||||
delete m_manageButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -67,7 +66,6 @@ private:
|
|||||||
{
|
{
|
||||||
addMutableAction(m_combo);
|
addMutableAction(m_combo);
|
||||||
parent.addItem(m_combo);
|
parent.addItem(m_combo);
|
||||||
parent.addItem(m_manageButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void refresh() final
|
void refresh() final
|
||||||
@@ -126,7 +124,6 @@ private:
|
|||||||
|
|
||||||
Guard m_ignoreChanges;
|
Guard m_ignoreChanges;
|
||||||
QComboBox *m_combo;
|
QComboBox *m_combo;
|
||||||
QWidget *m_manageButton;
|
|
||||||
};
|
};
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user