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