From 32683a89b9fa401d974d9a60c485205a026bab27 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Sun, 20 Jul 2014 12:47:43 +0400 Subject: [PATCH] small fix --- CHANGELOG | 4 ++-- PKGBUILD | 2 +- sources/netctlgui/src/netctlinteract.cpp | 2 +- sources/netctlgui/src/wpasupinteract.cpp | 8 ++++---- sources/plasmoid/netctl.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 960ebaa..9352169 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,7 @@ Ver.1.2.0: + [all] added icons + [all] added support of netctl-auto -+ [gui] added suppoort of macvlan ++ [gui] added support of macvlan + [gui] added ability to remove profile + [gui] added support of hidden wifi network + [gui] added contextual menu to tables @@ -16,6 +16,7 @@ Ver.1.2.0: + [lib] added doxygen documentation + [plasmoid] added dataengine configuration + [plasmoid] added about window +- [gui] fix possible segfaults with null arrays (#5) * [all] changes in the project architecture * [all] refactoring * [gui] more debug information @@ -27,7 +28,6 @@ Ver.1.2.0: * [lib] rewrited getSettingsFromProfile() function * [plasmoid] edited configuration interface * [plasmoid] changed double click event to click event -- [gui] fix possible segfaults with null arrays (#5) Ver.1.1.0 (netctl-1.7 update): + [gui] added frequency diff --git a/PKGBUILD b/PKGBUILD index 526e184..3adb4cd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -15,7 +15,7 @@ optdepends=('kdebase-runtime: sudo support' 'wpa_supplicant: wifi support') source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${pkgbase}-${pkgver}-src.tar.xz") install="${pkgbase}.install" -md5sums=('e6ad580c9f7fcd593480f14cd93c471c') +md5sums=('1d6797070defe45ec7009cb8e4f768c9') prepare() { rm -rf "${srcdir}/"{build-plasmoid,build-qt4,build-qt5} diff --git a/sources/netctlgui/src/netctlinteract.cpp b/sources/netctlgui/src/netctlinteract.cpp index 6b5594c..380d777 100644 --- a/sources/netctlgui/src/netctlinteract.cpp +++ b/sources/netctlgui/src/netctlinteract.cpp @@ -144,7 +144,7 @@ QString Netctl::getWifiInterface() interfaces.append(allInterfaces[i]); } - if (interfaces.count() == 0) + if (interfaces.isEmpty()) return QString(""); else return interfaces[0]; diff --git a/sources/netctlgui/src/wpasupinteract.cpp b/sources/netctlgui/src/wpasupinteract.cpp index f579aa7..affe1d2 100644 --- a/sources/netctlgui/src/wpasupinteract.cpp +++ b/sources/netctlgui/src/wpasupinteract.cpp @@ -287,7 +287,7 @@ bool WpaSup::startWpaSupplicant() if (debug) qDebug() << "[WpaSup]" << "[startWpaSupplicant]" << ":" << "Could not find wpa_supplicant"; return false; } - if (getInterfaceList().count() == 0) { + if (getInterfaceList().isEmpty()) { if (debug) qDebug() << "[WpaSup]" << "[startWpaSupplicant]" << ":" << "Could not find interfaces"; return false; } @@ -343,7 +343,7 @@ QString WpaSup::getWpaCliOutput(const QString commandLine) if (debug) qDebug() << "[WpaSup]" << "[getWpaCliOutput]" << ":" << "Could not find wpa_cli"; return QString(); } - if (getInterfaceList().count() == 0) { + if (getInterfaceList().isEmpty()) { if (debug) qDebug() << "[WpaSup]" << "[getWpaCliOutput]" << ":" << "Could not find interfaces"; return QString(); } @@ -379,9 +379,9 @@ bool WpaSup::wpaCliCall(const QString commandLine) if (debug) qDebug() << "[WpaSup]" << "[wpaCliCall]" << ":" << "Could not find wpa_cli"; return false; } - if (getInterfaceList().count() == 0) { + if (getInterfaceList().isEmpty()) { if (debug) qDebug() << "[WpaSup]" << "[wpaCliCall]" << ":" << "Could not find interfaces"; - return QString(); + return false; } QProcess command; diff --git a/sources/plasmoid/netctl.cpp b/sources/plasmoid/netctl.cpp index 7309535..cd67561 100644 --- a/sources/plasmoid/netctl.cpp +++ b/sources/plasmoid/netctl.cpp @@ -417,7 +417,7 @@ void Netctl::connectToEngine() void Netctl::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data) { - if (data.keys().count() == 0) + if (data.isEmpty()) return; QString value = data[QString("value")].toString(); if (value.isEmpty())