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

Initialize variable in header

parent e2f22d09
Pipeline #33197 passed with stage
in 6 minutes and 52 seconds
......@@ -100,7 +100,8 @@ private:
const QString m_label;
const QString m_outputFileName;
const QStringList m_patterns;
ArgumentPassingMethod m_createMethod, m_verifyMethod;
ArgumentPassingMethod m_createMethod = CommandLine;
ArgumentPassingMethod m_verifyMethod = CommandLine;
};
}
......
......@@ -33,11 +33,6 @@ class DefaultKeyFilter::Private
public:
Private() :
mMatchContexts(AnyMatchContext),
mSpecificity(0),
mItalic(false),
mBold(false),
mStrikeOut(false),
mUseFullFont(false),
mRevoked(DoesNotMatter),
mExpired(DoesNotMatter),
mDisabled(DoesNotMatter),
......@@ -62,11 +57,11 @@ public:
QString mIcon;
QString mId;
MatchContexts mMatchContexts;
unsigned int mSpecificity;
bool mItalic;
bool mBold;
bool mStrikeOut;
bool mUseFullFont;
unsigned int mSpecificity = 0;
bool mItalic = false;
bool mBold = false;
bool mStrikeOut = false;
bool mUseFullFont = false;
QFont mFont;
TriState mRevoked;
......
......@@ -555,7 +555,7 @@ public:
Q_EMIT q->keysResolved(true, false);
}
KeyResolver *q;
KeyResolver *const q;
QString mSender;
QStringList mRecipients;
QStringList mHiddenRecipients;
......
......@@ -54,15 +54,11 @@ Q_DECLARE_METATYPE(GpgME::Key)
class AbstractKeyListModel::Private
{
public:
Private() :
m_toolTipOptions(Formatting::Validity),
m_useKeyCache(false),
m_secretOnly(false) {}
int m_toolTipOptions;
int m_toolTipOptions = Formatting::Validity;
mutable QHash<const char *, QVariant> prettyEMailCache;
mutable QHash<const char *, QVariant> remarksCache;
bool m_useKeyCache;
bool m_secretOnly;
bool m_useKeyCache = false;
bool m_secretOnly = false;
std::vector<GpgME::Key> m_remarkKeys;
};
AbstractKeyListModel::AbstractKeyListModel(QObject *p)
......@@ -305,6 +301,7 @@ QVariant AbstractKeyListModel::data(const QModelIndex &index, int role) const
return d->remarksCache[fpr] = remark;
} else {
QStringList remarkList;
remarkList.reserve(remarks.size());
for (const auto &rem: remarks) {
remarkList << QString::fromStdString(rem);
}
......
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