Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 534212 Details for
Bug 656940
[kde overlay] kde-plasma/plasma-vault: Make kde-frameworks/networkmanager-qt optional
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
plasma-vault-KF5NetworkManagerQt_dependency_optional.patch
plasma-vault-KF5NetworkManagerQt_dependency_optional.patch (text/plain), 3.31 KB, created by
Arfrever Frehtes Taifersar Arahesis
on 2018-05-31 02:34:17 UTC
(
hide
)
Description:
plasma-vault-KF5NetworkManagerQt_dependency_optional.patch
Filename:
MIME Type:
Creator:
Arfrever Frehtes Taifersar Arahesis
Created:
2018-05-31 02:34:17 UTC
Size:
3.31 KB
patch
obsolete
>From 08709b35bb1da32e16b30ac8731c5527420aca5e Mon Sep 17 00:00:00 2001 >From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> >Date: Wed, 30 May 2018 08:13:25 +0200 >Subject: [PATCH] Make dependency on KF5NetworkManagerQt optional. > >--- > CMakeLists.txt | 6 +++++- > kded/CMakeLists.txt | 9 ++++++++- > kded/config-plasma-vault.cmake | 1 + > kded/service.cpp | 11 +++++++++++ > 4 files changed, 25 insertions(+), 2 deletions(-) > create mode 100644 kded/config-plasma-vault.cmake > >diff --git a/CMakeLists.txt b/CMakeLists.txt >index 3011d43..37c28c8 100644 >--- a/CMakeLists.txt >+++ b/CMakeLists.txt >@@ -11,6 +11,8 @@ set (PLASMAVAULT_VERSION "0.1") > > set (REQUIRED_QT_VERSION 5.7.0) > >+option (ENABLE_NETWORKMANAGER "Enable usage of NetworkManager" ON) >+ > # We don't build in-source > if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") > message ( >@@ -58,8 +60,10 @@ find_package ( > KIO > Plasma > WidgetsAddons >- NetworkManagerQt > ) >+if (ENABLE_NETWORKMANAGER) >+ find_package (KF5NetworkManagerQt ${KF5_DEP_VERSION} REQUIRED) >+endif() > find_package (KF5SysGuard REQUIRED) > > include_directories ( >diff --git a/kded/CMakeLists.txt b/kded/CMakeLists.txt >index 666100e..81a04db 100644 >--- a/kded/CMakeLists.txt >+++ b/kded/CMakeLists.txt >@@ -1,3 +1,5 @@ >+configure_file (config-plasma-vault.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-plasma-vault.h) >+ > include_directories ( > ${CMAKE_CURRENT_SOURCE_DIR} > ${CMAKE_CURRENT_SOURCE_DIR}/engine >@@ -85,8 +87,13 @@ target_link_libraries ( > KF5::SysGuard > KF5::WidgetsAddons > KF5::ProcessCore >- KF5::NetworkManagerQt > ) >+if (ENABLE_NETWORKMANAGER) >+ target_link_libraries ( >+ kded_plasmavault >+ KF5::NetworkManagerQt >+ ) >+endif () > > > install ( >diff --git a/kded/config-plasma-vault.cmake b/kded/config-plasma-vault.cmake >new file mode 100644 >index 0000000..6b4d97a >--- /dev/null >+++ b/kded/config-plasma-vault.cmake >@@ -0,0 +1 @@ >+#cmakedefine ENABLE_NETWORKMANAGER >diff --git a/kded/service.cpp b/kded/service.cpp >index 33ce52d..e45c1b4 100644 >--- a/kded/service.cpp >+++ b/kded/service.cpp >@@ -37,7 +37,10 @@ > > #include <functional> > >+#include <config-plasma-vault.h> >+#ifdef ENABLE_NETWORKMANAGER > #include <NetworkManagerQt/Manager> >+#endif > > K_PLUGIN_FACTORY_WITH_JSON(PlasmaVaultServiceFactory, > "plasmavault.json", >@@ -71,7 +74,11 @@ public: > > savedNetworkingState = Expected<NetworkingState, int>::success( > NetworkingState { >+#ifdef ENABLE_NETWORKMANAGER > NetworkManager::isNetworkingEnabled() || true, >+#else >+ true, >+#endif > {} > }); > } >@@ -85,7 +92,9 @@ public: > return; > } > >+#ifdef ENABLE_NETWORKMANAGER > NetworkManager::setNetworkingEnabled(savedNetworkingState->wasNetworkingEnabled); >+#endif > } > > >@@ -257,10 +266,12 @@ void PlasmaVaultService::onVaultStatusChanged(VaultInfo::Status status) > > // qDebug() << "Vaults inhibitting networking: " << devicesInhibittingNetworking; > >+#ifdef ENABLE_NETWORKMANAGER > // Now, let's handle the networking part > if (!devicesInhibittingNetworking.isEmpty()) { > NetworkManager::setNetworkingEnabled(false); > } >+#endif > > d->restoreNetworkingState(); > } >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 656940
: 534212