+ new Verbose* DBus calls

+ new force request to netctl (DBus)
+ PointType enum
+ notification on hidding,
+ new columns in WiFi menu
* improve user expierence
* fix language definition
* fix tests
* update 3rdparty components
* small refactoring
This commit is contained in:
arcan1s
2015-03-09 08:29:26 +03:00
parent d94aa4ebf7
commit 362a11f0bc
29 changed files with 363 additions and 176 deletions

View File

@ -121,7 +121,7 @@ void TestNetctl::test_getRecommendedConfiguration()
QMap<QString, QString> resultMap = Netctl::getRecommendedConfiguration();
QStringList result;
for (int i=0; i<resultMap.keys().count(); i++)
result.append(resultMap.keys()[i] + QString("==") + resultMap[resultMap.keys()[i]]);
result.append(QString("%1==%2").arg(resultMap.keys()[i]).arg(resultMap[resultMap.keys()[i]]));
QWARN("This test may fail on other configuration");
QCOMPARE(result, original);
@ -135,8 +135,7 @@ void TestNetctl::test_getActiveProfile()
QStringList result = netctl->getActiveProfile();
QStringList dbus;
if (helper)
dbus = sendDBusRequest(QString("/netctl"), QString("ActiveProfile"))
[0].toString().split(QChar('|'));
dbus = sendDBusRequest(QString("/netctl"), QString("netctlActiveProfile"))[0].toString().split(QChar('|'));
netctl->startProfile(QString("netctlgui-test-dummy"));
delete netctl;

View File

@ -82,8 +82,7 @@ QList<QVariant> TestNetctlAuto::sendDBusRequest(const QString path, const QStrin
QDBusConnection bus = QDBusConnection::systemBus();
QDBusMessage request = QDBusMessage::createMethodCall(DBUS_HELPER_SERVICE, path,
DBUS_HELPER_INTERFACE, cmd);
if (!args.isEmpty())
request.setArguments(args);
if (!args.isEmpty()) request.setArguments(args);
QDBusMessage response = bus.call(request);
QList<QVariant> arguments = response.arguments();

View File

@ -68,8 +68,7 @@ QList<QVariant> TestNetctlProfile::sendDBusRequest(const QString path, const QSt
QDBusConnection bus = QDBusConnection::systemBus();
QDBusMessage request = QDBusMessage::createMethodCall(DBUS_HELPER_SERVICE, path,
DBUS_HELPER_INTERFACE, cmd);
if (!args.isEmpty())
request.setArguments(args);
if (!args.isEmpty()) request.setArguments(args);
QDBusMessage response = bus.call(request);
QList<QVariant> arguments = response.arguments();
@ -110,7 +109,7 @@ void TestNetctlProfile::test_getRecommendedConfiguration()
QMap<QString, QString> resultMap = NetctlProfile::getRecommendedConfiguration();
QStringList result;
for (int i=0; i<resultMap.keys().count(); i++)
result.append(resultMap.keys()[i] + QString("==") + resultMap[resultMap.keys()[i]]);
result.append(QString("%1==%2").arg(resultMap.keys()[i]).arg(resultMap[resultMap.keys()[i]]));
QWARN("This test may fail on other configuration");
QCOMPARE(result, original);
@ -237,7 +236,7 @@ void TestNetctlProfile::test_createProfile()
args.append(QString("netctlgui-test-full"));
QStringList profileSettingsList;
for (int i=0; i<profileSettings.keys().count(); i++)
profileSettingsList.append(profileSettings.keys()[i] + QString("==") + profileSettings[profileSettings.keys()[i]]);
profileSettingsList.append(QString("%1==%2").arg(profileSettings.keys()[i]).arg(profileSettings[profileSettings.keys()[i]]));
args.append(profileSettingsList);
QVERIFY(sendDBusRequest(QString("/ctrl"), QString("Create"), args)[0].toBool());
}
@ -300,7 +299,7 @@ phase2=\"auth=PAP\"\
}
QMap<QString, QString> resultMap = netctl->getSettingsFromProfile(QString("netctlgui-test-full"));
for (int i=0; i<resultMap.keys().count(); i++)
result.append(resultMap.keys()[i] + QString("==") + resultMap[resultMap.keys()[i]]);
result.append(QString("%1==%2").arg(resultMap.keys()[i]).arg(resultMap[resultMap.keys()[i]]));
netctl->removeProfile(QString("netctlgui-test-full"));
delete netctl;

View File

@ -43,8 +43,7 @@ QList<QVariant> TestWpaSup::sendDBusRequest(const QString path, const QString cm
QDBusConnection bus = QDBusConnection::systemBus();
QDBusMessage request = QDBusMessage::createMethodCall(DBUS_HELPER_SERVICE, path,
DBUS_HELPER_INTERFACE, cmd);
if (!args.isEmpty())
request.setArguments(args);
if (!args.isEmpty()) request.setArguments(args);
QDBusMessage response = bus.call(request);
QList<QVariant> arguments = response.arguments();
@ -86,7 +85,7 @@ void TestWpaSup::test_getRecommendedConfiguration()
QMap<QString, QString> resultMap = WpaSup::getRecommendedConfiguration();
QStringList result;
for (int i=0; i<resultMap.keys().count(); i++)
result.append(resultMap.keys()[i] + QString("==") + resultMap[resultMap.keys()[i]]);
result.append(QString("%1==%2").arg(resultMap.keys()[i]).arg(resultMap[resultMap.keys()[i]]));
QWARN("This test may fail on other configuration");
QCOMPARE(result, original);