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
Contributor

@jonasschnelli 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()));
Copy link
Member

@laanwj laanwj Nov 12, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

@jonasschnelli jonasschnelli Nov 12, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

jonasschnelli commented Nov 12, 2015

force push fixed @paveljanik's nits.

@paveljanik
Copy link
Contributor

paveljanik commented Nov 12, 2015

tested ACK

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

@jonasschnelli
Copy link
Contributor 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
jonasschnelli added a commit that referenced this pull request Nov 16, 2015
773ae46 [Qt] add shortcurts for debug-/console-window (Jonas Schnelli)
luke-jr pushed 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...

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants