Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit eff39706 authored by Laurent Montel's avatar Laurent Montel 😁

Initialize some variables

parent f1027660
......@@ -76,10 +76,10 @@ public:
int nextId() const override;
private:
QLabel *mLabel;
QButtonGroup *mProviderGroup;
QRadioButton *mUseProvider;
QRadioButton *mDontUseProvider;
QLabel *mLabel = nullptr;
QButtonGroup *mProviderGroup = nullptr;
QRadioButton *mUseProvider = nullptr;
QRadioButton *mDontUseProvider = nullptr;
};
class CredentialsPage : public QWizardPage
......@@ -89,8 +89,8 @@ public:
int nextId() const override;
private:
KLineEdit *mUserName;
KPasswordLineEdit *mPassword;
KLineEdit *mUserName = nullptr;
KPasswordLineEdit *mPassword = nullptr;
};
class ServerTypePage : public QWizardPage
......@@ -104,8 +104,8 @@ public:
private:
void manualConfigToggled(bool toggled);
QButtonGroup *mServerGroup;
QComboBox *mProvidersCombo;
QButtonGroup *mServerGroup = nullptr;
QComboBox *mProvidersCombo = nullptr;
};
class ConnectionPage : public QWizardPage
......@@ -120,17 +120,17 @@ public:
private:
void urlElementChanged();
QFormLayout *mLayout;
KLineEdit *mHost;
KLineEdit *mPath;
QCheckBox *mUseSecureConnection;
QFormLayout *mPreviewLayout;
QLabel *mCalDavUrlLabel;
QLabel *mCalDavUrlPreview;
QLabel *mCardDavUrlLabel;
QLabel *mCardDavUrlPreview;
QLabel *mGroupDavUrlLabel;
QLabel *mGroupDavUrlPreview;
QFormLayout *mLayout = nullptr;
KLineEdit *mHost = nullptr;
KLineEdit *mPath = nullptr;
QCheckBox *mUseSecureConnection = nullptr;
QFormLayout *mPreviewLayout = nullptr;
QLabel *mCalDavUrlLabel = nullptr;
QLabel *mCalDavUrlPreview = nullptr;
QLabel *mCardDavUrlLabel = nullptr;
QLabel *mCardDavUrlPreview = nullptr;
QLabel *mGroupDavUrlLabel = nullptr;
QLabel *mGroupDavUrlPreview = nullptr;
};
class CheckPage : public QWizardPage
......@@ -143,7 +143,7 @@ public:
private:
void checkConnection();
void onFetchDone(KJob *);
QTextBrowser *mStatusLabel;
QTextBrowser *mStatusLabel = nullptr;
};
#endif
......@@ -189,7 +189,7 @@ void GmailConfigDialog::readSettings()
const QString refreshToken = settings->refreshToken(&rejected);
if (rejected) {
//m_ui->password->setEnabled( false );
KMessageBox::information(0, i18n("Could not access KWallet. If you want to use Gmail resource, you have to activate it."));
KMessageBox::information(nullptr, i18n("Could not access KWallet. If you want to use Gmail resource, you have to activate it."));
} else {
m_account->setAccessToken(accessToken);
m_account->setRefreshToken(refreshToken);
......
......@@ -37,8 +37,8 @@ public:
private:
PasswordRequesterInterface *requesterImpl();
PasswordRequesterInterface *mImpl;
ImapResourceBase *mResource;
PasswordRequesterInterface *mImpl = nullptr;
ImapResourceBase *mResource = nullptr;
};
#endif
......@@ -49,7 +49,7 @@ private Q_SLOTS:
void onDeleteDone(KJob *job);
private:
KIMAP::Session *mSession;
KIMAP::Session *mSession = nullptr;
const KMime::Message::Ptr mMessage;
const QString mMailbox;
qint64 mUidNext;
......
......@@ -156,7 +156,7 @@ public:
void setItemMergingMode(Akonadi::ItemSync::MergeMode mergeMode) override;
private:
ImapResourceBase *m_resource;
ImapResourceBase *m_resource = nullptr;
const TaskArguments m_arguments;
};
......
......@@ -47,7 +47,7 @@ private:
int m_pendingMetaDataJobs;
Akonadi::Collection m_collection;
KIMAP::Session *m_session;
KIMAP::Session *m_session = nullptr;
};
#endif
......@@ -73,13 +73,13 @@ private:
void listFlagsForImapSet(const KIMAP::ImapSet &set);
void taskComplete();
KIMAP::Session *m_session;
KIMAP::Session *m_session = nullptr;
QVector<qint64> m_messageUidsMissingBody;
int m_fetchedMissingBodies;
bool m_fetchMissingBodies;
bool m_incremental;
qint64 m_localHighestModSeq;
BatchFetcher *m_batchFetcher;
BatchFetcher *m_batchFetcher = nullptr;
Akonadi::Collection m_modifiedCollection;
bool m_uidBasedFetch;
bool m_flagsChanged;
......
......@@ -45,9 +45,9 @@ protected:
private:
void triggerFetchJob();
KIMAP::Session *m_session;
KIMAP::Session *m_session = nullptr;
qint64 m_uid;
bool m_messageReceived;
bool m_messageReceived = false;
};
#endif
......@@ -100,7 +100,7 @@ private:
};
QHash<QString, EventFile> mEvents; // cached alarms and file names, indexed by ID
QHash<QString, QString> mFileEventIds; // alarm IDs, indexed by file name
Akonadi_KAlarm_Dir_Resource::Settings *mSettings;
Akonadi_KAlarm_Dir_Resource::Settings *mSettings = nullptr;
Akonadi::Collection::Id mCollectionId; // ID of this resource's collection
KACalendar::Compat mCompatibility;
int mVersion; // calendar format version
......
......@@ -55,11 +55,11 @@ private Q_SLOTS:
private:
Ui::SettingsDialog ui;
AlarmTypeWidget *mTypeSelector;
QPushButton *mOkButton;
KConfigDialogManager *mManager;
Akonadi_KAlarm_Dir_Resource::Settings *mSettings;
bool mReadOnlySelected; // read-only was set by user (not by validate())
AlarmTypeWidget *mTypeSelector = nullptr;
QPushButton *mOkButton = nullptr;
KConfigDialogManager *mManager = nullptr;
Akonadi_KAlarm_Dir_Resource::Settings *mSettings = nullptr;
bool mReadOnlySelected = false; // read-only was set by user (not by validate())
};
}
......
......@@ -42,7 +42,7 @@ public:
private:
Ui::AlarmTypeRadioWidget ui;
QButtonGroup *mButtonGroup;
QButtonGroup *mButtonGroup = nullptr;
};
#endif // ALARMTYPERADIOWIDGET_H
......
......@@ -44,7 +44,7 @@ protected:
virtual void startRelationTask(KIMAP::Session *session) = 0;
private:
KIMAP::Session *mImapSession;
KIMAP::Session *mImapSession = nullptr;
private Q_SLOTS:
void onCollectionFetchResult(KJob *job);
......
......@@ -44,7 +44,7 @@ protected:
void startRelationTask(KIMAP::Session *session) override;
private:
KIMAP::Session *mSession;
KIMAP::Session *mSession = nullptr;
Akonadi::Tag::List mTags;
QHash<QString, Akonadi::Item::List> mTagMembers;
Akonadi::Relation::List mRelations;
......
......@@ -45,11 +45,11 @@ private:
void readConfig();
void writeConfig();
Ui::ConfigDialog ui;
KConfigDialogManager *mManager;
FolderArchiveSettingPage *mFolderArchiveSettingPage;
Akonadi_Maildir_Resource::MaildirSettings *mSettings;
bool mToplevelIsContainer;
QPushButton *mOkButton;
KConfigDialogManager *mManager = nullptr;
FolderArchiveSettingPage *mFolderArchiveSettingPage = nullptr;
Akonadi_Maildir_Resource::MaildirSettings *mSettings = nullptr;
bool mToplevelIsContainer = false;
QPushButton *mOkButton = nullptr;
};
#endif
......@@ -312,7 +312,7 @@ bool KMIndexReader::readHeader(int *version)
bool KMIndexReader::readIndex()
{
qint32 len;
KMIndexData *msg;
KMIndexData *msg = nullptr;
Q_ASSERT(mFp != nullptr);
rewind(mFp);
......
......@@ -128,7 +128,7 @@ private:
QString mIndexFileName;
QFile mIndexFile;
FILE *mFp;
FILE *mFp = nullptr;
bool mConvertToUtf8;
bool mIndexSwapByteOrder; // Index file was written with swapped byte order
......
......@@ -163,7 +163,7 @@ protected:
}
private:
FileStore::FiFoQueueJobSession *mParent;
FileStore::FiFoQueueJobSession *mParent = nullptr;
};
FileStore::FiFoQueueJobSession::FiFoQueueJobSession(QObject *parent)
......
......@@ -32,7 +32,7 @@ public:
}
public:
FileStore::StoreCompactJob *mParent;
FileStore::StoreCompactJob *mParent = nullptr;
Collection::List mCollections;
Item::List mItems;
......
......@@ -381,7 +381,7 @@ protected:
}
protected:
Settings *mSettings;
Settings *mSettings = nullptr;
};
}
......
......@@ -170,8 +170,8 @@ protected:
QUrl mCurrentUrl;
QStringList mSupportedMimetypes;
QString mCollectionIcon;
KIO::FileCopyJob *mDownloadJob;
KIO::FileCopyJob *mUploadJob;
KIO::FileCopyJob *mDownloadJob = nullptr;
KIO::FileCopyJob *mUploadJob = nullptr;
QByteArray mCurrentHash;
protected Q_SLOTS:
......
......@@ -35,7 +35,7 @@ namespace Akonadi
template <typename Settings>
class AKONADI_SINGLEFILERESOURCE_EXPORT SingleFileResourceConfigDialog : public SingleFileResourceConfigDialogBase
{
Settings *mSettings;
Settings *mSettings = nullptr;
public:
explicit SingleFileResourceConfigDialog(WId windowId, Settings *settings)
......
......@@ -97,19 +97,19 @@ protected Q_SLOTS:
protected:
Ui::SingleFileResourceConfigDialog ui;
KConfigDialogManager *mManager;
KConfigDialogManager *mManager = nullptr;
private:
void validate();
void slotStatJobResult(KJob *);
void writeConfig();
void readConfig();
KIO::StatJob *mStatJob;
SingleFileValidatingWidget *mAppendedWidget;
bool mDirUrlChecked;
bool mMonitorEnabled;
bool mLocalFileOnly;
QPushButton *mOkButton;
KIO::StatJob *mStatJob = nullptr;
SingleFileValidatingWidget *mAppendedWidget = nullptr;
bool mDirUrlChecked = false;
bool mMonitorEnabled = false;
bool mLocalFileOnly = false;
QPushButton *mOkButton = nullptr;
};
/**
......
......@@ -42,10 +42,10 @@ public:
void saveSettings();
private:
Ui::ConfigDialog *ui;
Ui::ConfigDialog *ui = nullptr;
KConfigDialogManager *mManager;
Settings *mSettings;
KConfigDialogManager *mManager = nullptr;
Settings *mSettings = nullptr;
};
#endif // CONFIGDIALOG_H
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