Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.3
apper
0021-Update-the-last-refresh-cache-time-from-th...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0021-Update-the-last-refresh-cache-time-from-the-update-c.patch of Package apper
From b0c2b6d99bb08298ab5e15ddc5c1faa1a040c946 Mon Sep 17 00:00:00 2001 From: Daniel Nicoletti <dantti12@gmail.com> Date: Mon, 21 Jan 2013 10:38:21 -0200 Subject: [PATCH] Update the last refresh cache time from the update changed signal as it is always emitted after a refresh cache --- apperd/ApperdThread.cpp | 28 ++++++++-------------------- apperd/ApperdThread.h | 1 - 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/apperd/ApperdThread.cpp b/apperd/ApperdThread.cpp index fd62bcf..fcbe2bf 100644 --- a/apperd/ApperdThread.cpp +++ b/apperd/ApperdThread.cpp @@ -101,13 +101,8 @@ void ApperdThread::init() QString locale(KGlobal::locale()->language() % QLatin1Char('.') % KGlobal::locale()->encoding()); Daemon::global()->setHints(QLatin1String("locale=") % locale); - // Watch for TransactionListChanged so we start sentinel - connect(Daemon::global(), SIGNAL(transactionListChanged(QStringList)), - this, SLOT(transactionListChanged(QStringList))); - - // Watch for UpdatesChanged so we display new updates connect(Daemon::global(), SIGNAL(updatesChanged()), - this, SLOT(updatesChanged())); + SLOT(updatesChanged())); m_interface = new DBusInterface(this); @@ -128,8 +123,7 @@ void ApperdThread::init() QDBusConnection::systemBus(), QDBusServiceWatcher::WatchForRegistration, this); - connect(watcher, SIGNAL(serviceRegistered(QString)), - this, SLOT(setProxy())); + connect(watcher, SIGNAL(serviceRegistered(QString)), SLOT(setProxy())); // if PackageKit is running check to see if there are running transactons already bool packagekitIsRunning = nameHasOwner(QLatin1String("org.freedesktop.PackageKit"), @@ -251,21 +245,15 @@ void ApperdThread::setProxy() } } -void ApperdThread::transactionListChanged(const QStringList &tids) +void ApperdThread::updatesChanged() { - if (tids.isEmpty()) { - // update the last time the cache was refreshed - QDateTime lastCacheRefresh; - lastCacheRefresh = getTimeSinceRefreshCache(); - if (lastCacheRefresh != m_lastRefreshCache) { - m_lastRefreshCache = lastCacheRefresh; - } + // update the last time the cache was refreshed + QDateTime lastCacheRefresh; + lastCacheRefresh = getTimeSinceRefreshCache(); + if (lastCacheRefresh != m_lastRefreshCache) { + m_lastRefreshCache = lastCacheRefresh; } -} -// This is called when the list of updates changes -void ApperdThread::updatesChanged() -{ bool ignoreBattery = m_configs[CFG_INSTALL_UP_BATTERY].value<bool>(); bool ignoreMobile = m_configs[CFG_INSTALL_UP_MOBILE].value<bool>(); diff --git a/apperd/ApperdThread.h b/apperd/ApperdThread.h index 384ba30..c911c98 100644 --- a/apperd/ApperdThread.h +++ b/apperd/ApperdThread.h @@ -45,7 +45,6 @@ private slots: void proxyChanged(); void setProxy(); - void transactionListChanged(const QStringList &tids); void updatesChanged(); void appShouldConserveResourcesChanged(); -- 1.8.1.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor