diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-10-26 08:32:09 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-26 19:27:03 -0700 |
commit | d58c962bdb62d8d51407e8aa2d679695530b543c (patch) | |
tree | 6f2afa7c2e12eb15b04b656145eb832138df2df7 /desktop-widgets | |
parent | ffecc00f42f2e02f76cf616d03d179e8741f4fba (diff) | |
download | subsurface-d58c962bdb62d8d51407e8aa2d679695530b543c.tar.gz |
cleanup: replace deprecated signal
Again, the replacement was only implemented in Qt 5.14, so more conditional
code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/modeldelegates.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop-widgets/modeldelegates.cpp b/desktop-widgets/modeldelegates.cpp index 0267cafcf..e2774240f 100644 --- a/desktop-widgets/modeldelegates.cpp +++ b/desktop-widgets/modeldelegates.cpp @@ -113,7 +113,11 @@ QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewI comboDelegate->view()->installEventFilter(const_cast<QObject *>(qobject_cast<const QObject *>(this))); QAbstractItemView *comboPopup = comboDelegate->lineEdit()->completer()->popup(); comboPopup->setMouseTracking(true); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + connect(comboDelegate, &QComboBox::textHighlighted, this, &ComboBoxDelegate::testActivationString); +#else connect(comboDelegate, QOverload<const QString &>::of(&QComboBox::highlighted), this, &ComboBoxDelegate::testActivationString); +#endif connect(comboDelegate, QOverload<int>::of(&QComboBox::activated), this, &ComboBoxDelegate::fakeActivation); connect(comboPopup, &QAbstractItemView::entered, this, &ComboBoxDelegate::testActivationIndex); connect(comboPopup, &QAbstractItemView::activated, this, &ComboBoxDelegate::fakeActivation); |