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

Add autocomplete to bitcoin-qt's console window. #7613

Merged
merged 1 commit into from Mar 14, 2016

Conversation

Projects
None yet
7 participants
@GamerSg
Contributor

GamerSg commented Feb 27, 2016

Would have preferred if the command arrays were in a vector, would have prevented hardcoding of array sizes in for loop. I will probably do that in another pull request.

autocomplete

@luke-jr

This comment has been minimized.

Show comment
Hide comment
@luke-jr

luke-jr Feb 27, 2016

Member

Concept ACK.

Member

luke-jr commented Feb 27, 2016

Concept ACK.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Feb 27, 2016

Member

Nice!
Concept ACK.
Will review/test soon.

Member

jonasschnelli commented Feb 27, 2016

Nice!
Concept ACK.
Will review/test soon.

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Feb 27, 2016

Contributor

Concept ACK. Nice!

The build without wallet failed - see https://travis-ci.org/bitcoin/bitcoin/jobs/112189472#L1844

qt/libbitcoinqt.a(qt_libbitcoinqt_a-rpcconsole.o): In function `RPCConsole::RPCConsole(PlatformStyle const*, QWidget*)':
rpcconsole.cpp:(.text+0x566a): undefined reference to `vWalletRPCCommands'
Contributor

paveljanik commented Feb 27, 2016

Concept ACK. Nice!

The build without wallet failed - see https://travis-ci.org/bitcoin/bitcoin/jobs/112189472#L1844

qt/libbitcoinqt.a(qt_libbitcoinqt_a-rpcconsole.o): In function `RPCConsole::RPCConsole(PlatformStyle const*, QWidget*)':
rpcconsole.cpp:(.text+0x566a): undefined reference to `vWalletRPCCommands'
@MarcoFalke

View changes

Show outdated Hide outdated src/qt/rpcconsole.cpp
@MarcoFalke

View changes

Show outdated Hide outdated src/qt/rpcconsole.cpp
@kirkalx

This comment has been minimized.

Show comment
Hide comment
@kirkalx

kirkalx Feb 28, 2016

Contributor

Concept ACK, nice idea.
Perhaps this could be implemented without making vRPCCommands etc. extern?
Nit: some of the spacing is a little unusual.

Contributor

kirkalx commented Feb 28, 2016

Concept ACK, nice idea.
Perhaps this could be implemented without making vRPCCommands etc. extern?
Nit: some of the spacing is a little unusual.

@jonasschnelli

View changes

Show outdated Hide outdated src/qt/rpcconsole.cpp
@jonasschnelli

View changes

Show outdated Hide outdated src/rpc/server.cpp

@jonasschnelli jonasschnelli added the GUI label Feb 28, 2016

@MarcoFalke

View changes

Show outdated Hide outdated src/qt/rpcconsole.cpp
@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Mar 3, 2016

Member

Concept ACK

Member

laanwj commented Mar 3, 2016

Concept ACK

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Mar 7, 2016

Member

Looks good to me now!
utACK after squash

Member

laanwj commented Mar 7, 2016

Looks good to me now!
utACK after squash

@kirkalx

This comment has been minimized.

Show comment
Hide comment
@kirkalx

kirkalx Mar 8, 2016

Contributor

Sweet, utACK after style nits
Refer doc/developer-notes.md for some coding style tips. Also a space after a comma, and before and after operators like = and << are always good things IMO :)

    for (size_t i =0; i < commandList.size(); ++i)
    {
        wordList<<commandList[i].c_str();
    }

    autoCompleter = new QCompleter(wordList,this);
Contributor

kirkalx commented Mar 8, 2016

Sweet, utACK after style nits
Refer doc/developer-notes.md for some coding style tips. Also a space after a comma, and before and after operators like = and << are always good things IMO :)

    for (size_t i =0; i < commandList.size(); ++i)
    {
        wordList<<commandList[i].c_str();
    }

    autoCompleter = new QCompleter(wordList,this);
@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Mar 8, 2016

Member

Currently, the wallet RPC commands are missing.
You need to build up your autocomplete list in RPCConsole::setClientModel() (and only if the modal exists) instead of in RPCConsole:: RPCConsole(). This is required because of the more modular creation of the tableRPC (see #7307).

Member

jonasschnelli commented Mar 8, 2016

Currently, the wallet RPC commands are missing.
You need to build up your autocomplete list in RPCConsole::setClientModel() (and only if the modal exists) instead of in RPCConsole:: RPCConsole(). This is required because of the more modular creation of the tableRPC (see #7307).

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Mar 11, 2016

Member

@jonasschnelli good catch!

Member

laanwj commented Mar 11, 2016

@jonasschnelli good catch!

@kirkalx

This comment has been minimized.

Show comment
Hide comment
@kirkalx

kirkalx Mar 11, 2016

Contributor

If you are still struggling with git for squashing, @GamerSg, Wladimir helped me with the same in #7458

Contributor

kirkalx commented Mar 11, 2016

If you are still struggling with git for squashing, @GamerSg, Wladimir helped me with the same in #7458

@GamerSg

This comment has been minimized.

Show comment
Hide comment
@GamerSg

GamerSg Mar 11, 2016

Contributor

Hi all, i just find time during the weekends to work on this, so ill fix up the remaining issues tomorrow.

Contributor

GamerSg commented Mar 11, 2016

Hi all, i just find time during the weekends to work on this, so ill fix up the remaining issues tomorrow.

Add autocomplete to bitcoin-qt's console window.
Removed externs
Added listCommands() to CRPCTable

Move autocomplete init to RPCConsole::setClientModel()
@GamerSg

This comment has been minimized.

Show comment
Hide comment
@GamerSg

GamerSg Mar 12, 2016

Contributor

Moved the initialisation to setClientModel() as @jonasschnelli suggested.
Squashed the commits as well.

Contributor

GamerSg commented Mar 12, 2016

Moved the initialisation to setClientModel() as @jonasschnelli suggested.
Squashed the commits as well.

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Mar 12, 2016

Member

Looks like this works just fine, now.

ACK ce7413f:

screenshot from 2016-03-12 15-55-14

Member

MarcoFalke commented Mar 12, 2016

Looks like this works just fine, now.

ACK ce7413f:

screenshot from 2016-03-12 15-55-14

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Mar 12, 2016

You have removed this } and moved it a bit to the right. Thus the indent is wrong at the end of if.

paveljanik commented on src/qt/rpcconsole.cpp in ce7413f Mar 12, 2016

You have removed this } and moved it a bit to the right. Thus the indent is wrong at the end of if.

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Mar 12, 2016

Contributor

Works OK. Please fix the indentation of "}" in rpcconsole.cpp.

Contributor

paveljanik commented Mar 12, 2016

Works OK. Please fix the indentation of "}" in rpcconsole.cpp.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Mar 14, 2016

Member

Tested ACK ce7413f

Member

jonasschnelli commented Mar 14, 2016

Tested ACK ce7413f

@jonasschnelli jonasschnelli merged commit ce7413f into bitcoin:master Mar 14, 2016

1 check passed

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

jonasschnelli added a commit that referenced this pull request Mar 14, 2016

Merge #7613: Add autocomplete to bitcoin-qt's console window.
ce7413f Add autocomplete to bitcoin-qt's console window. (Luv Khemani)
@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Mar 30, 2016

Contributor

@GamerSg When you activate (Enter) one of the selected items from autocompleter, it is executed, but the entry line is not emptied... Fixed in #7772.

Contributor

paveljanik commented Mar 30, 2016

@GamerSg When you activate (Enter) one of the selected items from autocompleter, it is executed, but the entry line is not emptied... Fixed in #7772.

svost added a commit to svost/novacoin that referenced this pull request Feb 6, 2017

svost added a commit to svost/novacoin that referenced this pull request Feb 6, 2017

kyuupichan referenced this pull request in kyuupichan/BitcoinUnlimited Mar 12, 2017

Merge #7613: Add autocomplete to bitcoin-qt's console window.
ce7413f Add autocomplete to bitcoin-qt's console window. (Luv Khemani)

cddjr referenced this pull request in cddjr/BitcoinUnlimited Apr 6, 2017

Merge #7613: Add autocomplete to bitcoin-qt's console window.
ce7413f Add autocomplete to bitcoin-qt's console window. (Luv Khemani)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment