Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Nov 16, 2015

Conversation

@jonasschnelli
Copy link
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
Copy link
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.

Copy link
@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.

Copy link
@jonasschnelli

jonasschnelli Nov 12, 2015

Author Member

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

@paveljanik
Copy link
Contributor

paveljanik commented Nov 12, 2015

But anyway - 7000 is yours!

@paveljanik
Copy link
Contributor

paveljanik commented Nov 12, 2015

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

@jonasschnelli
Copy link
Member Author

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 jonasschnelli force-pushed the jonasschnelli:2015/11/qt_shortcuts branch Nov 12, 2015
@jonasschnelli
Copy link
Member Author

jonasschnelli commented Nov 12, 2015

force push fixed @paveljanik's nits.

@jonasschnelli jonasschnelli force-pushed the jonasschnelli:2015/11/qt_shortcuts branch to 773ae46 Nov 12, 2015
@paveljanik
Copy link
Contributor

paveljanik commented Nov 12, 2015

tested ACK

@jonasschnelli
Copy link
Member Author

jonasschnelli commented Nov 12, 2015

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

@MarcoFalke
Copy link
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
Copy link
Member Author

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
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
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
Copy link
Contributor

rebroad commented Mar 1, 2016

Why not document this?

@laanwj
Copy link
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.