mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ffecc00f42
commit
d58c962bdb
1 changed files with 4 additions and 0 deletions
|
@ -113,7 +113,11 @@ QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewI
|
||||||
comboDelegate->view()->installEventFilter(const_cast<QObject *>(qobject_cast<const QObject *>(this)));
|
comboDelegate->view()->installEventFilter(const_cast<QObject *>(qobject_cast<const QObject *>(this)));
|
||||||
QAbstractItemView *comboPopup = comboDelegate->lineEdit()->completer()->popup();
|
QAbstractItemView *comboPopup = comboDelegate->lineEdit()->completer()->popup();
|
||||||
comboPopup->setMouseTracking(true);
|
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);
|
connect(comboDelegate, QOverload<const QString &>::of(&QComboBox::highlighted), this, &ComboBoxDelegate::testActivationString);
|
||||||
|
#endif
|
||||||
connect(comboDelegate, QOverload<int>::of(&QComboBox::activated), this, &ComboBoxDelegate::fakeActivation);
|
connect(comboDelegate, QOverload<int>::of(&QComboBox::activated), this, &ComboBoxDelegate::fakeActivation);
|
||||||
connect(comboPopup, &QAbstractItemView::entered, this, &ComboBoxDelegate::testActivationIndex);
|
connect(comboPopup, &QAbstractItemView::entered, this, &ComboBoxDelegate::testActivationIndex);
|
||||||
connect(comboPopup, &QAbstractItemView::activated, this, &ComboBoxDelegate::fakeActivation);
|
connect(comboPopup, &QAbstractItemView::activated, this, &ComboBoxDelegate::fakeActivation);
|
||||||
|
|
Loading…
Add table
Reference in a new issue