Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/qt/notificator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
#include <QTemporaryFile>
#include <QVariant>
#ifdef USE_DBUS
#include <stdint.h>
#include <QDBusMetaType>
#include <QtDBus>
#include <stdint.h>
#endif
#ifdef Q_OS_MAC
#include <qt/macnotificationhandler.h>
Expand Down Expand Up @@ -73,8 +74,6 @@ class FreedesktopImage
FreedesktopImage() {}
explicit FreedesktopImage(const QImage &img);

static int metaType();

// Image to variant that can be marshalled over DBus
static QVariant toVariant(const QImage &img);

Expand Down Expand Up @@ -136,15 +135,10 @@ const QDBusArgument &operator>>(const QDBusArgument &a, FreedesktopImage &i)
return a;
}

int FreedesktopImage::metaType()
{
return qDBusRegisterMetaType<FreedesktopImage>();
}

QVariant FreedesktopImage::toVariant(const QImage &img)
{
FreedesktopImage fimg(img);
return QVariant(FreedesktopImage::metaType(), &fimg);
return QVariant(qDBusRegisterMetaType<FreedesktopImage>(), &fimg);
}

void Notificator::notifyDBus(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout)
Expand Down