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] Restore < Qt5.6 compatibility for addAction #14979

Merged
merged 1 commit into from Dec 17, 2018

Conversation

Projects
None yet
4 participants
@jonasschnelli
Copy link
Member

commented Dec 17, 2018

#14573 broke < Qt5.6 compatibility due to calling the lambda version of addAction that was added in Qt5.6.

This PR re-enables < Qt5.6 compatibility.

@jonasschnelli jonasschnelli added the GUI label Dec 17, 2018

@fanquake

This comment has been minimized.

Copy link
Member

commented Dec 17, 2018

For reference a failed build is here, with log:

bitcoingui.o `test -f 'qt/bitcoingui.cpp' || echo './'`qt/bitcoingui.cpp
qt/bitcoingui.cpp:403:45: error: no matching member function for call to 'addAction'
    QAction* minimize_action = window_menu->addAction(tr("Minimize"), [] {
                               ~~~~~~~~~~~~~^~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:78:14: note: candidate function not viable: no known conversion from '(lambda at qt/bitcoingui.cpp:403:71)' to 'const QObject *' for 2nd argument
    QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:77:14: note: candidate function not viable: requires 2 arguments, but 3 were provided
    QAction *addAction(const QIcon &icon, const QString &text);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:538:10: note: candidate function not viable: requires single argument 'action', but 3 arguments were provided
    void addAction(QAction *action);
         ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:76:14: note: candidate function not viable: requires single argument 'text', but 3 arguments were provided
    QAction *addAction(const QString &text);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:79:14: note: candidate function not viable: requires at least 4 arguments, but 3 were provided
    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
             ^
qt/bitcoingui.cpp:425:44: error: no matching member function for call to 'addAction'
    QAction* restore_action = window_menu->addAction(tr("Restore"), [] {
                              ~~~~~~~~~~~~~^~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:77:14: note: candidate function not viable: no known conversion from 'QString' to 'const QIcon' for 1st argument
    QAction *addAction(const QIcon &icon, const QString &text);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:538:10: note: candidate function not viable: requires single argument 'action', but 2 arguments were provided
    void addAction(QAction *action);
         ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:76:14: note: candidate function not viable: requires single argument 'text', but 2 arguments were provided
    QAction *addAction(const QString &text);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:78:14: note: candidate function not viable: requires at least 3 arguments, but 2 were provided
    QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:79:14: note: candidate function not viable: requires at least 4 arguments, but 2 were provided
    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
             ^
qt/bitcoingui.cpp:436:22: error: no matching member function for call to 'addAction'
        window_menu->addAction(tr("Main Window"), [this] {
        ~~~~~~~~~~~~~^~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:77:14: note: candidate function not viable: no known conversion from 'QString' to 'const QIcon' for 1st argument
    QAction *addAction(const QIcon &icon, const QString &text);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:538:10: note: candidate function not viable: requires single argument 'action', but 2 arguments were provided
    void addAction(QAction *action);
         ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:76:14: note: candidate function not viable: requires single argument 'text', but 2 arguments were provided
    QAction *addAction(const QString &text);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:78:14: note: candidate function not viable: requires at least 3 arguments, but 2 were provided
    QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:79:14: note: candidate function not viable: requires at least 4 arguments, but 2 were provided
    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
             ^
qt/bitcoingui.cpp:447:22: error: no matching member function for call to 'addAction'
        window_menu->addAction(rpcConsole->tabTitle(tab_type), [this, tab_type] {
        ~~~~~~~~~~~~~^~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:77:14: note: candidate function not viable: no known conversion from 'QString' to 'const QIcon' for 1st argument
    QAction *addAction(const QIcon &icon, const QString &text);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:538:10: note: candidate function not viable: requires single argument 'action', but 2 arguments were provided
    void addAction(QAction *action);
         ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:76:14: note: candidate function not viable: requires single argument 'text', but 2 arguments were provided
    QAction *addAction(const QString &text);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:78:14: note: candidate function not viable: requires at least 3 arguments, but 2 were provided
    QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:79:14: note: candidate function not viable: requires at least 4 arguments, but 2 were provided
    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
             ^
4 errors generated.
make[2]: *** [qt/qt_libbitcoinqt_a-bitcoingui.o] Error 1
@promag

This comment has been minimized.

Copy link
Member

commented Dec 17, 2018

Thanks, utACK 3e21b69.

@laanwj

This comment has been minimized.

Copy link
Member

commented Dec 17, 2018

whoops
utACK

@fanquake

This comment has been minimized.

Copy link
Member

commented Dec 17, 2018

utACK 3e21b69

@laanwj laanwj merged commit 3e21b69 into bitcoin:master Dec 17, 2018

2 checks passed

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

laanwj added a commit that referenced this pull request Dec 17, 2018

Merge #14979: [Qt] Restore < Qt5.6 compatibility for addAction
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  #14573 broke < Qt5.6 compatibility due to calling the lambda version of `addAction` that was added in Qt5.6.

  This PR re-enables < Qt5.6 compatibility.

Tree-SHA512: b3cf055d88a76713d100be05b2298d4091967e1a43de176af2647f59e76b98b216493dd12a6d68a942ae7946f2026e33dd8e8d20fc44a9a9614a3690ad9a2417

luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Dec 26, 2018

MarcoFalke added a commit that referenced this pull request Feb 1, 2019

Merge #15308: build: Restore compatibility with older boost
119d360 travis: Document whether functional tests are run in the job name (Ben Woosley)
64f2854 Revert "travis: Compile trusty with depends for now" (Ben Woosley)
267eac0 Prefer boost::optional#get_value_or over #value_or (Ben Woosley)
1971f5b Piecewise construct to avoid invalid construction (Ben Woosley)

Pull request description:

  In light of #14979, I realized that only qt 5.5+ was being tested under CI, while compatibility lists 5.2+.

  In #15276, Marco added Trusty to CI, building with depends. This changes that build to system libraries, in order to ensure ongoing compatibility with our claimed minimum required versions.

  Fixes #14983, previously open as #14998

Tree-SHA512: 6cff5e28c756ecb8bf797c8f6eb77c1944ba61a8dd6d7d4984e63eef384f6429dc79c505da3241c05b9c4db31c72b2a9846c7365aba9280f2e0620e5f3998d07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.