diff options
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r-- | mainwindow.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 2590d4f..55a9769 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp | |||
@@ -8,7 +8,6 @@ MainWindow::MainWindow(QWidget *parent) : | |||
8 | { | 8 | { |
9 | ui->setupUi(this); | 9 | ui->setupUi(this); |
10 | ui->menuBar->setVisible(false); | 10 | ui->menuBar->setVisible(false); |
11 | |||
12 | qDebug() << "Using: " << this->qsettings.fileName(); | 11 | qDebug() << "Using: " << this->qsettings.fileName(); |
13 | 12 | ||
14 | this->qsystemtrayicon = new QSystemTrayIcon(this->windowIcon(), 0); | 13 | this->qsystemtrayicon = new QSystemTrayIcon(this->windowIcon(), 0); |
@@ -17,7 +16,7 @@ MainWindow::MainWindow(QWidget *parent) : | |||
17 | this->qsystemtrayicon->setToolTip(this->windowTitle()); | 16 | this->qsystemtrayicon->setToolTip(this->windowTitle()); |
18 | this->connect(this->qsystemtrayicon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(slotActivated(QSystemTrayIcon::ActivationReason))); | 17 | this->connect(this->qsystemtrayicon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(slotActivated(QSystemTrayIcon::ActivationReason))); |
19 | this->updateStatus(); | 18 | this->updateStatus(); |
20 | this->updateSpaceList(this->qsettings.value("hackerspace").toString()); | 19 | this->updateSpaceList(); |
21 | 20 | ||
22 | 21 | ||
23 | 22 | ||
@@ -33,8 +32,11 @@ MainWindow::~MainWindow() | |||
33 | delete ui; | 32 | delete ui; |
34 | } | 33 | } |
35 | 34 | ||
36 | void MainWindow::updateSpaceList(QString defaultSpace) | 35 | void MainWindow::updateSpaceList() |
37 | { | 36 | { |
37 | qDebug() << "updateSpaceList()"; | ||
38 | QString defaultSpace = this->qsettings.value("hackerspace").toString(); | ||
39 | |||
38 | QUrl url("http://spaceapi.net/directory.json"); | 40 | QUrl url("http://spaceapi.net/directory.json"); |
39 | QJsonObject json = QJsonDocument::fromJson(this->download(url)).object(); | 41 | QJsonObject json = QJsonDocument::fromJson(this->download(url)).object(); |
40 | 42 | ||
@@ -171,3 +173,5 @@ void MainWindow::on_comboBox_currentIndexChanged(const QString &arg1) | |||
171 | this->updateStatus(); | 173 | this->updateStatus(); |
172 | this->saveSettings(); | 174 | this->saveSettings(); |
173 | } | 175 | } |
176 | |||
177 | |||