X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fwidgets%2Fdecodermenu.cpp;h=5cf99e5212690ee18e18b2fe08195d94db7d7041;hb=HEAD;hp=505a1f67e9e4179c756f2ae33f148cf793686738;hpb=15784350767c05f3afb2f9af0c4b212a89493e30;p=pulseview.git diff --git a/pv/widgets/decodermenu.cpp b/pv/widgets/decodermenu.cpp index 505a1f67..5cf99e52 100644 --- a/pv/widgets/decodermenu.cpp +++ b/pv/widgets/decodermenu.cpp @@ -51,13 +51,17 @@ DecoderMenu::DecoderMenu(QWidget *parent, const char* input, bool first_level_de } QAction *const action = addAction(QString::fromUtf8(d->name)); - action->setData(qVariantFromValue(l->data)); + action->setData(QVariant::fromValue(l->data)); mapper_.setMapping(action, action); connect(action, SIGNAL(triggered()), &mapper_, SLOT(map())); } g_slist_free(li); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + connect(&mapper_, SIGNAL(mappedObject(QObject*)), this, SLOT(on_action(QObject*))); +#else connect(&mapper_, SIGNAL(mapped(QObject*)), this, SLOT(on_action(QObject*))); +#endif } int DecoderMenu::decoder_name_cmp(const void *a, const void *b)