mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-08 03:15:54 +00:00
Prepare to release 1.4.1
update docs, update ui deprecate description function
This commit is contained in:
@ -119,7 +119,7 @@ public:
|
||||
* @param profile profile name
|
||||
* @return profile description or ""
|
||||
*/
|
||||
QString getProfileDescription(const QString profile);
|
||||
Q_DECL_DEPRECATED QString getProfileDescription(const QString profile);
|
||||
/**
|
||||
* @brief method which gets profile status
|
||||
* @param profile profile name
|
||||
|
@ -321,11 +321,11 @@ bool Netctl::autoIsProfileActive(const QString profile)
|
||||
|
||||
bool status = false;
|
||||
QList<netctlProfileInfo> profiles = getProfileListFromNetctlAuto();
|
||||
for (int i=0; i<profiles.count(); i++)
|
||||
if ((profiles[i].name == profile) && (profiles[i].active)) {
|
||||
status = true;
|
||||
break;
|
||||
}
|
||||
for (int i=0; i<profiles.count(); i++) {
|
||||
if (profiles[i].name == profile) continue;
|
||||
status = profiles[i].active;
|
||||
break;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -341,11 +341,11 @@ bool Netctl::autoIsProfileEnabled(const QString profile)
|
||||
|
||||
bool status = false;
|
||||
QList<netctlProfileInfo> profiles = getProfileListFromNetctlAuto();
|
||||
for (int i=0; i<profiles.count(); i++)
|
||||
if ((profiles[i].name == profile) && (profiles[i].enabled)) {
|
||||
status = true;
|
||||
break;
|
||||
}
|
||||
for (int i=0; i<profiles.count(); i++) {
|
||||
if (profiles[i].name == profile) continue;
|
||||
status = profiles[i].enabled;
|
||||
break;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -182,10 +182,7 @@ InterfaceAnswer NetctlInterface::removeProfile(const QString profile)
|
||||
return InterfaceAnswer::Error;
|
||||
}
|
||||
|
||||
if (netctlProfile->removeProfile(profile))
|
||||
return InterfaceAnswer::True;
|
||||
else
|
||||
return InterfaceAnswer::Error;
|
||||
return static_cast<InterfaceAnswer>(netctlProfile->removeProfile(profile));
|
||||
}
|
||||
|
||||
|
||||
@ -238,10 +235,7 @@ InterfaceAnswer NetctlInterface::stopAllProfiles()
|
||||
return InterfaceAnswer::Error;
|
||||
}
|
||||
|
||||
if (netctlCommand->stopAllProfiles())
|
||||
return InterfaceAnswer::True;
|
||||
else
|
||||
return InterfaceAnswer::Error;
|
||||
return static_cast<InterfaceAnswer>(netctlCommand->stopAllProfiles());
|
||||
}
|
||||
|
||||
|
||||
|
@ -111,16 +111,16 @@ QString NetctlProfile::createProfile(const QString profile, const QMap<QString,
|
||||
for (int i=0; i<settings.keys().count(); i++) {
|
||||
out << settings.keys()[i] << QString("=");
|
||||
if ((settings.keys()[i] == QString("BindsToInterfaces")) ||
|
||||
(settings.keys()[i] == QString("After")) ||
|
||||
(settings.keys()[i] == QString("Address")) ||
|
||||
(settings.keys()[i] == QString("Routes")) ||
|
||||
(settings.keys()[i] == QString("Address6")) ||
|
||||
(settings.keys()[i] == QString("Routes6")) ||
|
||||
(settings.keys()[i] == QString("IPCustom")) ||
|
||||
(settings.keys()[i] == QString("DNS")) ||
|
||||
(settings.keys()[i] == QString("DNSOptions")) ||
|
||||
(settings.keys()[i] == QString("ScanFrequencies")) ||
|
||||
(settings.keys()[i] == QString("WPAConfigSection")))
|
||||
(settings.keys()[i] == QString("After")) ||
|
||||
(settings.keys()[i] == QString("Address")) ||
|
||||
(settings.keys()[i] == QString("Routes")) ||
|
||||
(settings.keys()[i] == QString("Address6")) ||
|
||||
(settings.keys()[i] == QString("Routes6")) ||
|
||||
(settings.keys()[i] == QString("IPCustom")) ||
|
||||
(settings.keys()[i] == QString("DNS")) ||
|
||||
(settings.keys()[i] == QString("DNSOptions")) ||
|
||||
(settings.keys()[i] == QString("ScanFrequencies")) ||
|
||||
(settings.keys()[i] == QString("WPAConfigSection")))
|
||||
out << QString("(%1)").arg(settings[settings.keys()[i]]) << endl;
|
||||
else
|
||||
out << settings[settings.keys()[i]] << endl;
|
||||
@ -220,7 +220,7 @@ QMap<QString, QString> NetctlProfile::getSettingsFromProfile(const QString profi
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
|
||||
output = QString(process.output).trimmed().split(QChar('\n'));
|
||||
|
||||
// gettings variables
|
||||
// read variables
|
||||
QStringList keys;
|
||||
for (int i=0; i<output.count(); i++)
|
||||
if (!systemVariables.contains(output[i].split(QChar('='))[0]))
|
||||
|
Reference in New Issue
Block a user