]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
Revert "HistoryView: fix deprecation warning"
authortobtoht <thotbot@protonmail.com>
Sat, 2 Jul 2022 19:58:38 +0000 (21:58 +0200)
committertobtoht <thotbot@protonmail.com>
Sat, 2 Jul 2022 19:58:38 +0000 (21:58 +0200)
This reverts commit 360da46157e123f8795e734955ad1a66f9a4b2c9.

src/model/HistoryView.cpp

index 047daecbbc2f62188aa47a3e05ea51f3969c1bff..86202f713cf0e9b6e357c046e18907e02c18ce33 100644 (file)
@@ -116,8 +116,8 @@ void HistoryView::showHeaderMenu(const QPoint& position)
 {
     const QList<QAction*> actions = m_columnActions->actions();
     for (auto& action : actions) {
-        Q_ASSERT(static_cast<QMetaType::Type>(action->data().typeId()) == QMetaType::Int);
-        if (static_cast<QMetaType::Type>(action->data().typeId()) != QMetaType::Int) {
+        Q_ASSERT(static_cast<QMetaType::Type>(action->data().type()) == QMetaType::Int);
+        if (static_cast<QMetaType::Type>(action->data().type()) != QMetaType::Int) {
             continue;
         }
         int columnIndex = action->data().toInt();
@@ -132,8 +132,8 @@ void HistoryView::toggleColumnVisibility(QAction* action)
     // Verify action carries a column index as data. Since QVariant.toInt()
     // below will accept anything that's interpretable as int, perform a type
     // check here to make sure data actually IS int
-    Q_ASSERT(static_cast<QMetaType::Type>(action->data().typeId()) == QMetaType::Int);
-    if (static_cast<QMetaType::Type>(action->data().typeId()) != QMetaType::Int) {
+    Q_ASSERT(static_cast<QMetaType::Type>(action->data().type()) == QMetaType::Int);
+    if (static_cast<QMetaType::Type>(action->data().type()) != QMetaType::Int) {
         return;
     }