From 5bb83a0078a5182a51e3a7764b30fb363096286a Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 8 Jul 2018 15:38:38 +0000 Subject: disable global shortcuts while configuration git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8120 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/hotkey/hotkeyfactory.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/plugins/General/hotkey/hotkeyfactory.cpp') diff --git a/src/plugins/General/hotkey/hotkeyfactory.cpp b/src/plugins/General/hotkey/hotkeyfactory.cpp index 7c0c176de..72c3ed9ab 100644 --- a/src/plugins/General/hotkey/hotkeyfactory.cpp +++ b/src/plugins/General/hotkey/hotkeyfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2012 by Ilya Kotov * + * Copyright (C) 2009-2018 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -18,9 +18,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ - #include #include +#include #include "settingsdialog.h" #include "hotkeymanager.h" #include "hotkeyfactory.h" @@ -43,7 +43,13 @@ QObject *HotkeyFactory::create(QObject *parent) QDialog *HotkeyFactory::createConfigDialog(QWidget *parent) { - return new SettingsDialog(parent); + SettingsDialog *dialog = new SettingsDialog(parent); + if(General::isEnabled(this)) + { + General::setEnabled(this, false); + connect(dialog, &QDialog::finished, [this] { General::setEnabled(this); }); + } + return dialog; } void HotkeyFactory::showAbout(QWidget *parent) -- cgit v1.2.3-13-gbd6f