mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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 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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue