mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 19:12:28 +02:00
tabs -> spaces, remove raw ptr, remove unnecessary spec diff
This commit is contained in:
parent
39e1a3fb44
commit
094857949d
7 changed files with 30 additions and 36 deletions
|
@ -589,9 +589,9 @@ Menu::Menu() {
|
|||
#endif
|
||||
|
||||
|
||||
// Developer >> Tests >>>
|
||||
MenuWrapper* testMenu = developerMenu->addMenu("Tests");
|
||||
addActionToQMenuAndActionHash(testMenu, MenuOption::RunClientScriptTests, 0, dialogsManager.data(), SLOT(showTestingResults()));
|
||||
// Developer >> Tests >>>
|
||||
MenuWrapper* testMenu = developerMenu->addMenu("Tests");
|
||||
addActionToQMenuAndActionHash(testMenu, MenuOption::RunClientScriptTests, 0, dialogsManager.data(), SLOT(showTestingResults()));
|
||||
|
||||
// Developer > Timing >>>
|
||||
MenuWrapper* timingMenu = developerMenu->addMenu("Timing");
|
||||
|
|
|
@ -172,7 +172,7 @@ namespace MenuOption {
|
|||
const QString ResetAvatarSize = "Reset Avatar Size";
|
||||
const QString ResetSensors = "Reset Sensors";
|
||||
const QString RunningScripts = "Running Scripts...";
|
||||
const QString RunClientScriptTests = "Run Client Script Tests";
|
||||
const QString RunClientScriptTests = "Run Client Script Tests";
|
||||
const QString RunTimingTests = "Run Timing Tests";
|
||||
const QString ScriptEditor = "Script Editor...";
|
||||
const QString ScriptedMotorControl = "Enable Scripted Motor Control";
|
||||
|
|
|
@ -159,12 +159,12 @@ void DialogsManager::showScriptEditor() {
|
|||
}
|
||||
|
||||
void DialogsManager::showTestingResults() {
|
||||
if (!_testingDialog) {
|
||||
_testingDialog = new TestingDialog(qApp->getWindow());
|
||||
connect(_testingDialog, SIGNAL(closed()), _testingDialog, SLOT(deleteLater()));
|
||||
}
|
||||
_testingDialog->show();
|
||||
_testingDialog->raise();
|
||||
if (!_testingDialog) {
|
||||
_testingDialog = new TestingDialog(qApp->getWindow());
|
||||
connect(_testingDialog, SIGNAL(closed()), _testingDialog, SLOT(deleteLater()));
|
||||
}
|
||||
_testingDialog->show();
|
||||
_testingDialog->raise();
|
||||
}
|
||||
|
||||
void DialogsManager::showDomainConnectionDialog() {
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
QPointer<HMDToolsDialog> getHMDToolsDialog() const { return _hmdToolsDialog; }
|
||||
QPointer<LodToolsDialog> getLodToolsDialog() const { return _lodToolsDialog; }
|
||||
QPointer<OctreeStatsDialog> getOctreeStatsDialog() const { return _octreeStatsDialog; }
|
||||
QPointer<TestingDialog> getTestingDialog() const { return _testingDialog; }
|
||||
QPointer<TestingDialog> getTestingDialog() const { return _testingDialog; }
|
||||
void emitAddressBarShown(bool visible) { emit addressBarShown(visible); }
|
||||
|
||||
public slots:
|
||||
|
@ -58,7 +58,7 @@ public slots:
|
|||
void hmdTools(bool showTools);
|
||||
void showScriptEditor();
|
||||
void showDomainConnectionDialog();
|
||||
void showTestingResults();
|
||||
void showTestingResults();
|
||||
|
||||
// Application Update
|
||||
void showUpdateDialog();
|
||||
|
@ -87,7 +87,7 @@ private:
|
|||
QPointer<LodToolsDialog> _lodToolsDialog;
|
||||
QPointer<OctreeStatsDialog> _octreeStatsDialog;
|
||||
QPointer<ScriptEditorWindow> _scriptEditor;
|
||||
QPointer<TestingDialog> _testingDialog;
|
||||
QPointer<TestingDialog> _testingDialog;
|
||||
QPointer<DomainConnectionDialog> _domainConnectionDialog;
|
||||
};
|
||||
|
||||
|
|
|
@ -15,25 +15,21 @@
|
|||
#include "Application.h"
|
||||
|
||||
TestingDialog::TestingDialog(QWidget* parent) :
|
||||
QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint)
|
||||
QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint),
|
||||
_console(new JSConsole(this))
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
setWindowTitle(windowLabel);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
setWindowTitle(windowLabel);
|
||||
|
||||
_console = new JSConsole(this);
|
||||
_console->setFixedHeight(TESTING_CONSOLE_HEIGHT);
|
||||
_console->setFixedHeight(TESTING_CONSOLE_HEIGHT);
|
||||
|
||||
auto _engines = DependencyManager::get<ScriptEngines>();
|
||||
_engine = _engines->loadScript(qApp->applicationDirPath() + testRunnerRelativePath);
|
||||
_console->setScriptEngine(_engine);
|
||||
connect(_engine, &ScriptEngine::finished, this, &TestingDialog::onTestingFinished);
|
||||
}
|
||||
|
||||
TestingDialog::~TestingDialog() {
|
||||
delete _console;
|
||||
auto _engines = DependencyManager::get<ScriptEngines>();
|
||||
_engine = _engines->loadScript(qApp->applicationDirPath() + testRunnerRelativePath);
|
||||
_console->setScriptEngine(_engine);
|
||||
connect(_engine, &ScriptEngine::finished, this, &TestingDialog::onTestingFinished);
|
||||
}
|
||||
|
||||
void TestingDialog::onTestingFinished(const QString& scriptPath) {
|
||||
_engine = NULL;
|
||||
_console->setScriptEngine(NULL);
|
||||
_engine = nullptr;
|
||||
_console->setScriptEngine(nullptr);
|
||||
}
|
||||
|
|
|
@ -21,16 +21,15 @@ const QString testRunnerRelativePath = "/scripts/developer/tests/unit_tests/test
|
|||
const unsigned int TESTING_CONSOLE_HEIGHT = 400;
|
||||
|
||||
class TestingDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
TestingDialog(QWidget* parent);
|
||||
~TestingDialog();
|
||||
TestingDialog(QWidget* parent);
|
||||
|
||||
void onTestingFinished(const QString& scriptPath);
|
||||
void onTestingFinished(const QString& scriptPath);
|
||||
|
||||
private:
|
||||
JSConsole* _console;
|
||||
ScriptEngine* _engine;
|
||||
std::unique_ptr<JSConsole> _console;
|
||||
ScriptEngine* _engine;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -14,7 +14,6 @@ describe("MyAvatar", function () {
|
|||
|
||||
// wait until we are finished loading
|
||||
var id = Script.setInterval(function () {
|
||||
print(MyAvatar.jointNames.length);
|
||||
if (MyAvatar.jointNames.length == 72) {
|
||||
// assume we are finished loading.
|
||||
Script.clearInterval(id);
|
||||
|
|
Loading…
Reference in a new issue