mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
qt: Do not assume qDBusRegisterMetaType
return type
`qDBusRegisterMetaType` returns: - `int` in Qt 5 - `QMetaType` in Qt 6
This commit is contained in:
parent
f60a63cc5f
commit
6cf4dc7f64
1 changed files with 3 additions and 9 deletions
|
@ -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>
|
||||
|
@ -73,8 +74,6 @@ public:
|
|||
FreedesktopImage() {}
|
||||
explicit FreedesktopImage(const QImage &img);
|
||||
|
||||
static int metaType();
|
||||
|
||||
// Image to variant that can be marshalled over DBus
|
||||
static QVariant toVariant(const QImage &img);
|
||||
|
||||
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue