Commit 6f1f5417 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

initialize pointer in headers

parent aeeeb32a
Pipeline #201077 failed with stage
in 9 minutes and 6 seconds
......@@ -13,7 +13,6 @@ class SpectrumParser::Private
{
public:
Private()
: currentSpectrum(nullptr)
{
}
......
......@@ -21,7 +21,7 @@ public:
int m_atomicNum;
QString m_name;
Element *m_element;
Element *m_element = nullptr;
};
class PropertyListEntry : public QListWidgetItem
......
......@@ -60,10 +60,10 @@ private:
Ui_MolcalcWidgetBase ui;
QTimer *m_timer;
QTimer *m_timer = nullptr;
private:
MoleculeParser *m_parser;
MoleculeParser *m_parser = nullptr;
QSet<QString> m_aliasList;
double m_mass;
bool m_validInput;
......
......@@ -45,8 +45,8 @@ inline static double translateToDY(double r, double angle, int num)
OrbitsWidget::OrbitsWidget(QWidget *parent)
: QWidget(parent)
, m_electronConf(new QLabel(this))
{
m_electronConf = new QLabel(this);
m_electronConf->setIndent(20);
auto layout = new QVBoxLayout(m_electronConf);
setLayout(layout);
......
......@@ -29,7 +29,7 @@ private:
int Elemno;
/// Label that shows the electronic configuration
QLabel *m_electronConf;
QLabel *const m_electronConf;
QList<int> numOfElectrons;
......
......@@ -18,13 +18,12 @@
SearchWidget::SearchWidget(QWidget *parent)
: QWidget(parent)
, m_timer(nullptr)
, m_searchLine(new KLineEdit(this))
{
auto mainlay = new QHBoxLayout(this);
mainlay->setContentsMargins(2, 2, 2, 2);
mainlay->setSpacing(5);
m_searchLine = new KLineEdit(this);
m_searchLine->setClearButtonEnabled(true);
m_searchLine->setPlaceholderText(i18n("Search..."));
m_searchLine->setTrapReturnKey(true);
......
......@@ -37,8 +37,8 @@ private Q_SLOTS:
void doSearch();
private:
KLineEdit *m_searchLine;
QTimer *m_timer;
KLineEdit *const m_searchLine;
QTimer *m_timer = nullptr;
};
#endif // KALZIUMSEARCHWIDGET_H
......@@ -33,8 +33,8 @@ private:
void initialize();
private:
IsotopeView *m_isotopeView;
QRadioButton *m_radioButton;
IsotopeView *m_isotopeView = nullptr;
QRadioButton *m_radioButton = nullptr;
public Q_SLOTS:
void setText(QString text)
......
......@@ -16,8 +16,8 @@
TableInfoWidget::TableInfoWidget(QWidget *parent)
: QWidget(parent)
, m_tableType(new QLabel(QStringLiteral("test"), this))
{
m_tableType = new QLabel(QStringLiteral("test"), this);
auto la = new QHBoxLayout(this);
la->addWidget(m_tableType);
......
......@@ -25,7 +25,7 @@ public:
~TableInfoWidget() override = default;
private:
QLabel *m_tableType;
QLabel *const m_tableType;
public Q_SLOTS:
void setTableType(int type);
......
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