Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/mumble/GlobalShortcut_unix.cpp')
-rw-r--r--src/mumble/GlobalShortcut_unix.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mumble/GlobalShortcut_unix.cpp b/src/mumble/GlobalShortcut_unix.cpp
index 9ae8c79fc..d8c1c8a46 100644
--- a/src/mumble/GlobalShortcut_unix.cpp
+++ b/src/mumble/GlobalShortcut_unix.cpp
@@ -6,6 +6,7 @@
#include "GlobalShortcut_unix.h"
#include "Settings.h"
+#include "Global.h"
#include <QtCore/QFileSystemWatcher>
#include <QtCore/QSocketNotifier>
@@ -23,10 +24,6 @@
# include <linux/input.h>
#endif
-// We define a global macro called 'g'. This can lead to issues when included code uses 'g' as a type or parameter name
-// (like protobuf 3.7 does). As such, for now, we have to make this our last incl
-#include "Global.h"
-
// We have to use a global 'diagnostic ignored' pragmas because
// we still support old versions of GCC. (FreeBSD 9.3 ships with GCC 4.2)
#if defined(__GNUC__)
@@ -65,7 +62,7 @@ GlobalShortcutX::GlobalShortcutX() {
}
#ifdef Q_OS_LINUX
- if (g.s.bEnableEvdev) {
+ if (Global::get().s.bEnableEvdev) {
QString dir = QLatin1String("/dev/input");
QFileSystemWatcher *fsw = new QFileSystemWatcher(QStringList(dir), this);
connect(fsw, SIGNAL(directoryChanged(const QString &)), this, SLOT(directoryChanged(const QString &)));
@@ -91,7 +88,7 @@ GlobalShortcutX::GlobalShortcutX() {
#ifndef NO_XINPUT2
int evt, error;
- if (g.s.bEnableXInput2 && XQueryExtension(display, "XInputExtension", &iXIopcode, &evt, &error)) {
+ if (Global::get().s.bEnableXInput2 && XQueryExtension(display, "XInputExtension", &iXIopcode, &evt, &error)) {
int major = XI_2_Major;
int minor = XI_2_Minor;
int rc = XIQueryVersion(display, &major, &minor);
@@ -251,7 +248,7 @@ void GlobalShortcutX::displayReadyRead(int) {
// One of the raw /dev/input devices has ready input
void GlobalShortcutX::inputReadyRead(int) {
#ifdef Q_OS_LINUX
- if (!g.s.bEnableEvdev) {
+ if (!Global::get().s.bEnableEvdev) {
return;
}
@@ -303,7 +300,7 @@ void GlobalShortcutX::inputReadyRead(int) {
// The /dev/input directory changed
void GlobalShortcutX::directoryChanged(const QString &dir) {
#ifdef Q_OS_LINUX
- if (!g.s.bEnableEvdev) {
+ if (!Global::get().s.bEnableEvdev) {
return;
}