Manually edited /usr/share/plasma/packages/org.kde.plasma.cuttlefish/contents/ui/Tools.qml, then launched cuttlefish.
Details
Details
Diff Detail
Diff Detail
- Repository
- R118 Plasma SDK
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Indeed. I backported your change to Plasma/5.12 and Plasma/5.14, BTW. Now the only remaining annoyance is the fact that it doesn't quit with Ctrl+q...
Comment Actions
- https://doc.qt.io/qt-5.11/qml-qtquick-shortcut.html
- http://doc.qt.io/qt-5/qkeysequence.html#StandardKey-enum
- http://doc.qt.io/archives/qt-4.8/qkeysequence.html#standard-shortcuts
- QKeySequence::Quit
- http://doc.qt.io/qt-5/qml-qtqml-qt.html#quit-method
So adding this shooooould work... but doesn't.
// cuttlefish.qml import QtQuick 2.5 Item { Shortcut { sequence: StandardKey.Quit onActivated: Qt.quit() } }
We get:
Signal QQmlEngine::quit() emitted, but no receivers connected to handle it.
to quit a C++ application when this method is called, connect the QQmlEngine::quit() signal to the QCoreApplication::quit() slot.
Hmmm.
Skimming Google/StackOverflow, we need to add:
// main.cpp #include <QQmlEngine> QObject::connect(settingsapp->engine(), &QQmlEngine::quit, &app, &QApplication::quit);
I wonder if we should be doing the shortcut in C++ as a QAction... oh well, discuss that in the patch. Patch incoming.