Commit 046891c5 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

One more cmakedefine01

parent b254306d
......@@ -7,6 +7,6 @@
#ifndef CONFIG_SOLID_EXTRAS_H
#define CONFIG_SOLID_EXTRAS_H
#cmakedefine HAVE_NM
#cmakedefine01 HAVE_NM
#endif
......@@ -8,7 +8,7 @@
#include "networkstatus.h"
#include "portalnetworkmonitor.h"
#ifdef HAVE_NM
#if HAVE_NM
#include <NetworkManagerQt/Manager>
#endif
......@@ -92,7 +92,7 @@ NetworkStatus::NetworkStatus(QObject *parent)
connect(PortalNetworkMonitor::instance(), &PortalNetworkMonitor::connectivityChanged, this, &NetworkStatus::connectivityChanged);
connect(PortalNetworkMonitor::instance(), &PortalNetworkMonitor::meteredChanged, this, &NetworkStatus::meteredChanged);
#ifdef HAVE_NM
#if HAVE_NM
if (!PortalNetworkMonitor::hasPortal()) {
connect(NetworkManager::notifier(), &NetworkManager::Notifier::connectivityChanged, this, &NetworkStatus::connectivityChanged);
connect(NetworkManager::notifier(), &NetworkManager::Notifier::meteredChanged, this, &NetworkStatus::meteredChanged);
......@@ -105,7 +105,7 @@ NetworkStatus::State NetworkStatus::connectivity() const
if (PortalNetworkMonitor::hasPortal()) {
return PortalNetworkMonitor::connectivity();
}
#ifdef HAVE_NM
#if HAVE_NM
switch (NetworkManager::connectivity()) {
case NetworkManager::UnknownConnectivity:
return Unknown;
......@@ -126,7 +126,7 @@ NetworkStatus::State NetworkStatus::metered() const
if (PortalNetworkMonitor::hasPortal()) {
return PortalNetworkMonitor::metered();
}
#ifdef HAVE_NM
#if HAVE_NM
switch (NetworkManager::metered()) {
case NetworkManager::Device::UnknownStatus:
return Unknown;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment