Fix global shortcuts memory leak
This commit is contained in:
@@ -87,24 +87,24 @@ GlobalShortcutsManager::GlobalShortcutsManager(QWidget *parent)
|
|||||||
|
|
||||||
// Create backends - these do the actual shortcut registration
|
// Create backends - these do the actual shortcut registration
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
kde_backend_ = new GlobalShortcutsBackendKDE(this);
|
kde_backend_ = new GlobalShortcutsBackendKDE(this, this);
|
||||||
gnome_backend_ = new GlobalShortcutsBackendGnome(this);
|
gnome_backend_ = new GlobalShortcutsBackendGnome(this, this);
|
||||||
mate_backend_ = new GlobalShortcutsBackendMate(this);
|
mate_backend_ = new GlobalShortcutsBackendMate(this, this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
if (!system_backend_) {
|
if (!system_backend_) {
|
||||||
system_backend_ = new GlobalShortcutsBackendMacOS(this);
|
system_backend_ = new GlobalShortcutsBackendMacOS(this, this);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if (!system_backend_) {
|
if (!system_backend_) {
|
||||||
system_backend_ = new GlobalShortcutsBackendSystem(this);
|
system_backend_ = new GlobalShortcutsBackendSystem(this, this);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||||
if (!system_backend_ && IsX11Available()) {
|
if (!system_backend_ && IsX11Available()) {
|
||||||
system_backend_ = new GlobalShortcutsBackendSystem(this);
|
system_backend_ = new GlobalShortcutsBackendSystem(this, this);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user