mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 19:03:07 +02:00
cleanup unused functions
This commit is contained in:
parent
0fcbc11419
commit
8797c40d94
3 changed files with 21 additions and 55 deletions
|
@ -1749,28 +1749,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
QString scriptsSwitch = QString("--").append(SCRIPTS_SWITCH);
|
QString scriptsSwitch = QString("--").append(SCRIPTS_SWITCH);
|
||||||
_defaultScriptsLocation = getCmdOption(argc, constArgv, scriptsSwitch.toStdString().c_str());
|
_defaultScriptsLocation = getCmdOption(argc, constArgv, scriptsSwitch.toStdString().c_str());
|
||||||
|
|
||||||
//{
|
|
||||||
// auto scriptEngines = DependencyManager::get<ScriptEngines>().data();
|
|
||||||
// // this will force the model the look at the correct directory (weird order of operations issue)
|
|
||||||
// scriptEngines->reloadLocalFiles();
|
|
||||||
|
|
||||||
// // do this as late as possible so that all required subsystems are initialized
|
|
||||||
// // If we've overridden the default scripts location, just load default scripts
|
|
||||||
// // otherwise, load 'em all
|
|
||||||
|
|
||||||
// // we just want to see if --scripts was set, we've already parsed it and done
|
|
||||||
// // the change in PathUtils. Rather than pass that in the constructor, lets just
|
|
||||||
// // look (this could be debated)
|
|
||||||
// QString scriptsSwitch = QString("--").append(SCRIPTS_SWITCH);
|
|
||||||
// QDir defaultScriptsLocation(getCmdOption(argc, constArgv, scriptsSwitch.toStdString().c_str()));
|
|
||||||
// if (!defaultScriptsLocation.exists()) {
|
|
||||||
// scriptEngines->loadDefaultScripts();
|
|
||||||
// scriptEngines->defaultScriptsLocationOverridden(true);
|
|
||||||
// } else {
|
|
||||||
// scriptEngines->loadScripts();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
// Make sure we don't time out during slow operations at startup
|
// Make sure we don't time out during slow operations at startup
|
||||||
updateHeartbeat();
|
updateHeartbeat();
|
||||||
|
|
||||||
|
@ -2251,29 +2229,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
|
|
||||||
_snapshotSound = DependencyManager::get<SoundCache>()->getSound(PathUtils::resourcesUrl("sounds/snapshot/snap.wav"));
|
_snapshotSound = DependencyManager::get<SoundCache>()->getSound(PathUtils::resourcesUrl("sounds/snapshot/snap.wav"));
|
||||||
|
|
||||||
//QVariant testProperty = property(hifi::properties::TEST);
|
|
||||||
//qDebug() << testProperty;
|
|
||||||
//if (testProperty.isValid()) {
|
|
||||||
// const auto testScript = property(hifi::properties::TEST).toUrl();
|
|
||||||
|
|
||||||
// // Set last parameter to exit interface when the test script finishes, if so requested
|
|
||||||
// DependencyManager::get<ScriptEngines>()->loadScript(testScript, false, false, false, false, quitWhenFinished);
|
|
||||||
|
|
||||||
// // This is done so we don't get a "connection time-out" message when we haven't passed in a URL.
|
|
||||||
// if (arguments().contains("--url")) {
|
|
||||||
// auto reply = SandboxUtils::getStatus();
|
|
||||||
// connect(reply, &QNetworkReply::finished, this, [this, reply] {
|
|
||||||
// handleSandboxStatus(reply);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
//} else {
|
|
||||||
// PROFILE_RANGE(render, "GetSandboxStatus");
|
|
||||||
// auto reply = SandboxUtils::getStatus();
|
|
||||||
// connect(reply, &QNetworkReply::finished, this, [this, reply] {
|
|
||||||
// handleSandboxStatus(reply);
|
|
||||||
// });
|
|
||||||
//}
|
|
||||||
|
|
||||||
// Monitor model assets (e.g., from Clara.io) added to the world that may need resizing.
|
// Monitor model assets (e.g., from Clara.io) added to the world that may need resizing.
|
||||||
static const int ADD_ASSET_TO_WORLD_TIMER_INTERVAL_MS = 1000;
|
static const int ADD_ASSET_TO_WORLD_TIMER_INTERVAL_MS = 1000;
|
||||||
_addAssetToWorldResizeTimer.setInterval(ADD_ASSET_TO_WORLD_TIMER_INTERVAL_MS); // 1s, Qt::CoarseTimer acceptable
|
_addAssetToWorldResizeTimer.setInterval(ADD_ASSET_TO_WORLD_TIMER_INTERVAL_MS); // 1s, Qt::CoarseTimer acceptable
|
||||||
|
@ -5245,6 +5200,8 @@ void Application::resumeAfterLoginDialogActionTaken() {
|
||||||
auto myAvatar = qApp->getMyAvatar();
|
auto myAvatar = qApp->getMyAvatar();
|
||||||
myAvatar->setEnableMeshVisible(true);
|
myAvatar->setEnableMeshVisible(true);
|
||||||
|
|
||||||
|
const auto& nodeList = DependencyManager::get<NodeList>();
|
||||||
|
nodeList->getDomainHandler().setInterstitialModeEnabled(_interstitialModeEnabled);
|
||||||
{
|
{
|
||||||
auto scriptEngines = DependencyManager::get<ScriptEngines>().data();
|
auto scriptEngines = DependencyManager::get<ScriptEngines>().data();
|
||||||
// this will force the model the look at the correct directory (weird order of operations issue)
|
// this will force the model the look at the correct directory (weird order of operations issue)
|
||||||
|
@ -5270,12 +5227,27 @@ void Application::resumeAfterLoginDialogActionTaken() {
|
||||||
if (!accountManager->isLoggedIn()) {
|
if (!accountManager->isLoggedIn()) {
|
||||||
addressManager->goToEntry();
|
addressManager->goToEntry();
|
||||||
} else {
|
} else {
|
||||||
addressManager->loadSettings();
|
QVariant testProperty = property(hifi::properties::TEST);
|
||||||
|
qDebug() << testProperty;
|
||||||
|
if (testProperty.isValid()) {
|
||||||
|
const auto testScript = property(hifi::properties::TEST).toUrl();
|
||||||
|
|
||||||
|
// Set last parameter to exit interface when the test script finishes, if so requested
|
||||||
|
DependencyManager::get<ScriptEngines>()->loadScript(testScript, false, false, false, false, quitWhenFinished);
|
||||||
|
|
||||||
|
// This is done so we don't get a "connection time-out" message when we haven't passed in a URL.
|
||||||
|
if (arguments().contains("--url")) {
|
||||||
|
auto reply = SandboxUtils::getStatus();
|
||||||
|
connect(reply, &QNetworkReply::finished, this, [this, reply] {
|
||||||
|
handleSandboxStatus(reply);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
addressManager->loadSettings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& nodeList = DependencyManager::get<NodeList>();
|
// restart domain handler.
|
||||||
// disconnect domain handler.
|
|
||||||
nodeList->getDomainHandler().setInterstitialModeEnabled(_interstitialModeEnabled);
|
|
||||||
nodeList->getDomainHandler().resetting();
|
nodeList->getDomainHandler().resetting();
|
||||||
|
|
||||||
auto menu = Menu::getInstance();
|
auto menu = Menu::getInstance();
|
||||||
|
|
|
@ -28,7 +28,6 @@ static const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStanda
|
||||||
static const bool HIFI_SCRIPT_DEBUGGABLES { true };
|
static const bool HIFI_SCRIPT_DEBUGGABLES { true };
|
||||||
static const QString SETTINGS_KEY { "RunningScripts" };
|
static const QString SETTINGS_KEY { "RunningScripts" };
|
||||||
static const QUrl DEFAULT_SCRIPTS_LOCATION { "file:///~//defaultScripts.js" };
|
static const QUrl DEFAULT_SCRIPTS_LOCATION { "file:///~//defaultScripts.js" };
|
||||||
static const QUrl CONTROLLER_SCRIPTS_LOCATION { "file:///~//system//controllers//controllerScripts.js" };
|
|
||||||
// Using a QVariantList so this is human-readable in the settings file
|
// Using a QVariantList so this is human-readable in the settings file
|
||||||
static Setting::Handle<QVariantList> runningScriptsHandle(SETTINGS_KEY, { QVariant(DEFAULT_SCRIPTS_LOCATION) });
|
static Setting::Handle<QVariantList> runningScriptsHandle(SETTINGS_KEY, { QVariant(DEFAULT_SCRIPTS_LOCATION) });
|
||||||
|
|
||||||
|
@ -288,10 +287,6 @@ void ScriptEngines::loadDefaultScripts() {
|
||||||
loadScript(DEFAULT_SCRIPTS_LOCATION);
|
loadScript(DEFAULT_SCRIPTS_LOCATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngines::loadControllerScripts() {
|
|
||||||
loadScript(CONTROLLER_SCRIPTS_LOCATION);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScriptEngines::loadOneScript(const QString& scriptFilename) {
|
void ScriptEngines::loadOneScript(const QString& scriptFilename) {
|
||||||
loadScript(scriptFilename);
|
loadScript(scriptFilename);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,6 @@ public:
|
||||||
void setDebugScriptUrl(const QString& url) { _debugScriptUrl = url; };
|
void setDebugScriptUrl(const QString& url) { _debugScriptUrl = url; };
|
||||||
|
|
||||||
void loadDefaultScripts();
|
void loadDefaultScripts();
|
||||||
void loadControllerScripts();
|
|
||||||
void reloadLocalFiles();
|
void reloadLocalFiles();
|
||||||
|
|
||||||
QStringList getRunningScripts();
|
QStringList getRunningScripts();
|
||||||
|
|
Loading…
Reference in a new issue