parent
299f51a24d
commit
289acbceca
@ -0,0 +1,25 @@
|
||||
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
|
||||
|
@ -0,0 +1,32 @@
|
||||
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
|
||||
|
@ -0,0 +1,25 @@
|
||||
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
|
||||
|
@ -0,0 +1,138 @@
|
||||
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
|
||||
|
@ -0,0 +1,37 @@
|
||||
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
|
||||
|
@ -0,0 +1,126 @@
|
||||
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
|
||||
|
@ -0,0 +1,198 @@
|
||||
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