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

RuntimeLoggingCategory: Fix compile error with Qt 6.3.0 #4788

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

Holzhaus
Copy link
Member

@Holzhaus Holzhaus commented Jun 6, 2022

[ 19%] Building CXX object CMakeFiles/mixxx-lib.dir/src/control/controlcompressingproxy.cpp.o
In file included from /usr/include/qt6/QtCore/QLoggingCategory:1,
                 from src/util/runtimeloggingcategory.h:3,
                 from src/control/controlcompressingproxy.h:7,
                 from src/control/controlcompressingproxy.cpp:1:
src/control/controlcompressingproxy.cpp: In member function ‘CompressingProxy::StateOfProcessQueuedEvent CompressingProxy::processQueuedEvents()’:
src/control/controlcompressingproxy.cpp:28:9: error: no matching function for call to ‘{anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder(const RuntimeLoggingCategory&)’
   28 |         qCWarning(m_logger) << "Deleted unprocessed events for " + m_key.group +
      |         ^~~~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:120:5: note: candidate: ‘{anonymous}::QLoggingCategoryMacroHolder<Which>::QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction) [with QtMsgType Which = QtWarningMsg; QMessageLogger::CategoryFunction = const QLoggingCategory& (*)()]’
  120 |     QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction catfunc)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:120:66: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘QMessageLogger::CategoryFunction’ {aka ‘const QLoggingCategory& (*)()’}
  120 |     QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction catfunc)
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:115:5: note: candidate: ‘{anonymous}::QLoggingCategoryMacroHolder<Which>::QLoggingCategoryMacroHolder(const QLoggingCategory&) [with QtMsgType Which = QtWarningMsg]’
  115 |     QLoggingCategoryMacroHolder(const QLoggingCategory &cat)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:115:57: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘const QLoggingCategory&’
  115 |     QLoggingCategoryMacroHolder(const QLoggingCategory &cat)
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/qt6/QtCore/qloggingcategory.h:110:35: note: candidate: ‘constexpr {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder(const {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&)’
  110 | template <QtMsgType Which> struct QLoggingCategoryMacroHolder
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:110:35: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘const {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&’
/usr/include/qt6/QtCore/qloggingcategory.h:110:35: note: candidate: ‘constexpr {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder({anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&&)’
/usr/include/qt6/QtCore/qloggingcategory.h:110:35: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘{anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&&’
src/control/controlcompressingproxy.cpp:46:9: error: no matching function for call to ‘{anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder(const RuntimeLoggingCategory&)’
   46 |         qCWarning(m_logger)
      |         ^~~~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:120:5: note: candidate: ‘{anonymous}::QLoggingCategoryMacroHolder<Which>::QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction) [with QtMsgType Which = QtWarningMsg; QMessageLogger::CategoryFunction = const QLoggingCategory& (*)()]’
  120 |     QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction catfunc)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:120:66: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘QMessageLogger::CategoryFunction’ {aka ‘const QLoggingCategory& (*)()’}
  120 |     QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction catfunc)
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:115:5: note: candidate: ‘{anonymous}::QLoggingCategoryMacroHolder<Which>::QLoggingCategoryMacroHolder(const QLoggingCategory&) [with QtMsgType Which = QtWarningMsg]’
  115 |     QLoggingCategoryMacroHolder(const QLoggingCategory &cat)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:115:57: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘const QLoggingCategory&’
  115 |     QLoggingCategoryMacroHolder(const QLoggingCategory &cat)
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/qt6/QtCore/qloggingcategory.h:110:35: note: candidate: ‘constexpr {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder(const {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&)’
  110 | template <QtMsgType Which> struct QLoggingCategoryMacroHolder
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qloggingcategory.h:110:35: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘const {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&’
/usr/include/qt6/QtCore/qloggingcategory.h:110:35: note: candidate: ‘constexpr {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder({anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&&)’
/usr/include/qt6/QtCore/qloggingcategory.h:110:35: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘{anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&&’
make[2]: *** [CMakeFiles/mixxx-lib.dir/build.make:413: CMakeFiles/mixxx-lib.dir/src/control/controlcompressingproxy.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:295: CMakeFiles/mixxx-lib.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

    [ 19%] Building CXX object CMakeFiles/mixxx-lib.dir/src/control/controlcompressingproxy.cpp.o
    In file included from /usr/include/qt6/QtCore/QLoggingCategory:1,
                     from src/util/runtimeloggingcategory.h:3,
                     from src/control/controlcompressingproxy.h:7,
                     from src/control/controlcompressingproxy.cpp:1:
    src/control/controlcompressingproxy.cpp: In member function ‘CompressingProxy::StateOfProcessQueuedEvent CompressingProxy::processQueuedEvents()’:
    src/control/controlcompressingproxy.cpp:28:9: error: no matching function for call to ‘{anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder(const RuntimeLoggingCategory&)’
       28 |         qCWarning(m_logger) << "Deleted unprocessed events for " + m_key.group +
          |         ^~~~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:120:5: note: candidate: ‘{anonymous}::QLoggingCategoryMacroHolder<Which>::QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction) [with QtMsgType Which = QtWarningMsg; QMessageLogger::CategoryFunction = const QLoggingCategory& (*)()]’
      120 |     QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction catfunc)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:120:66: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘QMessageLogger::CategoryFunction’ {aka ‘const QLoggingCategory& (*)()’}
      120 |     QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction catfunc)
          |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:115:5: note: candidate: ‘{anonymous}::QLoggingCategoryMacroHolder<Which>::QLoggingCategoryMacroHolder(const QLoggingCategory&) [with QtMsgType Which = QtWarningMsg]’
      115 |     QLoggingCategoryMacroHolder(const QLoggingCategory &cat)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:115:57: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘const QLoggingCategory&’
      115 |     QLoggingCategoryMacroHolder(const QLoggingCategory &cat)
          |                                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~
    /usr/include/qt6/QtCore/qloggingcategory.h:110:35: note: candidate: ‘constexpr {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder(const {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&)’
      110 | template <QtMsgType Which> struct QLoggingCategoryMacroHolder
          |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:110:35: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘const {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&’
    /usr/include/qt6/QtCore/qloggingcategory.h:110:35: note: candidate: ‘constexpr {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder({anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&&)’
    /usr/include/qt6/QtCore/qloggingcategory.h:110:35: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘{anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&&’
    src/control/controlcompressingproxy.cpp:46:9: error: no matching function for call to ‘{anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder(const RuntimeLoggingCategory&)’
       46 |         qCWarning(m_logger)
          |         ^~~~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:120:5: note: candidate: ‘{anonymous}::QLoggingCategoryMacroHolder<Which>::QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction) [with QtMsgType Which = QtWarningMsg; QMessageLogger::CategoryFunction = const QLoggingCategory& (*)()]’
      120 |     QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction catfunc)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:120:66: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘QMessageLogger::CategoryFunction’ {aka ‘const QLoggingCategory& (*)()’}
      120 |     QLoggingCategoryMacroHolder(QMessageLogger::CategoryFunction catfunc)
          |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:115:5: note: candidate: ‘{anonymous}::QLoggingCategoryMacroHolder<Which>::QLoggingCategoryMacroHolder(const QLoggingCategory&) [with QtMsgType Which = QtWarningMsg]’
      115 |     QLoggingCategoryMacroHolder(const QLoggingCategory &cat)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:115:57: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘const QLoggingCategory&’
      115 |     QLoggingCategoryMacroHolder(const QLoggingCategory &cat)
          |                                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~
    /usr/include/qt6/QtCore/qloggingcategory.h:110:35: note: candidate: ‘constexpr {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder(const {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&)’
      110 | template <QtMsgType Which> struct QLoggingCategoryMacroHolder
          |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/qt6/QtCore/qloggingcategory.h:110:35: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘const {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&’
    /usr/include/qt6/QtCore/qloggingcategory.h:110:35: note: candidate: ‘constexpr {anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>::QLoggingCategoryMacroHolder({anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&&)’
    /usr/include/qt6/QtCore/qloggingcategory.h:110:35: note:   no known conversion for argument 1 from ‘const RuntimeLoggingCategory’ to ‘{anonymous}::QLoggingCategoryMacroHolder<QtWarningMsg>&&’
    make[2]: *** [CMakeFiles/mixxx-lib.dir/build.make:413: CMakeFiles/mixxx-lib.dir/src/control/controlcompressingproxy.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:295: CMakeFiles/mixxx-lib.dir/all] Error 2
    make: *** [Makefile:166: all] Error 2
@Holzhaus
Copy link
Member Author

Holzhaus commented Jun 6, 2022

QML still doesn't work with qt 6.3, but at least it builds.

Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

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

Haven't tested it yet due to unresolved conflicts of Qt 6.3, a temporary RPM Fusion issue.

LGTM

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 6, 2022

Code LGTM too, unfortunately the build doesn't actually run for me because it hits DEBUG ASSERT: "pManifest.isNull() == pEffectPreset.isNull()" in function void EffectSlot::loadEffectInner(EffectManifestPointer, EffectPresetPointer, bool) at /home/swiftb0y/Sourcerepositories/mixxx/src/effects/effectslot.cpp:289

But I guess thats unrelated to this PR.

@uklotzde uklotzde merged commit b5de404 into mixxxdj:main Jun 6, 2022
@Holzhaus
Copy link
Member Author

Holzhaus commented Jun 7, 2022

Code LGTM too, unfortunately the build doesn't actually run for me because it hits DEBUG ASSERT: "pManifest.isNull() == pEffectPreset.isNull()" in function void EffectSlot::loadEffectInner(EffectManifestPointer, EffectPresetPointer, bool) at /home/swiftb0y/Sourcerepositories/mixxx/src/effects/effectslot.cpp:289

For me it doesn't run because the QML files fail to load (missing QML elements). Weird.

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 7, 2022

Mhmm. Do you have some uncommited qml files in your local repo?

@Holzhaus
Copy link
Member Author

Holzhaus commented Jun 7, 2022

Mhmm. Do you have some uncommited qml files in your local repo?

No. They probably changed something w.r.t. C++ QML plugin loading:

warning [Main] QQmlApplicationEngine failed to load component
warning [Main] file:///home/jan/Projects/mixxx/res/qml/main.qml:91:21: Type DeveloperToolsWindow unavailable
warning [Main] file:///home/jan/Projects/mixxx/res/qml/DeveloperToolsWindow.qml:115:20: Mixxx.ControlSortFilterModel is not a type
critical [Main] Failed to load QML file "/home/jan/Projects/mixxx/res/qml/main.qml"

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 7, 2022

Ok I can reproduce that as well, but only when working around the debug assert by using a new/clean settings directory. Using my pre-existing one breaks mixxx on startup. So is migration from 2.3 to 2.4 broken?

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 7, 2022

Nevermind, I think I just figured it out... It hits the debug assert when you request a non-existent effect. I previously tested #4775 with the same settings directory.

@Swiftb0y
Copy link
Member

Swiftb0y commented Jun 7, 2022

Also... The Qt4/5 gdb pretty printers from Kdevelop are partially broken for Qt6 (QStrings are always empty)... So don't use them for now I guess.

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.

3 participants