summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIoannis Christoforidis2021-07-01 12:05:46 +0200
committerIoannis Christoforidis2021-07-01 12:05:46 +0200
commit39c0e9b392a84d44a74d8d70801eba7c32418ecd (patch)
treed7ec8b71993ef27b2412be917ae020ae15f99c2f /src
parentadd Dialogue to add new Test (diff)
downloadspeedcheck-39c0e9b392a84d44a74d8d70801eba7c32418ecd.tar.gz
speedcheck-39c0e9b392a84d44a74d8d70801eba7c32418ecd.tar.xz
speedcheck-39c0e9b392a84d44a74d8d70801eba7c32418ecd.zip
Dynamically deactivate menuBars for Server and file benchmark addingproject_ioannis
Diffstat (limited to 'src')
-rw-r--r--src/addserver.cpp3
-rw-r--r--src/speedcheck.cpp7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/addserver.cpp b/src/addserver.cpp
index be57ef4..f0ca919 100644
--- a/src/addserver.cpp
+++ b/src/addserver.cpp
@@ -10,6 +10,7 @@ AddServer::AddServer(QWidget *parent) :
connect(_ui->radioButton, SIGNAL(clicked(bool)), this, SLOT(serverClicked(bool)));
connect(_ui->radioButton_2, SIGNAL(clicked(bool)), this, SLOT(fileClicked(bool)));
connect(_ui->buttonBox,SIGNAL(rejected()), this, SLOT(rejected()));
+ connect(_ui->buttonBox,SIGNAL(accepted()), this, SLOT(accepted()));
connect(_ui->selectedFile_2,SIGNAL(clicked(bool)), this, SLOT(selectClicked(bool)));
}
@@ -38,6 +39,8 @@ void AddServer::accepted() {
_filename = _ui->selectedFile_2->text();
_ui->selectedFile->text() = _filename;
}
+ _ui->selectedFile->setText(_filename);
+ this->~AddServer();
}
AddServer::~AddServer()
{
diff --git a/src/speedcheck.cpp b/src/speedcheck.cpp
index 344be46..19e2030 100644
--- a/src/speedcheck.cpp
+++ b/src/speedcheck.cpp
@@ -61,6 +61,7 @@ void SpeedCheck::startClicked(bool)
_ui->btnselect->setDisabled(true);
_ui->comboBox->setDisabled(true);
_ui->btnrefreshNetwork->setDisabled(true);
+ _ui->menuBar->setEnabled(false);
delete _thread;
_thread = new CopyThread(file, this);
connect(_thread, SIGNAL(logMessage(QString)), this, SLOT(logMessage(QString)), Qt::QueuedConnection);
@@ -91,6 +92,7 @@ void SpeedCheck::testFinished()
_ui->btnselect->setEnabled(true);
_ui->comboBox->setEnabled(true);
_ui->btnrefreshNetwork->setEnabled(true);
+ _ui->menuBar->setEnabled(true);
quitClicked(true);
// TODO start next test if available
}
@@ -143,7 +145,6 @@ void SpeedCheck::updateTimer()
_ui->picSpeed->readNextValue();
}
void SpeedCheck::addServerClicked(bool) {
- QWidget *wdg = new AddServer();
- wdg->show();
- logMessage("Hi");
+ QWidget *window = new AddServer;
+ window->show();
}