X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fclientsettings.cpp;h=bade58afeb8e9d032395b862318138d9d0b99b5c;hb=10e6f4629e39c66cfb8db6ab2806bf8f13ec700b;hp=c27e03a3186606113bc567446a4ce3cbf237a0fb;hpb=e50ae7a06fc4e5d3a911c361d30953410deab609;p=quassel.git diff --git a/src/client/clientsettings.cpp b/src/client/clientsettings.cpp index c27e03a3..bade58af 100644 --- a/src/client/clientsettings.cpp +++ b/src/client/clientsettings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -216,7 +216,7 @@ QSet CoreAccountSettings::bufferViewOverlay() { QSet viewIds; QVariantList variants = accountValue("BufferViewOverlay").toList(); - for (QVariantList::const_iterator iter = variants.constBegin(); iter != variants.constEnd(); iter++) { + for (QVariantList::const_iterator iter = variants.constBegin(); iter != variants.constEnd(); ++iter) { viewIds << iter->toInt(); } return viewIds; @@ -249,12 +249,10 @@ void CoreConnectionSettings::setNetworkDetectionMode(NetworkDetectionMode mode) CoreConnectionSettings::NetworkDetectionMode CoreConnectionSettings::networkDetectionMode() { -#ifdef HAVE_KDE4 - NetworkDetectionMode def = UseSolid; -#else - NetworkDetectionMode def = UsePingTimeout; -#endif - return (NetworkDetectionMode)localValue("NetworkDetectionMode", def).toInt(); + auto mode = localValue("NetworkDetectionMode", UseQNetworkConfigurationManager).toInt(); + if (mode == 0) + mode = UseQNetworkConfigurationManager; // UseSolid is gone, map that to the new default + return static_cast(mode); }