From 360da46157e123f8795e734955ad1a66f9a4b2c9 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 1 Jul 2022 14:43:45 +0200 Subject: [PATCH] HistoryView: fix deprecation warning --- src/model/HistoryView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/HistoryView.cpp b/src/model/HistoryView.cpp index 86202f7..047daec 100644 --- a/src/model/HistoryView.cpp +++ b/src/model/HistoryView.cpp @@ -116,8 +116,8 @@ void HistoryView::showHeaderMenu(const QPoint& position) { const QList actions = m_columnActions->actions(); for (auto& action : actions) { - Q_ASSERT(static_cast(action->data().type()) == QMetaType::Int); - if (static_cast(action->data().type()) != QMetaType::Int) { + Q_ASSERT(static_cast(action->data().typeId()) == QMetaType::Int); + if (static_cast(action->data().typeId()) != 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(action->data().type()) == QMetaType::Int); - if (static_cast(action->data().type()) != QMetaType::Int) { + Q_ASSERT(static_cast(action->data().typeId()) == QMetaType::Int); + if (static_cast(action->data().typeId()) != QMetaType::Int) { return; }