|
|
@ -12,7 +12,6 @@
|
|
|
|
#include <QScreen>
|
|
|
|
#include <QScreen>
|
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QUuid>
|
|
|
|
#include <QUuid>
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
|
|
|
#include <QDBusPendingReply>
|
|
|
|
#include <QDBusPendingReply>
|
|
|
|
#include "installerprompt.h"
|
|
|
|
#include "installerprompt.h"
|
|
|
|
#include "./ui_installerprompt.h"
|
|
|
|
#include "./ui_installerprompt.h"
|
|
|
@ -22,6 +21,9 @@ InstallerPrompt::InstallerPrompt(QWidget *parent)
|
|
|
|
, ui(new Ui::InstallerPrompt) {
|
|
|
|
, ui(new Ui::InstallerPrompt) {
|
|
|
|
ui->setupUi(this);
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Hide the Incorrect Password text
|
|
|
|
|
|
|
|
ui->incorrectPassword->setVisible(false);
|
|
|
|
|
|
|
|
|
|
|
|
// Set the background image and scale it
|
|
|
|
// Set the background image and scale it
|
|
|
|
QPixmap bg(":/background");
|
|
|
|
QPixmap bg(":/background");
|
|
|
|
if (bg.isNull()) {
|
|
|
|
if (bg.isNull()) {
|
|
|
@ -78,6 +80,8 @@ void InstallerPrompt::updateConnectionStatus() {
|
|
|
|
|
|
|
|
|
|
|
|
switch (status) {
|
|
|
|
switch (status) {
|
|
|
|
case NetworkManager::Status::Disconnected:
|
|
|
|
case NetworkManager::Status::Disconnected:
|
|
|
|
|
|
|
|
case NetworkManager::ConnectedLinkLocal:
|
|
|
|
|
|
|
|
case NetworkManager::Asleep:
|
|
|
|
statusText = tr("Not Connected");
|
|
|
|
statusText = tr("Not Connected");
|
|
|
|
statusIndicator = "<span style=\"color: red;\">❌</span> " + statusText;
|
|
|
|
statusIndicator = "<span style=\"color: red;\">❌</span> " + statusText;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -95,6 +99,7 @@ void InstallerPrompt::updateConnectionStatus() {
|
|
|
|
statusIndicator = "<span style=\"color: yellow;\">🟡</span> " + statusText;
|
|
|
|
statusIndicator = "<span style=\"color: yellow;\">🟡</span> " + statusText;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
|
|
|
|
qDebug() << "Unknown status:" << status;
|
|
|
|
statusText = tr("Unknown Status");
|
|
|
|
statusText = tr("Unknown Status");
|
|
|
|
statusIndicator = "<span style=\"color: grey;\">⚪</span> " + statusText;
|
|
|
|
statusIndicator = "<span style=\"color: grey;\">⚪</span> " + statusText;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -120,162 +125,154 @@ void InstallerPrompt::updateConnectionStatus() {
|
|
|
|
|
|
|
|
|
|
|
|
void InstallerPrompt::handleWiFiConnectionChange(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason)
|
|
|
|
void InstallerPrompt::handleWiFiConnectionChange(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (reason == NetworkManager::Device::NoSecretsReason) {
|
|
|
|
QMutexLocker locker(&wifiChangeMutex);
|
|
|
|
|
|
|
|
if (reason == NetworkManager::Device::NoSecretsReason && !wifiWrongHandling) {
|
|
|
|
|
|
|
|
wifiWrongHandling = true;
|
|
|
|
|
|
|
|
qDebug() << wifiSSID;
|
|
|
|
|
|
|
|
|
|
|
|
foreach (const NetworkManager::Connection::Ptr &connection, NetworkManager::listConnections()) {
|
|
|
|
foreach (const NetworkManager::Connection::Ptr &connection, NetworkManager::listConnections()) {
|
|
|
|
if (connection->settings()->connectionType() == NetworkManager::ConnectionSettings::Wireless) {
|
|
|
|
if (connection->settings()->connectionType() == NetworkManager::ConnectionSettings::Wireless) {
|
|
|
|
auto wirelessSetting = connection->settings()->setting(NetworkManager::Setting::Wireless).dynamicCast<NetworkManager::WirelessSetting>();
|
|
|
|
auto wirelessSetting = connection->settings()->setting(NetworkManager::Setting::Wireless).dynamicCast<NetworkManager::WirelessSetting>();
|
|
|
|
if (wirelessSetting && wirelessSetting->ssid() == ui->networkComboBox->currentText()) {
|
|
|
|
if (wirelessSetting && wirelessSetting->ssid() == wifiSSID) {
|
|
|
|
qDebug() << "Wiping connection with wrong password: " << ui->networkComboBox->currentText();
|
|
|
|
qDebug() << "Wiping connection with wrong password: " << wifiSSID;
|
|
|
|
|
|
|
|
// Show the Incorrect Password text
|
|
|
|
|
|
|
|
ui->incorrectPassword->setVisible(true);
|
|
|
|
QDBusPendingReply removeReply = connection->remove();
|
|
|
|
QDBusPendingReply removeReply = connection->remove();
|
|
|
|
removeReply.waitForFinished();
|
|
|
|
removeReply.waitForFinished();
|
|
|
|
handleWifiConnection(ui->networkComboBox->currentText(), true);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
wifiWrongHandling = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void InstallerPrompt::handleWifiConnection(const QString &ssid, bool recoverFromWrongPassword) {
|
|
|
|
NetworkManager::Connection::Ptr InstallerPrompt::findConnectionBySsid(const QString &ssid) {
|
|
|
|
ui->networkComboBox->setEnabled(false);
|
|
|
|
foreach (const NetworkManager::Connection::Ptr &connection, NetworkManager::listConnections()) {
|
|
|
|
qDebug() << "Attempting to find connection for SSID:" << ssid;
|
|
|
|
if (connection->settings()->connectionType() == NetworkManager::ConnectionSettings::Wireless) {
|
|
|
|
if (!recoverFromWrongPassword) {
|
|
|
|
auto wirelessSetting = connection->settings()->setting(NetworkManager::Setting::Wireless).dynamicCast<NetworkManager::WirelessSetting>();
|
|
|
|
foreach (const NetworkManager::Connection::Ptr &connection, NetworkManager::listConnections()) {
|
|
|
|
if (wirelessSetting && wirelessSetting->ssid() == ssid) {
|
|
|
|
if (connection->settings()->connectionType() == NetworkManager::ConnectionSettings::Wireless) {
|
|
|
|
return connection;
|
|
|
|
auto wirelessSetting = connection->settings()->setting(NetworkManager::Setting::Wireless).dynamicCast<NetworkManager::WirelessSetting>();
|
|
|
|
|
|
|
|
if (wirelessSetting && wirelessSetting->ssid() == ssid) {
|
|
|
|
|
|
|
|
qDebug() << "Attempting to use existing connection:" << ssid;
|
|
|
|
|
|
|
|
NetworkManager::activateConnection(connection->path(), wifiDevice->uni(), QString());
|
|
|
|
|
|
|
|
qDebug() << "Successfully connected:" << ssid;
|
|
|
|
|
|
|
|
ui->networkComboBox->setEnabled(true);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return NetworkManager::Connection::Ptr(); // Return null pointer if not found
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QMap<QString, QVariant> fullSettings = createSettingsBySSID(ssid);
|
|
|
|
QString InstallerPrompt::promptForWifiPassword(const QString &ssid, bool isWrongPassword) {
|
|
|
|
NMVariantMapMap nmMap;
|
|
|
|
QDialog passwordDialog(this);
|
|
|
|
|
|
|
|
passwordDialog.setModal(true);
|
|
|
|
|
|
|
|
passwordDialog.setWindowTitle(tr("Wi-Fi Password Required"));
|
|
|
|
|
|
|
|
passwordDialog.setWindowIcon(QIcon::fromTheme("network-wireless"));
|
|
|
|
|
|
|
|
passwordDialog.setStyleSheet("QLabel { color: black; } ");
|
|
|
|
|
|
|
|
passwordDialog.setMinimumWidth(250);
|
|
|
|
|
|
|
|
passwordDialog.setMinimumHeight(120);
|
|
|
|
|
|
|
|
passwordDialog.setMaximumWidth(5000);
|
|
|
|
|
|
|
|
passwordDialog.setMaximumHeight(500);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QVBoxLayout layout;
|
|
|
|
|
|
|
|
QLabel passwordLabel(tr("Enter password for \"%1\":").arg(ssid), &passwordDialog);
|
|
|
|
|
|
|
|
QLineEdit passwordLineEdit(&passwordDialog);
|
|
|
|
|
|
|
|
QPushButton passwordButton(tr("Connect"), &passwordDialog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
passwordLineEdit.setEchoMode(QLineEdit::Password);
|
|
|
|
|
|
|
|
layout.addWidget(&passwordLabel);
|
|
|
|
|
|
|
|
layout.addWidget(&passwordLineEdit);
|
|
|
|
|
|
|
|
layout.addWidget(&passwordButton);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
passwordDialog.setLayout(&layout);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Connect with a lambda function for inline validation
|
|
|
|
|
|
|
|
connect(&passwordLineEdit, &QLineEdit::textChanged, this, [&passwordLineEdit](const QString &text) {
|
|
|
|
|
|
|
|
int minLength = 8;
|
|
|
|
|
|
|
|
int maxLength = 64;
|
|
|
|
|
|
|
|
bool isValid = text.length() >= minLength && text.length() <= maxLength;
|
|
|
|
|
|
|
|
passwordLineEdit.setStyleSheet(isValid ? "" : "border: 1px solid red;");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(&passwordButton, &QPushButton::clicked, &passwordDialog, &QDialog::accept);
|
|
|
|
|
|
|
|
|
|
|
|
for (const auto &key : fullSettings.keys()) {
|
|
|
|
if (passwordDialog.exec() == QDialog::Accepted) {
|
|
|
|
nmMap[key] = fullSettings[key].toMap();
|
|
|
|
return passwordLineEdit.text();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NetworkManager::ConnectionSettings::Ptr newConnectionSettings(new NetworkManager::ConnectionSettings(NetworkManager::ConnectionSettings::Wireless));
|
|
|
|
return QString();
|
|
|
|
newConnectionSettings->fromMap(nmMap);
|
|
|
|
}
|
|
|
|
QVariantMap wirelessSecurity = fullSettings.value("802-11-wireless-security").toMap();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//bool isOpenNetwork = wirelessSecurity.isEmpty() || wirelessSecurity.value("key-mgmt").toString().isEmpty();
|
|
|
|
void InstallerPrompt::handleWifiConnection(const QString &ssid, bool recoverFromWrongPassword) {
|
|
|
|
//if (isOpenNetwork && wifiDevice && wifiDevice->isValid() && connection) {
|
|
|
|
ui->incorrectPassword->setVisible(false);
|
|
|
|
// qDebug() << "Attempting to connect to open network: " << ssid;
|
|
|
|
ui->networkComboBox->setEnabled(false);
|
|
|
|
// NetworkManager::activateConnection(connection->path(), wifiDevice->uni(), QString());
|
|
|
|
wifiSSID = ssid;
|
|
|
|
// return;
|
|
|
|
qDebug() << "Attempting to find connection for SSID:" << ssid;
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If the network is secured, display the password dialog
|
|
|
|
// Check for existing connection
|
|
|
|
QDialog passwordDialog(this);
|
|
|
|
NetworkManager::Connection::Ptr connection = findConnectionBySsid(ssid);
|
|
|
|
QVBoxLayout layout(&passwordDialog);
|
|
|
|
if (connection && !recoverFromWrongPassword) {
|
|
|
|
QLabel label(&passwordDialog);
|
|
|
|
qDebug() << "Using existing connection for:" << ssid;
|
|
|
|
if (!recoverFromWrongPassword) {
|
|
|
|
NetworkManager::activateConnection(connection->path(), wifiDevice->uni(), QString());
|
|
|
|
label.setText(tr("Enter Wi-Fi Password for %1:").arg(ssid));
|
|
|
|
ui->networkComboBox->setEnabled(true);
|
|
|
|
label.setStyleSheet("color: black");
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
|
|
|
|
label.setText(tr("Wrong Wi-Fi password for %1. Try again:").arg(ssid));
|
|
|
|
|
|
|
|
label.setStyleSheet("color: red");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
QLineEdit lineEdit(&passwordDialog);
|
|
|
|
|
|
|
|
QPushButton button(tr("Connect"), &passwordDialog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lineEdit.setEchoMode(QLineEdit::Password);
|
|
|
|
// Prompt for Wi-Fi password
|
|
|
|
layout.addWidget(&label);
|
|
|
|
QString password = promptForWifiPassword(ssid);
|
|
|
|
layout.addWidget(&lineEdit);
|
|
|
|
if (password.isEmpty()) {
|
|
|
|
layout.addWidget(&button);
|
|
|
|
ui->networkComboBox->setEnabled(true);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
connect(&button, &QPushButton::clicked, &passwordDialog, &QDialog::accept);
|
|
|
|
// Create new Wi-Fi connection
|
|
|
|
|
|
|
|
NMVariantMapMap settings = createSettingsBySSID(ssid);
|
|
|
|
|
|
|
|
if (settings.isEmpty()) {
|
|
|
|
|
|
|
|
QMessageBox::warning(this, tr("Error"), tr("Failed to create Wi-Fi settings."));
|
|
|
|
|
|
|
|
ui->networkComboBox->setEnabled(true);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (int attempts = 0; attempts < 3; ++attempts) {
|
|
|
|
// Update the wireless security settings
|
|
|
|
if (passwordDialog.exec() == QDialog::Rejected) {
|
|
|
|
QVariantMap wirelessSecurity;
|
|
|
|
ui->networkComboBox->setEnabled(true);
|
|
|
|
wirelessSecurity["key-mgmt"] = "wpa-psk";
|
|
|
|
return;
|
|
|
|
wirelessSecurity["psk"] = password;
|
|
|
|
}
|
|
|
|
settings["802-11-wireless-security"] = wirelessSecurity;
|
|
|
|
QString password = lineEdit.text();
|
|
|
|
|
|
|
|
if (wifiDevice && wifiDevice->isValid()) {
|
|
|
|
// Add the new connection
|
|
|
|
// Update the wireless security settings in the map
|
|
|
|
QDBusPendingReply<QDBusObjectPath> reply = NetworkManager::addConnection(settings);
|
|
|
|
wirelessSecurity["key-mgmt"] = "wpa-psk";
|
|
|
|
reply.waitForFinished();
|
|
|
|
wirelessSecurity["psk"] = password;
|
|
|
|
if (reply.isError()) {
|
|
|
|
fullSettings["802-11-wireless-security"] = wirelessSecurity;
|
|
|
|
QMessageBox::warning(this, tr("Error"), tr("Failed to add Wi-Fi connection."));
|
|
|
|
|
|
|
|
ui->networkComboBox->setEnabled(true);
|
|
|
|
// Convert QMap<QString, QVariant> to NMVariantMapMap
|
|
|
|
return;
|
|
|
|
NMVariantMapMap nmMap;
|
|
|
|
}
|
|
|
|
for (const auto &key : fullSettings.keys()) {
|
|
|
|
|
|
|
|
nmMap[key] = fullSettings[key].toMap();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Update the connection settings
|
|
|
|
// Activate the new connection
|
|
|
|
qDebug() << "Saving the connection...";
|
|
|
|
QDBusObjectPath path = reply.value();
|
|
|
|
QDBusObjectPath path;
|
|
|
|
NetworkManager::activateConnection(path.path(), wifiDevice->uni(), QString());
|
|
|
|
NetworkManager::ConnectionSettings::Ptr newConnectionSettings(new NetworkManager::ConnectionSettings(NetworkManager::ConnectionSettings::Wireless));
|
|
|
|
ui->networkComboBox->setEnabled(true);
|
|
|
|
newConnectionSettings->fromMap(nmMap);
|
|
|
|
}
|
|
|
|
QDBusPendingReply<QDBusObjectPath> addreply = NetworkManager::addConnection(nmMap);
|
|
|
|
|
|
|
|
addreply.waitForFinished();
|
|
|
|
|
|
|
|
if (addreply.isError()) {
|
|
|
|
|
|
|
|
qDebug() << nmMap;
|
|
|
|
|
|
|
|
qDebug() << "Unable to save the connection:" << addreply.error().message();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
path = addreply.value();
|
|
|
|
|
|
|
|
qDebug() << "Added connection path:" << path.path();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NetworkManager::Connection::Ptr connection = NetworkManager::findConnection(path.path());
|
|
|
|
NMVariantMapMap InstallerPrompt::createSettingsBySSID(const QString &ssid) {
|
|
|
|
if (!connection) {
|
|
|
|
NMVariantMapMap convertedSettings;
|
|
|
|
qDebug() << "Unable to retrieve the connection after saving:" << addreply.error().message();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QDBusPendingReply<QDBusObjectPath> reply = NetworkManager::activateConnection(connection->path(), wifiDevice->uni(), QString());
|
|
|
|
if (!wifiDevice) {
|
|
|
|
reply.waitForFinished();
|
|
|
|
qWarning() << "Wi-Fi device not found. Unable to set interface name.";
|
|
|
|
if (reply.isError()) {
|
|
|
|
return convertedSettings;
|
|
|
|
qDebug() << "Unable to activate the connection:" << addreply.error().message();
|
|
|
|
|
|
|
|
QMessageBox::warning(this, tr("Connection Failed"), tr("Unable to connect to the network."));
|
|
|
|
|
|
|
|
ui->networkComboBox->setEnabled(true);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
NetworkManager::reloadConnections();
|
|
|
|
|
|
|
|
qDebug() << "Successfully connected:" << ssid;
|
|
|
|
|
|
|
|
// ui->networkComboBox->setEnabled(true); !!! We don't run this here since we actually *want* the box to remain locked right now
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QMap<QString, QVariant> InstallerPrompt::createSettingsBySSID(const QString &ssid) {
|
|
|
|
|
|
|
|
// Create new connection settings
|
|
|
|
|
|
|
|
NetworkManager::ConnectionSettings::Ptr newConnectionSettings(new NetworkManager::ConnectionSettings(NetworkManager::ConnectionSettings::Wireless));
|
|
|
|
NetworkManager::ConnectionSettings::Ptr newConnectionSettings(new NetworkManager::ConnectionSettings(NetworkManager::ConnectionSettings::Wireless));
|
|
|
|
newConnectionSettings->setId(ssid);
|
|
|
|
newConnectionSettings->setId(ssid);
|
|
|
|
newConnectionSettings->setUuid(NetworkManager::ConnectionSettings::createNewUuid());
|
|
|
|
newConnectionSettings->setUuid(NetworkManager::ConnectionSettings::createNewUuid());
|
|
|
|
|
|
|
|
newConnectionSettings->setInterfaceName(wifiDevice->interfaceName());
|
|
|
|
// Set interface name from wifiDevice
|
|
|
|
|
|
|
|
if (wifiDevice) {
|
|
|
|
|
|
|
|
newConnectionSettings->setInterfaceName(wifiDevice->interfaceName());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
qWarning() << "Wi-Fi device not found. Unable to set interface name.";
|
|
|
|
|
|
|
|
return QMap<QString, QVariant>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Configure wireless settings
|
|
|
|
// Configure wireless settings
|
|
|
|
QVariantMap wirelessSetting;
|
|
|
|
QVariantMap wirelessSetting;
|
|
|
|
wirelessSetting.insert("ssid", ssid.toUtf8());
|
|
|
|
wirelessSetting.insert("ssid", ssid.toUtf8());
|
|
|
|
|
|
|
|
convertedSettings.insert("802-11-wireless", wirelessSetting);
|
|
|
|
|
|
|
|
|
|
|
|
// Configure wireless security settings
|
|
|
|
// Convert other settings
|
|
|
|
NetworkManager::WirelessSecuritySetting::Ptr wirelessSecuritySetting = newConnectionSettings->setting(NetworkManager::Setting::WirelessSecurity).staticCast<NetworkManager::WirelessSecuritySetting>();
|
|
|
|
|
|
|
|
wirelessSecuritySetting->setKeyMgmt(NetworkManager::WirelessSecuritySetting::WpaPsk);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Convert settings to QVariantMap
|
|
|
|
|
|
|
|
QMap<QString, QVariant> convertedSettings;
|
|
|
|
|
|
|
|
const auto settingsMap = newConnectionSettings->toMap();
|
|
|
|
const auto settingsMap = newConnectionSettings->toMap();
|
|
|
|
for (const auto &key : settingsMap.keys()) {
|
|
|
|
for (const auto &key : settingsMap.keys()) {
|
|
|
|
convertedSettings[key] = QVariant::fromValue(settingsMap[key]);
|
|
|
|
QVariant value = settingsMap.value(key);
|
|
|
|
|
|
|
|
convertedSettings.insert(key, value.toMap());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
convertedSettings.insert("802-11-wireless", wirelessSetting);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return convertedSettings;
|
|
|
|
return convertedSettings;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -334,7 +331,6 @@ void InstallerPrompt::refreshNetworkList() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Update the main map and combo box only after the new list is ready
|
|
|
|
// Update the main map and combo box only after the new list is ready
|
|
|
|
wifiNetworkMap.swap(tempWifiNetworkMap);
|
|
|
|
|
|
|
|
ui->networkComboBox->clear();
|
|
|
|
ui->networkComboBox->clear();
|
|
|
|
ui->networkComboBox->addItems(ssidList);
|
|
|
|
ui->networkComboBox->addItems(ssidList);
|
|
|
|
|
|
|
|
|
|
|
|