diff --git a/0002-Make-use-of-QLoggingCategory-packagekitqt.patch b/0002-Make-use-of-QLoggingCategory-packagekitqt.patch new file mode 100644 index 0000000..2bfb620 --- /dev/null +++ b/0002-Make-use-of-QLoggingCategory-packagekitqt.patch @@ -0,0 +1,92 @@ +From a71ce8e2065393a3dcf4cbcbd50a95732783c93e Mon Sep 17 00:00:00 2001 +From: Daniel Nicoletti +Date: Mon, 4 May 2015 18:55:08 -0300 +Subject: [PATCH 2/3] Make use of QLoggingCategory packagekitqt + +--- + src/common.h | 4 ++++ + src/daemon.cpp | 2 ++ + src/daemonprivate.cpp | 2 +- + src/transaction.cpp | 4 +++- + src/transactionprivate.cpp | 2 +- + 5 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/src/common.h b/src/common.h +index 05a3df4..24b7894 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -17,6 +17,10 @@ + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ ++#include ++ ++Q_DECLARE_LOGGING_CATEGORY(PACKAGEKITQT_TRANSACTION) ++Q_DECLARE_LOGGING_CATEGORY(PACKAGEKITQT_DAEMON) + + #define PK_NAME "org.freedesktop.PackageKit" + #define PK_PATH "/org/freedesktop/PackageKit" +diff --git a/src/daemon.cpp b/src/daemon.cpp +index 647756a..138a13a 100755 +--- a/src/daemon.cpp ++++ b/src/daemon.cpp +@@ -26,6 +26,8 @@ + + #include "common.h" + ++Q_LOGGING_CATEGORY(PACKAGEKITQT_TRANSACTION, "packagekitqt.daemon") ++ + using namespace PackageKit; + + Daemon* Daemon::m_global = 0; +diff --git a/src/daemonprivate.cpp b/src/daemonprivate.cpp +index 25ba55b..15e5362 100644 +--- a/src/daemonprivate.cpp ++++ b/src/daemonprivate.cpp +@@ -143,7 +143,7 @@ void DaemonPrivate::updateProperties(const QVariantMap &properties) + } else if (property == QLatin1String("VersionMinor")) { + versionMinor = value.toUInt(); + } else { +- qWarning() << "Unknown Transaction property:" << property << value; ++ qCWarning(PACKAGEKITQT_DAEMON) << "Unknown Daemon property:" << property << value; + } + + ++it; +diff --git a/src/transaction.cpp b/src/transaction.cpp +index 7cfa302..96d946b 100755 +--- a/src/transaction.cpp ++++ b/src/transaction.cpp +@@ -28,6 +28,8 @@ + + #include + ++Q_LOGGING_CATEGORY(PACKAGEKITQT_TRANSACTION, "packagekitqt.transaction") ++ + using namespace PackageKit; + + Transaction::Transaction() +@@ -353,7 +355,7 @@ Transaction::InternalError Transaction::parseError(const QString &errorName) + return Transaction::InternalErrorFunctionNotSupported; + } + +- qWarning() << "Transaction::parseError: unknown error" << errorName; ++ qCWarning(PACKAGEKITQT_TRANSACTION) << "Transaction::parseError: unknown error" << errorName; + return Transaction::InternalErrorFailed; + } + +diff --git a/src/transactionprivate.cpp b/src/transactionprivate.cpp +index 2c73899..56bc218 100644 +--- a/src/transactionprivate.cpp ++++ b/src/transactionprivate.cpp +@@ -335,7 +335,7 @@ void TransactionPrivate::updateProperties(const QVariantMap &properties) + uid = value.toUInt(); + QMetaObject::invokeMethod(q, "uidChanged", Qt::QueuedConnection); + } else { +- qWarning() << "Unknown Transaction property:" << property << value; ++ qCWarning(PACKAGEKITQT_TRANSACTION) << "Unknown Transaction property:" << property << value; + } + + ++it; +-- +2.5.0 + diff --git a/0003-Fix-copy-n-paste-typo.patch b/0003-Fix-copy-n-paste-typo.patch new file mode 100644 index 0000000..c0215b8 --- /dev/null +++ b/0003-Fix-copy-n-paste-typo.patch @@ -0,0 +1,25 @@ +From 1d4dc83d34cd4284fad7df5b259edbd4ef48d54a Mon Sep 17 00:00:00 2001 +From: Daniel Nicoletti +Date: Mon, 4 May 2015 19:03:11 -0300 +Subject: [PATCH 3/3] Fix copy'n'paste typo + +--- + src/daemon.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon.cpp b/src/daemon.cpp +index 138a13a..98d5c97 100755 +--- a/src/daemon.cpp ++++ b/src/daemon.cpp +@@ -26,7 +26,7 @@ + + #include "common.h" + +-Q_LOGGING_CATEGORY(PACKAGEKITQT_TRANSACTION, "packagekitqt.daemon") ++Q_LOGGING_CATEGORY(PACKAGEKITQT_DAEMON, "packagekitqt.daemon") + + using namespace PackageKit; + +-- +2.5.0 + diff --git a/PackageKit-Qt.spec b/PackageKit-Qt.spec index cc25bee..422025e 100644 --- a/PackageKit-Qt.spec +++ b/PackageKit-Qt.spec @@ -6,7 +6,7 @@ Summary: Qt support library for PackageKit Name: PackageKit-Qt Version: 0.9.5 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ URL: http://www.packagekit.org/ @@ -20,6 +20,8 @@ Source0: http://www.freedesktop.org/software/PackageKit/releases/PackageKit-Qt %endif ## upstream patches +Patch2: 0002-Make-use-of-QLoggingCategory-packagekitqt.patch +Patch3: 0003-Fix-copy-n-paste-typo.patch BuildRequires: cmake BuildRequires: pkgconfig(QtDBus) pkgconfig(QtSql) @@ -66,7 +68,7 @@ Requires: PackageKit-Qt5%{?_isa} = %{version}-%{release} %build -mkdir -p %{_target_platform} +mkdir %{_target_platform} pushd %{_target_platform} %{cmake} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ @@ -99,7 +101,8 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %postun -p /sbin/ldconfig %files -%doc AUTHORS NEWS COPYING +%doc AUTHORS NEWS +%license COPYING %{_libdir}/libpackagekitqt4.so.%{version} %{_libdir}/libpackagekitqt4.so.0 @@ -112,7 +115,8 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %if 0%{?qt5} %files -n PackageKit-Qt5 -%doc AUTHORS NEWS COPYING +%doc AUTHORS NEWS +%license COPYING %{_libdir}/libpackagekitqt5.so.%{version} %{_libdir}/libpackagekitqt5.so.0 @@ -126,6 +130,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Tue Oct 27 2015 Rex Dieter 0.9.5-4 +- pull in some upstream fixes, .spec cosmetics + * Tue Jun 16 2015 Fedora Release Engineering - 0.9.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild