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