Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Discover
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Discover
Commits
a8765a5b
Commit
a8765a5b
authored
Dec 21, 2017
by
Aleix Pol Gonzalez
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix commit on stable PackageKitQt
BUG: 388093
parent
2de84def
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
libdiscover/backends/PackageKitBackend/CMakeLists.txt
libdiscover/backends/PackageKitBackend/CMakeLists.txt
+5
-4
libdiscover/backends/PackageKitBackend/PackageKitNotifier.cpp
...iscover/backends/PackageKitBackend/PackageKitNotifier.cpp
+4
-0
libdiscover/backends/PackageKitBackend/PackageKitUpdater.cpp
libdiscover/backends/PackageKitBackend/PackageKitUpdater.cpp
+2
-2
No files found.
libdiscover/backends/PackageKitBackend/CMakeLists.txt
View file @
a8765a5b
...
...
@@ -15,10 +15,6 @@ add_library(packagekit-backend MODULE PackageKitBackend.cpp
TransactionSet.cpp
)
if
(
packagekitqt5_VERSION VERSION_GREATER 0.9.7
)
target_compile_definitions
(
packagekit-backend -DHAS_OFFLINE_UPDATES
)
endif
()
target_link_libraries
(
packagekit-backend PRIVATE Discover::Common Qt5::Core PK::packagekitqt5 KF5::ConfigGui KF5::KIOCore KF5::Archive AppStreamQt
)
install
(
TARGETS packagekit-backend DESTINATION
${
PLUGIN_INSTALL_DIR
}
/discover
)
...
...
@@ -32,3 +28,8 @@ install(TARGETS DiscoverPackageKitNotifier DESTINATION ${PLUGIN_INSTALL_DIR}/dis
install
(
FILES packagekit-backend-categories.xml DESTINATION
${
DATA_INSTALL_DIR
}
/libdiscover/categories
)
add_subdirectory
(
categoryimages
)
if
(
packagekitqt5_VERSION VERSION_GREATER 0.9.7
)
target_compile_definitions
(
packagekit-backend -DPKQT_0_10
)
target_compile_definitions
(
DiscoverPackageKitNotifier -DPKQT_0_10
)
endif
()
libdiscover/backends/PackageKitBackend/PackageKitNotifier.cpp
View file @
a8765a5b
...
...
@@ -131,6 +131,7 @@ uint PackageKitNotifier::updatesCount()
void
PackageKitNotifier
::
onDistroUpgrade
(
PackageKit
::
Transaction
::
DistroUpgrade
type
,
const
QString
&
name
,
const
QString
&
description
)
{
#ifdef PKQT_0_10
KNotification
*
notification
=
new
KNotification
(
QLatin1String
(
"distupgrade-notification"
),
KNotification
::
Persistent
|
KNotification
::
DefaultEvent
);
notification
->
setIconName
(
QStringLiteral
(
"system-software-update"
));
notification
->
setActions
(
QStringList
{
QLatin1String
(
"Upgrade"
)});
...
...
@@ -150,6 +151,7 @@ void PackageKitNotifier::onDistroUpgrade(PackageKit::Transaction::DistroUpgrade
});
notification
->
sendEvent
();
#endif
}
void
PackageKitNotifier
::
refreshDatabase
()
...
...
@@ -162,6 +164,7 @@ void PackageKitNotifier::refreshDatabase()
});
}
#ifdef PKQT_0_10
if
(
!
m_distUpgrades
&&
(
PackageKit
::
Daemon
::
roles
()
&
PackageKit
::
Transaction
::
RoleUpgradeSystem
))
{
m_distUpgrades
=
PackageKit
::
Daemon
::
getDistroUpgrades
();
connect
(
m_distUpgrades
,
&
PackageKit
::
Transaction
::
distroUpgrade
,
this
,
&
PackageKitNotifier
::
onDistroUpgrade
);
...
...
@@ -170,6 +173,7 @@ void PackageKitNotifier::refreshDatabase()
delete
m_distUpgrades
;
});
}
#endif
}
QProcess
*
PackageKitNotifier
::
checkAptVariable
(
const
QString
&
aptconfig
,
const
QLatin1String
&
varname
,
std
::
function
<
void
(
const
QStringRef
&
val
)
>
func
)
...
...
libdiscover/backends/PackageKitBackend/PackageKitUpdater.cpp
View file @
a8765a5b
...
...
@@ -142,7 +142,7 @@ void PackageKitUpdater::proceed()
{
if
(
!
m_proceedFunctions
.
isEmpty
())
processProceedFunction
();
#ifdef
HAS_OFFLINE_UPDATES
#ifdef
PKQT_0_10
else
if
(
qEnvironmentVariableIsSet
(
"PK_OFFLINE_UPDATE"
))
setupTransaction
(
PackageKit
::
Transaction
::
TransactionFlagOnlyTrusted
|
PackageKit
::
Transaction
::
TransactionFlagOnlyDownload
);
#endif
...
...
@@ -183,7 +183,7 @@ void PackageKitUpdater::finished(PackageKit::Transaction::Exit exit, uint /*time
fetchLastUpdateTime
();
if
(
qEnvironmentVariableIsSet
(
"PK_OFFLINE_UPDATE"
))
#ifdef
HAS_OFFLINE_UPDATES
#ifdef
PKQT_0_10
PackageKit
::
Daemon
::
global
()
->
offlineTrigger
(
PackageKit
::
Daemon
::
ActionReboot
);
#else
qWarning
()
<<
"PK_OFFLINE_UPDATE is set but discover was built against an old version of PackageKitQt that didn't support offline updates"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment