parent
289acbceca
commit
33c4ec3192
@ -1 +1 @@
|
||||
/PackageKit-Qt-0.9.2.tar.xz
|
||||
/PackageKit-Qt-0.9.5.tar.xz
|
||||
|
@ -1,28 +0,0 @@
|
||||
From ec677018df575ef295b5a57b66436b24ded63850 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Nicoletti <dantti12@gmail.com>
|
||||
Date: Tue, 6 May 2014 12:42:28 -0300
|
||||
Subject: [PATCH 02/16] Remove daemon proxy conection to changed()
|
||||
|
||||
---
|
||||
src/daemon.cpp | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/daemon.cpp b/src/daemon.cpp
|
||||
index 621fb89..06907f4 100755
|
||||
--- a/src/daemon.cpp
|
||||
+++ b/src/daemon.cpp
|
||||
@@ -94,10 +94,7 @@ void DaemonPrivate::setupSignal(const QString &signal, bool connect)
|
||||
const char *signalToConnect = 0;
|
||||
const char *memberToConnect = 0;
|
||||
|
||||
- if (signal == SIGNAL(changed())) {
|
||||
- signalToConnect = SIGNAL(Changed());
|
||||
- memberToConnect = SIGNAL(changed());
|
||||
- } else if (signal == SIGNAL(repoListChanged())) {
|
||||
+ if (signal == SIGNAL(repoListChanged())) {
|
||||
signalToConnect = SIGNAL(RepoListChanged());
|
||||
memberToConnect = SIGNAL(repoListChanged());
|
||||
} else if (signal == SIGNAL(restartScheduled())) {
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,74 +0,0 @@
|
||||
From c7b3c1dde34409fba8fd80355338d7f3fc1feffe Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Nicoletti <dantti12@gmail.com>
|
||||
Date: Tue, 6 May 2014 12:43:26 -0300
|
||||
Subject: [PATCH 03/16] Add operator== to bitfield
|
||||
|
||||
---
|
||||
src/bitfield.cpp | 15 ++++++++++-----
|
||||
src/bitfield.h | 6 +++++-
|
||||
2 files changed, 15 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/bitfield.cpp b/src/bitfield.cpp
|
||||
index c986905..68ef80c 100644
|
||||
--- a/src/bitfield.cpp
|
||||
+++ b/src/bitfield.cpp
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
using namespace PackageKit;
|
||||
|
||||
-Bitfield::Bitfield () : m_val (0)
|
||||
+Bitfield::Bitfield ()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -61,10 +61,15 @@ Bitfield Bitfield::operator|= (Bitfield mask)
|
||||
|
||||
Bitfield& Bitfield::operator= (const Bitfield& other)
|
||||
{
|
||||
- if (this == &other)
|
||||
- return *this;
|
||||
+ if (this == &other)
|
||||
+ return *this;
|
||||
|
||||
- m_val = other.m_val;
|
||||
+ m_val = other.m_val;
|
||||
|
||||
- return *this;
|
||||
+ return *this;
|
||||
+}
|
||||
+
|
||||
+bool Bitfield::operator==(const Bitfield &other)
|
||||
+{
|
||||
+ return m_val == other.m_val;
|
||||
}
|
||||
diff --git a/src/bitfield.h b/src/bitfield.h
|
||||
index d7dd481..8535e46 100644
|
||||
--- a/src/bitfield.h
|
||||
+++ b/src/bitfield.h
|
||||
@@ -2,6 +2,7 @@
|
||||
#define PACKAGEKIT_BITFIELD_H
|
||||
|
||||
#include <QtGlobal>
|
||||
+#include <QMetaType>
|
||||
|
||||
namespace PackageKit {
|
||||
|
||||
@@ -23,11 +24,14 @@ public:
|
||||
Bitfield operator|= (Bitfield mask);
|
||||
|
||||
Bitfield& operator= (const Bitfield& other);
|
||||
+ bool operator==(const Bitfield &other);
|
||||
|
||||
private:
|
||||
- qulonglong m_val;
|
||||
+ qulonglong m_val = 0;
|
||||
};
|
||||
|
||||
} // End namespace PackageKit
|
||||
|
||||
+Q_DECLARE_METATYPE(PackageKit::Bitfield)
|
||||
+
|
||||
#endif
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 9e3a611a3c1177878df2f09b6c4e0bee13239ba3 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Nicoletti <dantti12@gmail.com>
|
||||
Date: Tue, 6 May 2014 12:44:51 -0300
|
||||
Subject: [PATCH 04/16] Remove the metatype registration for Transaction types
|
||||
as is't a bit useless since it depends on the namespace being used better
|
||||
leave this to the client to register
|
||||
|
||||
---
|
||||
src/daemon.cpp | 19 -------------------
|
||||
1 file changed, 19 deletions(-)
|
||||
|
||||
diff --git a/src/daemon.cpp b/src/daemon.cpp
|
||||
index 06907f4..fdea8a7 100755
|
||||
--- a/src/daemon.cpp
|
||||
+++ b/src/daemon.cpp
|
||||
@@ -66,25 +66,6 @@ Daemon::Daemon(QObject *parent) :
|
||||
if (!db.open()) {
|
||||
qDebug() << "Failed to initialize the desktop files database";
|
||||
}
|
||||
-
|
||||
- qRegisterMetaType<PackageKit::Daemon::Network>("PackageKit::Daemon::Network");
|
||||
- qRegisterMetaType<PackageKit::Daemon::Authorize>("PackageKit::Daemon::Authorize");
|
||||
- qRegisterMetaType<PackageKit::Transaction::InternalError>("PackageKit::Transaction::InternalError");
|
||||
- qRegisterMetaType<PackageKit::Transaction::Role>("PackageKit::Transaction::Role");
|
||||
- qRegisterMetaType<PackageKit::Transaction::Error>("PackageKit::Transaction::Error");
|
||||
- qRegisterMetaType<PackageKit::Transaction::Exit>("PackageKit::Transaction::Exit");
|
||||
- qRegisterMetaType<PackageKit::Transaction::Filter>("PackageKit::Transaction::Filter");
|
||||
- qRegisterMetaType<PackageKit::Transaction::Message>("PackageKit::Transaction::Message");
|
||||
- qRegisterMetaType<PackageKit::Transaction::Status>("PackageKit::Transaction::Status");
|
||||
- qRegisterMetaType<PackageKit::Transaction::MediaType>("PackageKit::Transaction::MediaType");
|
||||
- qRegisterMetaType<PackageKit::Transaction::DistroUpgrade>("PackageKit::Transaction::DistroUpgrade");
|
||||
- qRegisterMetaType<PackageKit::Transaction::TransactionFlag>("PackageKit::Transaction::TransactionFlag");
|
||||
- qRegisterMetaType<PackageKit::Transaction::TransactionFlags>("PackageKit::Transaction::TransactionFlags");
|
||||
- qRegisterMetaType<PackageKit::Transaction::Restart>("PackageKit::Transaction::Restart");
|
||||
- qRegisterMetaType<PackageKit::Transaction::UpdateState>("PackageKit::Transaction::UpdateState");
|
||||
- qRegisterMetaType<PackageKit::Transaction::Group>("PackageKit::Transaction::Group");
|
||||
- qRegisterMetaType<PackageKit::Transaction::Info>("PackageKit::Transaction::Info");
|
||||
- qRegisterMetaType<PackageKit::Transaction::SigType>("PackageKit::Transaction::SigType");
|
||||
}
|
||||
|
||||
void DaemonPrivate::setupSignal(const QString &signal, bool connect)
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,25 +0,0 @@
|
||||
From d53989d7c8051ae0be95a91725646bd4f5fe38b9 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Nicoletti <dantti12@gmail.com>
|
||||
Date: Wed, 7 May 2014 16:16:25 -0300
|
||||
Subject: [PATCH 05/16] Remove RoleUpgradeSystem as it's not supported in 0.9.x
|
||||
anymore
|
||||
|
||||
---
|
||||
src/transaction.h | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/transaction.h b/src/transaction.h
|
||||
index 2b03f41..7b17fc5 100644
|
||||
--- a/src/transaction.h
|
||||
+++ b/src/transaction.h
|
||||
@@ -140,7 +140,6 @@ public:
|
||||
RoleGetDistroUpgrades,
|
||||
RoleGetCategories,
|
||||
RoleGetOldTransactions,
|
||||
- RoleUpgradeSystem, // Since 0.6.11
|
||||
RoleRepairSystem, // Since 0.7.2
|
||||
RoleGetDetailsLocal, // Since 0.8.17
|
||||
RoleGetFilesLocal, // Since 0.9.1
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,101 +0,0 @@
|
||||
From 8547dc427bd0d09faef7b26078adf39c2fe74e01 Mon Sep 17 00:00:00 2001
|
||||
From: Aleix Pol <aleixpol@kde.org>
|
||||
Date: Tue, 19 Aug 2014 18:54:46 +0200
|
||||
Subject: [PATCH 06/16] Properly export cmake targets
|
||||
|
||||
---
|
||||
CMakeLists.txt | 7 +++++++
|
||||
src/CMakeLists.txt | 20 +++++++++++---------
|
||||
src/modules/packagekit-qt-config.cmake.in | 7 +++----
|
||||
3 files changed, 21 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fa8978a..5df701d 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -51,6 +51,7 @@ set (LOCALE_DIR "${DATADIR}/locale")
|
||||
set (VERSION "${QPACKAGEKIT_VERSION}")
|
||||
set (BUILDDIR "${CMAKE_BINARY_DIR}")
|
||||
set (LOCALSTATEDIR "/var")
|
||||
+set (CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${LIBNAME}/")
|
||||
|
||||
add_definitions("-DLOCALSTATEDIR=\"${LOCALSTATEDIR}\"")
|
||||
add_definitions("-std=gnu++11")
|
||||
@@ -75,3 +76,9 @@ endif (DISABLE_MAINTAINER_CFLAGS)
|
||||
add_definitions(${MAINTAINER_CFLAGS})
|
||||
|
||||
add_subdirectory(src)
|
||||
+
|
||||
+install(EXPORT PackageKitQtTargets
|
||||
+ DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
||||
+ FILE PackageKitQtTargets.cmake
|
||||
+ NAMESPACE PK::
|
||||
+ COMPONENT Devel)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 8ef7906..d1176ec 100755
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -55,13 +55,14 @@ set(packagekitqt_SRC
|
||||
details.cpp
|
||||
)
|
||||
|
||||
-find_file(PK_INTERFACE_XML org.freedesktop.PackageKit.xml
|
||||
- PATHS ${CMAKE_INSTALL_PREFIX}/share/dbus-1/interfaces/
|
||||
+find_path(PK_INTERFACES_DIR org.freedesktop.PackageKit.xml
|
||||
+ HINTS ${CMAKE_INSTALL_PREFIX} /usr
|
||||
+ PATH_SUFFIXES share/dbus-1/interfaces/
|
||||
)
|
||||
-find_file(PK_TRANSACTION_INTERFACE_XML org.freedesktop.PackageKit.Transaction.xml
|
||||
- PATHS ${CMAKE_INSTALL_PREFIX}/share/dbus-1/interfaces/
|
||||
-)
|
||||
-if (PK_INTERFACE_XML STREQUAL "PK_INTERFACE_XML-NOTFOUND" OR PK_TRANSACTION_INTERFACE_XML STREQUAL "PK_TRANSACTION_INTERFACE_XML-NOTFOUND")
|
||||
+set(PK_INTERFACE_XML "${PK_INTERFACES_DIR}/org.freedesktop.PackageKit.xml")
|
||||
+set(PK_TRANSACTION_INTERFACE_XML "${PK_INTERFACES_DIR}/org.freedesktop.PackageKit.Transaction.xml")
|
||||
+
|
||||
+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 ()
|
||||
|
||||
@@ -87,7 +88,8 @@ set_target_properties(${LIBNAME} PROPERTIES VERSION ${QPACKAGEKIT_VERSION} SOVER
|
||||
if (Qt5_FOUND)
|
||||
add_dependencies(${LIBNAME} mocs)
|
||||
target_link_libraries(${LIBNAME}
|
||||
- ${Qt5DBus_LIBRARIES} ${Qt5Sql_LIBRARIES}
|
||||
+ LINK_PUBLIC Qt5::DBus
|
||||
+ LINK_PRIVATE Qt5::Sql
|
||||
)
|
||||
elseif (Qt4_FOUND)
|
||||
target_link_libraries(${LIBNAME}
|
||||
@@ -99,8 +101,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${LIBNAME}.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc
|
||||
@ONLY
|
||||
)
|
||||
-
|
||||
-install(TARGETS ${LIBNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+target_include_directories(${LIBNAME} INTERFACE "$<INSTALL_INTERFACE:include/PackageKit/>")
|
||||
+install(TARGETS ${LIBNAME} EXPORT PackageKitQtTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
)
|
||||
diff --git a/src/modules/packagekit-qt-config.cmake.in b/src/modules/packagekit-qt-config.cmake.in
|
||||
index f9f4436..a91b095 100644
|
||||
--- a/src/modules/packagekit-qt-config.cmake.in
|
||||
+++ b/src/modules/packagekit-qt-config.cmake.in
|
||||
@@ -1,11 +1,10 @@
|
||||
# - Config information for PackageKit-Qt@QT_VERSION@
|
||||
# This file defines:
|
||||
#
|
||||
-# PackageKitQt@QT_VERSION@_INCLUDE_DIR - the PackageKitQt@QT_VERSION@ include directory
|
||||
# PackageKitQt@QT_VERSION@_LIBRARIES - Link these to use PackageKitQt@QT_VERSION@
|
||||
|
||||
SET(prefix "@CMAKE_INSTALL_PREFIX@")
|
||||
SET(exec_prefix "@CMAKE_INSTALL_PREFIX@")
|
||||
-SET(PackageKitQt@QT_VERSION@_LIBRARIES "@PKQT_INSTALL_LIBDIR@/lib@LIBNAME@.so" CACHE FILEPATH "Libraries for PackageKitQt@QT_VERSION@")
|
||||
-SET(PackageKitQt@QT_VERSION@_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/PackageKit/@LIBNAME@" CACHE PATH "Include path for PackageKitQt@QT_VERSION@")
|
||||
-SET(PackageKitQt@QT_VERSION@_FOUND "TRUE")
|
||||
+SET(PackageKitQt@QT_VERSION@_LIBRARIES "PK::packagekitqt5")
|
||||
+
|
||||
+include("${CMAKE_CURRENT_LIST_DIR}/PackageKitQtTargets.cmake")
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 0d929b4afe1a761c53df5f1c719334712f05fa6b Mon Sep 17 00:00:00 2001
|
||||
From: Aleix Pol <aleixpol@kde.org>
|
||||
Date: Wed, 27 Aug 2014 16:08:59 +0200
|
||||
Subject: [PATCH 07/16] Don't assume the target is packagekitqt5
|
||||
|
||||
It can also be packagekitqt4
|
||||
---
|
||||
src/modules/packagekit-qt-config.cmake.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/modules/packagekit-qt-config.cmake.in b/src/modules/packagekit-qt-config.cmake.in
|
||||
index a91b095..3dcf3f3 100644
|
||||
--- a/src/modules/packagekit-qt-config.cmake.in
|
||||
+++ b/src/modules/packagekit-qt-config.cmake.in
|
||||
@@ -5,6 +5,6 @@
|
||||
|
||||
SET(prefix "@CMAKE_INSTALL_PREFIX@")
|
||||
SET(exec_prefix "@CMAKE_INSTALL_PREFIX@")
|
||||
-SET(PackageKitQt@QT_VERSION@_LIBRARIES "PK::packagekitqt5")
|
||||
+SET(PackageKitQt@QT_VERSION@_LIBRARIES "PK::@LIBNAME@")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PackageKitQtTargets.cmake")
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,32 +0,0 @@
|
||||
From ede40b16ce6b48a02ffda6c4dc56f1aac8590357 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Klumpp <matthias@tenstral.net>
|
||||
Date: Mon, 8 Sep 2014 21:52:04 +0200
|
||||
Subject: [PATCH 08/16] Fix compilation due to not-set cmake variable
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5df701d..b1e1e97 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -41,6 +41,7 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
#
|
||||
# Configure files
|
||||
#
|
||||
+set (CMAKE_INSTALL_LIBDIR "lib/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE PATH "Output directory for libraries")
|
||||
set (PREFIXDIR "${CMAKE_INSTALL_PREFIX}")
|
||||
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
|
||||
set (PKGDATADIR "${DATA_INSTALL_DIR}")
|
||||
@@ -56,7 +57,6 @@ set (CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${LIBNAME}/")
|
||||
add_definitions("-DLOCALSTATEDIR=\"${LOCALSTATEDIR}\"")
|
||||
add_definitions("-std=gnu++11")
|
||||
|
||||
-set(CMAKE_INSTALL_LIBDIR "lib/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE PATH "Output directory for libraries")
|
||||
if (IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
set (PKQT_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
||||
else (IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,25 +0,0 @@
|
||||
From ad25d71c5725131db3991fb80594e0f9a74fa2ed Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Klumpp <matthias@tenstral.net>
|
||||
Date: Mon, 8 Sep 2014 23:46:51 +0200
|
||||
Subject: [PATCH 09/16] Fix QPK include dir in cmake module
|
||||
|
||||
---
|
||||
src/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index d1176ec..5037fb2 100755
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -101,7 +101,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${LIBNAME}.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc
|
||||
@ONLY
|
||||
)
|
||||
-target_include_directories(${LIBNAME} INTERFACE "$<INSTALL_INTERFACE:include/PackageKit/>")
|
||||
+target_include_directories(${LIBNAME} INTERFACE "$<INSTALL_INTERFACE:include/PackageKit/${LIBNAME}/>")
|
||||
install(TARGETS ${LIBNAME} EXPORT PackageKitQtTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,138 +0,0 @@
|
||||
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
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 7248b030c08859866d966fe7cfd3e788e4f8f7d1 Mon Sep 17 00:00:00 2001
|
||||
From: Aleix Pol <aleixpol@kde.org>
|
||||
Date: Tue, 16 Sep 2014 15:13:05 +0200
|
||||
Subject: [PATCH 11/16] Use "PackageKit" as the include namespace rather than
|
||||
the library name
|
||||
|
||||
This way the project doesn't need to hard-code the qt version on the
|
||||
source code.
|
||||
|
||||
Reviewed by Daniel Nicoletti
|
||||
---
|
||||
src/CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 9d5210f..c52e1b1 100755
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -101,13 +101,13 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${LIBNAME}.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc
|
||||
@ONLY
|
||||
)
|
||||
-target_include_directories(${LIBNAME} INTERFACE "$<INSTALL_INTERFACE:include/PackageKit/${LIBNAME}/>")
|
||||
+target_include_directories(${LIBNAME} INTERFACE "$<INSTALL_INTERFACE:include/${LIBNAME}/PackageKit/;include/${LIBNAME}>")
|
||||
install(TARGETS ${LIBNAME} EXPORT PackageKitQtTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
)
|
||||
install(FILES ${packagekitqt_HEADERS}
|
||||
- DESTINATION include/PackageKit/${LIBNAME}
|
||||
+ DESTINATION include/${LIBNAME}/PackageKit/
|
||||
)
|
||||
|
||||
add_subdirectory(modules)
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,126 +0,0 @@
|
||||
From 97306279fa6b5eed72187125895b313b0b51a386 Mon Sep 17 00:00:00 2001
|
||||
From: Hrvoje Senjan <hrvoje.senjan@gmail.com>
|
||||
Date: Fri, 19 Sep 2014 00:17:36 +0200
|
||||
Subject: [PATCH 12/16] Use GNUInstallDirs to determine most of used variables
|
||||
|
||||
Also removed unused vars
|
||||
---
|
||||
CMakeLists.txt | 17 +++--------------
|
||||
config.h.in | 7 -------
|
||||
src/CMakeLists.txt | 4 ++--
|
||||
src/packagekitqt4.pc.in | 4 ++--
|
||||
src/packagekitqt5.pc.in | 4 ++--
|
||||
5 files changed, 9 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b1e1e97..1c77b82 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -6,6 +6,9 @@ find_package(PkgConfig REQUIRED)
|
||||
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
|
||||
+# Used to set installation paths
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
set(QPACKAGEKIT_VERSION_MAJOR "0")
|
||||
set(QPACKAGEKIT_VERSION_MINOR "9")
|
||||
set(QPACKAGEKIT_VERSION_PATCH "3")
|
||||
@@ -41,28 +44,14 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
#
|
||||
# Configure files
|
||||
#
|
||||
-set (CMAKE_INSTALL_LIBDIR "lib/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE PATH "Output directory for libraries")
|
||||
-set (PREFIXDIR "${CMAKE_INSTALL_PREFIX}")
|
||||
-set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
|
||||
-set (PKGDATADIR "${DATA_INSTALL_DIR}")
|
||||
-set (LIBDIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
|
||||
-set (PKGLIBDIR "${LIBDIR}/packagekit")
|
||||
set (GETTEXT_PACKAGE "packagekit")
|
||||
-set (LOCALE_DIR "${DATADIR}/locale")
|
||||
set (VERSION "${QPACKAGEKIT_VERSION}")
|
||||
-set (BUILDDIR "${CMAKE_BINARY_DIR}")
|
||||
set (LOCALSTATEDIR "/var")
|
||||
set (CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${LIBNAME}/")
|
||||
|
||||
add_definitions("-DLOCALSTATEDIR=\"${LOCALSTATEDIR}\"")
|
||||
add_definitions("-std=gnu++11")
|
||||
|
||||
-if (IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
- set (PKQT_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
||||
-else (IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
- set (PKQT_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
-endif (IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
-
|
||||
configure_file(config.h.in ${CMAKE_BINARY_DIR}/config.h)
|
||||
|
||||
#
|
||||
diff --git a/config.h.in b/config.h.in
|
||||
index 782abcb..7985f30 100644
|
||||
--- a/config.h.in
|
||||
+++ b/config.h.in
|
||||
@@ -8,13 +8,6 @@
|
||||
#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
|
||||
|
||||
/* Paths */
|
||||
-#define LOCALEDIR "@LOCALE_DIR@"
|
||||
-#define PKGDATADIR "@PKGDATADIR@"
|
||||
-#define PKGLIBDIR "@PKGLIBDIR@"
|
||||
-#define PREFIXDIR "@PREFIXDIR@"
|
||||
-#define DATADIR "@DATADIR@"
|
||||
-#define LIBDIR "@LIBDIR@"
|
||||
-#define BUILDDIR "@BUILDDIR@"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE_NAME "packagekit-qt"
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index c52e1b1..c6e16bd 100755
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -101,13 +101,13 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${LIBNAME}.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc
|
||||
@ONLY
|
||||
)
|
||||
-target_include_directories(${LIBNAME} INTERFACE "$<INSTALL_INTERFACE:include/${LIBNAME}/PackageKit/;include/${LIBNAME}>")
|
||||
+target_include_directories(${LIBNAME} INTERFACE "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${LIBNAME}/PackageKit/;${CMAKE_INSTALL_INCLUDEDIR}/${LIBNAME}>")
|
||||
install(TARGETS ${LIBNAME} EXPORT PackageKitQtTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
)
|
||||
install(FILES ${packagekitqt_HEADERS}
|
||||
- DESTINATION include/${LIBNAME}/PackageKit/
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${LIBNAME}/PackageKit/
|
||||
)
|
||||
|
||||
add_subdirectory(modules)
|
||||
diff --git a/src/packagekitqt4.pc.in b/src/packagekitqt4.pc.in
|
||||
index 449bbe2..013e5a0 100755
|
||||
--- a/src/packagekitqt4.pc.in
|
||||
+++ b/src/packagekitqt4.pc.in
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
-libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
-includedir=${prefix}/include
|
||||
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
Name: @LIBNAME@
|
||||
Description: PackageKit is a system daemon for installing stuff.
|
||||
diff --git a/src/packagekitqt5.pc.in b/src/packagekitqt5.pc.in
|
||||
index 0b2f476..da6c2a9 100644
|
||||
--- a/src/packagekitqt5.pc.in
|
||||
+++ b/src/packagekitqt5.pc.in
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
-libdir=@PKQT_INSTALL_LIBDIR@
|
||||
-includedir=${prefix}/include
|
||||
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
Name: @LIBNAME@
|
||||
Description: PackageKit is a system daemon for installing stuff.
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,198 +0,0 @@
|
||||
From 60787cfccd76b15e0f5813d7ab5567292f7efce7 Mon Sep 17 00:00:00 2001
|
||||
From: Aleix Pol <aleixpol@kde.org>
|
||||
Date: Thu, 2 Oct 2014 18:51:55 +0200
|
||||
Subject: [PATCH 16/16] Deprecate ::packageIcon methods
|
||||
|
||||
It's suggested to use Appstream instead.
|
||||
Also removes the QtSql dependency, which is nice.
|
||||
|
||||
Reviewed by Daniel Nicoletti
|
||||
---
|
||||
src/CMakeLists.txt | 5 -----
|
||||
src/common.h | 2 --
|
||||
src/daemon.cpp | 11 -----------
|
||||
src/daemon.h | 4 +++-
|
||||
src/packagekitqt4.pc.in | 2 +-
|
||||
src/packagekitqt5.pc.in | 2 +-
|
||||
src/transaction.cpp | 33 +--------------------------------
|
||||
src/transaction.h | 4 +++-
|
||||
8 files changed, 9 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index c6e16bd..0e18022 100755
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -11,16 +11,12 @@ endif ()
|
||||
# Set up Qt
|
||||
if (Qt5_FOUND)
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
- find_package(Qt5Sql REQUIRED)
|
||||
include_directories(${Qt5Core_INCLUDE_DIRS}
|
||||
${Qt5DBus_INCLUDE_DIRS}
|
||||
- ${Qt5Sql_INCLUDE_DIRS}
|
||||
)
|
||||
add_definitions(${Qt5DBus_DEFINITIONS})
|
||||
- add_definitions(${Qt5Sql_DEFINITIONS})
|
||||
elseif (Qt4_FOUND)
|
||||
set(QT_USE_QTDBUS TRUE)
|
||||
- set(QT_USE_QTSQL TRUE)
|
||||
set(QT_DONT_USE_QTGUI TRUE)
|
||||
include(${QT_USE_FILE})
|
||||
endif ()
|
||||
@@ -89,7 +85,6 @@ if (Qt5_FOUND)
|
||||
add_dependencies(${LIBNAME} mocs)
|
||||
target_link_libraries(${LIBNAME}
|
||||
LINK_PUBLIC Qt5::DBus
|
||||
- LINK_PRIVATE Qt5::Sql
|
||||
)
|
||||
elseif (Qt4_FOUND)
|
||||
target_link_libraries(${LIBNAME}
|
||||
diff --git a/src/common.h b/src/common.h
|
||||
index d7497d4..05a3df4 100644
|
||||
--- a/src/common.h
|
||||
+++ b/src/common.h
|
||||
@@ -34,5 +34,3 @@
|
||||
#define AUTH_SYSTEM_SOURCES_REFRESH "org.freedesktop.packagekit.system-sources-refresh"
|
||||
#define AUTH_SYSTEM_NETWORK_PROXY_CONFIGURE "org.freedesktop.packagekit.system-network-proxy-configure"
|
||||
#define AUTH_CANCEL_FOREIGN "org.freedesktop.packagekit.cancel-foreign"
|
||||
-
|
||||
-#define PK_DESKTOP_DEFAULT_DATABASE LOCALSTATEDIR "/lib/PackageKit/desktop-files.db"
|
||||
diff --git a/src/daemon.cpp b/src/daemon.cpp
|
||||
index 442ef55..647756a 100755
|
||||
--- a/src/daemon.cpp
|
||||
+++ b/src/daemon.cpp
|
||||
@@ -19,9 +19,6 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#include <QtSql>
|
||||
-#include <QDebug>
|
||||
-
|
||||
#include "daemon.h"
|
||||
#include "daemonprivate.h"
|
||||
#include "transactionprivate.h"
|
||||
@@ -58,14 +55,6 @@ Daemon::Daemon(QObject *parent) :
|
||||
QLatin1String("PropertiesChanged"),
|
||||
this,
|
||||
SLOT(propertiesChanged(QString,QVariantMap,QStringList)));
|
||||
-
|
||||
- // Set up database for desktop files
|
||||
- QSqlDatabase db;
|
||||
- db = QSqlDatabase::addDatabase("QSQLITE", PK_DESKTOP_DEFAULT_DATABASE);
|
||||
- db.setDatabaseName(PK_DESKTOP_DEFAULT_DATABASE);
|
||||
- if (!db.open()) {
|
||||
- qDebug() << "Failed to initialize the desktop files database";
|
||||
- }
|
||||
}
|
||||
|
||||
void DaemonPrivate::setupSignal(const QString &signal, bool connect)
|
||||
diff --git a/src/daemon.h b/src/daemon.h
|
||||
index 6ad2779..05d74f4 100644
|
||||
--- a/src/daemon.h
|
||||
+++ b/src/daemon.h
|
||||
@@ -277,8 +277,10 @@ public:
|
||||
|
||||
/**
|
||||
* Returns the package icon from the \p packageID
|
||||
+ *
|
||||
+ * @deprecated use Appstream to fetch icons
|
||||
*/
|
||||
- Q_INVOKABLE static QString packageIcon(const QString &packageID);
|
||||
+ Q_INVOKABLE QT_DEPRECATED static QString packageIcon(const QString &packageID);
|
||||
|
||||
/**
|
||||
* Returns the string representing the enum
|
||||
diff --git a/src/packagekitqt4.pc.in b/src/packagekitqt4.pc.in
|
||||
index 013e5a0..2030ff2 100755
|
||||
--- a/src/packagekitqt4.pc.in
|
||||
+++ b/src/packagekitqt4.pc.in
|
||||
@@ -6,6 +6,6 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
Name: @LIBNAME@
|
||||
Description: PackageKit is a system daemon for installing stuff.
|
||||
Version: @VERSION@
|
||||
-Requires: QtCore, QtDBus, QtSql, QtXml
|
||||
+Requires: QtCore, QtDBus, QtXml
|
||||
Libs: -L${libdir} -l@LIBNAME@
|
||||
Cflags: -I${includedir}/PackageKit/@LIBNAME@
|
||||
diff --git a/src/packagekitqt5.pc.in b/src/packagekitqt5.pc.in
|
||||
index da6c2a9..99ace5b 100644
|
||||
--- a/src/packagekitqt5.pc.in
|
||||
+++ b/src/packagekitqt5.pc.in
|
||||
@@ -6,6 +6,6 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
Name: @LIBNAME@
|
||||
Description: PackageKit is a system daemon for installing stuff.
|
||||
Version: @VERSION@
|
||||
-Requires: Qt5Core, Qt5DBus, Qt5Sql, Qt5Xml
|
||||
+Requires: Qt5Core, Qt5DBus, Qt5Xml
|
||||
Libs: -L${libdir} -l@LIBNAME@
|
||||
Cflags: -I${includedir}/PackageKit/@LIBNAME@
|
||||
diff --git a/src/transaction.cpp b/src/transaction.cpp
|
||||
index 0ed97e1..7cfa302 100755
|
||||
--- a/src/transaction.cpp
|
||||
+++ b/src/transaction.cpp
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "daemon.h"
|
||||
#include "common.h"
|
||||
|
||||
-#include <QSqlQuery>
|
||||
#include <QDBusError>
|
||||
|
||||
using namespace PackageKit;
|
||||
@@ -215,37 +214,7 @@ QString Transaction::packageData(const QString &packageID)
|
||||
|
||||
QString Transaction::packageIcon(const QString &packageID)
|
||||
{
|
||||
- QString path;
|
||||
- QSqlDatabase db = QSqlDatabase::database(PK_DESKTOP_DEFAULT_DATABASE);
|
||||
- if (!db.isOpen()) {
|
||||
- qDebug() << "Desktop files database is not open";
|
||||
- return path;
|
||||
- }
|
||||
-
|
||||
- QSqlQuery q(db);
|
||||
- q.prepare("SELECT filename FROM cache WHERE package = :name");
|
||||
- q.bindValue(":name", Transaction::packageName(packageID));
|
||||
- if (q.exec()) {
|
||||
- if (q.next()) {
|
||||
- QFile desktopFile(q.value(0).toString());
|
||||
- if (desktopFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
- while (!desktopFile.atEnd()) {
|
||||
- QByteArray line = desktopFile.readLine().trimmed();
|
||||
- if (line.startsWith("Icon=")) {
|
||||
- path = line.mid(5);
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- desktopFile.close();
|
||||
- } else {
|
||||
- qDebug() << "Cannot open desktop file " << q.value(0).toString();
|
||||
- }
|
||||
- }
|
||||
- } else {
|
||||
- qDebug() << "Error while running query " << q.executedQuery();
|
||||
- }
|
||||
-
|
||||
- return path;
|
||||
+ return QString();
|
||||
}
|
||||
|
||||
QString Transaction::lastPackage() const
|
||||
diff --git a/src/transaction.h b/src/transaction.h
|
||||
index f9d4802..51ac1d0 100644
|
||||
--- a/src/transaction.h
|
||||
+++ b/src/transaction.h
|
||||
@@ -675,8 +675,10 @@ public:
|
||||
|
||||
/**
|
||||
* Returns the package icon from the \p packageID
|
||||
+ *
|
||||
+ * @deprecated use Appstream to fetch icons
|
||||
*/
|
||||
- static QString packageIcon(const QString &packageID);
|
||||
+ static QT_DEPRECATED QString packageIcon(const QString &packageID);
|
||||
|
||||
Q_SIGNALS:
|
||||
void allowCancelChanged();
|
||||
--
|
||||
2.1.0
|
||||
|
Loading…
Reference in new issue