Commit 7c258af7 authored by Laurent Montel's avatar Laurent Montel 😁

initialize pointer

parent a0b28eca
......@@ -44,7 +44,7 @@ void EntityTreeCreateJob::doStart()
void EntityTreeCreateJob::createNextLevelOfCollections()
{
CollectionCreateJob *job;
CollectionCreateJob *job = nullptr;
const Collection::List colList = m_collections.takeFirst();
for (const Collection &collection : colList) {
......
......@@ -337,10 +337,9 @@ ServerTypePage::ServerTypePage(QWidget *parent)
mServerGroup = new QButtonGroup(this);
mServerGroup->setExclusive(true);
QRadioButton *button;
QHBoxLayout *hLayout = new QHBoxLayout;
button = new QRadioButton(i18n("Use one of those servers:"));
QRadioButton *button = new QRadioButton(i18n("Use one of those servers:"));
registerField(QStringLiteral("templateConfiguration"), button);
mServerGroup->addButton(button);
mServerGroup->setId(button, 0);
......
......@@ -152,7 +152,7 @@ protected:
//Starts and queues a task
void startTask(ResourceTask *task);
void queueTask(ResourceTask *task);
SessionPool *m_pool;
SessionPool *m_pool = nullptr;
mutable Settings *m_settings;
private:
......@@ -165,8 +165,8 @@ private:
QList<ResourceTask *> m_taskList; //used to be able to kill tasks
QPointer<SubscriptionDialog> mSubscriptions;
ImapIdleManager *m_idle;
QTimer *m_statusMessageTimer;
ImapIdleManager *m_idle = nullptr;
QTimer *m_statusMessageTimer = nullptr;
QChar m_separatorCharacter;
};
......
......@@ -51,9 +51,9 @@ private Q_SLOTS:
private:
QString requestManualAuth(bool *userRejected);
ImapResourceBase *m_resource;
QDialog *m_requestDialog;
QDialog *m_settingsDialog;
ImapResourceBase *m_resource = nullptr;
QDialog *m_requestDialog = nullptr;
QDialog *m_settingsDialog = nullptr;
};
#endif
......@@ -83,18 +83,18 @@ private:
void readSettings();
void populateDefaultAuthenticationOptions();
ImapResourceBase *m_parentResource;
Ui::SetupServerView *m_ui;
MailTransport::ServerTest *m_serverTest;
bool m_subscriptionsChanged;
bool m_shouldClearCache;
ImapResourceBase *m_parentResource = nullptr;
Ui::SetupServerView *m_ui = nullptr;
MailTransport::ServerTest *m_serverTest = nullptr;
bool m_subscriptionsChanged = false;
bool m_shouldClearCache = false;
QString m_vacationFileName;
KIdentityManagement::IdentityCombo *m_identityCombobox;
KIdentityManagement::IdentityCombo *m_identityCombobox = nullptr;
QString m_oldResourceName;
QRegExpValidator mValidator;
Akonadi::Collection mOldTrash;
FolderArchiveSettingPage *m_folderArchiveSettingPage;
QPushButton *mOkButton;
FolderArchiveSettingPage *m_folderArchiveSettingPage = nullptr;
QPushButton *mOkButton = nullptr;
private Q_SLOTS:
void slotTest();
......
......@@ -58,7 +58,7 @@ private Q_SLOTS:
void onReplaceDone(KJob *job);
private:
KIMAP::Session *mSession;
KIMAP::Session *mSession = nullptr;
KMime::Message::Ptr mMessage;
const QString mMailbox;
qint64 mUidNext;
......
......@@ -96,11 +96,11 @@ private:
void restartMaildirScan(const KPIM::Maildir &maildir);
private:
Akonadi_Maildir_Resource::MaildirSettings *mSettings;
KDirWatch *mFsWatcher;
Akonadi_Maildir_Resource::MaildirSettings *mSettings = nullptr;
KDirWatch *mFsWatcher = nullptr;
QHash<QString, KPIM::Maildir> mMaildirsForCollection;
QSet<QString> mChangedFiles; //files changed by the resource and that should be ignored in slotFileChanged
QTimer *mChangedCleanerTimer;
QTimer *mChangedCleanerTimer = nullptr;
};
#endif
......@@ -61,9 +61,9 @@ private:
KPIM::Maildir m_maildir;
QHash<QString, Akonadi::Item> m_localItems;
QString m_mimeType;
Akonadi::TransactionSequence *m_transaction;
Akonadi::TransactionSequence *m_transaction = nullptr;
int m_transactionSize;
QDirIterator *m_entryIterator;
QDirIterator *m_entryIterator = nullptr;
qint64 m_previousMtime;
qint64 m_highestMtime;
QString m_listingPath;
......
......@@ -62,7 +62,7 @@ private Q_SLOTS:
private:
QHash<KJob *, Akonadi::Item> mCurrentItemDeletions;
KMBox::MBox *mMBox;
KMBox::MBox *mMBox = nullptr;
};
#endif
......@@ -47,8 +47,8 @@ public:
}
private:
MixedMaildirStore *mStore;
QTemporaryDir *mDir;
MixedMaildirStore *mStore = nullptr;
QTemporaryDir *mDir = nullptr;
private Q_SLOTS:
void init();
......
......@@ -45,8 +45,8 @@ public:
}
private:
MixedMaildirStore *mStore;
QTemporaryDir *mDir;
MixedMaildirStore *mStore = nullptr;
QTemporaryDir *mDir = nullptr;
private Q_SLOTS:
void init();
......
......@@ -69,8 +69,8 @@ public:
}
private:
MixedMaildirStore *mStore;
QTemporaryDir *mDir;
MixedMaildirStore *mStore = nullptr;
QTemporaryDir *mDir = nullptr;
private Q_SLOTS:
void init();
......
......@@ -49,8 +49,8 @@ public:
}
private:
MixedMaildirStore *mStore;
QTemporaryDir *mDir;
MixedMaildirStore *mStore = nullptr;
QTemporaryDir *mDir = nullptr;
private Q_SLOTS:
void init();
......
......@@ -49,8 +49,8 @@ public:
}
private:
MixedMaildirStore *mStore;
QTemporaryDir *mDir;
MixedMaildirStore *mStore = nullptr;
QTemporaryDir *mDir = nullptr;
private Q_SLOTS:
void init();
......
......@@ -53,8 +53,8 @@ public:
}
private:
MixedMaildirStore *mStore;
QTemporaryDir *mDir;
MixedMaildirStore *mStore = nullptr;
QTemporaryDir *mDir = nullptr;
private Q_SLOTS:
void init();
......
......@@ -68,8 +68,8 @@ public:
}
private:
MixedMaildirStore *mStore;
QTemporaryDir *mDir;
MixedMaildirStore *mStore = nullptr;
QTemporaryDir *mDir = nullptr;
private Q_SLOTS:
void init();
......
......@@ -55,7 +55,7 @@ public:
public:
Collection mTopLevelCollection;
mutable FileStore::Job *mLastCheckedJob;
mutable FileStore::Job *mLastCheckedJob = nullptr;
mutable int mErrorCode;
mutable QString mErrorText;
......@@ -96,7 +96,7 @@ public:
private:
QTemporaryDir mDir;
TestStore *mStore;
TestStore *mStore = nullptr;
private Q_SLOTS:
void init();
......
......@@ -49,12 +49,12 @@ class CompactChangeHelper::Private
CompactChangeHelper *const q;
public:
explicit Private(CompactChangeHelper *parent) : q(parent), mSession(nullptr)
explicit Private(CompactChangeHelper *parent) : q(parent)
{
}
public:
Session *mSession;
Session *mSession = nullptr;
CollectionRevisionMap mChangesByCollection;
QQueue<UpdateBatch> mPendingUpdates;
UpdateBatch mCurrentUpdate;
......
......@@ -30,8 +30,7 @@
using KPIM::Maildir;
ConfigDialog::ConfigDialog(QWidget *parent) :
QDialog(parent),
mToplevelIsContainer(false)
QDialog(parent)
{
setWindowTitle(i18n("Select a KMail Mail folder"));
QWidget *mainWidget = new QWidget(this);
......
......@@ -39,9 +39,9 @@ private Q_SLOTS:
private:
Ui::ConfigDialog ui;
KConfigDialogManager *mManager;
QPushButton *mOkButton;
bool mToplevelIsContainer;
KConfigDialogManager *mManager = nullptr;
QPushButton *mOkButton = nullptr;
bool mToplevelIsContainer = false;
};
#endif
......@@ -92,7 +92,7 @@ private Q_SLOTS:
void tagFetchJobResult(KJob *job);
private:
MixedMaildirStore *mStore;
MixedMaildirStore *mStore = nullptr;
struct TagContext {
Akonadi::Item mItem;
......@@ -106,7 +106,7 @@ private:
QSet<Akonadi::Collection::Id> mSynchronizedCollections;
QSet<Akonadi::Collection::Id> mPendingSynchronizeCollections;
CompactChangeHelper *mCompactHelper;
CompactChangeHelper *mCompactHelper = nullptr;
};
#endif
......
......@@ -76,7 +76,7 @@ public:
public:
const Collection mCollection;
MixedMaildirStore *const mStore;
TransactionSequence *mTransaction;
TransactionSequence *mTransaction = nullptr;
QHash<QString, Item> mServerItemsByRemoteId;
......
......@@ -41,11 +41,11 @@ private Q_SLOTS:
void checkConnectionJobFinished(KJob *);
private:
KConfigDialogManager *mManager;
KLineEdit *mServerEdit;
KLineEdit *mUserEdit;
KLineEdit *mPasswordEdit;
QPushButton *mCheckConnectionButton;
KConfigDialogManager *mManager = nullptr;
KLineEdit *mServerEdit = nullptr;
KLineEdit *mUserEdit = nullptr;
KLineEdit *mPasswordEdit = nullptr;
QPushButton *mCheckConnectionButton = nullptr;
};
#endif
......@@ -74,14 +74,14 @@ private:
void populateDefaultAuthenticationOptions();
private:
POP3Resource *mParentResource;
QButtonGroup *encryptionButtonGroup;
MailTransport::ServerTest *mServerTest;
POP3Resource *mParentResource = nullptr;
QButtonGroup *encryptionButtonGroup = nullptr;
MailTransport::ServerTest *mServerTest = nullptr;
QRegExpValidator mValidator;
bool mServerTestFailed;
KWallet::Wallet *mWallet;
bool mServerTestFailed = false;
KWallet::Wallet *mWallet = nullptr;
QString mInitalPassword;
QPushButton *mOkButton;
QPushButton *mOkButton = nullptr;
};
#endif
......@@ -68,11 +68,11 @@ private:
QList<QByteArray> mAllowedDeletions;
QList<QByteArray> mAllowedRetrieves;
QList<QByteArray> mMails;
QTcpServer *mTcpServer;
QTcpSocket *mTcpServerConnection;
QTcpServer *mTcpServer = nullptr;
QTcpSocket *mTcpServerConnection = nullptr;
int mConnections;
int mProgress;
bool mGotDisconnected;
bool mGotDisconnected = false;
// We use one big mutex to protect everything
// There shouldn't be deadlocks, as there are only 2 places where the functions
......@@ -98,7 +98,7 @@ public:
private:
FakeServer *mServer;
FakeServer *mServer = nullptr;
};
#endif
......
......@@ -69,7 +69,7 @@ private:
QString authenticationToString(int type) const;
QPointer<KIO::Slave> mSlave;
SlaveBaseJob *mCurrentJob;
SlaveBaseJob *mCurrentJob = nullptr;
QString mPassword;
};
......@@ -93,8 +93,8 @@ protected:
void startJob(const QString &path);
virtual void connectJob();
KIO::TransferJob *mJob;
POPSession *mPOPSession;
KIO::TransferJob *mJob = nullptr;
POPSession *mPOPSession = nullptr;
};
class LoginJob : public SlaveBaseJob
......
......@@ -149,14 +149,14 @@ private:
State mState;
Akonadi::Collection mTargetCollection;
POPSession *mPopSession;
POPSession *mPopSession = nullptr;
bool mAskAgain;
QTimer *mIntervalTimer;
QTimer *mIntervalTimer = nullptr;
bool mIntervalCheckInProgress;
QString mPassword;
bool mSavePassword;
bool mTestLocalInbox;
KWallet::Wallet *mWallet;
KWallet::Wallet *mWallet = nullptr;
// Maps IDs on the server to message sizes on the server
QMap<int, int> mIdsToSizeMap;
......
......@@ -48,8 +48,8 @@ public:
TestStore() : mLastCheckedJob(nullptr), mLastProcessedJob(nullptr), mErrorCode(0) {}
public:
mutable Akonadi::FileStore::Job *mLastCheckedJob;
Akonadi::FileStore::Job *mLastProcessedJob;
mutable Akonadi::FileStore::Job *mLastCheckedJob = nullptr;
Akonadi::FileStore::Job *mLastProcessedJob = nullptr;
Collection mTopLevelCollection;
......
......@@ -118,8 +118,8 @@ protected:
QUrl refreshTokenUrl_;
QString verifier_;
QString signatureMethod_;
QNetworkAccessManager *manager_;
O2ReplyServer *replyServer_;
QNetworkAccessManager *manager_ = nullptr;
O2ReplyServer *replyServer_ = nullptr;
};
#endif // O1_H
......@@ -54,8 +54,8 @@ protected:
/// Augment reply with a timer.
QNetworkReply *addTimer(QNetworkReply *reply);
QNetworkAccessManager *manager_;
O1 *authenticator_;
QNetworkAccessManager *manager_ = nullptr;
O1 *authenticator_ = nullptr;
};
#endif // O1REQUESTOR_H
......@@ -160,8 +160,8 @@ protected:
QString code_;
QString localhostPolicy_;
QString apiKey_;
QNetworkAccessManager *manager_;
O2ReplyServer *replyServer_;
QNetworkAccessManager *manager_ = nullptr;
O2ReplyServer *replyServer_ = nullptr;
O2ReplyList timedReplies_;
GrantFlow grantFlow_;
};
......
......@@ -67,11 +67,11 @@ protected:
Idle, Requesting, ReRequesting
};
QNetworkAccessManager *manager_;
O2 *authenticator_;
QNetworkAccessManager *manager_ = nullptr;
O2 *authenticator_ = nullptr;
QNetworkRequest request_;
QByteArray data_;
QNetworkReply *reply_;
QNetworkReply *reply_ = nullptr;
Status status_;
int id_;
QNetworkAccessManager::Operation operation_;
......
......@@ -42,10 +42,10 @@ public:
void setAuthentication(const QString &token, const QString &secret);
protected:
KIO::Integration::AccessManager *mManager;
O1Requestor *mRequestor;
O1Tomboy *mO1;
QNetworkReply *mReply;
KIO::Integration::AccessManager *mManager = nullptr;
O1Requestor *mRequestor = nullptr;
O1Tomboy *mO1 = nullptr;
QNetworkReply *mReply = nullptr;
QString mApiURL;
QString mContentURL;
......
......@@ -69,12 +69,12 @@ private:
void retryAfterFailure(const QString &errorMessage);
// Status handling
void showError(const QString &errorText);
QTimer *mStatusMessageTimer;
QTimer *mStatusMessageTimer = nullptr;
// Only one UploadJob should run per time
bool mUploadJobProcessRunning;
KIO::AccessManager *mManager;
KIO::AccessManager *mManager = nullptr;
};
#endif
......@@ -48,7 +48,7 @@ private:
void onUserRequestFinished();
QString mUserURL;
QWebEngineView *mWebView;
QWebEngineView *mWebView = nullptr;
};
......
......@@ -40,8 +40,8 @@ private:
void save();
void validate();
Ui::SettingsDialog ui;
KConfigDialogManager *mManager;
QPushButton *mOkButton;
KConfigDialogManager *mManager = nullptr;
QPushButton *mOkButton = nullptr;
};
}
......
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