[Qt] Restore < Qt5.6 compatibility for addAction #14979

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2018/12/fix_addaction changing 1 files +12 −7
  1. jonasschnelli commented at 6:30 am on December 17, 2018: contributor

    #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.

  2. [Qt] Restore < Qt5.6 compatibility for addAction 3e21b690d1
  3. jonasschnelli added the label GUI on Dec 17, 2018
  4. fanquake commented at 6:57 am on December 17, 2018: member

    For reference a failed build is here, with log:

     0bitcoingui.o `test -f 'qt/bitcoingui.cpp' || echo './'`qt/bitcoingui.cpp
     1qt/bitcoingui.cpp:403:45: error: no matching member function for call to 'addAction'
     2    QAction* minimize_action = window_menu->addAction(tr("Minimize"), [] {
     3                               ~~~~~~~~~~~~~^~~~~~~~~
     4/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
     5    QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
     6             ^
     7/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmenu.h:77:14: note: candidate function not viable: requires 2 arguments, but 3 were provided
     8    QAction *addAction(const QIcon &icon, const QString &text);
     9             ^
    10/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
    11    void addAction(QAction *action);
    12         ^
    13/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
    14    QAction *addAction(const QString &text);
    15             ^
    16/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
    17    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
    18             ^
    19qt/bitcoingui.cpp:425:44: error: no matching member function for call to 'addAction'
    20    QAction* restore_action = window_menu->addAction(tr("Restore"), [] {
    21                              ~~~~~~~~~~~~~^~~~~~~~~
    22/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
    23    QAction *addAction(const QIcon &icon, const QString &text);
    24             ^
    25/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
    26    void addAction(QAction *action);
    27         ^
    28/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
    29    QAction *addAction(const QString &text);
    30             ^
    31/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
    32    QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
    33             ^
    34/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
    35    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
    36             ^
    37qt/bitcoingui.cpp:436:22: error: no matching member function for call to 'addAction'
    38        window_menu->addAction(tr("Main Window"), [this] {
    39        ~~~~~~~~~~~~~^~~~~~~~~
    40/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
    41    QAction *addAction(const QIcon &icon, const QString &text);
    42             ^
    43/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
    44    void addAction(QAction *action);
    45         ^
    46/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
    47    QAction *addAction(const QString &text);
    48             ^
    49/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
    50    QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
    51             ^
    52/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
    53    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
    54             ^
    55qt/bitcoingui.cpp:447:22: error: no matching member function for call to 'addAction'
    56        window_menu->addAction(rpcConsole->tabTitle(tab_type), [this, tab_type] {
    57        ~~~~~~~~~~~~~^~~~~~~~~
    58/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
    59    QAction *addAction(const QIcon &icon, const QString &text);
    60             ^
    61/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
    62    void addAction(QAction *action);
    63         ^
    64/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
    65    QAction *addAction(const QString &text);
    66             ^
    67/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
    68    QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
    69             ^
    70/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
    71    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
    72             ^
    734 errors generated.
    74make[2]: *** [qt/qt_libbitcoinqt_a-bitcoingui.o] Error 1
    
  5. promag commented at 9:29 am on December 17, 2018: member
    Thanks, utACK 3e21b690.
  6. laanwj commented at 10:51 am on December 17, 2018: member
    whoops utACK
  7. fanquake commented at 10:55 am on December 17, 2018: member
    utACK 3e21b69
  8. laanwj merged this on Dec 17, 2018
  9. laanwj closed this on Dec 17, 2018

  10. laanwj referenced this in commit bfd7e54097 on Dec 17, 2018
  11. luke-jr referenced this in commit 487c173ab5 on Dec 24, 2018
  12. luke-jr referenced this in commit a867c37069 on Dec 26, 2018
  13. MarcoFalke referenced this in commit 2c0867a181 on Feb 1, 2019
  14. deadalnix referenced this in commit 631d110c68 on Oct 12, 2020
  15. jasonbcox referenced this in commit b01ba2ed25 on Oct 13, 2020
  16. ftrader referenced this in commit b515ce60ff on Apr 14, 2021
  17. christiancfifi referenced this in commit ea528f8998 on Aug 24, 2021
  18. christiancfifi referenced this in commit 59933c0265 on Aug 24, 2021
  19. christiancfifi referenced this in commit c77cc5d5b2 on Aug 25, 2021
  20. christiancfifi referenced this in commit ca2508fb30 on Aug 25, 2021
  21. christiancfifi referenced this in commit e9956d267e on Aug 26, 2021
  22. christiancfifi referenced this in commit f97a0e8fb1 on Aug 28, 2021
  23. christiancfifi referenced this in commit 4e02ba7ff7 on Aug 29, 2021
  24. christiancfifi referenced this in commit 67f109eaee on Aug 29, 2021
  25. christiancfifi referenced this in commit 146871ad57 on Aug 29, 2021
  26. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me