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

Initialize pointer

parent 76bbcc03
......@@ -38,7 +38,7 @@ public:
protected:
void keyPressEvent(QKeyEvent *e) override;
private:
KPIMTextEdit::TextEditorCompleter *mTextEditorCompleter;
KPIMTextEdit::TextEditorCompleter *mTextEditorCompleter = nullptr;
KSyntaxHighlighting::Repository mRepo;
};
}
......
......@@ -37,7 +37,6 @@ using namespace KPIMTextEdit;
TextEditFindBarBase::TextEditFindBarBase(QWidget *parent)
: QWidget(parent)
, mHideWhenClose(true)
{
QVBoxLayout *topLayout = new QVBoxLayout;
QHBoxLayout *lay = new QHBoxLayout;
......
......@@ -78,9 +78,9 @@ private Q_SLOTS:
protected:
QString mLastSearchStr;
TextFindWidget *mFindWidget;
TextReplaceWidget *mReplaceWidget;
bool mHideWhenClose;
TextFindWidget *mFindWidget = nullptr;
TextReplaceWidget *mReplaceWidget = nullptr;
bool mHideWhenClose = true;
};
}
......
......@@ -53,12 +53,12 @@ Q_SIGNALS:
void searchStringEmpty(bool);
private:
QLineEdit *mSearch;
QAction *mCaseSensitiveAct;
QAction *mWholeWordAct;
QLineEdit *mSearch = nullptr;
QAction *mCaseSensitiveAct = nullptr;
QAction *mWholeWordAct = nullptr;
QPushButton *mFindPrevBtn;
QPushButton *mFindNextBtn;
QPushButton *mFindPrevBtn = nullptr;
QPushButton *mFindNextBtn = nullptr;
};
class TextReplaceWidget : public QWidget
......@@ -78,9 +78,9 @@ Q_SIGNALS:
void replaceAllText();
private:
QLineEdit *mReplace;
QPushButton *mReplaceBtn;
QPushButton *mReplaceAllBtn;
QLineEdit *mReplace = nullptr;
QPushButton *mReplaceBtn = nullptr;
QPushButton *mReplaceAllBtn = nullptr;
};
}
#endif // TEXTFINDREPLACEWIDGET_H
......@@ -35,13 +35,11 @@ class KPIMTextEdit::TextGoToLineWidgetPrivate
{
public:
TextGoToLineWidgetPrivate()
: mSpinbox(nullptr)
, mGoToLine(nullptr)
{
}
QSpinBox *mSpinbox;
QPushButton *mGoToLine;
QSpinBox *mSpinbox = nullptr;
QPushButton *mGoToLine = nullptr;
};
TextGoToLineWidget::TextGoToLineWidget(QWidget *parent)
......
......@@ -30,8 +30,6 @@
using namespace KPIMTextEdit;
TextMessageIndicator::TextMessageIndicator(QWidget *parent)
: QWidget(parent)
, mTimer(nullptr)
, mLineSpacing(0)
{
setObjectName(QStringLiteral("TextMessageIndicator"));
setFocusPolicy(Qt::NoFocus);
......
......@@ -55,9 +55,9 @@ private:
void computeSizeAndResize();
QString mMessage;
QString mDetails;
QTimer *mTimer;
QTimer *mTimer = nullptr;
QPixmap mSymbol;
int mLineSpacing;
int mLineSpacing = 0;
};
}
......
......@@ -37,7 +37,7 @@ public:
{
}
QPlainTextEdit *mView;
QPlainTextEdit *mView = nullptr;
};
PlainTextEditFindBar::PlainTextEditFindBar(QPlainTextEdit *view, QWidget *parent)
......
......@@ -82,10 +82,10 @@ public:
QStringList ignoreSpellCheckingWords;
PlainTextEditor *q;
KPIMTextEdit::TextMessageIndicator *mTextIndicator;
KIO::KUriFilterSearchProviderActions *webshortcutMenuManager;
Sonnet::SpellCheckDecorator *richTextDecorator;
Sonnet::Speller *speller;
KPIMTextEdit::TextMessageIndicator *mTextIndicator = nullptr;
KIO::KUriFilterSearchProviderActions *webshortcutMenuManager = nullptr;
Sonnet::SpellCheckDecorator *richTextDecorator = nullptr;
Sonnet::Speller *speller = nullptr;
QString spellCheckingConfigFileName;
QString spellCheckingLanguage;
......
......@@ -75,7 +75,7 @@ private:
#if KPIMTEXTEDIT_HAVE_TEXTTOSPEECH
QString mDefaultEngine;
QTextToSpeech *mTextToSpeech;
QTextToSpeech *mTextToSpeech = nullptr;
#endif
};
}
......
......@@ -36,7 +36,7 @@ private:
void slotRestoreDefaults();
void readConfig();
void writeConfig();
KPIMTextEdit::TextToSpeechConfigWidget *mTextToSpeechConfigWidget;
KPIMTextEdit::TextToSpeechConfigWidget *mTextToSpeechConfigWidget = nullptr;
};
}
......
......@@ -41,7 +41,7 @@ public:
QStringList availableVoices() const override;
void setEngine(const QString &engineName) override;
#if KPIMTEXTEDIT_HAVE_TEXTTOSPEECH
QTextToSpeech *mTextToSpeech;
QTextToSpeech *mTextToSpeech = nullptr;
#endif
};
}
......
......@@ -53,13 +53,13 @@ private:
void updateAvailableLocales();
void updateAvailableEngine();
void updateAvailableVoices();
QSlider *mVolume;
QSlider *mRate;
QSlider *mPitch;
TextToSpeechLanguageComboBox *mLanguage;
AbstractTextToSpeechConfigInterface *mAbstractTextToSpeechConfigInterface;
QComboBox *mAvailableEngine;
QComboBox *mVoice;
QSlider *mVolume = nullptr;
QSlider *mRate = nullptr;
QSlider *mPitch = nullptr;
TextToSpeechLanguageComboBox *mLanguage = nullptr;
AbstractTextToSpeechConfigInterface *mAbstractTextToSpeechConfigInterface = nullptr;
QComboBox *mAvailableEngine = nullptr;
QComboBox *mVoice = 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