fix warnings and crash
This commit is contained in:
parent
5ecd0c3cc3
commit
361ee29e94
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "version.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
#include <QSettings>
|
||||
#include <QThread>
|
||||
|
@ -48,8 +48,8 @@ SnoreCore::SnoreCore(QObject *parent):
|
|||
|
||||
SnoreCore &SnoreCore::instance()
|
||||
{
|
||||
static SnoreCore instance(qApp);
|
||||
return instance;
|
||||
static SnoreCore *instance(new SnoreCore(qApp));
|
||||
return *instance;
|
||||
}
|
||||
|
||||
SnoreCore::~SnoreCore()
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
using namespace Snore;
|
||||
|
||||
SnoreCorePrivate::SnoreCorePrivate():
|
||||
m_localSettingsPrefix(qApp->applicationName().isEmpty() ? "SnoreNotify" : qApp->applicationName()),
|
||||
m_settings(new QSettings("Snorenotify", "libsnore", this))
|
||||
{
|
||||
snoreDebug(SNORE_INFO) << "Version:" << Version::version();
|
||||
|
@ -45,6 +46,7 @@ SnoreCorePrivate::SnoreCorePrivate():
|
|||
|
||||
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(slotAboutToQuit()));
|
||||
|
||||
|
||||
m_defaultApp = Application("SnoreNotify", Icon(":/root/snore.png"));
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ private:
|
|||
|
||||
Application m_defaultApp;
|
||||
|
||||
QString m_localSettingsPrefix = qApp->applicationName().isEmpty() ? "SnoreNotify" : qApp->applicationName();
|
||||
QString m_localSettingsPrefix;
|
||||
|
||||
QSettings *m_settings;
|
||||
|
||||
|
|
Loading…
Reference in New Issue