mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 06:02:07 +02:00
remove dead code, use stop index
This commit is contained in:
parent
9065a49d05
commit
a8896de140
2 changed files with 7 additions and 9 deletions
|
@ -87,6 +87,7 @@ var homeServer = null;
|
||||||
const GO_HOME_INDEX = 0;
|
const GO_HOME_INDEX = 0;
|
||||||
const SERVER_LABEL_INDEX = 2;
|
const SERVER_LABEL_INDEX = 2;
|
||||||
const RESTART_INDEX = 3;
|
const RESTART_INDEX = 3;
|
||||||
|
const STOP_INDEX = 4;
|
||||||
const SETTINGS_INDEX = 5;
|
const SETTINGS_INDEX = 5;
|
||||||
|
|
||||||
function buildMenuArray(serverState) {
|
function buildMenuArray(serverState) {
|
||||||
|
@ -147,7 +148,7 @@ function updateMenuArray(menuArray, serverState) {
|
||||||
menuArray[GO_HOME_INDEX].enabled = running;
|
menuArray[GO_HOME_INDEX].enabled = running;
|
||||||
|
|
||||||
// Stop is only visible if running
|
// Stop is only visible if running
|
||||||
menuArray[RESTART_INDEX + 1].visible = running;
|
menuArray[STOP_INDEX].visible = running;
|
||||||
|
|
||||||
// Settings is only visible if running
|
// Settings is only visible if running
|
||||||
menuArray[SETTINGS_INDEX].enabled = running;
|
menuArray[SETTINGS_INDEX].enabled = running;
|
||||||
|
|
|
@ -51,9 +51,6 @@ int main(int argc, const char* argv[]) {
|
||||||
|
|
||||||
static const int LOCAL_SERVER_TIMEOUT_MS = 500;
|
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
|
// Try to connect - if we can't connect, interface has probably just gone down
|
||||||
if (socket.waitForConnected(LOCAL_SERVER_TIMEOUT_MS)) {
|
if (socket.waitForConnected(LOCAL_SERVER_TIMEOUT_MS)) {
|
||||||
|
|
||||||
|
@ -84,9 +81,9 @@ int main(int argc, const char* argv[]) {
|
||||||
|
|
||||||
QElapsedTimer startupTime;
|
QElapsedTimer startupTime;
|
||||||
startupTime.start();
|
startupTime.start();
|
||||||
|
|
||||||
// Debug option to demonstrate that the client's local time does not
|
// 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
|
// need to be in sync with any other network node. This forces clock
|
||||||
// skew for the individual client
|
// skew for the individual client
|
||||||
const char* CLOCK_SKEW = "--clockSkew";
|
const char* CLOCK_SKEW = "--clockSkew";
|
||||||
const char* clockSkewOption = getCmdOption(argc, argv, CLOCK_SKEW);
|
const char* clockSkewOption = getCmdOption(argc, argv, CLOCK_SKEW);
|
||||||
|
@ -117,7 +114,7 @@ int main(int argc, const char* argv[]) {
|
||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
translator.load("i18n/interface_en");
|
translator.load("i18n/interface_en");
|
||||||
app.installTranslator(&translator);
|
app.installTranslator(&translator);
|
||||||
|
|
||||||
qCDebug(interfaceapp, "Created QT Application.");
|
qCDebug(interfaceapp, "Created QT Application.");
|
||||||
exitCode = app.exec();
|
exitCode = app.exec();
|
||||||
server.close();
|
server.close();
|
||||||
|
@ -127,4 +124,4 @@ int main(int argc, const char* argv[]) {
|
||||||
|
|
||||||
qCDebug(interfaceapp, "Normal exit.");
|
qCDebug(interfaceapp, "Normal exit.");
|
||||||
return exitCode;
|
return exitCode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue