summaryrefslogtreecommitdiffstats
path: root/src/speedcheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/speedcheck.cpp')
-rw-r--r--src/speedcheck.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/speedcheck.cpp b/src/speedcheck.cpp
index f4c7985..2151953 100644
--- a/src/speedcheck.cpp
+++ b/src/speedcheck.cpp
@@ -107,14 +107,22 @@ void SpeedCheck::updateNetworkInfos(int) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
return;
QByteArray speed = file.readLine();
+ QDir wireless(path + "/wireless");
// Remove new line at End of the line
speed.remove(speed.length() - 1, 1);
- if (speed.toInt() < 1000) {
- QMessageBox::warning(NULL, "Warning","Link Speed Slow");
- _ui->networkSpeed->setStyleSheet("QLabel {color:orange;}");
- _ui->networkSpeed->setToolTip("Networkspeed slow!");
+ if (!wireless.exists()) {
+ if (speed.toInt() < 1000) {
+ QMessageBox::warning(NULL, "Warning","Link Speed Slow");
+ _ui->networkSpeed->setStyleSheet("QLabel {color:orange;}");
+ _ui->networkSpeed->setToolTip("Networkspeed slow!");
+ }
+ _ui->networkSpeed->setText(speed + " MB/s");
+ }
+ else {
+ _ui->networkSpeed->setDisabled(true);
+ _ui->networkSpeed->setText("");
+ _ui->link->setText("");
}
- _ui->networkSpeed->setText(speed + " MB/s");
}
void SpeedCheck::updateTimer()
{