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:
@@ -103,7 +103,7 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) :
|
||||
connect(ui->bottomAlignmentButton, &QToolButton::toggled,
|
||||
this, &ContextPaneTextWidget::onVerticalAlignmentChanged);
|
||||
|
||||
connect(ui->styleComboBox, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
connect(ui->styleComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &ContextPaneTextWidget::onStyleComboBoxChanged);
|
||||
}
|
||||
|
||||
@@ -386,8 +386,9 @@ void ContextPaneTextWidget::onHorizontalAlignmentChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void ContextPaneTextWidget::onStyleComboBoxChanged(const QString &style)
|
||||
void ContextPaneTextWidget::onStyleComboBoxChanged(int index)
|
||||
{
|
||||
const QString style = ui->styleComboBox->itemText(index);
|
||||
if (style == QLatin1String("Normal"))
|
||||
emit removeProperty(QLatin1String("style"));
|
||||
else
|
||||
|
||||
@@ -63,8 +63,7 @@ public:
|
||||
void onCurrentFontChanged(const QFont &font);
|
||||
void onHorizontalAlignmentChanged();
|
||||
void onVerticalAlignmentChanged();
|
||||
void onStyleComboBoxChanged(const QString &style);
|
||||
|
||||
void onStyleComboBoxChanged(int index);
|
||||
|
||||
signals:
|
||||
void propertyChanged(const QString &, const QVariant &);
|
||||
|
||||
@@ -228,8 +228,7 @@ NewDialog::NewDialog(QWidget *parent) :
|
||||
connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &NewDialog::accept);
|
||||
connect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &NewDialog::reject);
|
||||
|
||||
connect(m_ui->comboBox,
|
||||
QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_ui->comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &NewDialog::setSelectedPlatform);
|
||||
}
|
||||
|
||||
@@ -519,7 +518,7 @@ void NewDialog::updateOkButton()
|
||||
m_okButton->setEnabled(currentWizardFactory() != nullptr);
|
||||
}
|
||||
|
||||
void NewDialog::setSelectedPlatform(const QString & /*platform*/)
|
||||
void NewDialog::setSelectedPlatform(int /*platform*/)
|
||||
{
|
||||
//The static cast allows us to keep PlatformFilterProxyModel anonymous
|
||||
static_cast<PlatformFilterProxyModel*>(m_filterProxyModel)->setPlatform(selectedPlatform());
|
||||
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
void accept() override;
|
||||
void reject() override;
|
||||
void updateOkButton();
|
||||
void setSelectedPlatform(const QString &platform);
|
||||
void setSelectedPlatform(int index);
|
||||
|
||||
Core::IWizardFactory *currentWizardFactory() const;
|
||||
void addItem(QStandardItem *topLevelCategoryItem, IWizardFactory *factory);
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -139,8 +139,7 @@ public:
|
||||
|
||||
connect(m_ui.fontComboBox, &QFontComboBox::currentFontChanged,
|
||||
this, &FontSettingsPageWidget::fontSelected);
|
||||
connect(m_ui.sizeComboBox,
|
||||
QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_ui.sizeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &FontSettingsPageWidget::fontSizeSelected);
|
||||
connect(m_ui.zoomSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||
this, &FontSettingsPageWidget::fontZoomChanged);
|
||||
@@ -165,7 +164,7 @@ public:
|
||||
|
||||
void saveSettings();
|
||||
void fontSelected(const QFont &font);
|
||||
void fontSizeSelected(const QString &sizeString);
|
||||
void fontSizeSelected(int index);
|
||||
void fontZoomChanged();
|
||||
void antialiasChanged();
|
||||
void colorSchemeSelected(int index);
|
||||
@@ -400,8 +399,9 @@ QList<int> FontSettingsPageWidget::pointSizesForSelectedFont() const
|
||||
return sizeLst;
|
||||
}
|
||||
|
||||
void FontSettingsPageWidget::fontSizeSelected(const QString &sizeString)
|
||||
void FontSettingsPageWidget::fontSizeSelected(int index)
|
||||
{
|
||||
const QString sizeString = m_ui.sizeComboBox->itemText(index);
|
||||
bool ok = true;
|
||||
const int size = sizeString.toInt(&ok);
|
||||
if (ok) {
|
||||
|
||||
@@ -95,8 +95,7 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
|
||||
&QStandardItemModel::itemChanged,
|
||||
this, &BookmarkDialog::itemChanged);
|
||||
|
||||
connect(ui.bookmarkFolders,
|
||||
QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
connect(ui.bookmarkFolders, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &BookmarkDialog::selectBookmarkFolder);
|
||||
|
||||
connect(ui.treeView, &TreeView::customContextMenuRequested,
|
||||
@@ -188,11 +187,9 @@ void BookmarkDialog::textChanged(const QString& string)
|
||||
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!string.isEmpty());
|
||||
}
|
||||
|
||||
void BookmarkDialog::selectBookmarkFolder(const QString &folderName)
|
||||
void BookmarkDialog::selectBookmarkFolder(int index)
|
||||
{
|
||||
if (folderName.isEmpty())
|
||||
return;
|
||||
|
||||
const QString folderName = ui.bookmarkFolders->itemText(index);
|
||||
if (folderName == tr("Bookmarks")) {
|
||||
ui.treeView->clearSelection();
|
||||
return;
|
||||
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
void toolButtonClicked();
|
||||
void itemChanged(QStandardItem *item);
|
||||
void textChanged(const QString& string);
|
||||
void selectBookmarkFolder(const QString &folderName);
|
||||
void selectBookmarkFolder(int index);
|
||||
void customContextMenuRequested(const QPoint &point);
|
||||
void currentChanged(const QModelIndex& current);
|
||||
bool eventFilter(QObject *object, QEvent *e);
|
||||
|
||||
Reference in New Issue
Block a user