Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. warning: implicitly-declared ??
Forum Updated to NodeBB v4.3 + New Features

warning: implicitly-declared ??

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    After new download / install of 5.12.12 I am getting hundred of the following warnings :

    /home/qy/Qt/5.12.12/gcc_64/include/QtWidgets/qstyleoption.h:588: warning: implicitly-declared ‘QStyleOptionComplex& QStyleOptionComplex::operator=(const QStyleOptionComplex&)’ is deprecated [-Wdeprecated-copy]
    ../../../../5.12.12/gcc_64/include/QtWidgets/qstyleoption.h: In member function ‘QStyleOptionComboBox& QStyleOptionComboBox::operator=(const QStyleOptionComboBox&)’:
    ../../../../5.12.12/gcc_64/include/QtWidgets/qstyleoption.h:588:24: warning: implicitly-declared ‘QStyleOptionComplex& QStyleOptionComplex::operator=(const QStyleOptionComplex&)’ is deprecated [-Wdeprecated-copy]
      588 | class Q_WIDGETS_EXPORT QStyleOptionComboBox : public QStyleOptionComplex
          |                        ^~~~~~~~~~~~~~~~~~~~
    ../../../../5.12.12/gcc_64/include/QtWidgets/qstyleoption.h:510:5: note: because ‘QStyleOptionComplex’ has user-provided ‘QStyleOptionComplex::QStyleOptionComplex(const QStyleOptionComplex&)’
      510 |     QStyleOptionComplex(const QStyleOptionComplex &other) : QStyleOption(Version, Type) { *this = other; }
          |     ^~~~~~~~~~~~~~~~~~~
    

    My code still works, but even removing all warning in .pro file I still get the above.
    I am tempted to "downgrade" to next to last 5 version, but like to know / get confirmed it would be worth a while...

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      It's a deprecation warning coming from compiler, not from Qt. You can safely ignore it.

      I am tempted to "downgrade" to next to last 5 version, but like to know / get confirmed it would be worth a while...

      If you do want to make sure the warning goes away it's probably better to upgrade to Qt 5.15 or 6 which are better prepared for new compiler warnings introduced in recent years.

      (Z(:^

      A 1 Reply Last reply
      4
      • sierdzioS sierdzio

        It's a deprecation warning coming from compiler, not from Qt. You can safely ignore it.

        I am tempted to "downgrade" to next to last 5 version, but like to know / get confirmed it would be worth a while...

        If you do want to make sure the warning goes away it's probably better to upgrade to Qt 5.15 or 6 which are better prepared for new compiler warnings introduced in recent years.

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @sierdzio I have disabled compiler warnings and still getting these. Warnings do no bother me but when I get real error it is a pain to scroll thru the warnings to get to it. Yes, I am adding 6.2.2. - hope it will make these disappear.
        Cheers

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved