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/UserLocalVolumeDialog.cpp')
-rw-r--r--src/mumble/UserLocalVolumeDialog.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mumble/UserLocalVolumeDialog.cpp b/src/mumble/UserLocalVolumeDialog.cpp
index 20ddea688..a4f5981a1 100644
--- a/src/mumble/UserLocalVolumeDialog.cpp
+++ b/src/mumble/UserLocalVolumeDialog.cpp
@@ -38,16 +38,13 @@
#include "ClientUser.h"
#include "Database.h"
#include "MainWindow.h"
+#include "Global.h"
#include <QtGui/QCloseEvent>
#include <QtWidgets/QPushButton>
#include <cmath>
-// 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 include.
-#include "Global.h"
-
UserLocalVolumeDialog::UserLocalVolumeDialog(unsigned int sessionId,
QMap< unsigned int, UserLocalVolumeDialog * > *qmUserVolTracker)
: QDialog(nullptr), m_clientSession(sessionId), m_qmUserVolTracker(qmUserVolTracker) {
@@ -63,7 +60,7 @@ UserLocalVolumeDialog::UserLocalVolumeDialog(unsigned int sessionId,
m_originalVolumeAdjustmentDecibel = qsUserLocalVolume->value();
}
- if (g.mw && g.mw->windowFlags() & Qt::WindowStaysOnTopHint) {
+ if (Global::get().mw && Global::get().mw->windowFlags() & Qt::WindowStaysOnTopHint) {
// If the main window is set to always be on top of other windows, we should make the
// volume dialog behave the same in order for it to not get hidden behind the main window.
setWindowFlags(Qt::WindowStaysOnTopHint);
@@ -107,9 +104,9 @@ void UserLocalVolumeDialog::on_qbbUserLocalVolume_clicked(QAbstractButton *butto
ClientUser *user = ClientUser::get(m_clientSession);
if (user) {
if (!user->qsHash.isEmpty()) {
- g.db->setUserLocalVolume(user->qsHash, user->getLocalVolumeAdjustments());
+ Global::get().db->setUserLocalVolume(user->qsHash, user->getLocalVolumeAdjustments());
} else {
- g.mw->logChangeNotPermanent(QObject::tr("Local Volume Adjustment..."), user);
+ Global::get().mw->logChangeNotPermanent(QObject::tr("Local Volume Adjustment..."), user);
}
}
UserLocalVolumeDialog::close();