forked from qt-creator/qt-creator
Remove uses QOverload<const QString &>::of(&QComboBox::currentIndexChanged)
Gone in Qt 6. Task-number: QTCREATORBUG-24098 Change-Id: I7ab2dcb9b7c71a3b0d07f05162ef2752e02dc881 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -39,7 +39,7 @@ ColorSettings::ColorSettings(QWidget *parent)
|
||||
m_ui.setupUi(this);
|
||||
|
||||
m_ui.m_colorThemeView->setEnabled(false);
|
||||
connect(m_ui.m_comboColorThemes, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_ui.m_comboColorThemes, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &ColorSettings::selectTheme);
|
||||
connect(m_ui.m_colorThemeView, &ColorThemeView::colorChanged, this, &ColorSettings::updateCurrentColors);
|
||||
connect(m_ui.m_addColorTheme, &QToolButton::clicked, this, &ColorSettings::createTheme);
|
||||
@@ -68,8 +68,9 @@ void ColorSettings::updateCurrentColors()
|
||||
m_colorThemes[m_ui.m_comboColorThemes->currentText()] = m_ui.m_colorThemeView->colorData();
|
||||
}
|
||||
|
||||
void ColorSettings::selectTheme(const QString &name)
|
||||
void ColorSettings::selectTheme(int index)
|
||||
{
|
||||
const QString name = m_ui.m_comboColorThemes->itemText(index);
|
||||
m_ui.m_colorThemeView->reset();
|
||||
if (!name.isEmpty() && m_colorThemes.contains(name)) {
|
||||
m_ui.m_colorThemeView->setEnabled(true);
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <QFrame>
|
||||
|
||||
namespace ScxmlEditor {
|
||||
|
||||
namespace Common {
|
||||
|
||||
class ColorSettings : public QFrame
|
||||
@@ -41,11 +40,12 @@ public:
|
||||
|
||||
void save();
|
||||
void updateCurrentColors();
|
||||
void selectTheme(const QString &name);
|
||||
void createTheme();
|
||||
void removeTheme();
|
||||
|
||||
private:
|
||||
void selectTheme(int);
|
||||
|
||||
QVariantMap m_colorThemes;
|
||||
Ui::ColorSettings m_ui;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user