Re: [cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Nicolas Desprès
On Thu, Dec 15, 2011 at 4:33 PM, Raphael Kubo da Costa
wrote:

> Clinton Stimpson  writes:
>
> > On Thursday, December 15, 2011 08:20:14 am Raphael Kubo da Costa wrote:
> >> As I mentioned in the commit message, QKeySequence::Quit will not work
> >> on all platforms (the documentation says it translates to nothing on
> >> Windows, for example, and I couldn't use it on the i3 window manager,
> >> for example). I can change it if you prefer, though.
> >
> > Ok, the patch is fine.
> > Is this something that needs brought up to the Qt developer's attention?
>
> I'm not sure; the QKeySequence's documentation explicitly shows that
> QKeySequence::Quit does not have any value on Windows at least, so I
> guess this is a design decision.
>

The standard on Windows is not to have any special shortcut for Quit since
people uses ALT+F4 most of the time.  However QtCreator uses Ctrl+Q :-)

-- 
Nicolas Desprès
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Clinton Stimpson
On Thursday, December 15, 2011 08:33:40 am Raphael Kubo da Costa wrote:
> Clinton Stimpson  writes:
> > On Thursday, December 15, 2011 08:20:14 am Raphael Kubo da Costa wrote:
> >> As I mentioned in the commit message, QKeySequence::Quit will not work
> >> on all platforms (the documentation says it translates to nothing on
> >> Windows, for example, and I couldn't use it on the i3 window manager,
> >> for example). I can change it if you prefer, though.
> > 
> > Ok, the patch is fine.
> > Is this something that needs brought up to the Qt developer's attention?
> 
> I'm not sure; the QKeySequence's documentation explicitly shows that
> QKeySequence::Quit does not have any value on Windows at least, so I
> guess this is a design decision.


Its been applied. 
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56e049

Thanks

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Raphael Kubo da Costa
Clinton Stimpson  writes:

> On Thursday, December 15, 2011 08:20:14 am Raphael Kubo da Costa wrote:
>> As I mentioned in the commit message, QKeySequence::Quit will not work
>> on all platforms (the documentation says it translates to nothing on
>> Windows, for example, and I couldn't use it on the i3 window manager,
>> for example). I can change it if you prefer, though.
>
> Ok, the patch is fine.
> Is this something that needs brought up to the Qt developer's attention?

I'm not sure; the QKeySequence's documentation explicitly shows that
QKeySequence::Quit does not have any value on Windows at least, so I
guess this is a design decision.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Clinton Stimpson
On Thursday, December 15, 2011 08:20:14 am Raphael Kubo da Costa wrote:
> Clinton Stimpson  writes:
> > 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 
> >>  #include 
> >>  #include 
> >> 
> >> +#include 
> >> 
> >>  #include 
> >>  
> >>  #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?
> 
> As I mentioned in the commit message, QKeySequence::Quit will not work
> on all platforms (the documentation says it translates to nothing on
> Windows, for example, and I couldn't use it on the i3 window manager,
> for example). I can change it if you prefer, though.

Ok, the patch is fine.
Is this something that needs brought up to the Qt developer's attention?

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Raphael Kubo da Costa
Clinton Stimpson  writes:

> 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 
>>  #include 
>>  #include 
>> +#include 
>>  #include 
>>
>>  #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?

As I mentioned in the commit message, QKeySequence::Quit will not work
on all platforms (the documentation says it translates to nothing on
Windows, for example, and I couldn't use it on the i3 window manager,
for example). I can change it if you prefer, though.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Clinton Stimpson
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 
>  #include 
>  #include 
> +#include 
>  #include 
> 
>  #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
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Brad King

On 12/13/2011 6:51 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.


Clinton, does this look okay to you?

Thanks,
-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers