Fix bug can not show anything in browser when connect a portal wifi

This commit is contained in:
chenlelin 2021-03-27 15:05:16 +08:00
parent 2d62ca677b
commit 9fdccab7fc
3 changed files with 6 additions and 6 deletions

1
debian/control vendored
View File

@ -27,7 +27,6 @@ Depends: network-manager (>=1.2.6),
network-manager-config-connectivity-ubuntu,
gir1.2-javascriptcoregtk-4.0,
gir1.2-webkit2-4.0,
gnome-shell,
${shlibs:Depends},
${misc:Depends}
Description: Gui Applet tool for display and edit network simply

View File

@ -3429,12 +3429,13 @@ void MainWindow::connWifiDone(int connFlag)
{
// Wifi连接结果0点击连接成功 1失败 2没有配置文件 3开机启动网络工具时已经连接 4密码错误 5找不到已保存的网络
if (connFlag == 0) {
WifiAuthThread *wifi_auth_thread=new WifiAuthThread();
wifi_auth_thread->start();
syslog(LOG_DEBUG, "Wi-Fi already connected by clicking button");
if (!isHuaWeiPC) {
//如果是华为电脑,使用获取连接信号的方式更新列表
this->ksnm->execGetWifiList(this->wcardname);
} else {
WifiAuthThread *wifi_auth_thread=new WifiAuthThread();
wifi_auth_thread->start();
}
QString txt(tr("Conn Wifi Success"));

View File

@ -1,6 +1,6 @@
#include "wifi-auth-thread.h"
#include <QDebug>
#include <QProcess>
void WifiAuthThread::run()
{
@ -11,9 +11,9 @@ void WifiAuthThread::run()
QDBusConnection::systemBus() );
QDBusReply<uint> reply= interface.call("CheckConnectivity");
if (reply.isValid()) {
//qDebug() << "-----------------------> 000000000000000011" << reply.value();
if (reply.value() == 2) {
system("gdbus call --session --dest org.gnome.Shell.PortalHelper --object-path /org/gnome/Shell/PortalHelper --method org.gtk.Application.Activate []");
//system("xdg-open http://nmcheck.gnome.org");
QProcess::startDetached(QString("xdg-open http://nmcheck.gnome.org"));
}
}
}