mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 20:48:56 +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) {
|
if (_testRunnerMobile) {
|
||||||
delete _testRunnerMobile;
|
delete _testRunnerMobile;
|
||||||
}
|
}
|
||||||
_testRunnerMobile = new TestRunnerMobile(_ui.workingFolderRunOnMobileLabel);
|
_testRunnerMobile = new TestRunnerMobile(_ui.workingFolderRunOnMobileLabel, _ui.readDeviceButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Nitpick::startTestsEvaluation(const bool isRunningFromCommandLine,
|
void Nitpick::startTestsEvaluation(const bool isRunningFromCommandLine,
|
||||||
|
@ -326,3 +326,7 @@ void Nitpick::appendLogWindow(const QString& message) {
|
||||||
void Nitpick::on_setWorkingFolderRunOnMobileButton_clicked() {
|
void Nitpick::on_setWorkingFolderRunOnMobileButton_clicked() {
|
||||||
_testRunnerMobile->setWorkingFolder();
|
_testRunnerMobile->setWorkingFolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Nitpick::on_readDeviceButton_clicked() {
|
||||||
|
_testRunnerMobile->readDevice();
|
||||||
|
}
|
||||||
|
|
|
@ -76,8 +76,6 @@ private slots:
|
||||||
void on_setWorkingFolderRunOnDesktopButton_clicked();
|
void on_setWorkingFolderRunOnDesktopButton_clicked();
|
||||||
void on_runNowButton_clicked();
|
void on_runNowButton_clicked();
|
||||||
|
|
||||||
void on_setWorkingFolderRunOnMobileButton_clicked();
|
|
||||||
|
|
||||||
void on_checkBoxRunLatest_clicked();
|
void on_checkBoxRunLatest_clicked();
|
||||||
|
|
||||||
void on_updateTestRailRunResultsButton_clicked();
|
void on_updateTestRailRunResultsButton_clicked();
|
||||||
|
@ -97,6 +95,9 @@ private slots:
|
||||||
void about();
|
void about();
|
||||||
void content();
|
void content();
|
||||||
|
|
||||||
|
void on_setWorkingFolderRunOnMobileButton_clicked();
|
||||||
|
void on_readDeviceButton_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::NitpickClass _ui;
|
Ui::NitpickClass _ui;
|
||||||
Test* _test{ nullptr };
|
Test* _test{ nullptr };
|
||||||
|
|
|
@ -16,8 +16,9 @@
|
||||||
#include "Nitpick.h"
|
#include "Nitpick.h"
|
||||||
extern Nitpick* nitpick;
|
extern Nitpick* nitpick;
|
||||||
|
|
||||||
TestRunnerMobile::TestRunnerMobile(QLabel* workingFolderLabel, QObject* parent) : QObject(parent) {
|
TestRunnerMobile::TestRunnerMobile(QLabel* workingFolderLabel, QPushButton *readDeviceButton, QObject* parent) : QObject(parent) {
|
||||||
_workingFolderLabel = workingFolderLabel;
|
_workingFolderLabel = workingFolderLabel;
|
||||||
|
_readDeviceButton = readDeviceButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
TestRunnerMobile::~TestRunnerMobile() {
|
TestRunnerMobile::~TestRunnerMobile() {
|
||||||
|
@ -31,7 +32,7 @@ void TestRunnerMobile::setWorkingFolder() {
|
||||||
parent += "/";
|
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);
|
QFileDialog::ShowDirsOnly);
|
||||||
|
|
||||||
// If user canceled then restore previous selection and return
|
// If user canceled then restore previous selection and return
|
||||||
|
@ -41,4 +42,9 @@ void TestRunnerMobile::setWorkingFolder() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_workingFolderLabel->setText(QDir::toNativeSeparators(_workingFolder));
|
_workingFolderLabel->setText(QDir::toNativeSeparators(_workingFolder));
|
||||||
}
|
|
||||||
|
_readDeviceButton->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TestRunnerMobile::readDevice() {
|
||||||
|
}
|
||||||
|
|
|
@ -12,17 +12,20 @@
|
||||||
#define hifi_testRunnerMobile_h
|
#define hifi_testRunnerMobile_h
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
class TestRunnerMobile : public QObject {
|
class TestRunnerMobile : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit TestRunnerMobile(QLabel* workingFolderLabel, QObject* parent = 0);
|
explicit TestRunnerMobile(QLabel* workingFolderLabel, QPushButton *readDeviceButton, QObject* parent = 0);
|
||||||
~TestRunnerMobile();
|
~TestRunnerMobile();
|
||||||
|
|
||||||
void setWorkingFolder();
|
void setWorkingFolder();
|
||||||
|
void readDevice();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLabel* _workingFolderLabel;
|
QLabel* _workingFolderLabel;
|
||||||
QString _workingFolder;
|
QString _workingFolder;
|
||||||
|
QPushButton* _readDeviceButton;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_1">
|
<widget class="QWidget" name="tab_1">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -551,7 +551,10 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Run on Device</string>
|
<string>Run on Device</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QPushButton" name="getDeviceButton">
|
<widget class="QPushButton" name="readDeviceButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
|
@ -561,7 +564,7 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Get Device</string>
|
<string>Read Device</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
|
|
Loading…
Reference in a new issue