]> sigrok.org Git - pulseview.git/blobdiff - pv/widgets/decodermenu.cpp
Session: Fix issue #67 by improving error handling
[pulseview.git] / pv / widgets / decodermenu.cpp
index 505a1f67e9e4179c756f2ae33f148cf793686738..5cf99e5212690ee18e18b2fe08195d94db7d7041 100644 (file)
@@ -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)