cleanup
This commit is contained in:
parent
daa9a8e389
commit
2e3359331c
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
using namespace Snore;
|
using namespace Snore;
|
||||||
|
|
||||||
int ApplicationData::applicationMetaID = qRegisterMetaType<Application>();
|
|
||||||
|
|
||||||
ApplicationData::ApplicationData(const QString &name, const Icon &icon):
|
ApplicationData::ApplicationData(const QString &name, const Icon &icon):
|
||||||
m_name(name),
|
m_name(name),
|
||||||
m_icon(icon)
|
m_icon(icon)
|
||||||
|
|
|
@ -37,8 +37,6 @@ public:
|
||||||
Icon m_icon;
|
Icon m_icon;
|
||||||
QHash<QString,Alert> m_alerts;
|
QHash<QString,Alert> m_alerts;
|
||||||
Hint m_hint;
|
Hint m_hint;
|
||||||
|
|
||||||
static int applicationMetaID;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,6 @@ using namespace Snore;
|
||||||
|
|
||||||
int Notification::m_defaultTimeout = 10;
|
int Notification::m_defaultTimeout = 10;
|
||||||
|
|
||||||
int NotificationData::notificationMetaID = qRegisterMetaType<Notification>();
|
|
||||||
|
|
||||||
|
|
||||||
Notification::Notification () :
|
Notification::Notification () :
|
||||||
d(NULL)
|
d(NULL)
|
||||||
|
|
|
@ -82,7 +82,6 @@ private:
|
||||||
|
|
||||||
static uint notificationCount;
|
static uint notificationCount;
|
||||||
static uint m_idCount;
|
static uint m_idCount;
|
||||||
static int notificationMetaID;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,10 @@
|
||||||
using namespace Snore;
|
using namespace Snore;
|
||||||
|
|
||||||
|
|
||||||
SnoreCore::SnoreCore(QSystemTrayIcon *trayIcon ):
|
SnoreCore::SnoreCore(QSystemTrayIcon *trayIcon )
|
||||||
d_ptr(new SnoreCorePrivate(trayIcon ))
|
|
||||||
{
|
{
|
||||||
|
SnoreCorePrivate::registerMetaTypes();
|
||||||
|
d_ptr = new SnoreCorePrivate(trayIcon );
|
||||||
Q_D(SnoreCore);
|
Q_D(SnoreCore);
|
||||||
d->q_ptr = this;
|
d->q_ptr = this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,12 @@ bool SnoreCorePrivate::setBackendIfAvailible(const QString &backend)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SnoreCorePrivate::registerMetaTypes()
|
||||||
|
{
|
||||||
|
qRegisterMetaType<Notification>();
|
||||||
|
qRegisterMetaType<Application>();
|
||||||
|
}
|
||||||
|
|
||||||
bool SnoreCorePrivate::primaryBackendCanUpdateNotification() const
|
bool SnoreCorePrivate::primaryBackendCanUpdateNotification() const
|
||||||
{
|
{
|
||||||
return m_notificationBackend->canUpdateNotification();
|
return m_notificationBackend->canUpdateNotification();
|
||||||
|
|
|
@ -40,6 +40,8 @@ public:
|
||||||
{
|
{
|
||||||
return QCryptographicHash::hash(data,QCryptographicHash::Md5).toHex();
|
return QCryptographicHash::hash(data,QCryptographicHash::Md5).toHex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void registerMetaTypes();
|
||||||
public:
|
public:
|
||||||
SnoreCorePrivate(QSystemTrayIcon *trayIcon);
|
SnoreCorePrivate(QSystemTrayIcon *trayIcon);
|
||||||
~SnoreCorePrivate();
|
~SnoreCorePrivate();
|
||||||
|
@ -51,6 +53,8 @@ public:
|
||||||
bool setBackendIfAvailible(const QString & backend);
|
bool setBackendIfAvailible(const QString & backend);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return whether the backend can update a notification
|
* @return whether the backend can update a notification
|
||||||
|
|
Loading…
Reference in New Issue