support Linux build with qt6-base-dev & qt6-multimedia-dev

There was an error:
    ../win/Qt/qt_main.cpp:767:37: error: attempt to use a deleted function
                        action->setData(actchar);
                                        ^
    /usr/include/x86_64-linux-gnu/qt6/QtCore/qvariant.h:199:5: note: 'QVariant<char *, false>' has been explicitly marked deleted here
        QVariant(T) = delete;
        ^
    1 error generated.

I'm hoping the fix applied is the correct one for the error.
This commit is contained in:
nhmall
2023-08-08 12:41:44 -04:00
parent 491cc9933f
commit b7c92b498d
3 changed files with 83 additions and 65 deletions

View File

@@ -764,7 +764,11 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
if (actchar[0]) {
QString name = menuitem;
QAction *action = item[i].menu->addAction(name);
action->setData(actchar);
#if QT_VERSION < 0x060000
action->setData(actchar);
#else
action->setData(QString(actchar));
#endif
}
} else {
item[i].menu->addSeparator();