Verified Commit 54adb6a8 authored by Alexander Lohnau's avatar Alexander Lohnau
Browse files

Plugins: Always initialize members directly in header

parent 9629826a
......@@ -10,9 +10,6 @@ namespace kt
Plugin::Plugin(QObject *parent)
: KParts::Plugin(parent)
{
core = nullptr;
gui = nullptr;
loaded = false;
}
Plugin::~Plugin()
......
......@@ -130,9 +130,9 @@ public:
}
private:
CoreInterface *core;
GUIInterface *gui;
bool loaded;
CoreInterface *core = nullptr;
GUIInterface *gui = nullptr;
bool loaded = false;
};
}
......
......@@ -34,14 +34,6 @@ namespace kt
{
InfoWidgetPlugin::InfoWidgetPlugin(QObject *parent, const QVariantList &)
: Plugin(parent)
, peer_view(nullptr)
, cd_view(nullptr)
, tracker_view(nullptr)
, file_view(nullptr)
, status_tab(nullptr)
, webseeds_tab(nullptr)
, monitor(nullptr)
, pref(nullptr)
{
}
......
......@@ -58,15 +58,15 @@ private Q_SLOTS:
void torrentRemoved(bt::TorrentInterface *tc);
private:
PeerView *peer_view;
ChunkDownloadView *cd_view;
TrackerView *tracker_view;
FileView *file_view;
StatusTab *status_tab;
WebSeedsTab *webseeds_tab;
Monitor *monitor;
PeerView *peer_view = nullptr;
ChunkDownloadView *cd_view = nullptr;
TrackerView *tracker_view = nullptr;
FileView *file_view = nullptr;
StatusTab *status_tab = nullptr;
WebSeedsTab *webseeds_tab = nullptr;
Monitor *monitor = nullptr;
IWPrefPage *pref;
IWPrefPage *pref = nullptr;
};
}
......
......@@ -28,11 +28,6 @@ namespace kt
{
LogViewerPlugin::LogViewerPlugin(QObject *parent, const QVariantList &)
: Plugin(parent)
, lv(nullptr)
, pref(nullptr)
, flags(nullptr)
, dock(nullptr)
, pos(SEPARATE_ACTIVITY)
{
}
......
......@@ -45,11 +45,11 @@ private:
void removeLogViewerFromGUI();
private:
LogViewer *lv;
LogPrefPage *pref;
LogFlags *flags;
QDockWidget *dock;
LogViewerPosition pos;
LogViewer *lv = nullptr;
LogPrefPage *pref = nullptr;
LogFlags *flags = nullptr;
QDockWidget *dock = nullptr;
LogViewerPosition pos = SEPARATE_ACTIVITY;
};
}
......
......@@ -31,7 +31,6 @@ namespace kt
{
ScanFolderPlugin::ScanFolderPlugin(QObject *parent, const QVariantList &args)
: Plugin(parent)
, tlq(nullptr)
{
Q_UNUSED(args);
}
......
......@@ -35,9 +35,9 @@ public Q_SLOTS:
void updateScanFolders();
private:
ScanFolderPrefPage *pref;
TorrentLoadQueue *tlq;
ScanThread *scanner;
ScanFolderPrefPage *pref = nullptr;
TorrentLoadQueue *tlq = nullptr;
ScanThread *scanner = nullptr;
};
}
......
......@@ -28,10 +28,6 @@ namespace kt
{
ScanForLostFilesPlugin::ScanForLostFilesPlugin(QObject *parent, const QVariantList &args)
: Plugin(parent)
, m_view(nullptr)
, m_dock(nullptr)
, m_pref(nullptr)
, m_pos(SEPARATE_ACTIVITY)
{
Q_UNUSED(args);
}
......
......@@ -45,10 +45,10 @@ private:
void removeFromGUI();
private:
ScanForLostFilesWidget *m_view;
QDockWidget *m_dock;
ScanForLostFilesPrefPage *m_pref;
SFLFPosition m_pos;
ScanForLostFilesWidget *m_view = nullptr;
QDockWidget *m_dock = nullptr;
ScanForLostFilesPrefPage *m_pref = nullptr;
SFLFPosition m_pos = SEPARATE_ACTIVITY;
};
}
......
......@@ -37,10 +37,8 @@ namespace kt
{
SearchPlugin::SearchPlugin(QObject *parent, const QVariantList &args)
: Plugin(parent)
, engines(nullptr)
{
Q_UNUSED(args);
pref = nullptr;
}
SearchPlugin::~SearchPlugin()
......
......@@ -50,10 +50,10 @@ private Q_SLOTS:
void preferencesUpdated();
private:
SearchActivity *activity;
SearchPrefPage *pref;
SearchEngineList *engines;
ProxyHelper *proxy;
SearchActivity *activity = nullptr;
SearchPrefPage *pref = nullptr;
SearchEngineList *engines = nullptr;
ProxyHelper *proxy = nullptr;
};
}
......
......@@ -24,7 +24,6 @@ namespace kt
{
SyndicationPlugin::SyndicationPlugin(QObject *parent, const QVariantList &args)
: Plugin(parent)
, add_feed(nullptr)
{
Q_UNUSED(args);
setupActions();
......
......@@ -31,14 +31,14 @@ private:
void setupActions();
private:
QAction *add_feed;
QAction *remove_feed;
QAction *edit_feed_name;
QAction *add_filter;
QAction *remove_filter;
QAction *edit_filter;
QAction *manage_filters;
SyndicationActivity *activity;
QAction *add_feed = nullptr;
QAction *remove_feed = nullptr;
QAction *edit_feed_name = nullptr;
QAction *add_filter = nullptr;
QAction *remove_filter = nullptr;
QAction *edit_filter = nullptr;
QAction *manage_filters = nullptr;
SyndicationActivity *activity = nullptr;
friend class SyndicationActivity;
};
......
......@@ -27,8 +27,6 @@ namespace kt
{
UPnPPlugin::UPnPPlugin(QObject *parent, const QVariantList & /*args*/)
: Plugin(parent)
, sock(nullptr)
, upnp_tab(nullptr)
{
}
......
......@@ -32,8 +32,8 @@ public:
void shutdown(bt::WaitJob *job) override;
private:
bt::UPnPMCastSocket *sock;
UPnPWidget *upnp_tab;
bt::UPnPMCastSocket *sock = nullptr;
UPnPWidget *upnp_tab = 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