warning: implicitly-declared ??
-
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... -
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.
-
@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