mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-07 10:02:24 +02:00
Read device button enabled after setting working folder.
This commit is contained in:
parent
0728794e38
commit
089c71b047
5 changed files with 27 additions and 10 deletions
|
@ -93,7 +93,7 @@ void Nitpick::setup() {
|
|||
if (_testRunnerMobile) {
|
||||
delete _testRunnerMobile;
|
||||
}
|
||||
_testRunnerMobile = new TestRunnerMobile(_ui.workingFolderRunOnMobileLabel);
|
||||
_testRunnerMobile = new TestRunnerMobile(_ui.workingFolderRunOnMobileLabel, _ui.readDeviceButton);
|
||||
}
|
||||
|
||||
void Nitpick::startTestsEvaluation(const bool isRunningFromCommandLine,
|
||||
|
@ -326,3 +326,7 @@ void Nitpick::appendLogWindow(const QString& message) {
|
|||
void Nitpick::on_setWorkingFolderRunOnMobileButton_clicked() {
|
||||
_testRunnerMobile->setWorkingFolder();
|
||||
}
|
||||
|
||||
void Nitpick::on_readDeviceButton_clicked() {
|
||||
_testRunnerMobile->readDevice();
|
||||
}
|
||||
|
|
|
@ -76,8 +76,6 @@ private slots:
|
|||
void on_setWorkingFolderRunOnDesktopButton_clicked();
|
||||
void on_runNowButton_clicked();
|
||||
|
||||
void on_setWorkingFolderRunOnMobileButton_clicked();
|
||||
|
||||
void on_checkBoxRunLatest_clicked();
|
||||
|
||||
void on_updateTestRailRunResultsButton_clicked();
|
||||
|
@ -97,6 +95,9 @@ private slots:
|
|||
void about();
|
||||
void content();
|
||||
|
||||
void on_setWorkingFolderRunOnMobileButton_clicked();
|
||||
void on_readDeviceButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::NitpickClass _ui;
|
||||
Test* _test{ nullptr };
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
#include "Nitpick.h"
|
||||
extern Nitpick* nitpick;
|
||||
|
||||
TestRunnerMobile::TestRunnerMobile(QLabel* workingFolderLabel, QObject* parent) : QObject(parent) {
|
||||
TestRunnerMobile::TestRunnerMobile(QLabel* workingFolderLabel, QPushButton *readDeviceButton, QObject* parent) : QObject(parent) {
|
||||
_workingFolderLabel = workingFolderLabel;
|
||||
_readDeviceButton = readDeviceButton;
|
||||
}
|
||||
|
||||
TestRunnerMobile::~TestRunnerMobile() {
|
||||
|
@ -31,7 +32,7 @@ void TestRunnerMobile::setWorkingFolder() {
|
|||
parent += "/";
|
||||
}
|
||||
|
||||
_workingFolder = QFileDialog::getExistingDirectory(nullptr, "Please select a temporary folder for installation", parent,
|
||||
_workingFolder = QFileDialog::getExistingDirectory(nullptr, "Please select a working folder for temporary files", parent,
|
||||
QFileDialog::ShowDirsOnly);
|
||||
|
||||
// If user canceled then restore previous selection and return
|
||||
|
@ -41,4 +42,9 @@ void TestRunnerMobile::setWorkingFolder() {
|
|||
}
|
||||
|
||||
_workingFolderLabel->setText(QDir::toNativeSeparators(_workingFolder));
|
||||
}
|
||||
|
||||
_readDeviceButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void TestRunnerMobile::readDevice() {
|
||||
}
|
||||
|
|
|
@ -12,17 +12,20 @@
|
|||
#define hifi_testRunnerMobile_h
|
||||
#include <QLabel>
|
||||
#include <QObject>
|
||||
#include <QPushButton>
|
||||
|
||||
class TestRunnerMobile : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TestRunnerMobile(QLabel* workingFolderLabel, QObject* parent = 0);
|
||||
explicit TestRunnerMobile(QLabel* workingFolderLabel, QPushButton *readDeviceButton, QObject* parent = 0);
|
||||
~TestRunnerMobile();
|
||||
|
||||
void setWorkingFolder();
|
||||
void readDevice();
|
||||
|
||||
private:
|
||||
QLabel* _workingFolderLabel;
|
||||
QString _workingFolder;
|
||||
QPushButton* _readDeviceButton;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_1">
|
||||
<attribute name="title">
|
||||
|
@ -551,7 +551,10 @@
|
|||
<attribute name="title">
|
||||
<string>Run on Device</string>
|
||||
</attribute>
|
||||
<widget class="QPushButton" name="getDeviceButton">
|
||||
<widget class="QPushButton" name="readDeviceButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
|
@ -561,7 +564,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Get Device</string>
|
||||
<string>Read Device</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
|
|
Loading…
Reference in a new issue