Commit bce3d213 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 2d7505cd
Pipeline #33776 passed with stage
in 22 minutes and 37 seconds
......@@ -20,7 +20,6 @@
NotesAgent::NotesAgent(const QString &id)
: Akonadi::AgentBase(id)
, mAgentInitialized(false)
{
Kdelibs4ConfigMigrator migrate(QStringLiteral("notesagent"));
migrate.setConfigFiles(QStringList()
......
......@@ -46,7 +46,7 @@ private Q_SLOTS:
void slotStartAgent();
private:
bool mAgentInitialized;
bool mAgentInitialized = false;
NotesManager *mNotesManager = nullptr;
};
......
......@@ -34,8 +34,6 @@
NotesManager::NotesManager(QObject *parent)
: QObject(parent)
, mListener(nullptr)
, mCheckAlarm(nullptr)
{
mSession = new Akonadi::Session("KNotes Session", this);
mNoteRecorder = new NoteShared::NotesChangeRecorder(this);
......
......@@ -38,7 +38,7 @@ public:
QString mTitle;
QString mText;
bool mRichText = false;
QWidget *mWidget = nullptr;
QWidget *const mWidget;
};
CreateNewNoteJob::CreateNewNoteJob(QObject *parent, QWidget *widget)
......
......@@ -35,8 +35,7 @@ class NoteShared::NotesNetworkReceiverPrivate
{
public:
NotesNetworkReceiverPrivate(QTcpSocket *s)
: m_timer(nullptr)
, m_buffer(new QByteArray())
: m_buffer(new QByteArray())
, m_sock(s)
{
}
......@@ -49,8 +48,8 @@ public:
QTimer *m_timer = nullptr; // to avoid memory and connection floods
QByteArray *m_buffer = nullptr;
QTcpSocket *m_sock = nullptr;
QByteArray *const m_buffer;
QTcpSocket *const m_sock;
QString m_titleAddon;
};
......
......@@ -31,7 +31,7 @@ protected Q_SLOTS:
void slotWritten(qint64);
private:
QTcpSocket *m_socket = nullptr;
QTcpSocket *const m_socket;
QByteArray m_note;
QByteArray m_title;
QByteArray m_sender;
......
......@@ -13,7 +13,6 @@
Application::Application(int &argc, char **argv[])
: KontactInterface::PimUniqueApplication(argc, argv)
, mMainWindow(nullptr)
{
}
......
......@@ -19,7 +19,7 @@ public:
private:
void slotGeneralPaletteChanged();
QIcon mIcon;
const QIcon mIcon;
QColor mTextColor;
};
......
......@@ -65,11 +65,6 @@
KNote::KNote(const QDomDocument &buildDoc, const Akonadi::Item &item, bool allowAkonadiSearchDebug, QWidget *parent)
: QFrame(parent, Qt::FramelessWindowHint)
, mItem(item)
, m_label(nullptr)
, m_grip(nullptr)
, m_button(nullptr)
, m_tool(nullptr)
, m_editor(nullptr)
, m_kwinConf(KSharedConfig::openConfig(QStringLiteral("kwinrc")))
, mDisplayAttribute(new KNoteDisplaySettings)
, mAllowDebugAkonadiSearch(allowAkonadiSearchDebug)
......
......@@ -23,7 +23,6 @@
KNotePrintSelectedNotesDialog::KNotePrintSelectedNotesDialog(QWidget *parent)
: QDialog(parent)
, mPreview(false)
{
setWindowTitle(i18nc("@title:window", "Select notes"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
......
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