X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fclientsettings.cpp;h=171d7fe4c8058308d62518e8f0219177b78621c3;hb=3a3e844f9fcfd12235a0086af75ecd503b621ef4;hp=1023efb000a952ac47d367b0e7a11d73a3020e07;hpb=d32f2fcafe3d3925cd64e332e0d02261a134af21;p=quassel.git diff --git a/src/client/clientsettings.cpp b/src/client/clientsettings.cpp index 1023efb0..171d7fe4 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-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -25,6 +25,7 @@ #include #ifdef HAVE_SSL #include +#include #endif #include "client.h" @@ -42,9 +43,9 @@ ClientSettings::~ClientSettings() /***********************************************************************************************/ -CoreAccountSettings::CoreAccountSettings(const QString &subgroup) +CoreAccountSettings::CoreAccountSettings(QString subgroup) : ClientSettings("CoreAccounts"), - _subgroup(subgroup) + _subgroup(std::move(subgroup)) { } @@ -216,7 +217,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 +250,10 @@ void CoreConnectionSettings::setNetworkDetectionMode(NetworkDetectionMode mode) CoreConnectionSettings::NetworkDetectionMode CoreConnectionSettings::networkDetectionMode() { -#ifdef HAVE_KDE4 - NetworkDetectionMode def = UseSolid; -#else - NetworkDetectionMode def = UseQNetworkConfigurationManager; -#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); } @@ -322,7 +321,8 @@ void NotificationSettings::setHighlightNick(NotificationSettings::HighlightNickT NotificationSettings::HighlightNickType NotificationSettings::highlightNick() { - return (NotificationSettings::HighlightNickType)localValue("Highlights/HighlightNick", CurrentNick).toInt(); + return (NotificationSettings::HighlightNickType)localValue("Highlights/HighlightNick", + CurrentNick).toInt(); }