7#include "matchsetting.h"
8#include "matchsetting_p.h"
12#if !NM_CHECK_VERSION(1, 14, 0)
13#define NM_SETTING_MATCH_SETTING_NAME "match"
14#define NM_SETTING_MATCH_INTERFACE_NAME "interface-name"
17NetworkManager::MatchSettingPrivate::MatchSettingPrivate()
18 : name(NM_SETTING_MATCH_SETTING_NAME)
22NetworkManager::MatchSetting::MatchSetting()
23 : Setting(Setting::Match)
24 , d_ptr(new MatchSettingPrivate())
28NetworkManager::MatchSetting::MatchSetting(
const Ptr &other)
30 , d_ptr(new MatchSettingPrivate())
32 setInterfaceName(other->interfaceName());
35NetworkManager::MatchSetting::~MatchSetting()
47void NetworkManager::MatchSetting::setInterfaceName(
const QStringList &name)
51 d->interfaceName = name;
54QStringList NetworkManager::MatchSetting::interfaceName()
const
56 Q_D(
const MatchSetting);
58 return d->interfaceName;
63 if (setting.contains(
QLatin1String(NM_SETTING_MATCH_INTERFACE_NAME))) {
64 setInterfaceName(setting.value(
QLatin1String(NM_SETTING_MATCH_INTERFACE_NAME)).toStringList());
72 if (!interfaceName().isEmpty()) {
73 setting.insert(
QLatin1String(NM_SETTING_MATCH_INTERFACE_NAME), interfaceName());
81 dbg.
nospace() <<
"type: " << setting.typeAsString(setting.type()) <<
'\n';
82 dbg.
nospace() <<
"initialized: " << !setting.isNull() <<
'\n';
84 dbg.
nospace() << NM_SETTING_MATCH_INTERFACE_NAME <<
": " << setting.interfaceName() <<
'\n';
Represents Match setting.
void fromMap(const QVariantMap &setting) override
Must be reimplemented, default implementation does nothing.
QVariantMap toMap() const override
Must be reimplemented, default implementationd does nothing.
QString name() const override
Must be reimplemented, default implementationd does nothing.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:13 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.