You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
5.6 KiB
139 lines
5.6 KiB
From 3693ea5ed68b53fdb9e2d9c034dcda7b68798c89 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Nicoletti <dantti12@gmail.com>
|
|
Date: Tue, 16 Sep 2014 08:56:19 -0300
|
|
Subject: [PATCH 10/16] Disable namespacing and classes names on the interfaces
|
|
generated by qdbusxml2cpp so the org.fdo.PackageKit.Offiline interface
|
|
doesn't clash the PackageKit typedef of org.fdo.PackageKit
|
|
|
|
---
|
|
src/CMakeLists.txt | 4 ++--
|
|
src/daemon.cpp | 8 ++++----
|
|
src/daemonprivate.cpp | 2 +-
|
|
src/daemonprivate.h | 4 ++--
|
|
src/transactionprivate.cpp | 10 +++++-----
|
|
src/transactionprivate.h | 4 ++--
|
|
6 files changed, 16 insertions(+), 16 deletions(-)
|
|
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index 5037fb2..9d5210f 100755
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -66,8 +66,8 @@ if (NOT PK_INTERFACE_XML OR NOT PK_TRANSACTION_INTERFACE_XML)
|
|
message (FATAL_ERROR "Unable to find PackageKit DBus specifications! Please install PackageKit to continue!")
|
|
endif ()
|
|
|
|
-set_source_files_properties(${PK_INTERFACE_XML} PROPERTIES CLASSNAME DaemonProxy)
|
|
-set_source_files_properties(${PK_TRANSACTION_INTERFACE_XML} PROPERTIES CLASSNAME TransactionProxy)
|
|
+set_source_files_properties(${PK_INTERFACE_XML} PROPERTIES NO_NAMESPACE true)
|
|
+set_source_files_properties(${PK_TRANSACTION_INTERFACE_XML} PROPERTIES NO_NAMESPACE true)
|
|
|
|
if (Qt5_FOUND)
|
|
qt5_add_dbus_interface(packagekitqt_SRC ${PK_INTERFACE_XML} daemonproxy)
|
|
diff --git a/src/daemon.cpp b/src/daemon.cpp
|
|
index fdea8a7..442ef55 100755
|
|
--- a/src/daemon.cpp
|
|
+++ b/src/daemon.cpp
|
|
@@ -47,10 +47,10 @@ Daemon::Daemon(QObject *parent) :
|
|
d_ptr(new DaemonPrivate(this))
|
|
{
|
|
Q_D(Daemon);
|
|
- d->daemon = new ::DaemonProxy(QLatin1String(PK_NAME),
|
|
- QLatin1String(PK_PATH),
|
|
- QDBusConnection::systemBus(),
|
|
- this);
|
|
+ d->daemon = new ::OrgFreedesktopPackageKitInterface(QLatin1String(PK_NAME),
|
|
+ QLatin1String(PK_PATH),
|
|
+ QDBusConnection::systemBus(),
|
|
+ this);
|
|
|
|
QDBusConnection::systemBus().connect(QLatin1String(PK_NAME),
|
|
QLatin1String(PK_PATH),
|
|
diff --git a/src/daemonprivate.cpp b/src/daemonprivate.cpp
|
|
index 6a52f14..25ba55b 100644
|
|
--- a/src/daemonprivate.cpp
|
|
+++ b/src/daemonprivate.cpp
|
|
@@ -124,7 +124,7 @@ void DaemonPrivate::updateProperties(const QVariantMap &properties)
|
|
} else if (property == QLatin1String("DistroId")) {
|
|
distroId = value.toString();
|
|
} else if (property == QLatin1String("Filters")) {
|
|
- filters = static_cast<Transaction::Filters>(value.toULongLong());
|
|
+ filters = static_cast<Transaction::Filters>(value.toUInt());
|
|
} else if (property == QLatin1String("Groups")) {
|
|
groups = static_cast<Transaction::Groups>(value.toULongLong());
|
|
} else if (property == QLatin1String("Locked")) {
|
|
diff --git a/src/daemonprivate.h b/src/daemonprivate.h
|
|
index abc03a7..b8c2b6c 100644
|
|
--- a/src/daemonprivate.h
|
|
+++ b/src/daemonprivate.h
|
|
@@ -27,7 +27,7 @@
|
|
|
|
#include "daemon.h"
|
|
|
|
-class DaemonProxy;
|
|
+class OrgFreedesktopPackageKitInterface;
|
|
|
|
namespace PackageKit {
|
|
|
|
@@ -39,7 +39,7 @@ protected:
|
|
virtual ~DaemonPrivate() {}
|
|
|
|
Daemon *q_ptr;
|
|
- ::DaemonProxy *daemon;
|
|
+ ::OrgFreedesktopPackageKitInterface *daemon;
|
|
QStringList hints;
|
|
QStringList connectedSignals;
|
|
|
|
diff --git a/src/transactionprivate.cpp b/src/transactionprivate.cpp
|
|
index 7a87aec..2c73899 100644
|
|
--- a/src/transactionprivate.cpp
|
|
+++ b/src/transactionprivate.cpp
|
|
@@ -46,10 +46,10 @@ void TransactionPrivate::setup(const QDBusObjectPath &transactionId)
|
|
Q_Q(Transaction);
|
|
|
|
tid = transactionId;
|
|
- p = new TransactionProxy(QLatin1String(PK_NAME),
|
|
- tid.path(),
|
|
- QDBusConnection::systemBus(),
|
|
- q);
|
|
+ p = new OrgFreedesktopPackageKitTransactionInterface(QLatin1String(PK_NAME),
|
|
+ tid.path(),
|
|
+ QDBusConnection::systemBus(),
|
|
+ q);
|
|
if (!Daemon::global()->hints().isEmpty()) {
|
|
q->setHints(Daemon::global()->hints());
|
|
}
|
|
@@ -329,7 +329,7 @@ void TransactionPrivate::updateProperties(const QVariantMap &properties)
|
|
status = static_cast<Transaction::Status>(value.toUInt());
|
|
QMetaObject::invokeMethod(q, "statusChanged", Qt::QueuedConnection);
|
|
} else if (property == QLatin1String("TransactionFlags")) {
|
|
- transactionFlags = static_cast<Transaction::TransactionFlags>(value.toULongLong());
|
|
+ transactionFlags = static_cast<Transaction::TransactionFlags>(value.toUInt());
|
|
QMetaObject::invokeMethod(q, "transactionFlagsChanged", Qt::QueuedConnection);
|
|
} else if (property == QLatin1String("Uid")) {
|
|
uid = value.toUInt();
|
|
diff --git a/src/transactionprivate.h b/src/transactionprivate.h
|
|
index 895cfac..72860d8 100644
|
|
--- a/src/transactionprivate.h
|
|
+++ b/src/transactionprivate.h
|
|
@@ -29,7 +29,7 @@
|
|
|
|
#include "transaction.h"
|
|
|
|
-class TransactionProxy;
|
|
+class OrgFreedesktopPackageKitTransactionInterface;
|
|
|
|
namespace PackageKit {
|
|
|
|
@@ -45,7 +45,7 @@ protected:
|
|
void runQueuedTransaction();
|
|
|
|
QDBusObjectPath tid;
|
|
- ::TransactionProxy* p = 0;
|
|
+ ::OrgFreedesktopPackageKitTransactionInterface* p = 0;
|
|
Transaction *q_ptr;
|
|
QStringList connectedSignals;
|
|
|
|
--
|
|
2.1.0
|
|
|