[Qt] add shortcurts for debug-/console-window #7000

Merged
merged 1 commit into from Nov 16, 2015

Conversation

Projects
None yet
5 participants
@jonasschnelli
Member

jonasschnelli commented Nov 12, 2015

Opening the console- or the debug-window (info tab) seems to be a action that many users do often. This PR adds a shortcut for opening the debug window (shift-ctrl-D) and one for showing directly the console (shift-ctrl-C). Considered to be a undocumented expert feature.

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Nov 12, 2015

Member

utACK

Member

laanwj commented Nov 12, 2015

utACK

@@ -364,6 +365,9 @@ void BitcoinGUI::createActions()
connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
}
#endif // ENABLE_WALLET
+
+ new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C), this, SLOT(showDebugWindowActivateConsole()));

This comment has been minimized.

@laanwj

laanwj Nov 12, 2015

Member

This looks weird, allocating a freely-floating object, but I do think it is correct. The object will become a child of *this, and automatically freed with it.

@laanwj

laanwj Nov 12, 2015

Member

This looks weird, allocating a freely-floating object, but I do think it is correct. The object will become a child of *this, and automatically freed with it.

This comment has been minimized.

@jonasschnelli

jonasschnelli Nov 12, 2015

Member

Right. It looks a bit strange. But i think it should compile fine and leaves no men-leak (and requires less code).

@jonasschnelli

jonasschnelli Nov 12, 2015

Member

Right. It looks a bit strange. But i think it should compile fine and leaves no men-leak (and requires less code).

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Nov 12, 2015

Contributor

But anyway - 7000 is yours!

Contributor

paveljanik commented Nov 12, 2015

But anyway - 7000 is yours!

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Nov 12, 2015

Contributor

BTW - will test on OS X later today - Ctrl key...

Contributor

paveljanik commented Nov 12, 2015

BTW - will test on OS X later today - Ctrl key...

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 12, 2015

Member

@paveljanik the problem with a parameter for showDebugWindow() is, that binding a parameter to a signal is non-trivial (requires a QSignalMapper) and result in a uncommon code. I have considered that but was going for the more clear way which not really involves more code line (maybe +2).

I have testes it on OSX. QT automaps the OSX-cmd key to ctrl. Needs testing on Linux/Windows.

Member

jonasschnelli commented Nov 12, 2015

@paveljanik the problem with a parameter for showDebugWindow() is, that binding a parameter to a signal is non-trivial (requires a QSignalMapper) and result in a uncommon code. I have considered that but was going for the more clear way which not really involves more code line (maybe +2).

I have testes it on OSX. QT automaps the OSX-cmd key to ctrl. Needs testing on Linux/Windows.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 12, 2015

Member

force push fixed @paveljanik's nits.

Member

jonasschnelli commented Nov 12, 2015

force push fixed @paveljanik's nits.

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Nov 12, 2015

Contributor

tested ACK

Contributor

paveljanik commented Nov 12, 2015

tested ACK

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 12, 2015

Member

Binaries if someone likes to test this on Windows or Linux: https://bitcoin.jonasschnelli.ch/pulls/7000/

Member

jonasschnelli commented Nov 12, 2015

Binaries if someone likes to test this on Windows or Linux: https://bitcoin.jonasschnelli.ch/pulls/7000/

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Nov 12, 2015

Member

I need this!

tested ACK 773ae46

Member

MarcoFalke commented Nov 12, 2015

I need this!

tested ACK 773ae46

@laanwj laanwj added the RPC/REST/ZMQ label Nov 13, 2015

@jonasschnelli jonasschnelli added GUI and removed RPC/REST/ZMQ labels Nov 13, 2015

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 13, 2015

Member

Just tested this also on Windows and Linux/Ubuntu. Works.

Member

jonasschnelli commented Nov 13, 2015

Just tested this also on Windows and Linux/Ubuntu. Works.

@jonasschnelli jonasschnelli merged commit 773ae46 into bitcoin:master Nov 16, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

jonasschnelli added a commit that referenced this pull request Nov 16, 2015

Merge pull request #7000
773ae46 [Qt] add shortcurts for debug-/console-window (Jonas Schnelli)

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Nov 27, 2015

@rebroad

This comment has been minimized.

Show comment
Hide comment
@rebroad

rebroad Mar 1, 2016

Contributor

Why not document this?

Contributor

rebroad commented Mar 1, 2016

Why not document this?

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Mar 1, 2016

Member

Hah, would be awesome if someone wrote a manual/help function for the GUI in the first place...

Member

laanwj commented Mar 1, 2016

Hah, would be awesome if someone wrote a manual/help function for the GUI in the first place...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment