Commit 5714ae44 authored by Edric Milaret's avatar Edric Milaret Committed by gerrit2
Browse files

connectivity: monitor changes

Reload accounts when network changes

Change-Id: Id5f19a0974ab45c96eadc2a87615d95d0cce4b17
Tuleap: #1011
parent a63f75c4
......@@ -6,7 +6,7 @@
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets svg xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets svg xml network
win32: QT += winextras
......@@ -227,7 +227,8 @@ win32 {
QTRUNTIME.files = $$RUNTIMEDIR/Qt5Core.dll $$RUNTIMEDIR/Qt5Widgets.dll \
$$RUNTIMEDIR/Qt5Gui.dll $$RUNTIMEDIR/Qt5Svg.dll \
$$RUNTIMEDIR/Qt5Xml.dll $$RUNTIMEDIR/Qt5WinExtras.dll
$$RUNTIMEDIR/Qt5Xml.dll $$RUNTIMEDIR/Qt5WinExtras.dll \
$$RUNTIMEDIR/Qt5Network.dll
QTRUNTIME.path = $$OUT_PWD/release
QTDEPSRUNTIME.files = $$RUNTIMEDIR/zlib1.dll \
......
......@@ -120,6 +120,12 @@ MainWindow::MainWindow(QWidget* parent) :
settings.setValue(SettingsKey::enableNotifications, true);
}
connect(&GlobalSystemTray::instance(), SIGNAL(messageClicked()), this, SLOT(notificationClicked()));
connect(&netManager_, &QNetworkConfigurationManager::onlineStateChanged, [=](bool online) {
Q_UNUSED(online)
AccountModel::instance().slotConnectivityChanged();
});
}
MainWindow::~MainWindow()
......
......@@ -22,6 +22,7 @@
#include <QMainWindow>
#include <QMouseEvent>
#include <QNetworkConfigurationManager>
#include "navstack.h"
......@@ -60,4 +61,5 @@ private:
~MainWindow();
Ui::MainWindow* ui;
NavStack* navStack_;
QNetworkConfigurationManager netManager_;
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment