Formatting
This commit is contained in:
@@ -38,12 +38,13 @@
|
||||
GlobalShortcut *GlobalShortcut::initialized_ = nullptr;
|
||||
QHash<QPair<quint32, quint32>, GlobalShortcut*> GlobalShortcut::internal_shortcuts_;
|
||||
|
||||
GlobalShortcut::GlobalShortcut(QObject *parent) : QObject(parent),
|
||||
backend_(nullptr),
|
||||
qt_key_(Qt::Key(0)),
|
||||
qt_mods_(Qt::NoModifier),
|
||||
native_key_(0),
|
||||
native_mods_(0) {
|
||||
GlobalShortcut::GlobalShortcut(QObject *parent)
|
||||
: QObject(parent),
|
||||
backend_(nullptr),
|
||||
qt_key_(Qt::Key(0)),
|
||||
qt_mods_(Qt::NoModifier),
|
||||
native_key_(0),
|
||||
native_mods_(0) {
|
||||
|
||||
Q_ASSERT(!initialized_);
|
||||
|
||||
@@ -52,13 +53,14 @@ GlobalShortcut::GlobalShortcut(QObject *parent) : QObject(parent),
|
||||
|
||||
}
|
||||
|
||||
GlobalShortcut::GlobalShortcut(const QKeySequence &shortcut, GlobalShortcutsBackend *backend, QObject *parent) : QObject(parent),
|
||||
backend_(backend),
|
||||
shortcut_(shortcut),
|
||||
qt_key_(Qt::Key(0)),
|
||||
qt_mods_(Qt::NoModifier),
|
||||
native_key_(0),
|
||||
native_mods_(0) {
|
||||
GlobalShortcut::GlobalShortcut(const QKeySequence &shortcut, GlobalShortcutsBackend *backend, QObject *parent)
|
||||
: QObject(parent),
|
||||
backend_(backend),
|
||||
shortcut_(shortcut),
|
||||
qt_key_(Qt::Key(0)),
|
||||
qt_mods_(Qt::NoModifier),
|
||||
native_key_(0),
|
||||
native_mods_(0) {
|
||||
|
||||
Q_ASSERT(initialized_);
|
||||
setShortcut(shortcut);
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
#include "ui_globalshortcutgrabber.h"
|
||||
|
||||
GlobalShortcutGrabber::GlobalShortcutGrabber(QWidget *parent)
|
||||
: QDialog(parent), ui_(new Ui::GlobalShortcutGrabber), wrapper_(nullptr) {
|
||||
: QDialog(parent),
|
||||
ui_(new Ui::GlobalShortcutGrabber),
|
||||
wrapper_(nullptr) {
|
||||
|
||||
ui_->setupUi(this);
|
||||
|
||||
|
||||
@@ -41,7 +41,10 @@
|
||||
const char *GlobalShortcutsBackendKDE::kKdeService = "org.kde.kglobalaccel";
|
||||
const char *GlobalShortcutsBackendKDE::kKdePath = "/kglobalaccel";
|
||||
|
||||
GlobalShortcutsBackendKDE::GlobalShortcutsBackendKDE(GlobalShortcutsManager *manager, QObject *parent) : GlobalShortcutsBackend(manager, parent), interface_(nullptr), component_(nullptr) {}
|
||||
GlobalShortcutsBackendKDE::GlobalShortcutsBackendKDE(GlobalShortcutsManager *manager, QObject *parent)
|
||||
: GlobalShortcutsBackend(manager, parent),
|
||||
interface_(nullptr),
|
||||
component_(nullptr) {}
|
||||
|
||||
bool GlobalShortcutsBackendKDE::IsAvailable() {
|
||||
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
#include "globalshortcutsbackend.h"
|
||||
#include "globalshortcut.h"
|
||||
|
||||
GlobalShortcutsBackendSystem::GlobalShortcutsBackendSystem(GlobalShortcutsManager *manager, QObject *parent) : GlobalShortcutsBackend(manager, parent), gshortcut_init_(nullptr) {}
|
||||
GlobalShortcutsBackendSystem::GlobalShortcutsBackendSystem(GlobalShortcutsManager *manager, QObject *parent)
|
||||
: GlobalShortcutsBackend(manager, parent),
|
||||
gshortcut_init_(nullptr) {}
|
||||
|
||||
GlobalShortcutsBackendSystem::~GlobalShortcutsBackendSystem() { GlobalShortcutsBackendSystem::DoUnregister(); }
|
||||
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
#include "globalshortcutsmanager.h"
|
||||
|
||||
GlobalShortcutsBackend::GlobalShortcutsBackend(GlobalShortcutsManager *manager, QObject *parent)
|
||||
: QObject(parent), manager_(manager), active_(false) {}
|
||||
: QObject(parent),
|
||||
manager_(manager),
|
||||
active_(false) {}
|
||||
|
||||
bool GlobalShortcutsBackend::Register() {
|
||||
bool ret = DoRegister();
|
||||
|
||||
@@ -60,8 +60,7 @@ GlobalShortcutsManager::GlobalShortcutsManager(QWidget *parent)
|
||||
use_kde_(true),
|
||||
use_gnome_(true),
|
||||
use_mate_(true),
|
||||
use_x11_(false)
|
||||
{
|
||||
use_x11_(false) {
|
||||
|
||||
settings_.beginGroup(GlobalShortcutsSettingsPage::kSettingsGroup);
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ static const QMap<Qt::Key, quint32> keymapper_x11_ = { // clazy:exclude=non-pod
|
||||
{ Qt::Key_cedilla, XK_cedilla },
|
||||
{ Qt::Key_onesuperior, XK_onesuperior },
|
||||
{ Qt::Key_masculine, XK_masculine },
|
||||
{ Qt::Key_guillemotright, XK_guillemotright },
|
||||
{ Qt::Key_guillemotright, XK_guillemotright },
|
||||
{ Qt::Key_onequarter, XK_onequarter },
|
||||
{ Qt::Key_onehalf, XK_onehalf },
|
||||
{ Qt::Key_threequarters, XK_threequarters },
|
||||
@@ -171,7 +171,7 @@ static const QMap<Qt::Key, quint32> keymapper_x11_ = { // clazy:exclude=non-pod
|
||||
{ Qt::Key_Adiaeresis, XK_Adiaeresis },
|
||||
{ Qt::Key_Aring, XK_Aring },
|
||||
{ Qt::Key_AE, XK_AE },
|
||||
{ Qt::Key_Ccedilla, XK_Ccedilla },
|
||||
{ Qt::Key_Ccedilla, XK_Ccedilla },
|
||||
{ Qt::Key_Egrave, XK_Egrave },
|
||||
{ Qt::Key_Eacute, XK_Eacute },
|
||||
{ Qt::Key_Ecircumflex, XK_Ecircumflex },
|
||||
@@ -197,9 +197,9 @@ static const QMap<Qt::Key, quint32> keymapper_x11_ = { // clazy:exclude=non-pod
|
||||
{ Qt::Key_THORN, XK_THORN },
|
||||
{ Qt::Key_ssharp, XK_ssharp },
|
||||
{ Qt::Key_division, XK_division },
|
||||
{ Qt::Key_ydiaeresis, XK_ydiaeresis },
|
||||
{ Qt::Key_ydiaeresis, XK_ydiaeresis },
|
||||
{ Qt::Key_Multi_key, XK_Multi_key },
|
||||
{ Qt::Key_Codeinput, XK_Codeinput },
|
||||
{ Qt::Key_Codeinput, XK_Codeinput },
|
||||
{ Qt::Key_SingleCandidate, XK_SingleCandidate },
|
||||
{ Qt::Key_MultipleCandidate, XK_MultipleCandidate },
|
||||
{ Qt::Key_PreviousCandidate, XK_PreviousCandidate },
|
||||
|
||||
Reference in New Issue
Block a user