X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorebufferviewmanager.cpp;h=76157552669bdb50da00cf96eae0292eed3f9982;hp=58a1dd48a5854e7db2e68baf1b8187ed8dd82db1;hb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce diff --git a/src/core/corebufferviewmanager.cpp b/src/core/corebufferviewmanager.cpp index 58a1dd48..76157552 100644 --- a/src/core/corebufferviewmanager.cpp +++ b/src/core/corebufferviewmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 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 * @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "corebufferviewmanager.h" @@ -25,7 +25,6 @@ #include "core.h" #include "coresession.h" -INIT_SYNCABLE_OBJECT(CoreBufferViewManager) CoreBufferViewManager::CoreBufferViewManager(SignalProxy *proxy, CoreSession *parent) : BufferViewManager(proxy, parent), _coreSession(parent) @@ -33,11 +32,11 @@ CoreBufferViewManager::CoreBufferViewManager(SignalProxy *proxy, CoreSession *pa QVariantMap views = Core::getUserSetting(_coreSession->user(), "BufferViews").toMap(); QVariantMap::iterator iter = views.begin(); QVariantMap::iterator iterEnd = views.end(); - CoreBufferViewConfig *config = 0; + CoreBufferViewConfig *config = nullptr; while (iter != iterEnd) { config = new CoreBufferViewConfig(iter.key().toInt(), iter.value().toMap(), this); addBufferViewConfig(config); - iter++; + ++iter; } } @@ -50,7 +49,7 @@ void CoreBufferViewManager::saveBufferViews() BufferViewConfigHash::const_iterator iterEnd = bufferViewConfigHash().constEnd(); while (iter != iterEnd) { views[QString::number((*iter)->bufferViewId())] = (*iter)->toVariantMap(); - iter++; + ++iter; } Core::setUserSetting(_coreSession->user(), "BufferViews", views); @@ -70,12 +69,11 @@ void CoreBufferViewManager::requestCreateBufferView(const QVariantMap &propertie if ((*iter)->bufferViewId() > maxId) maxId = (*iter)->bufferViewId(); - iter++; + ++iter; } maxId++; - CoreBufferViewConfig *config = new CoreBufferViewConfig(maxId, properties); - addBufferViewConfig(config); + addBufferViewConfig(new CoreBufferViewConfig(maxId, properties, this)); } @@ -85,7 +83,7 @@ void CoreBufferViewManager::requestCreateBufferViews(const QVariantList &propert QVariantList::const_iterator iterEnd = properties.constEnd(); while (iter != iterEnd) { requestCreateBufferView((*iter).toMap()); - iter++; + ++iter; } }