rizinorg/cutter

Qt 6 deprecations: 'type()', `QVariant::Bool`, `paletteChanged`, `fromUtf16`

Open

#3 034 ouverte le 22 août 2022

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)C++ (1 123 forks)batch import
Qtgood first issue

Métriques du dépôt

Stars
 (14 852 stars)
Métriques de merge PR
 (Merge moyen 8j 12h) (6 PRs mergées en 30 j)

Description

Environment information

Describe the bug

/Users/user/Rizin/cutter/src/common/Configuration.cpp:595:28: warning: 'type' is deprecated: Use typeId() or metaType(). [-Wdeprecated-declarations]
        switch (it.value().type()) {
                           ^
/opt/homebrew/include/QtCore/qvariant.h:331:5: note: 'type' has been explicitly marked deprecated here
    QT_DEPRECATED_VERSION_X_6_0("Use typeId() or metaType().")
    ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
/Users/user/Rizin/cutter/src/common/Configuration.cpp:596:28: warning: 'Type' is deprecated: Use QMetaType::Type instead. [-Wdeprecated-declarations]
        case QVariant::Type::Bool:
                           ^
/opt/homebrew/include/QtCore/qvariant.h:98:10: note: 'Type' has been explicitly marked deprecated here
    enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
         ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
/Users/user/Rizin/cutter/src/common/Configuration.cpp:596:30: warning: 'Bool' is deprecated: Use QMetaType::Type instead. [-Wdeprecated-declarations]
        case QVariant::Type::Bool:
                             ^
/opt/homebrew/include/QtCore/qvariant.h:98:10: note: 'Type' has been explicitly marked deprecated here
    enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
         ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
/Users/user/Rizin/cutter/src/common/Configuration.cpp:598:28: warning: 'Type' is deprecated: Use QMetaType::Type instead. [-Wdeprecated-declarations]
        case QVariant::Type::Int:
                           ^
/opt/homebrew/include/QtCore/qvariant.h:98:10: note: 'Type' has been explicitly marked deprecated here
    enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
         ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
/Users/user/Rizin/cutter/src/common/Configuration.cpp:598:30: warning: 'Int' is deprecated: Use QMetaType::Type instead. [-Wdeprecated-declarations]
        case QVariant::Type::Int:
                             ^
/opt/homebrew/include/QtCore/qvariant.h:98:10: note: 'Type' has been explicitly marked deprecated here
    enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
         ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
5 warnings generated.
                item->setText(0, QString::fromUtf16(reinterpret_cast<const ushort *>(key_utf16)));
                                          ^
/opt/homebrew/lib/QtCore.framework/Headers/qstring.h:799:5: note: 'fromUtf16' has been explicitly marked deprecated here
    QT_DEPRECATED_VERSION_X_6_0("Use char16_t* overload.")
    ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
/Users/user/Rizin/cutter/src/dialogs/VersionInfoDialog.cpp:227:43: warning: 'fromUtf16' is deprecated: Use char16_t* overload. [-Wdeprecated-declarations]
                item->setText(1, QString::fromUtf16(reinterpret_cast<const ushort *>(val_utf16)));
                                          ^
/opt/homebrew/lib/QtCore.framework/Headers/qstring.h:799:5: note: 'fromUtf16' has been explicitly marked deprecated here
    QT_DEPRECATED_VERSION_X_6_0("Use char16_t* overload.")
    ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]
/Users/user/Rizin/cutter/src/widgets/ColorThemeListView.cpp:35:37: warning: 'paletteChanged' is deprecated: Handle QEvent::ApplicationPaletteChange instead [-Wdeprecated-declarations]
    connect(qApp, &QGuiApplication::paletteChanged, this, [this]() {
                                    ^
/opt/homebrew/include/QtGui/qguiapplication.h:195:5: note: 'paletteChanged' has been explicitly marked deprecated here
    QT_DEPRECATED_VERSION_X_6_0("Handle QEvent::ApplicationPaletteChange instead") void paletteChanged(const QPalette &pal);
    ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
/Users/user/Rizin/cutter/src/widgets/ColorThemeListView.cpp:200:29: warning: 'fontMetrics' is deprecated: Use the QFontMetricsF constructor instead. [-Wdeprecated-declarations]
    QPixmap pix(QSize(qApp->fontMetrics().height(), qApp->fontMetrics().height()));
                            ^
/opt/homebrew/lib/QtWidgets.framework/Headers/qapplication.h:105:5: note: 'fontMetrics' has been explicitly marked deprecated here
    QT_DEPRECATED_VERSION_X_6_0("Use the QFontMetricsF constructor instead.")
    ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
/Users/user/Rizin/cutter/src/widgets/ColorThemeListView.cpp:200:59: warning: 'fontMetrics' is deprecated: Use the QFontMetricsF constructor instead. [-Wdeprecated-declarations]
    QPixmap pix(QSize(qApp->fontMetrics().height(), qApp->fontMetrics().height()));
                                                          ^
/opt/homebrew/lib/QtWidgets.framework/Headers/qapplication.h:105:5: note: 'fontMetrics' has been explicitly marked deprecated here
    QT_DEPRECATED_VERSION_X_6_0("Use the QFontMetricsF constructor instead.")
    ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^

/Users/user/Rizin/cutter/src/widgets/BoolToggleDelegate.cpp:9:34: warning: 'type' is deprecated: Use typeId() or metaType(). [-Wdeprecated-declarations]
    if (index.data(Qt::EditRole).type() == QVariant::Bool) {
                                 ^
/opt/homebrew/include/QtCore/qvariant.h:331:5: note: 'type' has been explicitly marked deprecated here
    QT_DEPRECATED_VERSION_X_6_0("Use typeId() or metaType().")
    ^
/opt/homebrew/include/QtCore/qglobal.h:441:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_0'
# define QT_DEPRECATED_VERSION_X_6_0(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/include/QtCore/qglobal.h:353:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:1120:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]

Expected behavior

No deprecation warnings

See also:

Guide contributeur