Commit e9036771 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify private pointer class

parent 5f160db2
Pipeline #26554 passed with stage
in 55 minutes and 12 seconds
......@@ -615,7 +615,8 @@ struct Q_DECL_HIDDEN Kleo::KeyResolver::Private {
};
Kleo::KeyResolver::KeyResolver(bool encToSelf, bool showApproval, bool oppEncryption, unsigned int f, int encrWarnThresholdKey, int signWarnThresholdKey, int encrWarnThresholdRootCert, int signWarnThresholdRootCert, int encrWarnThresholdChainCert, int signWarnThresholdChainCert)
: mEncryptToSelf(encToSelf)
: d(new Private)
, mEncryptToSelf(encToSelf)
, mShowApprovalDialog(showApproval)
, mOpportunisticEncyption(oppEncryption)
, mCryptoMessageFormats(f)
......@@ -626,13 +627,11 @@ Kleo::KeyResolver::KeyResolver(bool encToSelf, bool showApproval, bool oppEncryp
, mEncryptChainCertNearExpiryWarningThreshold(encrWarnThresholdChainCert)
, mSigningChainCertNearExpiryWarningThreshold(signWarnThresholdChainCert)
{
d = new Private();
}
Kleo::KeyResolver::~KeyResolver()
{
delete d;
d = nullptr;
}
Kleo::Result Kleo::KeyResolver::checkKeyNearExpiry(const GpgME::Key &key, const char *dontAskAgainName, bool mine, bool sign, bool ca, int recur_limit, const GpgME::Key &orig) const
......
......@@ -273,7 +273,7 @@ private:
friend class ::Kleo::KeyResolver::SigningPreferenceCounter;
struct Private;
Private *d;
Private *const d;
bool mEncryptToSelf;
const bool mShowApprovalDialog : 1;
......
......@@ -137,7 +137,6 @@ View::~View()
d->mAggregation = nullptr;
delete d;
d = nullptr;
}
Model *View::model() const
......
......@@ -631,7 +631,7 @@ protected Q_SLOTS:
private:
class Private;
Private *d;
Private *const d;
}; // class View
} // namespace Core
} // namespace MessageList
......
......@@ -44,7 +44,7 @@ public:
void render(const MimeTreeParser::MessagePartPtr &msgPart, HtmlWriter *writer);
void setShowEncryptionDetails(bool showEncryptionDetails);
private:
DefaultRendererPrivate *d;
DefaultRendererPrivate *const d;
};
}
#endif //__MESSAGEVIEWER_MAILRENDERER_H
......@@ -44,7 +44,7 @@ protected:
private:
Q_DISABLE_COPY(BodyPartFormatterFactory)
BodyPartFormatterFactoryPrivate *d;
BodyPartFormatterFactoryPrivate *const d;
friend class BodyPartFormatterFactoryPrivate;
};
}
......
......@@ -60,7 +60,7 @@ public:
WebHitTestResult &operator=(const WebHitTestResult &webHit);
private:
WebHitTestResultPrivate *d;
WebHitTestResultPrivate *const d;
};
}
Q_DECLARE_METATYPE(WebEngineViewer::WebHitTestResult)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment