aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgKeyTableModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/model/GpgKeyTableModel.cpp')
-rw-r--r--src/core/model/GpgKeyTableModel.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/model/GpgKeyTableModel.cpp b/src/core/model/GpgKeyTableModel.cpp
index d5de3844..0938fbe0 100644
--- a/src/core/model/GpgKeyTableModel.cpp
+++ b/src/core/model/GpgKeyTableModel.cpp
@@ -53,7 +53,14 @@ GpgKeyTableModel::GpgKeyTableModel(int channel,
auto GpgKeyTableModel::index(int row, int column,
const QModelIndex &parent) const -> QModelIndex {
if (!hasIndex(row, column, parent) || parent.isValid()) return {};
- return createIndex(row, column, &cached_items_[row]);
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ return createIndex(row, column,
+ static_cast<const void *>(&cached_items_[row]));
+#else
+ return createIndex(
+ row, column,
+ const_cast<void *>(static_cast<const void *>(&cached_items_[row])));
+#endif
}
auto GpgKeyTableModel::rowCount(const QModelIndex & /*parent*/) const -> int {