X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fcoreconnection.cpp;h=a4e24e0243dd95f22e33ef23acbc6eb56079ab1e;hb=e50ae7a06fc4e5d3a911c361d30953410deab609;hp=36503854663d60d1da9bb9d2780afb1211cc0952;hpb=e7657c44a3720231d89998f74f6369243431f878;p=quassel.git diff --git a/src/client/coreconnection.cpp b/src/client/coreconnection.cpp index 36503854..a4e24e02 100644 --- a/src/client/coreconnection.cpp +++ b/src/client/coreconnection.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -57,7 +57,7 @@ void CoreConnection::init() _reconnectTimer.setSingleShot(true); connect(&_reconnectTimer, SIGNAL(timeout()), SLOT(reconnectTimeout())); -#ifdef HAVE_KDE +#ifdef HAVE_KDE4 connect(Solid::Networking::notifier(), SIGNAL(statusChanged(Solid::Networking::Status)), SLOT(solidNetworkStatusChanged(Solid::Networking::Status))); #endif @@ -127,7 +127,7 @@ void CoreConnection::reconnectTimeout() if (!_peer) { CoreConnectionSettings s; if (_wantReconnect && s.autoReconnect()) { -#ifdef HAVE_KDE +#ifdef HAVE_KDE4 // If using Solid, we don't want to reconnect if we're offline if (s.networkDetectionMode() == CoreConnectionSettings::UseSolid) { if (Solid::Networking::status() != Solid::Networking::Connected @@ -135,7 +135,7 @@ void CoreConnection::reconnectTimeout() return; } } -#endif /* HAVE_KDE */ +#endif /* HAVE_KDE4 */ reconnectToCore(); } @@ -169,7 +169,7 @@ void CoreConnection::reconnectIntervalChanged(const QVariant &interval) } -#ifdef HAVE_KDE +#ifdef HAVE_KDE4 void CoreConnection::solidNetworkStatusChanged(Solid::Networking::Status status) { @@ -211,8 +211,10 @@ bool CoreConnection::isLocalConnection() const return false; if (currentAccount().isInternal()) return true; - if (_peer->isLocal()) - return true; + if (_authHandler) + return _authHandler->isLocal(); + if (_peer) + return _peer->isLocal(); return false; }