[cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.
Clinton Stimpson
clinton at elemtech.com
Thu Dec 15 09:46:15 EST 2011
On Tuesday, December 13, 2011 04:51:16 pm Raphael Kubo da Costa wrote:
> QKeySequence::Quit does not work on all platforms, and since it
> translates to Ctrl+Q on all platforms where it does work, Ctrl+Q was
> hardcoded instead.
> ---
> Source/QtDialog/CMakeSetupDialog.cxx | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/Source/QtDialog/CMakeSetupDialog.cxx
> b/Source/QtDialog/CMakeSetupDialog.cxx index 1c058d3..338eaff 100644
> --- a/Source/QtDialog/CMakeSetupDialog.cxx
> +++ b/Source/QtDialog/CMakeSetupDialog.cxx
> @@ -26,6 +26,7 @@
> #include <QMimeData>
> #include <QUrl>
> #include <QShortcut>
> +#include <QKeySequence>
> #include <QMacInstallDialog.h>
>
> #include "QCMake.h"
> @@ -99,6 +100,7 @@ CMakeSetupDialog::CMakeSetupDialog()
> QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)),
> this, SLOT(doDeleteCache()));
> this->ExitAction = FileMenu->addAction(tr("E&xit"));
> + this->ExitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
> QObject::connect(this->ExitAction, SIGNAL(triggered(bool)),
> this, SLOT(close()));
Can you instead make that
+ this->ExitAction->setShortcut(QKeySequence::Quit);
Do you want to redo the patch, or shall we just make the change to use Quit?
--
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
More information about the cmake-developers
mailing list