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