Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 656940
Collapse All | Expand All

(-)a/CMakeLists.txt (-1 / +5 lines)
Lines 11-16 set (PLASMAVAULT_VERSION "0.1") Link Here
11
11
12
set (REQUIRED_QT_VERSION 5.7.0)
12
set (REQUIRED_QT_VERSION 5.7.0)
13
13
14
option (ENABLE_NETWORKMANAGER "Enable usage of NetworkManager" ON)
15
14
# We don't build in-source
16
# We don't build in-source
15
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
17
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
16
   message (
18
   message (
Lines 58-65 find_package ( Link Here
58
   KIO
60
   KIO
59
   Plasma
61
   Plasma
60
   WidgetsAddons
62
   WidgetsAddons
61
   NetworkManagerQt
62
   )
63
   )
64
if (ENABLE_NETWORKMANAGER)
65
    find_package (KF5NetworkManagerQt ${KF5_DEP_VERSION} REQUIRED)
66
endif()
63
find_package (KF5SysGuard REQUIRED)
67
find_package (KF5SysGuard REQUIRED)
64
68
65
include_directories (
69
include_directories (
(-)a/kded/CMakeLists.txt (-1 / +8 lines)
Lines 1-3 Link Here
1
configure_file (config-plasma-vault.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-plasma-vault.h)
2
1
include_directories (
3
include_directories (
2
   ${CMAKE_CURRENT_SOURCE_DIR}
4
   ${CMAKE_CURRENT_SOURCE_DIR}
3
   ${CMAKE_CURRENT_SOURCE_DIR}/engine
5
   ${CMAKE_CURRENT_SOURCE_DIR}/engine
Lines 85-92 target_link_libraries ( Link Here
85
   KF5::SysGuard
87
   KF5::SysGuard
86
   KF5::WidgetsAddons
88
   KF5::WidgetsAddons
87
   KF5::ProcessCore
89
   KF5::ProcessCore
88
   KF5::NetworkManagerQt
89
   )
90
   )
91
if (ENABLE_NETWORKMANAGER)
92
    target_link_libraries (
93
       kded_plasmavault
94
       KF5::NetworkManagerQt
95
    )
96
endif ()
90
97
91
98
92
install (
99
install (
(-)a/kded/config-plasma-vault.cmake (+1 lines)
Line 0 Link Here
1
#cmakedefine ENABLE_NETWORKMANAGER
(-)a/kded/service.cpp (-1 / +11 lines)
Lines 37-43 Link Here
37
37
38
#include <functional>
38
#include <functional>
39
39
40
#include <config-plasma-vault.h>
41
#ifdef ENABLE_NETWORKMANAGER
40
#include <NetworkManagerQt/Manager>
42
#include <NetworkManagerQt/Manager>
43
#endif
41
44
42
K_PLUGIN_FACTORY_WITH_JSON(PlasmaVaultServiceFactory,
45
K_PLUGIN_FACTORY_WITH_JSON(PlasmaVaultServiceFactory,
43
                           "plasmavault.json",
46
                           "plasmavault.json",
Lines 71-77 public: Link Here
71
74
72
        savedNetworkingState = Expected<NetworkingState, int>::success(
75
        savedNetworkingState = Expected<NetworkingState, int>::success(
73
                NetworkingState {
76
                NetworkingState {
77
#ifdef ENABLE_NETWORKMANAGER
74
                    NetworkManager::isNetworkingEnabled() || true,
78
                    NetworkManager::isNetworkingEnabled() || true,
79
#else
80
                    true,
81
#endif
75
                    {}
82
                    {}
76
                });
83
                });
77
    }
84
    }
Lines 85-91 public: Link Here
85
            return;
92
            return;
86
        }
93
        }
87
94
95
#ifdef ENABLE_NETWORKMANAGER
88
        NetworkManager::setNetworkingEnabled(savedNetworkingState->wasNetworkingEnabled);
96
        NetworkManager::setNetworkingEnabled(savedNetworkingState->wasNetworkingEnabled);
97
#endif
89
    }
98
    }
90
99
91
100
Lines 257-266 void PlasmaVaultService::onVaultStatusChanged(VaultInfo::Status status) Link Here
257
266
258
        // qDebug() << "Vaults inhibitting networking: " << devicesInhibittingNetworking;
267
        // qDebug() << "Vaults inhibitting networking: " << devicesInhibittingNetworking;
259
268
269
#ifdef ENABLE_NETWORKMANAGER
260
        // Now, let's handle the networking part
270
        // Now, let's handle the networking part
261
        if (!devicesInhibittingNetworking.isEmpty()) {
271
        if (!devicesInhibittingNetworking.isEmpty()) {
262
            NetworkManager::setNetworkingEnabled(false);
272
            NetworkManager::setNetworkingEnabled(false);
263
        }
273
        }
274
#endif
264
275
265
        d->restoreNetworkingState();
276
        d->restoreNetworkingState();
266
    }
277
    }
267
- 

Return to bug 656940