Commit cf4eeddc authored by Michael Pyne's avatar Michael Pyne
Browse files

JuK: More minor cleanups.

parent 6f9a0426
......@@ -17,49 +17,51 @@
#include "juk.h"
#include <KSharedConfig>
#include <kaboutdata.h>
#include <kmessagebox.h>
#include <kactioncollection.h>
#include <kstandardaction.h>
#include <ktoggleaction.h>
#include <kactionmenu.h>
#include <kconfiggroup.h>
#include <KSharedConfig>
#include <kglobalaccel.h>
#include <ktoolbarpopupaction.h>
#include <kmessagebox.h>
#include <knotification.h>
#include <kstandardaction.h>
#include <ktoggleaction.h>
#include <ktoolbarpopupaction.h>
#include <QIcon>
#include <QAction>
#include <QCoreApplication>
#include <QKeyEvent>
#include <QDBusInterface>
#include <QDBusMessage>
#include <QDBusReply>
#include <QDesktopWidget>
#include <QDir>
#include <QDirIterator>
#include <QIcon>
#include <QKeyEvent>
#include <QMenuBar>
#include <QMetaType>
#include <QTime>
#include <QTimer>
#include <QDesktopWidget>
#include <QScreen>
#include <QStatusBar>
#include <QDBusMessage>
#include <QDBusReply>
#include <QDBusInterface>
#include <QTime>
#include <QTimer>
#include "slideraction.h"
#include "statuslabel.h"
#include "systemtray.h"
#include "keydialog.h"
#include "tagguesserconfigdlg.h"
#include "filerenamerconfigdlg.h"
#include "scrobbler.h"
#include "scrobbleconfigdlg.h"
#include "actioncollection.h"
#include "cache.h"
#include "playlistsplitter.h"
#include "collectionlist.h"
#include "covermanager.h"
#include "filerenamerconfigdlg.h"
#include "keydialog.h"
#include "playlistsplitter.h"
#include "scrobbleconfigdlg.h"
#include "scrobbler.h"
#include "slideraction.h"
#include "statuslabel.h"
#include "systemtray.h"
#include "tagguesserconfigdlg.h"
#include "tagtransactionmanager.h"
#include "tracksequencemanager.h"
#include "juk_debug.h"
using namespace ActionCollection;
......@@ -77,16 +79,10 @@ void deleteAndClear(T *&ptr)
// public members
////////////////////////////////////////////////////////////////////////////////
JuK::JuK(const QStringList &filesToOpen, QWidget *parent) :
KXmlGuiWindow(parent, Qt::WindowFlags(Qt::WA_DeleteOnClose)),
m_splitter(nullptr),
m_statusLabel(nullptr),
m_systemTray(nullptr),
m_player(new PlayerManager),
m_scrobbler(nullptr),
m_filesToOpen(filesToOpen),
m_shuttingDown(false),
m_pmToken(0)
JuK::JuK(const QStringList &filesToOpen, QWidget *parent)
: KXmlGuiWindow(parent, Qt::WindowFlags(Qt::WA_DeleteOnClose))
, m_player(new PlayerManager)
, m_filesToOpen(filesToOpen)
{
// Expect segfaults if you change this order.
......@@ -101,7 +97,7 @@ JuK::JuK(const QStringList &filesToOpen, QWidget *parent) :
Cache::ensureAppDataStorageExists();
setupActions();
setupLayout();
setupLayout(); // Creates PlaylistSplitter and therefore CollectionList
bool firstRun = !KSharedConfig::openConfig()->hasGroup("MainWindow");
......
......@@ -81,22 +81,22 @@ private slots:
void slotClearOldCovers();
private:
PlaylistSplitter *m_splitter;
StatusLabel *m_statusLabel;
SystemTray *m_systemTray;
PlaylistSplitter *m_splitter = nullptr;
StatusLabel *m_statusLabel = nullptr;
SystemTray *m_systemTray = nullptr;
KToggleAction *m_randomPlayAction;
KToggleAction *m_toggleSystemTrayAction;
KToggleAction *m_toggleDockOnCloseAction;
KToggleAction *m_togglePopupsAction;
KToggleAction *m_randomPlayAction = nullptr;
KToggleAction *m_toggleSystemTrayAction = nullptr;
KToggleAction *m_toggleDockOnCloseAction = nullptr;
KToggleAction *m_togglePopupsAction = nullptr;
PlayerManager *m_player;
Scrobbler *m_scrobbler;
PlayerManager *m_player = nullptr;
Scrobbler *m_scrobbler = nullptr;
QStringList m_filesToOpen;
bool m_startDocked;
bool m_shuttingDown;
uint m_pmToken;
bool m_startDocked = false;
bool m_shuttingDown = false;
uint m_pmToken = 0;
static JuK* m_instance;
};
......
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