Port away from QNetworkConfigurationmanager

This commit is contained in:
Tobias Fella
2020-11-12 21:45:30 +01:00
parent d0022155b5
commit e2f6853258
2 changed files with 0 additions and 21 deletions

View File

@@ -53,8 +53,6 @@ Controller::Controller(QObject *parent)
Connection::setRoomType<NeoChatRoom>();
Connection::setUserType<NeoChatUser>();
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;

View File

@@ -9,7 +9,6 @@
#include <QApplication>
#include <QMediaPlayer>
#include <QMenu>
#include <QNetworkConfigurationManager>
#include <QObject>
#include <QSystemTrayIcon>
@@ -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<Connection *> m_connections;
QPointer<Connection> 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);