aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgKeyTableModel.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-17 20:56:38 +0000
committersaturneric <[email protected]>2025-04-17 20:56:38 +0000
commit8b17b911711d250f09fe81c7fe5ee380d252b919 (patch)
tree2776949e4f0d0c05dee6d65149ffb5ff635da7ec /src/core/model/GpgKeyTableModel.cpp
parentfix: issues found on linux platform (diff)
downloadGpgFrontend-8b17b911711d250f09fe81c7fe5ee380d252b919.tar.gz
GpgFrontend-8b17b911711d250f09fe81c7fe5ee380d252b919.zip
fix: qt5 build issues
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 {