mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
Merge bitcoin-core/gui#584: Getting ready to Qt 6 (5/n). Do not assume qDBusRegisterMetaType
return type
6cf4dc7f64
qt: Do not assume `qDBusRegisterMetaType` return type (Hennadii Stepanov) Pull request description: `qDBusRegisterMetaType` returns: - [`int`](https://doc.qt.io/qt-5/qdbusargument.html#qDBusRegisterMetaType) in Qt 5 - [`QMetaType`](https://doc.qt.io/qt-6/qdbusargument.html#qDBusRegisterMetaType) in Qt 6 ACKs for top commit: laanwj: Anyhow code review ACK6cf4dc7f64
w0xlt: tACK6cf4dc7f64
on Ubuntu 21.10, Qt 5.15.2. Tree-SHA512: 17d43e191d31a6f927d19550c52471ed3b9222f492a23cee2e553f2c679cf37125e00637b00ea9f4ee3e37dfcf5278171be9a5e1e2e899592516291c7b5cd942
This commit is contained in:
commit
254f3cc368
1 changed files with 3 additions and 9 deletions
|
@ -14,8 +14,9 @@
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#ifdef USE_DBUS
|
#ifdef USE_DBUS
|
||||||
#include <stdint.h>
|
#include <QDBusMetaType>
|
||||||
#include <QtDBus>
|
#include <QtDBus>
|
||||||
|
#include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
#include <qt/macnotificationhandler.h>
|
#include <qt/macnotificationhandler.h>
|
||||||
|
@ -73,8 +74,6 @@ public:
|
||||||
FreedesktopImage() {}
|
FreedesktopImage() {}
|
||||||
explicit FreedesktopImage(const QImage &img);
|
explicit FreedesktopImage(const QImage &img);
|
||||||
|
|
||||||
static int metaType();
|
|
||||||
|
|
||||||
// Image to variant that can be marshalled over DBus
|
// Image to variant that can be marshalled over DBus
|
||||||
static QVariant toVariant(const QImage &img);
|
static QVariant toVariant(const QImage &img);
|
||||||
|
|
||||||
|
@ -136,15 +135,10 @@ const QDBusArgument &operator>>(const QDBusArgument &a, FreedesktopImage &i)
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
int FreedesktopImage::metaType()
|
|
||||||
{
|
|
||||||
return qDBusRegisterMetaType<FreedesktopImage>();
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant FreedesktopImage::toVariant(const QImage &img)
|
QVariant FreedesktopImage::toVariant(const QImage &img)
|
||||||
{
|
{
|
||||||
FreedesktopImage fimg(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)
|
void Notificator::notifyDBus(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout)
|
||||||
|
|
Loading…
Add table
Reference in a new issue