From a8896de140f1ef9be595cdb0c1ae37e532494bd3 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 30 Dec 2015 09:45:23 -0800 Subject: [PATCH] remove dead code, use stop index --- console/src/main.js | 3 ++- interface/src/main.cpp | 13 +++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/console/src/main.js b/console/src/main.js index 84928768d8..e05b16730c 100644 --- a/console/src/main.js +++ b/console/src/main.js @@ -87,6 +87,7 @@ var homeServer = null; const GO_HOME_INDEX = 0; const SERVER_LABEL_INDEX = 2; const RESTART_INDEX = 3; +const STOP_INDEX = 4; const SETTINGS_INDEX = 5; function buildMenuArray(serverState) { @@ -147,7 +148,7 @@ function updateMenuArray(menuArray, serverState) { menuArray[GO_HOME_INDEX].enabled = running; // Stop is only visible if running - menuArray[RESTART_INDEX + 1].visible = running; + menuArray[STOP_INDEX].visible = running; // Settings is only visible if running menuArray[SETTINGS_INDEX].enabled = running; diff --git a/interface/src/main.cpp b/interface/src/main.cpp index 43a56d87d4..6de32657f1 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -51,9 +51,6 @@ int main(int argc, const char* argv[]) { static const int LOCAL_SERVER_TIMEOUT_MS = 500; - QElapsedTimer waitingTimer; - waitingTimer.start(); - // Try to connect - if we can't connect, interface has probably just gone down if (socket.waitForConnected(LOCAL_SERVER_TIMEOUT_MS)) { @@ -84,9 +81,9 @@ int main(int argc, const char* argv[]) { QElapsedTimer startupTime; startupTime.start(); - - // Debug option to demonstrate that the client's local time does not - // need to be in sync with any other network node. This forces clock + + // Debug option to demonstrate that the client's local time does not + // need to be in sync with any other network node. This forces clock // skew for the individual client const char* CLOCK_SKEW = "--clockSkew"; const char* clockSkewOption = getCmdOption(argc, argv, CLOCK_SKEW); @@ -117,7 +114,7 @@ int main(int argc, const char* argv[]) { QTranslator translator; translator.load("i18n/interface_en"); app.installTranslator(&translator); - + qCDebug(interfaceapp, "Created QT Application."); exitCode = app.exec(); server.close(); @@ -127,4 +124,4 @@ int main(int argc, const char* argv[]) { qCDebug(interfaceapp, "Normal exit."); return exitCode; -} +}