1 Star 0 Fork 15

blublue/kf5-networkmanager-qt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
add-pppoe-parent.patch 2.48 KB
一键复制 编辑 原始数据 按行查看 历史
blublue 提交于 2021-11-17 10:44 . 添加 pppoe 网络设置
Index: networkmanager-qt/src/settings/pppoesetting.cpp
===================================================================
--- networkmanager-qt.orig/src/settings/pppoesetting.cpp
+++ networkmanager-qt/src/settings/pppoesetting.cpp
@@ -97,6 +97,20 @@ QString NetworkManager::PppoeSetting::pa
return d->password;
}
+void NetworkManager::PppoeSetting::setParent(const QString &parent)
+{
+ Q_D(PppoeSetting);
+
+ d->parent = parent;
+}
+
+QString NetworkManager::PppoeSetting::parent() const
+{
+ Q_D(const PppoeSetting);
+
+ return d->parent;
+}
+
void NetworkManager::PppoeSetting::setPasswordFlags(NetworkManager::Setting::SecretFlags flags)
{
Q_D(PppoeSetting);
@@ -171,6 +185,10 @@ QVariantMap NetworkManager::PppoeSetting
setting.insert(QLatin1String(NM_SETTING_PPPOE_USERNAME), username());
}
+ if (!parent().isEmpty()) {
+ setting.insert(QLatin1String(NM_SETTING_PPPOE_PARENT), parent());
+ }
+
if (!password().isEmpty()) {
setting.insert(QLatin1String(NM_SETTING_PPPOE_PASSWORD), password());
}
@@ -190,6 +208,7 @@ QDebug NetworkManager::operator <<(QDebu
dbg.nospace() << NM_SETTING_PPPOE_SERVICE << ": " << setting.service() << '\n';
dbg.nospace() << NM_SETTING_PPPOE_USERNAME << ": " << setting.username() << '\n';
dbg.nospace() << NM_SETTING_PPPOE_PASSWORD << ": " << setting.password() << '\n';
+ dbg.nospace() << NM_SETTING_PPPOE_PARENT << ": " << setting.parent() << '\n';
dbg.nospace() << NM_SETTING_PPPOE_PASSWORD_FLAGS << ": " << setting.passwordFlags() << '\n';
return dbg.maybeSpace();
Index: networkmanager-qt/src/settings/pppoesetting.h
===================================================================
--- networkmanager-qt.orig/src/settings/pppoesetting.h
+++ networkmanager-qt/src/settings/pppoesetting.h
@@ -54,6 +54,9 @@ public:
void setPassword(const QString &password);
QString password() const;
+ void setParent(const QString &parent);
+ QString parent() const;
+
void setPasswordFlags(Setting::SecretFlags flags);
Setting::SecretFlags passwordFlags() const;
Index: networkmanager-qt/src/settings/pppoesetting_p.h
===================================================================
--- networkmanager-qt.orig/src/settings/pppoesetting_p.h
+++ networkmanager-qt/src/settings/pppoesetting_p.h
@@ -35,6 +35,7 @@ public:
QString service;
QString username;
QString password;
+ QString parent;
NetworkManager::Setting::SecretFlags passwordFlags;
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/blublue/kf5-networkmanager-qt.git
git@gitee.com:blublue/kf5-networkmanager-qt.git
blublue
kf5-networkmanager-qt
kf5-networkmanager-qt
master

搜索帮助