fix: 修复任务栏不响应信号的问题
后端服务的信号没有参数,而任务栏的服务的信号中是带参数的,因此将后端的接口中加上参数即可 Log: Task: https://pms.uniontech.com/task-view-133075.html Influence: 调整任务栏位置,查看任务栏位置是否变化 Change-Id: Ibe97dfdff487407d8e7680168bd5993aaeedeac2
This commit is contained in:
@ -31,7 +31,7 @@ PlasmaWindow::PlasmaWindow(const QString &service, const QString &path, const QD
|
||||
: DBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||
, d_ptr(new __WindowPrivate)
|
||||
{
|
||||
if (QMetaType::type("Rect") == QMetaType::UnknownType)
|
||||
if (QMetaType::type("DockRect") == QMetaType::UnknownType)
|
||||
registerRectMetaType();
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <DBusExtendedAbstractInterface>
|
||||
#include <QtDBus/QtDBus>
|
||||
|
||||
#include "types/rect.h"
|
||||
#include "types/dockrect.h"
|
||||
|
||||
/*
|
||||
* Proxy class for interface com.deepin.daemon.KWayland.PlasmaWindow
|
||||
@ -50,7 +50,7 @@ public Q_SLOTS: // METHODS
|
||||
|
||||
|
||||
|
||||
inline QDBusPendingReply<Rect> Geometry()
|
||||
inline QDBusPendingReply<DockRect> Geometry()
|
||||
{
|
||||
QList<QVariant> argumentList;
|
||||
return asyncCallWithArgumentList(QStringLiteral("Geometry"), argumentList);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "rect.h"
|
||||
#include "dockrect.h"
|
||||
#include <QDebug>
|
||||
|
||||
Rect::Rect()
|
||||
DockRect::DockRect()
|
||||
: X(0)
|
||||
, Y(0)
|
||||
, Width(0)
|
||||
@ -10,7 +10,7 @@ Rect::Rect()
|
||||
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, const Rect &rect)
|
||||
QDebug operator<<(QDebug debug, const DockRect &rect)
|
||||
{
|
||||
debug << QString("Rect(%1, %2, %3, %4)").arg(rect.X)
|
||||
.arg(rect.Y)
|
||||
@ -20,12 +20,12 @@ QDebug operator<<(QDebug debug, const Rect &rect)
|
||||
return debug;
|
||||
}
|
||||
|
||||
Rect::operator QRect() const
|
||||
DockRect::operator QRect() const
|
||||
{
|
||||
return QRect(X, Y, Width, Height);
|
||||
}
|
||||
|
||||
QDBusArgument &operator<<(QDBusArgument &arg, const Rect &rect)
|
||||
QDBusArgument &operator<<(QDBusArgument &arg, const DockRect &rect)
|
||||
{
|
||||
arg.beginStructure();
|
||||
arg << rect.X << rect.Y << rect.Width << rect.Height;
|
||||
@ -34,7 +34,7 @@ QDBusArgument &operator<<(QDBusArgument &arg, const Rect &rect)
|
||||
return arg;
|
||||
}
|
||||
|
||||
const QDBusArgument &operator>>(const QDBusArgument &arg, Rect &rect)
|
||||
const QDBusArgument &operator>>(const QDBusArgument &arg, DockRect &rect)
|
||||
{
|
||||
arg.beginStructure();
|
||||
arg >> rect.X >> rect.Y >> rect.Width >> rect.Height;
|
||||
@ -45,6 +45,6 @@ const QDBusArgument &operator>>(const QDBusArgument &arg, Rect &rect)
|
||||
|
||||
void registerRectMetaType()
|
||||
{
|
||||
qRegisterMetaType<Rect>("Rect");
|
||||
qDBusRegisterMetaType<Rect>();
|
||||
qRegisterMetaType<DockRect>("DockRect");
|
||||
qDBusRegisterMetaType<DockRect>();
|
||||
}
|
@ -4,20 +4,20 @@
|
||||
#include <QRect>
|
||||
#include <QDBusMetaType>
|
||||
|
||||
struct Rect
|
||||
struct DockRect
|
||||
{
|
||||
public:
|
||||
Rect();
|
||||
DockRect();
|
||||
operator QRect() const;
|
||||
|
||||
friend QDebug operator<<(QDebug debug, const Rect &rect);
|
||||
friend const QDBusArgument &operator>>(const QDBusArgument &arg, Rect &rect);
|
||||
friend QDBusArgument &operator<<(QDBusArgument &arg, const Rect &rect);
|
||||
friend QDebug operator<<(QDebug debug, const DockRect &rect);
|
||||
friend const QDBusArgument &operator>>(const QDBusArgument &arg, DockRect &rect);
|
||||
friend QDBusArgument &operator<<(QDBusArgument &arg, const DockRect &rect);
|
||||
|
||||
qint32 X, Y, Width, Height;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(Rect)
|
||||
Q_DECLARE_METATYPE(DockRect)
|
||||
|
||||
void registerRectMetaType();
|
||||
|
Reference in New Issue
Block a user