]> granicus.if.org Git - nethack/commitdiff
PR913 - Another Qt 6 signal: mapped -> mappedString
authorRay Chason <ray.chason@protonmail.com>
Fri, 28 Oct 2022 02:59:30 +0000 (22:59 -0400)
committernhmall <nhmall@nethack.org>
Fri, 28 Oct 2022 02:59:30 +0000 (22:59 -0400)
win/Qt/qt_main.cpp

index 967ec7e01cc3f5b4250520e42038cdde62fd08c2..f61f70d1e46b65ff06b22168698c44b9f231d022 100644 (file)
@@ -829,8 +829,13 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
     // order changed: was Again, Get, Kick, Throw, Fire, Drop, Eat, Rest
     //                now Again, PickUp, Drop, Kick, Throw, Fire, Eat, Rest
     QSignalMapper* sm = new QSignalMapper(this);
+#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
+    connect(sm, SIGNAL(mappedString(const QString&)),
+            this, SLOT(doKeys(const QString&)));
+#else
     connect(sm, SIGNAL(mapped(const QString&)),
             this, SLOT(doKeys(const QString&)));
+#endif
     AddToolButton(toolbar, sm, "Again", do_repeat, QPixmap(again_xpm));
     // this used to be called "Get" which is confusing to experienced players
     AddToolButton(toolbar, sm, "Pick up", dopickup, QPixmap(pickup_xpm));