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 9a4d1312 authored by Laurent Montel's avatar Laurent Montel 😁

Initialize variables

parent 686eb168
......@@ -46,9 +46,9 @@ public:
private:
void slotOkClicked();
void slotDefaultClicked();
GrantleeThemeEditor::ConfigureWidget *mConfigureWidget;
KPIMTextEdit::PlainTextEditorWidget *mDefaultTemplate;
Akonadi::AkonadiContactEditor *mDefaultContact;
GrantleeThemeEditor::ConfigureWidget *mConfigureWidget = nullptr;
KPIMTextEdit::PlainTextEditorWidget *mDefaultTemplate = nullptr;
Akonadi::AkonadiContactEditor *mDefaultContact = nullptr;
};
#endif
......@@ -46,8 +46,8 @@ Q_SIGNALS:
private:
KContacts::Addressee mContact;
KAddressBookGrantlee::GrantleePrint *mGrantleePrint;
QWebEngineView *mViewer;
KAddressBookGrantlee::GrantleePrint *mGrantleePrint = nullptr;
QWebEngineView *mViewer = nullptr;
};
#endif // CONTACTPRINTTHEMEPREVIEW_H
......@@ -40,10 +40,10 @@ public:
ContactPrintThemePreview *preview() const;
private:
ContactPrintThemePreview *mPreview;
ThemeTemplateWidget *mThemeTemplate;
QSplitter *mMainSplitter;
QSplitter *mWidgetSplitter;
ContactPrintThemePreview *mPreview = nullptr;
ThemeTemplateWidget *mThemeTemplate = nullptr;
QSplitter *mMainSplitter = nullptr;
QSplitter *mWidgetSplitter = nullptr;
};
#endif // EDITORPAGE_H
......@@ -68,20 +68,20 @@ private:
bool saveCurrentProject(ActionSaveTheme act);
void setupActions();
void closeThemeEditor();
ThemeEditorPage *mThemeEditor;
QAction *mNewThemeAction;
QAction *mCloseThemeAction;
QAction *mAddExtraPage;
QAction *mCloseAction;
QAction *mOpenAction;
QAction *mUploadTheme;
QAction *mSaveAction;
QAction *mInstallTheme;
QAction *mInsertFile;
QAction *mManageTheme;
QAction *mUpdateView;
QAction *mSaveAsAction;
KRecentFilesAction *mRecentFileAction;
ThemeEditorPage *mThemeEditor = nullptr;
QAction *mNewThemeAction = nullptr;
QAction *mCloseThemeAction = nullptr;
QAction *mAddExtraPage = nullptr;
QAction *mCloseAction = nullptr;
QAction *mOpenAction = nullptr;
QAction *mUploadTheme = nullptr;
QAction *mSaveAction = nullptr;
QAction *mInstallTheme = nullptr;
QAction *mInsertFile = nullptr;
QAction *mManageTheme = nullptr;
QAction *mUpdateView = nullptr;
QAction *mSaveAsAction = nullptr;
KRecentFilesAction *mRecentFileAction = nullptr;
};
#endif // THEMEEDITORMAINWINDOW_H
......@@ -71,11 +71,11 @@ private:
void createZip(const QString &themeName, KZip *zip);
EditorPage *createExtraPage(const QString &filename);
QList<EditorPage *> mExtraPage;
GrantleeThemeEditor::ThemeEditorTabWidget *mTabWidget;
EditorPage *mEditorPage;
GrantleeThemeEditor::DesktopFilePage *mDesktopPage;
GrantleeThemeEditor::ThemeSession *mThemeSession;
bool mChanged;
GrantleeThemeEditor::ThemeEditorTabWidget *mTabWidget = nullptr;
EditorPage *mEditorPage = nullptr;
GrantleeThemeEditor::DesktopFilePage *mDesktopPage = nullptr;
GrantleeThemeEditor::ThemeSession *mThemeSession = nullptr;
bool mChanged = false;
};
#endif // THEMEEDITORPAGE_H
......@@ -44,7 +44,7 @@ Q_SIGNALS:
void insertTemplate(const QString &);
private:
ThemeTemplateListWidget *mListTemplate;
ThemeTemplateListWidget *mListTemplate = nullptr;
};
#endif // THEMETEMPLATEWIDGET_H
......@@ -45,9 +45,9 @@ public:
private:
void slotDefaultClicked();
void slotOkClicked();
GrantleeThemeEditor::ConfigureWidget *mConfigureWidget;
KPIMTextEdit::PlainTextEditorWidget *mDefaultTemplate;
Akonadi::AkonadiContactEditor *mDefaultContact;
GrantleeThemeEditor::ConfigureWidget *mConfigureWidget = nullptr;
KPIMTextEdit::PlainTextEditorWidget *mDefaultTemplate = nullptr;
Akonadi::AkonadiContactEditor *mDefaultContact = nullptr;
};
#endif // CONTACTCONFIGUREDIALOG_H
......@@ -67,20 +67,20 @@ private:
bool saveCurrentProject(ActionSaveTheme act);
void setupActions();
void closeThemeEditor();
ContactEditorPage *mContactEditor;
QAction *mNewThemeAction;
QAction *mCloseThemeAction;
QAction *mAddExtraPage;
QAction *mCloseAction;
QAction *mOpenAction;
QAction *mUploadTheme;
QAction *mSaveAction;
QAction *mInstallTheme;
QAction *mInsertFile;
QAction *mManageTheme;
QAction *mUpdateView;
QAction *mSaveAsAction;
KRecentFilesAction *mRecentFileAction;
ContactEditorPage *mContactEditor = nullptr;
QAction *mNewThemeAction = nullptr;
QAction *mCloseThemeAction = nullptr;
QAction *mAddExtraPage = nullptr;
QAction *mCloseAction = nullptr;
QAction *mOpenAction = nullptr;
QAction *mUploadTheme = nullptr;
QAction *mSaveAction = nullptr;
QAction *mInstallTheme = nullptr;
QAction *mInsertFile = nullptr;
QAction *mManageTheme = nullptr;
QAction *mUpdateView = nullptr;
QAction *mSaveAsAction = nullptr;
KRecentFilesAction *mRecentFileAction = nullptr;
};
#endif // CONTACTEDITORMAINWINDOW_H
......@@ -73,14 +73,14 @@ private:
EditorPage *createCustomPage(const QString &filename);
QList<EditorPage *> mExtraPage;
GrantleeThemeEditor::ThemeEditorTabWidget *mTabWidget;
EditorPage *mEditorPage;
EditorPage *mEditorGroupPage;
EditorPage *mEditorGroupEmbeddedPage;
EditorPage *mEditorEmbeddedPage;
GrantleeThemeEditor::DesktopFilePage *mDesktopPage;
GrantleeThemeEditor::ThemeSession *mThemeSession;
bool mChanged;
GrantleeThemeEditor::ThemeEditorTabWidget *mTabWidget = nullptr;
EditorPage *mEditorPage = nullptr;
EditorPage *mEditorGroupPage = nullptr;
EditorPage *mEditorGroupEmbeddedPage = nullptr;
EditorPage *mEditorEmbeddedPage = nullptr;
GrantleeThemeEditor::DesktopFilePage *mDesktopPage = nullptr;
GrantleeThemeEditor::ThemeSession *mThemeSession = nullptr;
bool mChanged = false;
};
#endif // CONTACTEDITORPAGE_H
......@@ -49,13 +49,13 @@ public:
private:
KContacts::Addressee mContact;
Akonadi::ContactViewer *mContactViewer;
Akonadi::ContactGroupViewer *mGroupViewer;
Akonadi::ContactViewer *mContactViewer = nullptr;
Akonadi::ContactGroupViewer *mGroupViewer = nullptr;
KAddressBookGrantlee::GrantleeContactFormatter *mFormatter;
KAddressBookGrantlee::GrantleeContactGroupFormatter *mGroupFormatter;
KAddressBookGrantlee::GrantleeContactFormatter *mFormatter = nullptr;
KAddressBookGrantlee::GrantleeContactGroupFormatter *mGroupFormatter = nullptr;
QTabWidget *mTabWidget;
QTabWidget *mTabWidget = nullptr;
};
#endif // CONTACTPREVIEWWIDGET_H
......@@ -43,7 +43,7 @@ Q_SIGNALS:
void insertTemplate(const QString &);
private:
ContactTemplateListWidget *mListTemplate;
ContactTemplateListWidget *mListTemplate = nullptr;
};
#endif // CONTACTTEMPLATEWIDGET_H
......@@ -39,9 +39,9 @@ public:
GrantleeThemeEditor::PreviewWidget *preview() const;
private:
ContactTemplateWidget *mContactTemplate;
QSplitter *mMainSplitter;
QSplitter *mWidgetSplitter;
ContactTemplateWidget *mContactTemplate = nullptr;
QSplitter *mMainSplitter = nullptr;
QSplitter *mWidgetSplitter = nullptr;
};
#endif // EDITORPAGE_H
......@@ -34,7 +34,7 @@ public:
void updateViewer() override;
private:
ContactPreviewWidget *mPreview;
ContactPreviewWidget *mPreview = nullptr;
};
#endif // PREVIEWWIDGET_H
......@@ -40,7 +40,7 @@ public:
void setDefault();
private:
Ui::ConfigureWidget *ui;
Ui::ConfigureWidget *ui = nullptr;
};
}
......
......@@ -65,13 +65,13 @@ private:
void slotExtraDisplayHeadersChanged();
void saveAsFilename(const QString &filename);
QString mDefaultDesktopName;
QLineEdit *mName;
KPIMTextEdit::PlainTextEditorWidget *mDescription;
QLineEdit *mFilename;
QLineEdit *mAuthor;
QLineEdit *mEmail;
QLineEdit *mVersion;
KEditListWidget *mExtraDisplayHeaders;
QLineEdit *mName = nullptr;
KPIMTextEdit::PlainTextEditorWidget *mDescription = nullptr;
QLineEdit *mFilename = nullptr;
QLineEdit *mAuthor = nullptr;
QLineEdit *mEmail = nullptr;
QLineEdit *mVersion = nullptr;
KEditListWidget *mExtraDisplayHeaders = nullptr;
};
}
......
......@@ -61,8 +61,8 @@ Q_SIGNALS:
protected:
PageType mType;
QString mPageFileName;
GrantleeThemeEditor::PreviewWidget *mPreview;
GrantleeThemeEditor::EditorWidget *mEditor;
GrantleeThemeEditor::PreviewWidget *mPreview = nullptr;
GrantleeThemeEditor::EditorWidget *mEditor = nullptr;
};
}
......
......@@ -40,7 +40,7 @@ protected:
void keyPressEvent(QKeyEvent *e) override;
protected:
KPIMTextEdit::TextEditorCompleter *mTextEditorCompleter;
KPIMTextEdit::TextEditorCompleter *mTextEditorCompleter = nullptr;
private:
void initCompleter();
KSyntaxHighlighting::Repository mRepo;
......
......@@ -37,14 +37,12 @@ class GrantleeThemeEditor::ManageThemesPrivate
{
public:
ManageThemesPrivate()
: mListThemes(nullptr)
, mDeleteTheme(nullptr)
{
}
QString mLocalDirectory;
QListWidget *mListThemes;
QPushButton *mDeleteTheme;
QListWidget *mListThemes = nullptr;
QPushButton *mDeleteTheme = nullptr;
};
ManageThemes::ManageThemes(const QString &relativeThemePath, QWidget *parent)
......
......@@ -33,15 +33,12 @@ class GrantleeThemeEditor::NewThemeDialogPrivate
{
public:
NewThemeDialogPrivate()
: mThemeName(nullptr)
, mUrlRequester(nullptr)
, mOkButton(nullptr)
{
}
KLineEdit *mThemeName;
KUrlRequester *mUrlRequester;
QPushButton *mOkButton;
KLineEdit *mThemeName = nullptr;
KUrlRequester *mUrlRequester = nullptr;
QPushButton *mOkButton = nullptr;
};
NewThemeDialog::NewThemeDialog(QWidget *parent)
: QDialog(parent)
......
......@@ -39,9 +39,9 @@ public:
GrantleeThemeEditor::PreviewWidget *preview() const;
private:
ThemeTemplateWidget *mThemeTemplate;
QSplitter *mMainSplitter;
QSplitter *mWidgetSplitter;
ThemeTemplateWidget *mThemeTemplate = nullptr;
QSplitter *mMainSplitter = nullptr;
QSplitter *mWidgetSplitter = nullptr;
};
#endif // EDITORPAGE_H
......@@ -43,8 +43,8 @@ public Q_SLOTS:
private:
QByteArray mDefaultEmail;
MessageViewer::Viewer *mViewer;
MessageViewer::GrantleeHeaderTestStyle *mGrantleeHeaderStyle;
MessageViewer::Viewer *mViewer = nullptr;
MessageViewer::GrantleeHeaderTestStyle *mGrantleeHeaderStyle = nullptr;
};
#endif // PREVIEWWIDGET_H
......@@ -41,9 +41,9 @@ public:
private:
void slotOkClicked();
void slotDefaultClicked();
GrantleeThemeEditor::ConfigureWidget *mConfigureWidget;
KPIMTextEdit::PlainTextEditorWidget *mDefaultTemplate;
KPIMTextEdit::PlainTextEditorWidget *mDefaultEmail;
GrantleeThemeEditor::ConfigureWidget *mConfigureWidget = nullptr;
KPIMTextEdit::PlainTextEditorWidget *mDefaultTemplate = nullptr;
KPIMTextEdit::PlainTextEditorWidget *mDefaultEmail = nullptr;
};
#endif // THEMECONFIGUREDIALOG_H
......@@ -70,22 +70,22 @@ private:
bool saveCurrentProject(ActionSaveTheme act);
void setupActions();
void closeThemeEditor();
ThemeEditorPage *mThemeEditor;
QAction *mNewThemeAction;
QAction *mCloseThemeAction;
QAction *mAddExtraPage;
QAction *mCloseAction;
QAction *mOpenAction;
QAction *mUploadTheme;
QAction *mSaveAction;
QAction *mInstallTheme;
QAction *mInsertFile;
QAction *mManageTheme;
QAction *mUpdateView;
QAction *mSaveAsAction;
KToggleAction *mPrintingMode;
KToggleAction *mNormalMode;
KRecentFilesAction *mRecentFileAction;
ThemeEditorPage *mThemeEditor = nullptr;
QAction *mNewThemeAction = nullptr;
QAction *mCloseThemeAction = nullptr;
QAction *mAddExtraPage = nullptr;
QAction *mCloseAction = nullptr;
QAction *mOpenAction = nullptr;
QAction *mUploadTheme = nullptr;
QAction *mSaveAction = nullptr;
QAction *mInstallTheme = nullptr;
QAction *mInsertFile = nullptr;
QAction *mManageTheme = nullptr;
QAction *mUpdateView = nullptr;
QAction *mSaveAsAction = nullptr;
KToggleAction *mPrintingMode = nullptr;
KToggleAction *mNormalMode = nullptr;
KRecentFilesAction *mRecentFileAction = nullptr;
};
#endif // THEMEEDITORMAINWINDOW_H
......@@ -73,11 +73,11 @@ private:
void createZip(const QString &themeName, KZip *zip);
EditorPage *createExtraPage(const QString &filename);
QList<EditorPage *> mExtraPage;
GrantleeThemeEditor::ThemeEditorTabWidget *mTabWidget;
EditorPage *mEditorPage;
GrantleeThemeEditor::DesktopFilePage *mDesktopPage;
GrantleeThemeEditor::ThemeSession *mThemeSession;
bool mChanged;
GrantleeThemeEditor::ThemeEditorTabWidget *mTabWidget = nullptr;
EditorPage *mEditorPage = nullptr;
GrantleeThemeEditor::DesktopFilePage *mDesktopPage = nullptr;
GrantleeThemeEditor::ThemeSession *mThemeSession = nullptr;
bool mChanged = false;
};
#endif // THEMEEDITORPAGE_H
......@@ -43,7 +43,7 @@ Q_SIGNALS:
void insertTemplate(const QString &);
private:
ThemeTemplateListWidget *mListTemplate;
ThemeTemplateListWidget *mListTemplate = nullptr;
};
#endif // THEMETEMPLATEWIDGET_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