1 | /* |
---|---|
2 | SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #include "genericsetting.h" |
8 | #include "genericsetting_p.h" |
9 | |
10 | #include "nmdebug.h" |
11 | |
12 | NetworkManager::GenericSettingPrivate::GenericSettingPrivate() |
13 | : name(NM_SETTING_GENERIC_SETTING_NAME) |
14 | { |
15 | } |
16 | |
17 | NetworkManager::GenericSetting::GenericSetting() |
18 | : Setting(Setting::Generic) |
19 | , d_ptr(new GenericSettingPrivate()) |
20 | { |
21 | } |
22 | |
23 | NetworkManager::GenericSetting::GenericSetting(const Ptr &other) |
24 | : Setting(other) |
25 | , d_ptr(new GenericSettingPrivate()) |
26 | { |
27 | } |
28 | |
29 | NetworkManager::GenericSetting::~GenericSetting() |
30 | { |
31 | delete d_ptr; |
32 | } |
33 | |
34 | QString NetworkManager::GenericSetting::name() const |
35 | { |
36 | Q_D(const GenericSetting); |
37 | |
38 | return d->name; |
39 | } |
40 | |
41 | void NetworkManager::GenericSetting::fromMap(const QVariantMap &setting) |
42 | { |
43 | Q_UNUSED(setting); |
44 | } |
45 | |
46 | QVariantMap NetworkManager::GenericSetting::toMap() const |
47 | { |
48 | QVariantMap setting; |
49 | |
50 | return setting; |
51 | } |
52 | |
53 | QDebug NetworkManager::operator<<(QDebug dbg, const NetworkManager::GenericSetting &setting) |
54 | { |
55 | dbg.nospace() << "type: "<< setting.typeAsString(type: setting.type()) << '\n'; |
56 | dbg.nospace() << "initialized: "<< !setting.isNull() << '\n'; |
57 | |
58 | return dbg.maybeSpace(); |
59 | } |
60 |