X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorebufferviewmanager.cpp;h=76157552669bdb50da00cf96eae0292eed3f9982;hp=2c63d921a8e87419f2d58e934b0ab0b92936a404;hb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;hpb=695758015a80eb8c158a9ac4c0f1c0b547e70df3 diff --git a/src/core/corebufferviewmanager.cpp b/src/core/corebufferviewmanager.cpp index 2c63d921..76157552 100644 --- a/src/core/corebufferviewmanager.cpp +++ b/src/core/corebufferviewmanager.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,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; } }