aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2016-04-19 20:23:14 +0200
committerMax Christian Pohle2016-04-19 20:23:14 +0200
commitcde10b2bfdd4c5c7d4d299dd3237b407590144c5 (patch)
tree27646936dfe1302f3fbf12365f564b9c8dfa368e
parent42e703bf9876432056a556fc0dbc1c3f5ac01976 (diff)
downloadqspacestatus-cde10b2bfdd4c5c7d4d299dd3237b407590144c5.tar.bz2
qspacestatus-cde10b2bfdd4c5c7d4d299dd3237b407590144c5.zip
made spaceapi directory configurableHEADmaster
can be configured using the directory=[URL] value in qspaceapi configuration file (which is currently ~/.config/CoderOnline/ qspacestatus.conf and subject to change). It now defaults to github, rather than the SpaceAPI website, because at the time of writing the directory has been down for some weeks.
-rw-r--r--mainwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 812efeb..37b0f19 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -88,8 +88,11 @@ void MainWindow::updateSpaceList()
88{ 88{
89 qDebug() << "updateSpaceList()"; 89 qDebug() << "updateSpaceList()";
90 QString defaultSpace = this->qsettings.value("hackerspace").toString(); 90 QString defaultSpace = this->qsettings.value("hackerspace").toString();
91 QString defaultDirectoryURL = this->qsettings.value("directory").toString();
92 if(defaultDirectoryURL == "")
93 { defaultDirectoryURL = "https://raw.githubusercontent.com/SpaceApi/OpenSpaceDirectory/master/directory.json" ; }
91 94
92 QUrl url("http://spaceapi.net/directory.json"); 95 QUrl url(defaultDirectoryURL);
93 QJsonObject json = QJsonDocument::fromJson(this->download(url)).object(); 96 QJsonObject json = QJsonDocument::fromJson(this->download(url)).object();
94 97
95 ui->comboBox->setDisabled(true); 98 ui->comboBox->setDisabled(true);
..