Commit 3fe98c42 authored by Laurent Montel's avatar Laurent Montel 😁

Initialize variables

parent 32de5b8e
......@@ -148,7 +148,7 @@ public:
private:
QList<UIDModelItem*> mChildItems;
QList<QVariant> mItemData;
UIDModelItem *mParentItem;
UIDModelItem *mParentItem = nullptr;
UserID::Signature mSig;
UserID mUid;
};
......@@ -204,7 +204,7 @@ int UserIDListModel::columnCount(const QModelIndex &parent) const
int UserIDListModel::rowCount(const QModelIndex &parent) const
{
UIDModelItem *parentItem;
UIDModelItem *parentItem = nullptr;
if (parent.column() > 0 || !mRootItem) {
return 0;
}
......@@ -224,7 +224,7 @@ QModelIndex UserIDListModel::index(int row, int column, const QModelIndex &paren
return QModelIndex();
}
UIDModelItem *parentItem;
UIDModelItem *parentItem = nullptr;
if (!parent.isValid()) {
parentItem = mRootItem;
......
......@@ -71,7 +71,7 @@ public:
private:
GpgME::Key mKey;
UIDModelItem *mRootItem;
UIDModelItem *mRootItem = nullptr;
};
}
......
......@@ -58,7 +58,7 @@ private Q_SLOTS:
void slotProcessExited(int, QProcess::ExitStatus);
private:
Kleo::GnuPGProcessBase *mProcess;
Kleo::GnuPGProcessBase *mProcess = nullptr;
QString mLastStdout, mLastStderr, mLastStatus;
};
......
......@@ -62,9 +62,9 @@ private:
QString m_log;
#ifdef HAVE_PIMTEXTEDIT
KPIMTextEdit::RichTextEditorWidget *m_textEdit;
KPIMTextEdit::RichTextEditorWidget *m_textEdit = nullptr;
#else
QTextEdit *m_textEdit;
QTextEdit *m_textEdit = nullptr;
#endif
};
......
......@@ -66,8 +66,8 @@ public Q_SLOTS:
void slotChanged();
private:
CryptoConfigModule *mMainWidget;
QDialogButtonBox *mButtonBox;
CryptoConfigModule *mMainWidget = nullptr;
QDialogButtonBox *mButtonBox = nullptr;
};
}
......
......@@ -607,7 +607,7 @@ Kleo::CryptoConfigEntryPath::CryptoConfigEntryPath(
mFileNameRequester(nullptr)
{
const int row = glay->rowCount();
QWidget *req;
QWidget *req = nullptr;
req = mFileNameRequester = new FileNameRequester(widget);
mFileNameRequester->setExistingOnly(false);
mFileNameRequester->setFilter(QDir::Files);
......@@ -650,7 +650,7 @@ Kleo::CryptoConfigEntryDirPath::CryptoConfigEntryDirPath(
mFileNameRequester(nullptr)
{
const int row = glay->rowCount();
QWidget *req;
QWidget *req = nullptr;
req = mFileNameRequester = new FileNameRequester(widget);
mFileNameRequester->setExistingOnly(false);
mFileNameRequester->setFilter(QDir::Dirs);
......
......@@ -78,7 +78,7 @@ private:
void init(Layout layout);
private:
QGpgME::CryptoConfig *mConfig;
QGpgME::CryptoConfig *mConfig = nullptr;
QList<CryptoConfigComponentGUI *> mComponentGUIs;
};
......
......@@ -80,7 +80,7 @@ public:
void defaults();
private:
QGpgME::CryptoConfigComponent *mComponent;
QGpgME::CryptoConfigComponent *mComponent = nullptr;
QList<CryptoConfigGroupGUI *> mGroupGUIs;
};
......@@ -100,7 +100,7 @@ public:
void defaults();
private:
QGpgME::CryptoConfigGroup *mGroup;
QGpgME::CryptoConfigGroup *mGroup = nullptr;
QList<CryptoConfigEntryGUI *> mEntryGUIs;
};
......@@ -161,9 +161,9 @@ protected:
virtual void doSave() = 0;
virtual void doLoad() = 0;
QGpgME::CryptoConfigEntry *mEntry;
QGpgME::CryptoConfigEntry *mEntry = nullptr;
QString mName;
bool mChanged;
bool mChanged = false;
};
/**
......@@ -183,7 +183,7 @@ public:
void doSave() override;
void doLoad() override;
private:
KLineEdit *mLineEdit;
KLineEdit *mLineEdit = nullptr;
};
/**
......@@ -199,7 +199,7 @@ public:
void doSave() override;
void doLoad() override;
private:
QComboBox *mComboBox;
QComboBox *mComboBox = nullptr;
};
/**
......@@ -219,7 +219,7 @@ public:
void doSave() override;
void doLoad() override;
private:
Kleo::FileNameRequester *mFileNameRequester;
Kleo::FileNameRequester *mFileNameRequester = nullptr;
};
/**
......@@ -239,7 +239,7 @@ public:
void doSave() override;
void doLoad() override;
private:
Kleo::FileNameRequester *mFileNameRequester;
Kleo::FileNameRequester *mFileNameRequester = nullptr;
};
/**
......@@ -259,7 +259,7 @@ public:
void doLoad() override;
private:
enum { Int, UInt, ListOfNone } mKind;
QSpinBox *mNumInput;
QSpinBox *mNumInput = nullptr;
};
/**
......@@ -278,7 +278,7 @@ public:
void doSave() override;
void doLoad() override;
private:
QCheckBox *mCheckBox;
QCheckBox *mCheckBox = nullptr;
};
/**
......@@ -300,8 +300,8 @@ private Q_SLOTS:
void slotOpenDialog();
private:
void setURLList(const QList<QUrl> &urlList);
QLabel *mLabel;
QPushButton *mPushButton;
QLabel *mLabel = nullptr;
QPushButton *mPushButton = nullptr;
QList<QUrl> mURLList;
};
......@@ -323,8 +323,8 @@ public:
private Q_SLOTS:
void slotOpenDialog();
private:
QLabel *mLabel;
QPushButton *mPushButton;
QLabel *mLabel = nullptr;
QPushButton *mPushButton = nullptr;
ParsedKeyserver mParsedKeyserver;
};
}
......
......@@ -53,16 +53,16 @@ public:
enum { UUp = 0, Up = 1, Left = 2, Right = 3, Down = 4, DDown = 5 };
#ifndef QT_NO_TREEWIDGET
QTreeWidget *availableLV;
QTreeWidget *currentLV;
QTreeWidget *availableLV = nullptr;
QTreeWidget *currentLV = nullptr;
#endif
QToolButton *navTB[6];
#ifndef QT_NO_TREEWIDGET
QTreeWidgetItem *placeHolderItem;
QTreeWidgetItem *placeHolderItem = nullptr;
#endif
Kleo::DNAttributeMapper *mapper;
Kleo::DNAttributeMapper *mapper = nullptr;
};
#ifndef QT_NO_TREEWIDGET
......
......@@ -55,7 +55,7 @@ public:
Private() : updateTimer(nullptr) {}
std::vector<GpgME::Key> keyBuffer;
QTimer *updateTimer;
QTimer *updateTimer = nullptr;
std::map<QByteArray, KeyListViewItem *> itemMap;
};
......
......@@ -215,9 +215,9 @@ private:
void deregisterItem(const KeyListViewItem *);
private:
const ColumnStrategy *mColumnStrategy;
const DisplayStrategy *mDisplayStrategy;
bool mHierarchical;
const ColumnStrategy *mColumnStrategy = nullptr;
const DisplayStrategy *mDisplayStrategy = nullptr;
bool mHierarchical = false;
class Private;
Private *const d;
......
......@@ -145,9 +145,9 @@ private Q_SLOTS:
private:
const QGpgME::Protocol *mOpenPGPBackend;
const QGpgME::Protocol *mSMIMEBackend;
QLabel *mLabel;
QPushButton *mEraseButton;
QPushButton *mDialogButton;
QLabel *mLabel = nullptr;
QPushButton *mEraseButton = nullptr;
QPushButton *mDialogButton = nullptr;
QString mDialogCaption, mDialogMessage, mInitialQuery;
bool mMulti;
unsigned int mKeyUsage;
......
......@@ -226,12 +226,12 @@ public:
{
}
Kleo::AbstractKeyListModel *model;
Kleo::KeyListSortFilterProxyModel *sortFilterProxy;
ProxyModel *proxyModel;
Kleo::AbstractKeyListModel *model = nullptr;
Kleo::KeyListSortFilterProxyModel *sortFilterProxy = nullptr;
ProxyModel *proxyModel = nullptr;
std::shared_ptr<Kleo::KeyCache> cache;
QString defaultKey;
bool wasEnabled;
bool wasEnabled = false;
private:
KeySelectionCombo * const q;
......
......@@ -184,21 +184,21 @@ private:
void init(bool, bool, const QString &, const QString &);
private:
QVBoxLayout *mTopLayout;
Kleo::KeyListView *mKeyListView;
QVBoxLayout *mTopLayout = nullptr;
Kleo::KeyListView *mKeyListView = nullptr;
const QGpgME::Protocol *mOpenPGPBackend;
const QGpgME::Protocol *mSMIMEBackend;
QCheckBox *mRememberCB;
QCheckBox *mRememberCB = nullptr;
std::vector<GpgME::Key> mSelectedKeys, mKeysToCheck;
unsigned int mKeyUsage;
QTimer *mCheckSelectionTimer;
QTimer *mStartSearchTimer;
QTimer *mCheckSelectionTimer = nullptr;
QTimer *mStartSearchTimer = nullptr;
// cross-eventloop temporaries:
QString mSearchText;
const QString mInitialQuery;
Kleo::KeyListViewItem *mCurrentContextMenuItem;
Kleo::KeyListViewItem *mCurrentContextMenuItem = nullptr;
int mTruncated, mListJobCount, mSavedOffsetY;
QPushButton *mOkButton;
QPushButton *mOkButton = nullptr;
};
}
......
......@@ -71,7 +71,7 @@ private:
void fixup(bool);
private:
QTimer *mBusyTimer;
QTimer *mBusyTimer = nullptr;
int mRealProgress;
};
}
......
......@@ -62,7 +62,7 @@ public:
void connectWatcher();
QFileSystemWatcher *m_watcher;
QFileSystemWatcher *m_watcher = nullptr;
QTimer m_timer;
std::set<QString> m_seenPaths;
std::set<QString> m_cachedDirectories;
......
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