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 6.8 deprecated declaration fixes #13845

Merged
merged 6 commits into from
Nov 8, 2024

Conversation

Holzhaus
Copy link
Member

@Holzhaus Holzhaus commented Nov 6, 2024

No description provided.

@Holzhaus
Copy link
Member Author

Holzhaus commented Nov 6, 2024

might be worth backporting to 2.5?

Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

src/controllers/legacycontrollersettings.cpp Outdated Show resolved Hide resolved
src/dialog/dlgreplacecuecolor.cpp Show resolved Hide resolved
src/util/xml.cpp Outdated Show resolved Hide resolved
src/util/db/sqlite.cpp Show resolved Hide resolved
src/preferences/dialog/dlgprefautodj.cpp Outdated Show resolved Hide resolved
src/preferences/dialog/dlgprefautodj.cpp Outdated Show resolved Hide resolved
@Holzhaus Holzhaus changed the base branch from main to 2.5 November 7, 2024 20:42
Fixes warnings such as:

    mixxx/src/controllers/legacycontrollersettings.cpp: In member function ‘virtual QWidget* LegacyControllerBooleaetting::buildInputWidget(QWidget*)’:
    mixxx/src/controllers/legacycontrollersettings.cpp:144:36: error: ‘void QCheckBox::stateChanged(int)’ is depreced: Use checkStateChanged() instead [-Werror=deprecated-declarations]
      144 |     connect(pCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
          |                                    ^~~~~~~~~~~~
    In file included from /usr/include/qt6/QtWidgets/QCheckBox:1,
                     from mixxx/src/controllers/legacycontrollersettings.cpp:5:/usr/include/qt6/QtWidgets/qcheckbox.h:41:10: note: declared here
       41 |     void stateChanged(int);
          |          ^~~~~~~~~~~~
    cc1plus: all warnings being treated as errors
Fixes warnings such as:

    In file included from mixxx/src/library/browse/browsethread.cpp:10:
    mixxx/src/util/datetime.h: In function ‘QDateTime mixxx::localDateTimeFromUtc(const QDateTime&)’:
    mixxx/src/util/datetime.h:16:51: error: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated:
    Pass QTimeZone instead [-Werror=deprecated-declarations]
       16 |     return QDateTime(dt.date(), dt.time(), Qt::UTC).toLocalTime();
          |                                                   ^
    In file included from /usr/include/qt6/QtCore/QDateTime:1,
                     from mixxx/src/util/fileinfo.h:5,
                     from mixxx/src/util/fileaccess.h:3,
                     from mixxx/src/library/browse/browsethread.h:14,
                     from mixxx/src/library/browse/browsethread.cpp:1:
    /usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
      359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
          |     ^~~~~~~~~
    cc1plus: all warnings being treated as errors
Fixes warnings such as:

    mixxx/src/skin/legacy/legacyskinparser.cpp: In static member function ‘static QDomE
    lement LegacySkinParser::openSkin(const QString&)’:
    mixxx/src/skin/legacy/legacyskinparser.cpp:237:25: error: ‘bool QDomDocument::setCo
    ntent(QIODevice*, QString*, int*, int*)’ is deprecated: Use the overload returning ParseResult instead
    . [-Werror=deprecated-declarations]
      237 |     if (!skin.setContent(&skinXmlFile,&errorMessage,&errorLine,&errorColumn)) {
          |          ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /usr/include/qt6/QtXml/QDomElement:1,
                     from mixxx/src/skin/legacy/legacyskinparser.h:3,
                     from mixxx/src/skin/legacy/legacyskinparser.cpp:1:
    /usr/include/qt6/QtXml/qdom.h:330:10: note: declared here
      330 |     bool setContent(QIODevice *dev, QString *errorMsg, int *errorLine = nullptr, int *errorCol
    umn = nullptr);
          |          ^~~~~~~~~~
Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you. Waiting for CI. I look forward into removing all these #ifs again once we caught up 😅

@Swiftb0y
Copy link
Member

Swiftb0y commented Nov 8, 2024

CI is failing in 2.5. Not because of this PR.

@Swiftb0y Swiftb0y merged commit 78dce94 into mixxxdj:2.5 Nov 8, 2024
8 of 11 checks passed
@Holzhaus Holzhaus deleted the qt6.7-deprecated-decls branch November 8, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants