From 8d64db6be31b55e3c4f4dbe211cd8e0972c32c4e Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt Date: Tue, 24 Apr 2018 11:53:33 +0200 Subject: [PATCH] Const-ify remFromCont() --- lib/db_base.cpp | 2 +- lib/db_base.h | 2 +- lib/db_key.cpp | 2 +- lib/db_key.h | 2 +- lib/db_x509.cpp | 2 +- lib/db_x509.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/db_base.cpp b/lib/db_base.cpp index ee74b51c..c963808e 100644 --- a/lib/db_base.cpp +++ b/lib/db_base.cpp @@ -56,7 +56,7 @@ void db_base::createSuccess(pki_base *pki) XCA_INFO(pki->getMsg(pki_base::msg_create).arg(pki->getIntName())); } -void db_base::remFromCont(QModelIndex &idx) +void db_base::remFromCont(const QModelIndex &idx) { if (!idx.isValid()) return; diff --git a/lib/db_base.h b/lib/db_base.h index 54465d2d..8959d181 100644 --- a/lib/db_base.h +++ b/lib/db_base.h @@ -115,7 +115,7 @@ class db_base: public QAbstractItemModel } virtual pki_base* insert(pki_base *item); virtual void inToCont(pki_base *pki); - virtual void remFromCont(QModelIndex &idx); + virtual void remFromCont(const QModelIndex &idx); QPixmap *loadImg(const char *name); void writeAll(void); diff --git a/lib/db_key.cpp b/lib/db_key.cpp index e913a43f..95605fcc 100644 --- a/lib/db_key.cpp +++ b/lib/db_key.cpp @@ -91,7 +91,7 @@ QList db_key::getUnusedKeys() "WHERE x509super.item IS NULL"); } -void db_key::remFromCont(QModelIndex &idx) +void db_key::remFromCont(const QModelIndex &idx) { db_base::remFromCont(idx); XSqlQuery q; diff --git a/lib/db_key.h b/lib/db_key.h index 86ed58d8..97ea4971 100644 --- a/lib/db_key.h +++ b/lib/db_key.h @@ -30,7 +30,7 @@ class db_key: public db_base QList getAllKeys(); pki_base *newPKI(enum pki_type type = none); void inToCont(pki_base *pki); - void remFromCont(QModelIndex &idx); + void remFromCont(const QModelIndex &idx); pki_base* insert(pki_base *item); void writeAll(); void setOwnPass(QModelIndex idx, enum pki_key::passType); diff --git a/lib/db_x509.cpp b/lib/db_x509.cpp index 03245dbd..8c21a5a8 100644 --- a/lib/db_x509.cpp +++ b/lib/db_x509.cpp @@ -95,7 +95,7 @@ QList db_x509::getAllIssuers() "WHERE certs.ca=1"); } -void db_x509::remFromCont(QModelIndex &idx) +void db_x509::remFromCont(const QModelIndex &idx) { db_x509super::remFromCont(idx); pki_base *pki = static_cast(idx.internalPointer()); diff --git a/lib/db_x509.h b/lib/db_x509.h index 6b59180c..b56d0588 100644 --- a/lib/db_x509.h +++ b/lib/db_x509.h @@ -38,7 +38,7 @@ class db_x509: public db_x509super bool updateView(); void updateViewAll(); void updateViewPKI(pki_base *pki); - void remFromCont(QModelIndex &idx); + void remFromCont(const QModelIndex &idx); QList getAllIssuers(); QList getCerts(bool unrevoked); void writeIndex(const QString fname, bool hierarchy);