Commit fb44a543 authored by Ahmad Samir's avatar Ahmad Samir Committed by Kurt Hindenburg
Browse files

Initialize members in-class where possible

- Default constructed Profile::Ptr is null
- QHash is empty by default
parent 2cd1f0b3
Pipeline #173412 passed with stage
in 2 minutes and 8 seconds
......@@ -55,22 +55,7 @@ using namespace Konsole;
EditProfileDialog::EditProfileDialog(QWidget *parent)
: KPageDialog(parent)
, _generalUi(nullptr)
, _tabsUi(nullptr)
, _appearanceUi(nullptr)
, _scrollingUi(nullptr)
, _keyboardUi(nullptr)
, _mouseUi(nullptr)
, _advancedUi(nullptr)
, _tempProfile(nullptr)
, _profile(nullptr)
, _isDefault(false)
, _previewedProperties(QHash<int, QVariant>())
, _delayedPreviewProperties(QHash<int, QVariant>())
, _delayedPreviewTimer(new QTimer(this))
, _colorDialog(nullptr)
, _buttonBox(nullptr)
, _fontDialog(nullptr)
{
setWindowTitle(i18n("Edit Profile"));
setFaceType(KPageDialog::List);
......
......@@ -312,13 +312,13 @@ private:
// otherwise returns true.
bool isProfileNameValid();
Ui::EditProfileGeneralPage *_generalUi;
Ui::EditProfileTabsPage *_tabsUi;
Ui::EditProfileAppearancePage *_appearanceUi;
Ui::EditProfileScrollingPage *_scrollingUi;
Ui::EditProfileKeyboardPage *_keyboardUi;
Ui::EditProfileMousePage *_mouseUi;
Ui::EditProfileAdvancedPage *_advancedUi;
Ui::EditProfileGeneralPage *_generalUi = nullptr;
Ui::EditProfileTabsPage *_tabsUi = nullptr;
Ui::EditProfileAppearancePage *_appearanceUi = nullptr;
Ui::EditProfileScrollingPage *_scrollingUi = nullptr;
Ui::EditProfileKeyboardPage *_keyboardUi = nullptr;
Ui::EditProfileMousePage *_mouseUi = nullptr;
Ui::EditProfileAdvancedPage *_advancedUi = nullptr;
using PageSetupMethod = void (EditProfileDialog::*)(const Profile::Ptr &);
struct Page {
......@@ -338,16 +338,16 @@ private:
Profile::Ptr _tempProfile;
Profile::Ptr _profile;
bool _isDefault;
bool _isDefault = false;
QHash<int, QVariant> _previewedProperties;
QHash<int, QVariant> _delayedPreviewProperties;
QTimer *_delayedPreviewTimer;
QTimer *_delayedPreviewTimer = nullptr;
ColorSchemeEditor *_colorDialog;
QDialogButtonBox *_buttonBox;
FontDialog *_fontDialog;
ColorSchemeEditor *_colorDialog = nullptr;
QDialogButtonBox *_buttonBox = nullptr;
FontDialog *_fontDialog = nullptr;
InitialProfileState _profileState = ExistingProfile;
};
......
Supports Markdown
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