X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoresession.cpp;h=0c62171845e6b57dc3697e1cbccea8e01fa650f2;hb=3f354bcce2cecfe88a46de90cbf94ffd1bc7c506;hp=ef3b397b8ae6104655a7f215da5622b7c6be0f3d;hpb=371368423788eec9f5756dc4cebb01aeb93d0e7a;p=quassel.git diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index ef3b397b..0c621718 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -28,6 +28,7 @@ #include "corebacklogmanager.h" #include "corebufferviewmanager.h" #include "coreirclisthelper.h" +#include "corenetworkconfig.h" #include "storage.h" #include "coreidentity.h" @@ -53,6 +54,7 @@ CoreSession::CoreSession(UserId uid, bool restoreState, QObject *parent) _backlogManager(new CoreBacklogManager(this)), _bufferViewManager(new CoreBufferViewManager(_signalProxy, this)), _ircListHelper(new CoreIrcListHelper(this)), + _networkConfig(new CoreNetworkConfig("GlobalNetworkConfig", this)), _coreInfo(this), scriptEngine(new QScriptEngine(this)), _processMessages(false) @@ -87,6 +89,7 @@ CoreSession::CoreSession(UserId uid, bool restoreState, QObject *parent) p->synchronize(&aliasManager()); p->synchronize(_backlogManager); p->synchronize(ircListHelper()); + p->synchronize(networkConfig()); p->synchronize(&_coreInfo); // Restore session state @@ -148,6 +151,7 @@ void CoreSession::loadSettings() { void CoreSession::saveSessionState() const { _bufferSyncer->storeDirtyIds(); _bufferViewManager->saveBufferViews(); + _networkConfig->save(); } void CoreSession::restoreSessionState() { @@ -203,7 +207,14 @@ void CoreSession::msgFromClient(BufferInfo bufinfo, QString msg) { // ALL messages coming pass through these functions before going to the GUI. // So this is the perfect place for storing the backlog and log stuff. void CoreSession::recvMessageFromServer(NetworkId networkId, Message::Type type, BufferInfo::Type bufferType, - const QString &target, const QString &text, const QString &sender, Message::Flags flags) { + const QString &target, const QString &text_, const QString &sender, Message::Flags flags) { + + // U+FDD0 and U+FDD1 are special characters for Qt's text engine, specifically they mark the boundaries of + // text frames in a QTextDocument. This might lead to problems in widgets displaying QTextDocuments (such as + // KDE's notifications), hence we remove those just to be safe. + QString text = text_; + text.remove(QChar(0xfdd0)).remove(QChar(0xfdd1)); + _messageQueue << RawMessage(networkId, type, bufferType, target, text, sender, flags); if(!_processMessages) { _processMessages = true;