From e2f6853258510c2110c4c1cb6a19a793a7cfe2eb Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Thu, 12 Nov 2020 21:45:30 +0100 Subject: [PATCH] Port away from QNetworkConfigurationmanager --- src/controller.cpp | 15 --------------- src/controller.h | 6 ------ 2 files changed, 21 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index ec3cfbcda..d0a7c0442 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -53,8 +53,6 @@ Controller::Controller(QObject *parent) Connection::setRoomType(); Connection::setUserType(); - connect(&m_ncm, &QNetworkConfigurationManager::onlineStateChanged, this, &Controller::isOnlineChanged); - QTimer::singleShot(0, this, [=] { invokeLogin(); }); @@ -208,14 +206,6 @@ void Controller::addConnection(Connection *c) connect(c, &Connection::loggedOut, this, [=] { dropConnection(c); }); - connect(&m_ncm, &QNetworkConfigurationManager::onlineStateChanged, [=](bool status) { - if (!status) { - return; - } - - c->stopSync(); - c->sync(30000); - }); setBusy(true); @@ -498,11 +488,6 @@ void Controller::setQuitOnLastWindowClosed(bool value) } } -bool Controller::isOnline() const -{ - return m_ncm.isOnline(); -} - bool Controller::busy() const { return m_busy; diff --git a/src/controller.h b/src/controller.h index 23d83dbfe..6efc80bba 100644 --- a/src/controller.h +++ b/src/controller.h @@ -9,7 +9,6 @@ #include #include #include -#include #include #include @@ -29,7 +28,6 @@ class Controller : public QObject Q_PROPERTY(int accountCount READ accountCount NOTIFY connectionAdded NOTIFY connectionDropped) Q_PROPERTY(bool quitOnLastWindowClosed READ quitOnLastWindowClosed WRITE setQuitOnLastWindowClosed NOTIFY quitOnLastWindowClosedChanged) Q_PROPERTY(Connection *activeConnection READ activeConnection WRITE setActiveConnection NOTIFY activeConnectionChanged) - Q_PROPERTY(bool isOnline READ isOnline NOTIFY isOnlineChanged) Q_PROPERTY(bool busy READ busy WRITE setBusy NOTIFY busyChanged) Q_PROPERTY(KAboutData aboutData READ aboutData WRITE setAboutData NOTIFY aboutDataChanged) @@ -51,8 +49,6 @@ public: int accountCount() const; - bool isOnline() const; - bool quitOnLastWindowClosed() const; void setQuitOnLastWindowClosed(bool value); @@ -75,7 +71,6 @@ private: QVector m_connections; QPointer m_connection; - QNetworkConfigurationManager m_ncm; bool m_busy = false; QByteArray loadAccessTokenFromFile(const AccountSettings &account); @@ -102,7 +97,6 @@ Q_SIGNALS: void quitOnLastWindowClosedChanged(); void unreadCountChanged(); void activeConnectionChanged(); - void isOnlineChanged(); void aboutDataChanged(); void passwordStatus(Controller::PasswordStatus status);