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

@jonasschnelli
Copy link
Contributor

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

@fanquake
Copy link
Member

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

@promag promag commented Dec 17, 2018

Thanks, utACK 3e21b69.

@laanwj
Copy link
Member

@laanwj laanwj commented Dec 17, 2018

whoops
utACK

@fanquake
Copy link
Member

@fanquake fanquake commented Dec 17, 2018

utACK 3e21b69

@laanwj laanwj merged commit 3e21b69 into bitcoin:master Dec 17, 2018
2 checks passed
laanwj added a commit that referenced this issue Dec 17, 2018
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 issue Dec 26, 2018
MarcoFalke added a commit that referenced this issue Feb 1, 2019
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
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Oct 12, 2020
Summary:
This is the oldest version on the most common linux distributions (from
pkgs.org) for which the build is not already broken:
 - Our current minimum is from Ubuntu Xenial 16.04, which is broken due
to libevent and Boost
 - Next is Debian Stretch which is also broken due to libevent

The picked version is from Ubuntu Bionic 18.04. Other can still use the
static depends for the build, just like before this patch, which has Qt
5.9.7.

We don't test against the 5.5.1 version, and the risk is high that it
gets broken on a regular basis (e.g. D7892, see
bitcoin/bitcoin#14979).

Test Plan:
  ninja all check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7893
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Oct 13, 2020
Summary:
[[bitcoin/bitcoin#14573 | PR14573]] / D7892 broke Qt5.6 compatibility due to calling the lambda version of addAction that was added in Qt5.6.

Backport of Core [[bitcoin/bitcoin#14979 | PR14979]]

Test Plan:
`ninja && ninja check`
Run `src/qt/bitcoin-qt` and test all menu actions

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D7894
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this issue Apr 14, 2021
Summary:
[[bitcoin/bitcoin#14573 | PR14573]] / D7892 broke Qt5.6 compatibility due to calling the lambda version of addAction that was added in Qt5.6.

Backport of Core [[bitcoin/bitcoin#14979 | PR14979]]

Test Plan:
`ninja && ninja check`
Run `src/qt/bitcoin-qt` and test all menu actions

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D7894
christiancfifi added a commit to christiancfifi/dash that referenced this issue Aug 24, 2021
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  bitcoin#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
christiancfifi added a commit to christiancfifi/dash that referenced this issue Aug 24, 2021
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  bitcoin#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
christiancfifi added a commit to christiancfifi/dash that referenced this issue Aug 25, 2021
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  bitcoin#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
christiancfifi added a commit to christiancfifi/dash that referenced this issue Aug 25, 2021
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  bitcoin#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
christiancfifi added a commit to christiancfifi/dash that referenced this issue Aug 26, 2021
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  bitcoin#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
christiancfifi added a commit to christiancfifi/dash that referenced this issue Aug 28, 2021
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  bitcoin#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
christiancfifi added a commit to christiancfifi/dash that referenced this issue Aug 29, 2021
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  bitcoin#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
christiancfifi added a commit to christiancfifi/dash that referenced this issue Aug 29, 2021
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  bitcoin#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
christiancfifi added a commit to christiancfifi/dash that referenced this issue Aug 29, 2021
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  bitcoin#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
@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
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants