From d8ac4b40b5acb5582b1491f48f3d3c2cfc044666 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 3 Mar 2019 19:31:26 +0100 Subject: Examples: replace deprecated QComboBox functions Replace the deprecated currentIndexChanged(QString) and activated(QString) with the new currentTextChanged() and textActivated() functions Change-Id: I8616354fa06cc63dce6f5cfef0902f4b55981043 Reviewed-by: Friedemann Kleint --- examples/widgets/richtext/textedit/textedit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/widgets/richtext') diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp index 00ea0325dc..3ad9f48b67 100644 --- a/examples/widgets/richtext/textedit/textedit.cpp +++ b/examples/widgets/richtext/textedit/textedit.cpp @@ -369,7 +369,7 @@ void TextEdit::setupTextActions() comboFont = new QFontComboBox(tb); tb->addWidget(comboFont); - connect(comboFont, QOverload::of(&QComboBox::activated), this, &TextEdit::textFamily); + connect(comboFont, &QComboBox::textActivated, this, &TextEdit::textFamily); comboSize = new QComboBox(tb); comboSize->setObjectName("comboSize"); @@ -381,7 +381,7 @@ void TextEdit::setupTextActions() comboSize->addItem(QString::number(size)); comboSize->setCurrentIndex(standardSizes.indexOf(QApplication::font().pointSize())); - connect(comboSize, QOverload::of(&QComboBox::activated), this, &TextEdit::textSize); + connect(comboSize, &QComboBox::textActivated, this, &TextEdit::textSize); } bool TextEdit::load(const QString &f) -- cgit v1.2.3