From: Manuel Nickschas Date: Tue, 19 Feb 2013 22:27:25 +0000 (-0800) Subject: Merge pull request #5 from Tucos/feat-keyx X-Git-Tag: 0.9-beta1~18 X-Git-Url: https://git.quassel-irc.org/?a=commitdiff_plain;h=04315f46a16fc3627218377071e008b6b9744992;hp=4f2d0000935e5f040940aca85a44b905bd916147;p=quassel.git Merge pull request #5 from Tucos/feat-keyx Add support for key exchange --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bd917c9..353511d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,9 +30,8 @@ project(QuasselIRC) include(CheckFunctionExists) include(CheckIncludeFile) -# cmake 2.6.2 is required for KDE >=4.2 and should be widespread enough now # For building against Qt5, we check for an even newer cmake version below! -cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.1 FATAL_ERROR) if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) @@ -69,6 +68,7 @@ option(STATIC "Enable static building (might not be portable)" OFF) if(APPLE) option(DEPLOY "Mac OS X only! Adds required libs to bundle resources and create a dmg. Note: requires Qt to be built with 10.4u SDK" OFF) + option(WITH_NOTIFICATION_CENTER "Enable OS X Notification Center support" ON) endif(APPLE) # Default to embedding data in the static case @@ -371,6 +371,15 @@ if(BUILD_GUI) set(INDICATEQT_LIBRARIES "") endif(WITH_LIBINDICATE AND NOT WITH_QT5) + # Setup OS X notification center support + if(WITH_NOTIFICATION_CENTER AND APPLE) + set(HAVE_NOTIFICATION_CENTER true) + add_definitions(-DHAVE_NOTIFICATION_CENTER) + set(CLIENT_LIBRARIES ${CLIENT_LIBRARIES} + /System/Library/Frameworks/Foundation.framework + ) + endif() + endif(BUILD_GUI) # Core-only deps diff --git a/scripts/build/Info.plist b/scripts/build/Info.plist index c0093c62..ccfc721a 100644 --- a/scripts/build/Info.plist +++ b/scripts/build/Info.plist @@ -28,6 +28,8 @@ NSPrincipalClass NSApplication + NSHighResolutionCapable + NSHumanReadableCopyright © 2005-2012, Quassel IRC Team diff --git a/src/client/abstractmessageprocessor.cpp b/src/client/abstractmessageprocessor.cpp index 13a20235..b5fe9544 100644 --- a/src/client/abstractmessageprocessor.cpp +++ b/src/client/abstractmessageprocessor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/abstractmessageprocessor.h b/src/client/abstractmessageprocessor.h index 8d5f5d6f..5a228a2c 100644 --- a/src/client/abstractmessageprocessor.h +++ b/src/client/abstractmessageprocessor.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/abstractui.cpp b/src/client/abstractui.cpp index 95b9ee15..5657d793 100644 --- a/src/client/abstractui.cpp +++ b/src/client/abstractui.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/abstractui.h b/src/client/abstractui.h index 44b0bf32..7730c643 100644 --- a/src/client/abstractui.h +++ b/src/client/abstractui.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/backlogrequester.cpp b/src/client/backlogrequester.cpp index a512d0d2..32bd887e 100644 --- a/src/client/backlogrequester.cpp +++ b/src/client/backlogrequester.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/backlogrequester.h b/src/client/backlogrequester.h index 14ea1e70..991ea8ac 100644 --- a/src/client/backlogrequester.h +++ b/src/client/backlogrequester.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/backlogsettings.h b/src/client/backlogsettings.h index d0c6d306..30335aee 100644 --- a/src/client/backlogsettings.h +++ b/src/client/backlogsettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/buffermodel.cpp b/src/client/buffermodel.cpp index 747325d6..2900403a 100644 --- a/src/client/buffermodel.cpp +++ b/src/client/buffermodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/buffermodel.h b/src/client/buffermodel.h index c1567a06..38a88f6a 100644 --- a/src/client/buffermodel.h +++ b/src/client/buffermodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/buffersettings.cpp b/src/client/buffersettings.cpp index b29e42e2..c940c57d 100644 --- a/src/client/buffersettings.cpp +++ b/src/client/buffersettings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/buffersettings.h b/src/client/buffersettings.h index 572f3e1b..15c690af 100644 --- a/src/client/buffersettings.h +++ b/src/client/buffersettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/bufferviewoverlay.cpp b/src/client/bufferviewoverlay.cpp index 3fca89a9..83560229 100644 --- a/src/client/bufferviewoverlay.cpp +++ b/src/client/bufferviewoverlay.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/bufferviewoverlay.h b/src/client/bufferviewoverlay.h index da61b6e6..6be157a6 100644 --- a/src/client/bufferviewoverlay.h +++ b/src/client/bufferviewoverlay.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/client.cpp b/src/client/client.cpp index 7b94d933..fe49f774 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/client.h b/src/client/client.h index ec87b8a4..460bedee 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientaliasmanager.cpp b/src/client/clientaliasmanager.cpp index 224df423..29daabd9 100644 --- a/src/client/clientaliasmanager.cpp +++ b/src/client/clientaliasmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientaliasmanager.h b/src/client/clientaliasmanager.h index d11c61b8..8fd02611 100644 --- a/src/client/clientaliasmanager.h +++ b/src/client/clientaliasmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientbacklogmanager.cpp b/src/client/clientbacklogmanager.cpp index d3f4b7a6..8cf96c35 100644 --- a/src/client/clientbacklogmanager.cpp +++ b/src/client/clientbacklogmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientbacklogmanager.h b/src/client/clientbacklogmanager.h index f341d770..c526e99b 100644 --- a/src/client/clientbacklogmanager.h +++ b/src/client/clientbacklogmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientbufferviewconfig.cpp b/src/client/clientbufferviewconfig.cpp index 578ad490..474828a0 100644 --- a/src/client/clientbufferviewconfig.cpp +++ b/src/client/clientbufferviewconfig.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientbufferviewconfig.h b/src/client/clientbufferviewconfig.h index 06205efb..857c3077 100644 --- a/src/client/clientbufferviewconfig.h +++ b/src/client/clientbufferviewconfig.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientbufferviewmanager.cpp b/src/client/clientbufferviewmanager.cpp index 98db62c9..7f7cda11 100644 --- a/src/client/clientbufferviewmanager.cpp +++ b/src/client/clientbufferviewmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientbufferviewmanager.h b/src/client/clientbufferviewmanager.h index 63a20a0c..57d26556 100644 --- a/src/client/clientbufferviewmanager.h +++ b/src/client/clientbufferviewmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientcoreinfo.cpp b/src/client/clientcoreinfo.cpp index 1a871d8f..708ab442 100644 --- a/src/client/clientcoreinfo.cpp +++ b/src/client/clientcoreinfo.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientcoreinfo.h b/src/client/clientcoreinfo.h index 75e3a41b..3b72c45f 100644 --- a/src/client/clientcoreinfo.h +++ b/src/client/clientcoreinfo.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientidentity.cpp b/src/client/clientidentity.cpp index 671a5878..eb64a12a 100644 --- a/src/client/clientidentity.cpp +++ b/src/client/clientidentity.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientidentity.h b/src/client/clientidentity.h index 02dcd33c..1543d31c 100644 --- a/src/client/clientidentity.h +++ b/src/client/clientidentity.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientignorelistmanager.cpp b/src/client/clientignorelistmanager.cpp index 85cbabe9..02a4e23f 100644 --- a/src/client/clientignorelistmanager.cpp +++ b/src/client/clientignorelistmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientignorelistmanager.h b/src/client/clientignorelistmanager.h index 5174dfbf..557c57a5 100644 --- a/src/client/clientignorelistmanager.h +++ b/src/client/clientignorelistmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientirclisthelper.cpp b/src/client/clientirclisthelper.cpp index faf25f87..3e7a4bdb 100644 --- a/src/client/clientirclisthelper.cpp +++ b/src/client/clientirclisthelper.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientirclisthelper.h b/src/client/clientirclisthelper.h index 708fa144..54c76ff9 100644 --- a/src/client/clientirclisthelper.h +++ b/src/client/clientirclisthelper.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientsettings.cpp b/src/client/clientsettings.cpp index 4e3fd162..b00f6b2a 100644 --- a/src/client/clientsettings.cpp +++ b/src/client/clientsettings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientsettings.h b/src/client/clientsettings.h index f2434a20..d2c3c4d7 100644 --- a/src/client/clientsettings.h +++ b/src/client/clientsettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientuserinputhandler.cpp b/src/client/clientuserinputhandler.cpp index e4a0f40b..a8c62fc6 100644 --- a/src/client/clientuserinputhandler.cpp +++ b/src/client/clientuserinputhandler.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/clientuserinputhandler.h b/src/client/clientuserinputhandler.h index 40654087..88f456ce 100644 --- a/src/client/clientuserinputhandler.h +++ b/src/client/clientuserinputhandler.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/coreaccount.cpp b/src/client/coreaccount.cpp index 37ee473e..237ae70b 100644 --- a/src/client/coreaccount.cpp +++ b/src/client/coreaccount.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/coreaccount.h b/src/client/coreaccount.h index c33afdf6..6da6734c 100644 --- a/src/client/coreaccount.h +++ b/src/client/coreaccount.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/coreaccountmodel.cpp b/src/client/coreaccountmodel.cpp index 06955740..33733461 100644 --- a/src/client/coreaccountmodel.cpp +++ b/src/client/coreaccountmodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/coreaccountmodel.h b/src/client/coreaccountmodel.h index 2527007e..24aeffda 100644 --- a/src/client/coreaccountmodel.h +++ b/src/client/coreaccountmodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/coreconnection.cpp b/src/client/coreconnection.cpp index eeaa5e2a..fb553fec 100644 --- a/src/client/coreconnection.cpp +++ b/src/client/coreconnection.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -28,14 +28,14 @@ #include "clientsettings.h" #include "coreaccountmodel.h" #include "identity.h" -#include "internalconnection.h" +#include "internalpeer.h" #include "network.h" #include "networkmodel.h" #include "quassel.h" #include "signalproxy.h" #include "util.h" -#include "protocols/legacy/legacyconnection.h" +#include "protocols/legacy/legacypeer.h" CoreConnection::CoreConnection(CoreAccountModel *model, QObject *parent) : QObject(parent), @@ -123,7 +123,7 @@ void CoreConnection::updateProgress(int value, int max) void CoreConnection::reconnectTimeout() { - if (!_connection) { + if (!_peer) { CoreConnectionSettings s; if (_wantReconnect && s.autoReconnect()) { #ifdef HAVE_KDE @@ -201,7 +201,7 @@ void CoreConnection::solidNetworkStatusChanged(Solid::Networking::Status status) bool CoreConnection::isEncrypted() const { - return _connection && _connection->isSecure(); + return _peer && _peer->isSecure(); } @@ -211,7 +211,7 @@ bool CoreConnection::isLocalConnection() const return false; if (currentAccount().isInternal()) return true; - if (_connection->isLocal()) + if (_peer->isLocal()) return true; return false; @@ -331,10 +331,10 @@ void CoreConnection::coreHasData(const QVariant &item) // if the connection is an orphan, the signalProxy adopts it. // -> we don't need to care about it anymore - disconnect(_connection, 0, this, 0); + disconnect(_peer, 0, this, 0); - _connection->setParent(0); - Client::signalProxy()->addPeer(_connection); + _peer->setParent(0); + Client::signalProxy()->addPeer(_peer); sessionStateReceived(msg["SessionState"].toMap()); } @@ -378,15 +378,15 @@ void CoreConnection::resetConnection(bool wantReconnect) _wantReconnect = wantReconnect; - if (_connection) { + if (_peer) { disconnect(_socket, 0, this, 0); - disconnect(_connection, 0, this, 0); - _connection->close(); + disconnect(_peer, 0, this, 0); + _peer->close(); - if (_connection->parent() == this) - _connection->deleteLater(); // if it's not us, it belongs to the sigproxy which will delete it + if (_peer->parent() == this) + _peer->deleteLater(); // if it's not us, it belongs to the sigproxy which will delete it _socket = 0; // socket is owned and will be deleted by RemoteConnection - _connection = 0; + _peer = 0; } else if (_socket) { disconnect(_socket, 0, this, 0); @@ -475,9 +475,9 @@ void CoreConnection::connectToCurrentAccount() } emit startInternalCore(); - InternalConnection *conn = new InternalConnection(); - Client::instance()->signalProxy()->addPeer(conn); // sigproxy will take ownership - emit connectToInternalCore(conn); + InternalPeer *peer = new InternalPeer(); + Client::instance()->signalProxy()->addPeer(peer); // sigproxy will take ownership + emit connectToInternalCore(peer); return; } @@ -525,10 +525,10 @@ void CoreConnection::connectToCurrentAccount() void CoreConnection::coreSocketConnected() { // Create the connection which will handle the incoming data - Q_ASSERT(!_connection); - _connection = new LegacyConnection(_socket, this); - connect(_connection, SIGNAL(dataReceived(QVariant)), SLOT(coreHasData(QVariant))); - connect(_connection, SIGNAL(transferProgress(int,int)), SLOT(updateProgress(int,int))); + Q_ASSERT(!_peer); + _peer = new LegacyPeer(_socket, this); + connect(_peer, SIGNAL(dataReceived(QVariant)), SLOT(coreHasData(QVariant))); + connect(_peer, SIGNAL(transferProgress(int,int)), SLOT(updateProgress(int,int))); // Phase One: Send client info and wait for core info @@ -546,7 +546,7 @@ void CoreConnection::coreSocketConnected() clientInit["UseCompression"] = false; #endif - qobject_cast(_connection)->writeSocketData(clientInit); + qobject_cast(_peer)->writeSocketData(clientInit); } @@ -695,7 +695,7 @@ void CoreConnection::loginToCore(const QString &prevError) clientLogin["MsgType"] = "ClientLogin"; clientLogin["User"] = currentAccount().user(); clientLogin["Password"] = currentAccount().password(); - qobject_cast(_connection)->writeSocketData(clientLogin); + qobject_cast(_peer)->writeSocketData(clientLogin); } @@ -809,5 +809,5 @@ void CoreConnection::doCoreSetup(const QVariant &setupData) QVariantMap setup; setup["MsgType"] = "CoreSetupData"; setup["SetupData"] = setupData; - qobject_cast(_connection)->writeSocketData(setup); + qobject_cast(_peer)->writeSocketData(setup); } diff --git a/src/client/coreconnection.h b/src/client/coreconnection.h index dcc914e9..836d8cc2 100644 --- a/src/client/coreconnection.h +++ b/src/client/coreconnection.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,11 +37,11 @@ #endif #include "coreaccount.h" -#include "remoteconnection.h" +#include "remotepeer.h" #include "types.h" class CoreAccountModel; -class InternalConnection; +class InternalPeer; class Network; class SignalProxy; @@ -107,7 +107,7 @@ signals: void coreSetupFailed(const QString &error); void startInternalCore(); - void connectToInternalCore(InternalConnection *connection); + void connectToInternalCore(InternalPeer *connection); // These signals MUST be handled synchronously! void userAuthenticationRequired(CoreAccount *, bool *valid, const QString &errorMessage = QString()); @@ -176,7 +176,7 @@ private: QVariantMap _coreMsgBuffer; QPointer _socket; - QPointer _connection; + QPointer _peer; ConnectionState _state; QTimer _reconnectTimer; diff --git a/src/client/execwrapper.cpp b/src/client/execwrapper.cpp index fd1e8c1c..5adc4596 100644 --- a/src/client/execwrapper.cpp +++ b/src/client/execwrapper.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/execwrapper.h b/src/client/execwrapper.h index d7aa5c45..91895168 100644 --- a/src/client/execwrapper.h +++ b/src/client/execwrapper.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/irclistmodel.cpp b/src/client/irclistmodel.cpp index b3ca23de..349ff727 100644 --- a/src/client/irclistmodel.cpp +++ b/src/client/irclistmodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/irclistmodel.h b/src/client/irclistmodel.h index 38179be8..9c25bd03 100644 --- a/src/client/irclistmodel.h +++ b/src/client/irclistmodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/messagefilter.cpp b/src/client/messagefilter.cpp index 241ad0f0..a9d8a7d4 100644 --- a/src/client/messagefilter.cpp +++ b/src/client/messagefilter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/messagefilter.h b/src/client/messagefilter.h index 089e0a22..26a3e34e 100644 --- a/src/client/messagefilter.h +++ b/src/client/messagefilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/messagemodel.cpp b/src/client/messagemodel.cpp index c0a633ca..b09a456d 100644 --- a/src/client/messagemodel.cpp +++ b/src/client/messagemodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/messagemodel.h b/src/client/messagemodel.h index 8a3c828e..04e169a5 100644 --- a/src/client/messagemodel.h +++ b/src/client/messagemodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/networkmodel.cpp b/src/client/networkmodel.cpp index 51a6af6f..1a2da5e8 100644 --- a/src/client/networkmodel.cpp +++ b/src/client/networkmodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/networkmodel.h b/src/client/networkmodel.h index 0cd97cdd..f0d4c02a 100644 --- a/src/client/networkmodel.h +++ b/src/client/networkmodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/selectionmodelsynchronizer.cpp b/src/client/selectionmodelsynchronizer.cpp index 5494ed2f..5f22e4a4 100644 --- a/src/client/selectionmodelsynchronizer.cpp +++ b/src/client/selectionmodelsynchronizer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/selectionmodelsynchronizer.h b/src/client/selectionmodelsynchronizer.h index e6f08eb5..c40cc5c5 100644 --- a/src/client/selectionmodelsynchronizer.h +++ b/src/client/selectionmodelsynchronizer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index e481ea8d..05c9e5bc 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/client/treemodel.h b/src/client/treemodel.h index 26775330..574dc6a5 100644 --- a/src/client/treemodel.h +++ b/src/client/treemodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 7bdf1c55..c247eb34 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -17,7 +17,7 @@ set(SOURCES eventmanager.cpp identity.cpp ignorelistmanager.cpp - internalconnection.cpp + internalpeer.cpp ircchannel.cpp ircevent.cpp irclisthelper.cpp @@ -29,13 +29,13 @@ set(SOURCES networkconfig.cpp networkevent.cpp quassel.cpp - remoteconnection.cpp + remotepeer.cpp settings.cpp signalproxy.cpp syncableobject.cpp util.cpp - protocols/legacy/legacyconnection.cpp + protocols/legacy/legacypeer.cpp ) set(MOC_HDRS @@ -49,18 +49,18 @@ set(MOC_HDRS eventmanager.h identity.h ignorelistmanager.h - internalconnection.h + internalpeer.h ircchannel.h irclisthelper.h ircuser.h network.h networkconfig.h - remoteconnection.h + remotepeer.h settings.h signalproxy.h syncableobject.h - protocols/legacy/legacyconnection.h + protocols/legacy/legacypeer.h ) set(HEADERS ${MOC_HDRS} @@ -74,6 +74,7 @@ set(HEADERS ${MOC_HDRS} networkevent.h logger.h message.h + protocol.h types.h util.h) diff --git a/src/common/abstractcliparser.h b/src/common/abstractcliparser.h index c4b6adad..bce6ef48 100644 --- a/src/common/abstractcliparser.h +++ b/src/common/abstractcliparser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/aliasmanager.cpp b/src/common/aliasmanager.cpp index f4f458e2..d4e02a24 100644 --- a/src/common/aliasmanager.cpp +++ b/src/common/aliasmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -102,6 +102,7 @@ AliasManager::AliasList AliasManager::defaults() << Alias("chanserv", "/msg chanserv $0") << Alias("hs", "/msg hostserv $0") << Alias("hostserv", "/msg hostserv $0") + << Alias("wii", "/whois $0 $0") << Alias("back", "/quote away"); #ifdef Q_OS_LINUX diff --git a/src/common/aliasmanager.h b/src/common/aliasmanager.h index 9c17f79b..a5646d85 100644 --- a/src/common/aliasmanager.h +++ b/src/common/aliasmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/backlogmanager.cpp b/src/common/backlogmanager.cpp index 64dab66b..c4527566 100644 --- a/src/common/backlogmanager.cpp +++ b/src/common/backlogmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/backlogmanager.h b/src/common/backlogmanager.h index 6c0dadba..9d11a322 100644 --- a/src/common/backlogmanager.h +++ b/src/common/backlogmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/basichandler.cpp b/src/common/basichandler.cpp index b705d550..341b7294 100644 --- a/src/common/basichandler.cpp +++ b/src/common/basichandler.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/basichandler.h b/src/common/basichandler.h index 827e74a0..663f487b 100644 --- a/src/common/basichandler.h +++ b/src/common/basichandler.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/bufferinfo.cpp b/src/common/bufferinfo.cpp index ae569efa..da013e38 100644 --- a/src/common/bufferinfo.cpp +++ b/src/common/bufferinfo.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/bufferinfo.h b/src/common/bufferinfo.h index 22bf9332..c816a8b2 100644 --- a/src/common/bufferinfo.h +++ b/src/common/bufferinfo.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/buffersyncer.cpp b/src/common/buffersyncer.cpp index b685f088..5fdc34cc 100644 --- a/src/common/buffersyncer.cpp +++ b/src/common/buffersyncer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/buffersyncer.h b/src/common/buffersyncer.h index de0b50e5..99a90846 100644 --- a/src/common/buffersyncer.h +++ b/src/common/buffersyncer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/bufferviewconfig.cpp b/src/common/bufferviewconfig.cpp index 2fff951f..3607d0fc 100644 --- a/src/common/bufferviewconfig.cpp +++ b/src/common/bufferviewconfig.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/bufferviewconfig.h b/src/common/bufferviewconfig.h index 5b506e5c..6d024529 100644 --- a/src/common/bufferviewconfig.h +++ b/src/common/bufferviewconfig.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/bufferviewmanager.cpp b/src/common/bufferviewmanager.cpp index 01529dfc..bae7fe4b 100644 --- a/src/common/bufferviewmanager.cpp +++ b/src/common/bufferviewmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/bufferviewmanager.h b/src/common/bufferviewmanager.h index fcc01201..bf3f95fe 100644 --- a/src/common/bufferviewmanager.h +++ b/src/common/bufferviewmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/cliparser.cpp b/src/common/cliparser.cpp index ffaee234..30d98911 100644 --- a/src/common/cliparser.cpp +++ b/src/common/cliparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/cliparser.h b/src/common/cliparser.h index a0b4fa99..dc8528ab 100644 --- a/src/common/cliparser.h +++ b/src/common/cliparser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/coreinfo.cpp b/src/common/coreinfo.cpp index f32a5a81..2d35f42d 100644 --- a/src/common/coreinfo.cpp +++ b/src/common/coreinfo.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/coreinfo.h b/src/common/coreinfo.h index 506af59c..16df9574 100644 --- a/src/common/coreinfo.h +++ b/src/common/coreinfo.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/ctcpevent.cpp b/src/common/ctcpevent.cpp index 2524ff28..099627b9 100644 --- a/src/common/ctcpevent.cpp +++ b/src/common/ctcpevent.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/ctcpevent.h b/src/common/ctcpevent.h index 91e7bbb6..54e26ecd 100644 --- a/src/common/ctcpevent.h +++ b/src/common/ctcpevent.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/event.cpp b/src/common/event.cpp index 157460e5..4b916e54 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/event.h b/src/common/event.h index 23aaa10b..1abe0fac 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/eventmanager.cpp b/src/common/eventmanager.cpp index ca1a95f8..370f3a3b 100644 --- a/src/common/eventmanager.cpp +++ b/src/common/eventmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/eventmanager.h b/src/common/eventmanager.h index 12411495..edebe617 100644 --- a/src/common/eventmanager.h +++ b/src/common/eventmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/genversion.cpp b/src/common/genversion.cpp index a939e9e3..64a1da68 100644 --- a/src/common/genversion.cpp +++ b/src/common/genversion.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/identity.cpp b/src/common/identity.cpp index b7181106..afdff7dd 100644 --- a/src/common/identity.cpp +++ b/src/common/identity.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/identity.h b/src/common/identity.h index 12e56777..4de98751 100644 --- a/src/common/identity.h +++ b/src/common/identity.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/ignorelistmanager.cpp b/src/common/ignorelistmanager.cpp index 2e9316bc..92052915 100644 --- a/src/common/ignorelistmanager.cpp +++ b/src/common/ignorelistmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/ignorelistmanager.h b/src/common/ignorelistmanager.h index fabded7a..efa007fc 100644 --- a/src/common/ignorelistmanager.h +++ b/src/common/ignorelistmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/internalconnection.cpp b/src/common/internalpeer.cpp similarity index 69% rename from src/common/internalconnection.cpp rename to src/common/internalpeer.cpp index a194a033..15e67ed3 100644 --- a/src/common/internalconnection.cpp +++ b/src/common/internalpeer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -21,20 +21,22 @@ #include #include -#include "internalconnection.h" +#include "internalpeer.h" + +using namespace Protocol; template class PeerMessageEvent : public QEvent { public: - PeerMessageEvent(InternalConnection *sender, InternalConnection::EventType eventType, const T &message) + PeerMessageEvent(InternalPeer *sender, InternalPeer::EventType eventType, const T &message) : QEvent(QEvent::Type(eventType)), sender(sender), message(message) {} - InternalConnection *sender; + InternalPeer *sender; T message; }; -InternalConnection::InternalConnection(QObject *parent) +InternalPeer::InternalPeer(QObject *parent) : SignalProxy::AbstractPeer(parent), _proxy(0), _peer(0), @@ -44,38 +46,38 @@ InternalConnection::InternalConnection(QObject *parent) } -InternalConnection::~InternalConnection() +InternalPeer::~InternalPeer() { if (_isOpen) emit disconnected(); } -QString InternalConnection::description() const +QString InternalPeer::description() const { return tr("internal connection"); } -bool InternalConnection::isOpen() const +bool InternalPeer::isOpen() const { return true; } -bool InternalConnection::isSecure() const +bool InternalPeer::isSecure() const { return true; } -bool InternalConnection::isLocal() const +bool InternalPeer::isLocal() const { return true; } -void InternalConnection::close(const QString &reason) +void InternalPeer::close(const QString &reason) { // FIXME Q_UNUSED(reason) @@ -83,13 +85,13 @@ void InternalConnection::close(const QString &reason) } -int InternalConnection::lag() const +int InternalPeer::lag() const { return 0; } -void InternalConnection::setSignalProxy(SignalProxy *proxy) +void InternalPeer::setSignalProxy(::SignalProxy *proxy) { if (!proxy && _proxy) { _proxy = 0; @@ -109,7 +111,7 @@ void InternalConnection::setSignalProxy(SignalProxy *proxy) } -void InternalConnection::setPeer(InternalConnection *peer) +void InternalPeer::setPeer(InternalPeer *peer) { if (_peer) { qWarning() << Q_FUNC_INFO << "Peer already set, ignoring!"; @@ -120,7 +122,7 @@ void InternalConnection::setPeer(InternalConnection *peer) } -void InternalConnection::peerDisconnected() +void InternalPeer::peerDisconnected() { disconnect(_peer, 0, this, 0); _peer = 0; @@ -131,32 +133,32 @@ void InternalConnection::peerDisconnected() } -void InternalConnection::dispatch(const SignalProxy::SyncMessage &msg) +void InternalPeer::dispatch(const SyncMessage &msg) { dispatch(SyncMessageEvent, msg); } -void InternalConnection::dispatch(const SignalProxy::RpcCall &msg) +void InternalPeer::dispatch(const RpcCall &msg) { dispatch(RpcCallEvent, msg); } -void InternalConnection::dispatch(const SignalProxy::InitRequest &msg) +void InternalPeer::dispatch(const InitRequest &msg) { dispatch(InitRequestEvent, msg); } -void InternalConnection::dispatch(const SignalProxy::InitData &msg) +void InternalPeer::dispatch(const InitData &msg) { dispatch(InitDataEvent, msg); } template -void InternalConnection::dispatch(EventType eventType, const T &msg) +void InternalPeer::dispatch(EventType eventType, const T &msg) { if (!_peer) { qWarning() << Q_FUNC_INFO << "Cannot dispatch a message without a peer!"; @@ -171,7 +173,7 @@ void InternalConnection::dispatch(EventType eventType, const T &msg) template -void InternalConnection::handle(const T &msg) +void InternalPeer::handle(const T &msg) { if (!_proxy) { qWarning() << Q_FUNC_INFO << "Cannot handle a message without having a signal proxy set!"; @@ -182,26 +184,26 @@ void InternalConnection::handle(const T &msg) } -void InternalConnection::customEvent(QEvent *event) +void InternalPeer::customEvent(QEvent *event) { switch ((int)event->type()) { case SyncMessageEvent: { - PeerMessageEvent *e = static_cast *>(event); + PeerMessageEvent *e = static_cast *>(event); handle(e->message); break; } case RpcCallEvent: { - PeerMessageEvent *e = static_cast *>(event); + PeerMessageEvent *e = static_cast *>(event); handle(e->message); break; } case InitRequestEvent: { - PeerMessageEvent *e = static_cast *>(event); + PeerMessageEvent *e = static_cast *>(event); handle(e->message); break; } case InitDataEvent: { - PeerMessageEvent *e = static_cast *>(event); + PeerMessageEvent *e = static_cast *>(event); handle(e->message); break; } diff --git a/src/common/internalconnection.h b/src/common/internalpeer.h similarity index 79% rename from src/common/internalconnection.h rename to src/common/internalpeer.h index 31f3756b..4c82ceb3 100644 --- a/src/common/internalconnection.h +++ b/src/common/internalpeer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,16 +18,17 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef INTERNALCONNECTION_H -#define INTERNALCONNECTION_H +#ifndef INTERNALPEER_H +#define INTERNALPEER_H #include +#include "protocol.h" #include "signalproxy.h" class QEvent; -class InternalConnection : public SignalProxy::AbstractPeer +class InternalPeer : public SignalProxy::AbstractPeer { Q_OBJECT @@ -39,16 +40,16 @@ public: InitDataEvent }; - InternalConnection(QObject *parent = 0); - virtual ~InternalConnection(); + InternalPeer(QObject *parent = 0); + virtual ~InternalPeer(); QString description() const; SignalProxy *signalProxy() const; void setSignalProxy(SignalProxy *proxy); - InternalConnection *peer() const; - void setPeer(InternalConnection *peer); + InternalPeer *peer() const; + void setPeer(InternalPeer *peer); bool isOpen() const; bool isSecure() const; @@ -56,10 +57,10 @@ public: int lag() const; - void dispatch(const SignalProxy::SyncMessage &msg); - void dispatch(const SignalProxy::RpcCall &msg); - void dispatch(const SignalProxy::InitRequest &msg); - void dispatch(const SignalProxy::InitData &msg); + void dispatch(const Protocol::SyncMessage &msg); + void dispatch(const Protocol::RpcCall &msg); + void dispatch(const Protocol::InitRequest &msg); + void dispatch(const Protocol::InitData &msg); public slots: void close(const QString &reason = QString()); @@ -84,7 +85,7 @@ private: private: SignalProxy *_proxy; - InternalConnection *_peer; + InternalPeer *_peer; bool _isOpen; }; diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index 4acc23a7..3fc34610 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/ircchannel.h b/src/common/ircchannel.h index f2a716fd..c0ee0705 100644 --- a/src/common/ircchannel.h +++ b/src/common/ircchannel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/ircevent.cpp b/src/common/ircevent.cpp index 26b8b6a8..c002a97a 100644 --- a/src/common/ircevent.cpp +++ b/src/common/ircevent.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/ircevent.h b/src/common/ircevent.h index b9501365..a9d7880c 100644 --- a/src/common/ircevent.h +++ b/src/common/ircevent.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/irclisthelper.cpp b/src/common/irclisthelper.cpp index 42b0c3f4..ed0e4314 100644 --- a/src/common/irclisthelper.cpp +++ b/src/common/irclisthelper.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/irclisthelper.h b/src/common/irclisthelper.h index 18c71a69..87def608 100644 --- a/src/common/irclisthelper.h +++ b/src/common/irclisthelper.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/ircuser.cpp b/src/common/ircuser.cpp index 4d5f5726..b9f359e1 100644 --- a/src/common/ircuser.cpp +++ b/src/common/ircuser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/ircuser.h b/src/common/ircuser.h index daa59e51..3ff272dd 100644 --- a/src/common/ircuser.h +++ b/src/common/ircuser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/logbacktrace_unix.cpp b/src/common/logbacktrace_unix.cpp index eae97dc1..11e2550e 100644 --- a/src/common/logbacktrace_unix.cpp +++ b/src/common/logbacktrace_unix.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/logbacktrace_win.cpp b/src/common/logbacktrace_win.cpp index 7b795882..7d552c94 100644 --- a/src/common/logbacktrace_win.cpp +++ b/src/common/logbacktrace_win.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/logger.cpp b/src/common/logger.cpp index 97783fb6..8e35dcaf 100644 --- a/src/common/logger.cpp +++ b/src/common/logger.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/logger.h b/src/common/logger.h index 9a561307..ea5b01be 100644 --- a/src/common/logger.h +++ b/src/common/logger.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/mac_utils.cpp b/src/common/mac_utils.cpp index 2ceb7051..49d9a2dd 100644 --- a/src/common/mac_utils.cpp +++ b/src/common/mac_utils.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/mac_utils.h b/src/common/mac_utils.h index 09394da1..90e5f580 100644 --- a/src/common/mac_utils.h +++ b/src/common/mac_utils.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/main.cpp b/src/common/main.cpp index eafb1597..c0ffabff 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/message.cpp b/src/common/message.cpp index b0759141..f4016f5b 100644 --- a/src/common/message.cpp +++ b/src/common/message.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/message.h b/src/common/message.h index 5be33fb6..5125c664 100644 --- a/src/common/message.h +++ b/src/common/message.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/messageevent.cpp b/src/common/messageevent.cpp index b9db573f..0efb85cb 100644 --- a/src/common/messageevent.cpp +++ b/src/common/messageevent.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/messageevent.h b/src/common/messageevent.h index b9bcdc52..b18225b7 100644 --- a/src/common/messageevent.h +++ b/src/common/messageevent.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/network.cpp b/src/common/network.cpp index 4ce07fea..170069a8 100644 --- a/src/common/network.cpp +++ b/src/common/network.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/network.h b/src/common/network.h index b83c6998..5b24fbf3 100644 --- a/src/common/network.h +++ b/src/common/network.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/networkconfig.cpp b/src/common/networkconfig.cpp index 4c60d3a6..066988f8 100644 --- a/src/common/networkconfig.cpp +++ b/src/common/networkconfig.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -29,7 +29,8 @@ NetworkConfig::NetworkConfig(const QString &objectName, QObject *parent) _autoWhoEnabled(true), _autoWhoInterval(90), _autoWhoNickLimit(200), - _autoWhoDelay(5) + _autoWhoDelay(5), + _standardCtcp(false) { } @@ -107,3 +108,14 @@ void NetworkConfig::setAutoWhoDelay(int delay) SYNC(ARG(delay)) emit autoWhoDelaySet(delay); } + + +void NetworkConfig::setStandardCtcp(bool enabled) +{ + if (_standardCtcp == enabled) + return; + + _standardCtcp = enabled; + SYNC(ARG(enabled)) + emit standardCtcpSet(enabled); +} diff --git a/src/common/networkconfig.h b/src/common/networkconfig.h index 4c6adba9..ae121aa5 100644 --- a/src/common/networkconfig.h +++ b/src/common/networkconfig.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -35,6 +35,7 @@ class NetworkConfig : public SyncableObject Q_PROPERTY(int autoWhoInterval READ autoWhoInterval WRITE setAutoWhoInterval) Q_PROPERTY(int autoWhoNickLimit READ autoWhoNickLimit WRITE setAutoWhoNickLimit) Q_PROPERTY(int autoWhoDelay READ autoWhoDelay WRITE setAutoWhoDelay) + Q_PROPERTY(bool standardCtcp READ standardCtcp WRITE setStandardCtcp) public : NetworkConfig(const QString &objectName = "GlobalNetworkConfig", QObject *parent = 0); @@ -70,6 +71,10 @@ public slots: void setAutoWhoDelay(int); virtual inline void requestSetAutoWhoDelay(int i) { REQUEST(ARG(i)) } + inline bool standardCtcp() const { return _standardCtcp; } + void setStandardCtcp(bool); + virtual inline void requestSetStandardCtcp(bool b) { REQUEST(ARG(b)) } + signals: void pingTimeoutEnabledSet(bool); void pingIntervalSet(int); @@ -78,6 +83,7 @@ signals: void autoWhoIntervalSet(int); // void autoWhoNickLimitSet(int); void autoWhoDelaySet(int); + void standardCtcpSet(bool); // void setPingTimeoutEnabledRequested(bool); // void setPingIntervalRequested(int); @@ -96,6 +102,8 @@ private: int _autoWhoInterval; int _autoWhoNickLimit; int _autoWhoDelay; + + bool _standardCtcp; }; diff --git a/src/common/networkevent.cpp b/src/common/networkevent.cpp index 80b15321..ec8947b0 100644 --- a/src/common/networkevent.cpp +++ b/src/common/networkevent.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/networkevent.h b/src/common/networkevent.h index b55a9251..3bad605a 100644 --- a/src/common/networkevent.h +++ b/src/common/networkevent.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/protocol.h b/src/common/protocol.h new file mode 100644 index 00000000..af98b8b7 --- /dev/null +++ b/src/common/protocol.h @@ -0,0 +1,128 @@ +/*************************************************************************** + * Copyright (C) 2005-2013 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * 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., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef PROTOCOL_H_ +#define PROTOCOL_H_ + +#include +#include +#include + +namespace Protocol { + +/*** handled by SignalProxy ***/ + +class SyncMessage +{ +public: + inline SyncMessage(const QByteArray &className, const QString &objectName, const QByteArray &slotName, const QVariantList ¶ms) + : _className(className), _objectName(objectName), _slotName(slotName), _params(params) {} + + inline QByteArray className() const { return _className; } + inline QString objectName() const { return _objectName; } + inline QByteArray slotName() const { return _slotName; } + + inline QVariantList params() const { return _params; } + +private: + QByteArray _className; + QString _objectName; + QByteArray _slotName; + QVariantList _params; +}; + + +class RpcCall +{ +public: + inline RpcCall(const QByteArray &slotName, const QVariantList ¶ms) + : _slotName(slotName), _params(params) {} + + inline QByteArray slotName() const { return _slotName; } + inline QVariantList params() const { return _params; } + +private: + QByteArray _slotName; + QVariantList _params; +}; + + +class InitRequest +{ +public: + inline InitRequest(const QByteArray &className, const QString &objectName) + : _className(className), _objectName(objectName) {} + + inline QByteArray className() const { return _className; } + inline QString objectName() const { return _objectName; } + +private: + QByteArray _className; + QString _objectName; +}; + + +class InitData +{ +public: + inline InitData(const QByteArray &className, const QString &objectName, const QVariantMap &initData) + : _className(className), _objectName(objectName), _initData(initData) {} + + inline QByteArray className() const { return _className; } + inline QString objectName() const { return _objectName; } + + inline QVariantMap initData() const { return _initData; } + +private: + QByteArray _className; + QString _objectName; + QVariantMap _initData; +}; + + +/*** handled by RemoteConnection ***/ + +class HeartBeat +{ +public: + inline HeartBeat(const QDateTime ×tamp) : _timestamp(timestamp) {} + + inline QDateTime timestamp() const { return _timestamp; } + +private: + QDateTime _timestamp; +}; + + +class HeartBeatReply +{ +public: + inline HeartBeatReply(const QDateTime ×tamp) : _timestamp(timestamp) {} + + inline QDateTime timestamp() const { return _timestamp; } + +private: + QDateTime _timestamp; +}; + + +}; + +#endif diff --git a/src/common/protocols/legacy/legacyconnection.cpp b/src/common/protocols/legacy/legacypeer.cpp similarity index 84% rename from src/common/protocols/legacy/legacyconnection.cpp rename to src/common/protocols/legacy/legacypeer.cpp index ec6b26a4..709291f5 100644 --- a/src/common/protocols/legacy/legacyconnection.cpp +++ b/src/common/protocols/legacy/legacypeer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,10 +18,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "legacyconnection.h" +#include "legacypeer.h" -LegacyConnection::LegacyConnection(QTcpSocket *socket, QObject *parent) - : RemoteConnection(socket, parent), +using namespace Protocol; + +LegacyPeer::LegacyPeer(QTcpSocket *socket, QObject *parent) + : RemotePeer(socket, parent), _blockSize(0), _useCompression(false) { @@ -32,9 +34,9 @@ LegacyConnection::LegacyConnection(QTcpSocket *socket, QObject *parent) } -void LegacyConnection::setSignalProxy(SignalProxy *proxy) +void LegacyPeer::setSignalProxy(::SignalProxy *proxy) { - RemoteConnection::setSignalProxy(proxy); + RemotePeer::setSignalProxy(proxy); if (proxy) { // enable compression now if requested - the initial handshake is uncompressed in the legacy protocol! @@ -44,7 +46,7 @@ void LegacyConnection::setSignalProxy(SignalProxy *proxy) } -void LegacyConnection::socketDataAvailable() +void LegacyPeer::socketDataAvailable() { QVariant item; while (readSocketData(item)) { @@ -57,7 +59,7 @@ void LegacyConnection::socketDataAvailable() } -bool LegacyConnection::readSocketData(QVariant &item) +bool LegacyPeer::readSocketData(QVariant &item) { if (_blockSize == 0) { if (socket()->bytesAvailable() < 4) @@ -116,7 +118,7 @@ bool LegacyConnection::readSocketData(QVariant &item) } -void LegacyConnection::writeSocketData(const QVariant &item) +void LegacyPeer::writeSocketData(const QVariant &item) { if (!socket()->isOpen()) { qWarning() << Q_FUNC_INFO << "Can't write to a closed socket!"; @@ -145,7 +147,7 @@ void LegacyConnection::writeSocketData(const QVariant &item) } -void LegacyConnection::handlePackedFunc(const QVariant &packedFunc) +void LegacyPeer::handlePackedFunc(const QVariant &packedFunc) { QVariantList params(packedFunc.toList()); @@ -164,7 +166,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc) QByteArray className = params.takeFirst().toByteArray(); QString objectName = params.takeFirst().toString(); QByteArray slotName = params.takeFirst().toByteArray(); - handle(SignalProxy::SyncMessage(className, objectName, slotName, params)); + handle(Protocol::SyncMessage(className, objectName, slotName, params)); break; } case RpcCall: { @@ -173,7 +175,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc) return; } QByteArray slotName = params.takeFirst().toByteArray(); - handle(SignalProxy::RpcCall(slotName, params)); + handle(Protocol::RpcCall(slotName, params)); break; } case InitRequest: { @@ -183,7 +185,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc) } QByteArray className = params[0].toByteArray(); QString objectName = params[1].toString(); - handle(SignalProxy::InitRequest(className, objectName)); + handle(Protocol::InitRequest(className, objectName)); break; } case InitData: { @@ -194,7 +196,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc) QByteArray className = params[0].toByteArray(); QString objectName = params[1].toString(); QVariantMap initData = params[2].toMap(); - handle(SignalProxy::InitData(className, objectName, initData)); + handle(Protocol::InitData(className, objectName, initData)); break; } case HeartBeat: { @@ -206,7 +208,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc) // so we assume it's sent today, which works in exactly the same cases as it did in the old implementation QDateTime dateTime = QDateTime::currentDateTimeUtc(); dateTime.setTime(params[0].toTime()); - handle(RemoteConnection::HeartBeat(dateTime)); + handle(Protocol::HeartBeat(dateTime)); break; } case HeartBeatReply: { @@ -218,7 +220,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc) // so we assume it's sent today, which works in exactly the same cases as it did in the old implementation QDateTime dateTime = QDateTime::currentDateTimeUtc(); dateTime.setTime(params[0].toTime()); - handle(RemoteConnection::HeartBeatReply(dateTime)); + handle(Protocol::HeartBeatReply(dateTime)); break; } @@ -226,43 +228,43 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc) } -void LegacyConnection::dispatch(const SignalProxy::SyncMessage &msg) +void LegacyPeer::dispatch(const Protocol::SyncMessage &msg) { dispatchPackedFunc(QVariantList() << (qint16)Sync << msg.className() << msg.objectName() << msg.slotName() << msg.params()); } -void LegacyConnection::dispatch(const SignalProxy::RpcCall &msg) +void LegacyPeer::dispatch(const Protocol::RpcCall &msg) { dispatchPackedFunc(QVariantList() << (qint16)RpcCall << msg.slotName() << msg.params()); } -void LegacyConnection::dispatch(const SignalProxy::InitRequest &msg) +void LegacyPeer::dispatch(const Protocol::InitRequest &msg) { dispatchPackedFunc(QVariantList() << (qint16)InitRequest << msg.className() << msg.objectName()); } -void LegacyConnection::dispatch(const SignalProxy::InitData &msg) +void LegacyPeer::dispatch(const Protocol::InitData &msg) { dispatchPackedFunc(QVariantList() << (qint16)InitData << msg.className() << msg.objectName() << msg.initData()); } -void LegacyConnection::dispatch(const RemoteConnection::HeartBeat &msg) +void LegacyPeer::dispatch(const Protocol::HeartBeat &msg) { dispatchPackedFunc(QVariantList() << (qint16)HeartBeat << msg.timestamp().time()); } -void LegacyConnection::dispatch(const RemoteConnection::HeartBeatReply &msg) +void LegacyPeer::dispatch(const Protocol::HeartBeatReply &msg) { dispatchPackedFunc(QVariantList() << (qint16)HeartBeatReply << msg.timestamp().time()); } -void LegacyConnection::dispatchPackedFunc(const QVariantList &packedFunc) +void LegacyPeer::dispatchPackedFunc(const QVariantList &packedFunc) { writeSocketData(QVariant(packedFunc)); } diff --git a/src/common/protocols/legacy/legacyconnection.h b/src/common/protocols/legacy/legacypeer.h similarity index 76% rename from src/common/protocols/legacy/legacyconnection.h rename to src/common/protocols/legacy/legacypeer.h index c05ce513..a3aa178b 100644 --- a/src/common/protocols/legacy/legacyconnection.h +++ b/src/common/protocols/legacy/legacypeer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,16 +18,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef LEGACYCONNECTION_H -#define LEGACYCONNECTION_H +#ifndef LEGACYPEER_H +#define LEGACYPEER_H #include -#include "../../remoteconnection.h" +#include "../../remotepeer.h" class QDataStream; -class LegacyConnection : public RemoteConnection +class LegacyPeer : public RemotePeer { Q_OBJECT @@ -41,18 +41,18 @@ public: HeartBeatReply }; - LegacyConnection(QTcpSocket *socket, QObject *parent = 0); - ~LegacyConnection() {} + LegacyPeer(QTcpSocket *socket, QObject *parent = 0); + ~LegacyPeer() {} void setSignalProxy(SignalProxy *proxy); - void dispatch(const SignalProxy::SyncMessage &msg); - void dispatch(const SignalProxy::RpcCall &msg); - void dispatch(const SignalProxy::InitRequest &msg); - void dispatch(const SignalProxy::InitData &msg); + void dispatch(const Protocol::SyncMessage &msg); + void dispatch(const Protocol::RpcCall &msg); + void dispatch(const Protocol::InitRequest &msg); + void dispatch(const Protocol::InitData &msg); - void dispatch(const RemoteConnection::HeartBeat &msg); - void dispatch(const RemoteConnection::HeartBeatReply &msg); + void dispatch(const Protocol::HeartBeat &msg); + void dispatch(const Protocol::HeartBeatReply &msg); // FIXME: this is only used for the auth phase and should be replaced by something more generic void writeSocketData(const QVariant &item); diff --git a/src/common/quassel.cpp b/src/common/quassel.cpp index 89470d59..c60f5ec1 100644 --- a/src/common/quassel.cpp +++ b/src/common/quassel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,6 +40,7 @@ #include "bufferinfo.h" #include "types.h" #include "syncableobject.h" +#include "logger.h" Quassel::BuildInfo Quassel::_buildInfo; AbstractCliParser *Quassel::_cliParser = 0; @@ -494,10 +495,32 @@ void Quassel::loadTranslation(const QLocale &locale) quasselTranslator->setObjectName("QuasselTr"); qApp->installTranslator(quasselTranslator); - QLocale::setDefault(locale); +#if QT_VERSION >= 0x040800 + bool success = qtTranslator->load(locale, QString("qt_%1"), translationDirPath()); + if (!success) + qtTranslator->load(locale, QString("qt_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + quasselTranslator->load(locale, QString(""), translationDirPath()); +#else + QString localeName = locale.name(); + + // if the user did not specify a language in the settings, the system locale + // is used, but Qt < 4.8 does not respect language settings. This bit is + // based on QLocale::uiLanguages() as in Qt 4.8.3 + if (locale == QLocale::system()) { + // FIXME: does it make sense to set the locale to the system locale? + QLocale::setDefault(locale); + QVariant res = QSystemLocale().query(QSystemLocale::UILanguages, QVariant()); + if (!res.isNull()) { + QString newName = res.toStringList()[0]; + if (!newName.isEmpty()) { + localeName = newName.replace('-', "_"); // silly Qt. + } + } + } - bool success = qtTranslator->load(QString("qt_%1").arg(locale.name()), translationDirPath()); + bool success = qtTranslator->load(QString("qt_%1").arg(localeName), translationDirPath()); if (!success) - qtTranslator->load(QString("qt_%1").arg(locale.name()), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); - quasselTranslator->load(QString("%1").arg(locale.name()), translationDirPath()); + qtTranslator->load(QString("qt_%1").arg(localeName), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + quasselTranslator->load(QString("%1").arg(localeName), translationDirPath()); +#endif } diff --git a/src/common/quassel.h b/src/common/quassel.h index e070bae1..6089ac03 100644 --- a/src/common/quassel.h +++ b/src/common/quassel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -71,8 +71,9 @@ public: enum Feature { SynchronizedMarkerLine = 0x0001, SaslAuthentication = 0x0002, + SaslExternal = 0x0004, - NumFeatures = 0x0002 + NumFeatures = 0x0004 }; Q_DECLARE_FLAGS(Features, Feature); diff --git a/src/common/remoteconnection.cpp b/src/common/remotepeer.cpp similarity index 82% rename from src/common/remoteconnection.cpp rename to src/common/remotepeer.cpp index 4b73768f..e33f56a9 100644 --- a/src/common/remoteconnection.cpp +++ b/src/common/remotepeer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -25,9 +25,11 @@ # include #endif -#include "remoteconnection.h" +#include "remotepeer.h" -RemoteConnection::RemoteConnection(QTcpSocket *socket, QObject *parent) +using namespace Protocol; + +RemotePeer::RemotePeer(QTcpSocket *socket, QObject *parent) : SignalProxy::AbstractPeer(parent), _socket(socket), _signalProxy(0), @@ -49,7 +51,7 @@ RemoteConnection::RemoteConnection(QTcpSocket *socket, QObject *parent) } -QString RemoteConnection::description() const +QString RemotePeer::description() const { if (socket()) return socket()->peerAddress().toString(); @@ -58,13 +60,13 @@ QString RemoteConnection::description() const } -SignalProxy *RemoteConnection::signalProxy() const +::SignalProxy *RemotePeer::signalProxy() const { return _signalProxy; } -void RemoteConnection::setSignalProxy(SignalProxy *proxy) +void RemotePeer::setSignalProxy(::SignalProxy *proxy) { if (proxy == _signalProxy) return; @@ -89,7 +91,7 @@ void RemoteConnection::setSignalProxy(SignalProxy *proxy) } -void RemoteConnection::changeHeartBeatInterval(int secs) +void RemotePeer::changeHeartBeatInterval(int secs) { if(secs <= 0) _heartBeatTimer->stop(); @@ -100,19 +102,19 @@ void RemoteConnection::changeHeartBeatInterval(int secs) } -int RemoteConnection::lag() const +int RemotePeer::lag() const { return _lag; } -QTcpSocket *RemoteConnection::socket() const +QTcpSocket *RemotePeer::socket() const { return _socket; } -bool RemoteConnection::isSecure() const +bool RemotePeer::isSecure() const { if (socket()) { if (isLocal()) @@ -127,7 +129,7 @@ bool RemoteConnection::isSecure() const } -bool RemoteConnection::isLocal() const +bool RemotePeer::isLocal() const { if (socket()) { if (socket()->peerAddress() == QHostAddress::LocalHost || socket()->peerAddress() == QHostAddress::LocalHostIPv6) @@ -137,13 +139,13 @@ bool RemoteConnection::isLocal() const } -bool RemoteConnection::isOpen() const +bool RemotePeer::isOpen() const { return socket() && socket()->state() == QTcpSocket::ConnectedState; } -void RemoteConnection::close(const QString &reason) +void RemotePeer::close(const QString &reason) { if (!reason.isEmpty()) { qWarning() << "Disconnecting:" << reason; @@ -155,20 +157,24 @@ void RemoteConnection::close(const QString &reason) } -void RemoteConnection::handle(const HeartBeat &heartBeat) +void RemotePeer::handle(const HeartBeat &heartBeat) { dispatch(HeartBeatReply(heartBeat.timestamp())); } -void RemoteConnection::handle(const HeartBeatReply &heartBeatReply) +void RemotePeer::handle(const HeartBeatReply &heartBeatReply) { _heartBeatCount = 0; - emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTimeUtc())); +#if QT_VERSION < 0x040700 + emit lagUpdated(heartBeatReply.timestamp().time().msecsTo(QTime::currentTime()) / 2); +#else + emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTime()) / 2); +#endif } -void RemoteConnection::sendHeartBeat() +void RemotePeer::sendHeartBeat() { if (signalProxy()->maxHeartBeatCount() > 0 && _heartBeatCount >= signalProxy()->maxHeartBeatCount()) { qWarning() << "Disconnecting peer:" << description() @@ -183,7 +189,7 @@ void RemoteConnection::sendHeartBeat() emit lagUpdated(_lag); } - dispatch(HeartBeat(QDateTime::currentDateTimeUtc())); + dispatch(HeartBeat(QDateTime::currentDateTime())); ++_heartBeatCount; } diff --git a/src/common/remoteconnection.h b/src/common/remotepeer.h similarity index 72% rename from src/common/remoteconnection.h rename to src/common/remotepeer.h index 198627a0..e41a6a3b 100644 --- a/src/common/remoteconnection.h +++ b/src/common/remotepeer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,23 +18,24 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef REMOTECONNECTION_H -#define REMOTECONNECTION_H +#ifndef REMOTEPEER_H +#define REMOTEPEER_H #include #include +#include "protocol.h" #include "signalproxy.h" class QTimer; -class RemoteConnection : public SignalProxy::AbstractPeer +class RemotePeer : public SignalProxy::AbstractPeer { Q_OBJECT public: - RemoteConnection(QTcpSocket *socket, QObject *parent = 0); - virtual ~RemoteConnection() {}; + RemotePeer(QTcpSocket *socket, QObject *parent = 0); + virtual ~RemotePeer() {}; void setSignalProxy(SignalProxy *proxy); @@ -67,19 +68,16 @@ signals: void transferProgress(int current, int max); protected: - class HeartBeat; - class HeartBeatReply; - SignalProxy *signalProxy() const; template void handle(const T &protoMessage); - void handle(const HeartBeat &heartBeat); - void handle(const HeartBeatReply &heartBeatReply); - - virtual void dispatch(const HeartBeat &msg) = 0; - virtual void dispatch(const HeartBeatReply &msg) = 0; + // These protocol messages get handled internally and won't reach SignalProxy + void handle(const Protocol::HeartBeat &heartBeat); + void handle(const Protocol::HeartBeatReply &heartBeatReply); + virtual void dispatch(const Protocol::HeartBeat &msg) = 0; + virtual void dispatch(const Protocol::HeartBeatReply &msg) = 0; private slots: void sendHeartBeat(); @@ -93,36 +91,9 @@ private: int _lag; }; - -// These protocol messages get handled internally and won't reach SignalProxy - -class RemoteConnection::HeartBeat -{ -public: - inline HeartBeat(const QDateTime ×tamp) : _timestamp(timestamp) {} - - inline QDateTime timestamp() const { return _timestamp; } - -private: - QDateTime _timestamp; -}; - - -class RemoteConnection::HeartBeatReply -{ -public: - inline HeartBeatReply(const QDateTime ×tamp) : _timestamp(timestamp) {} - - inline QDateTime timestamp() const { return _timestamp; } - -private: - QDateTime _timestamp; -}; - - // Template methods we need in the header template inline -void RemoteConnection::handle(const T &protoMessage) +void RemotePeer::handle(const T &protoMessage) { if (!signalProxy()) { qWarning() << Q_FUNC_INFO << "Cannot handle messages without a SignalProxy!"; diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 7656a580..334d1972 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/settings.h b/src/common/settings.h index b98a2c11..8df2d525 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/signalproxy.cpp b/src/common/signalproxy.cpp index fca6d0da..f05a509f 100644 --- a/src/common/signalproxy.cpp +++ b/src/common/signalproxy.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,9 +40,12 @@ #include #include +#include "protocol.h" #include "syncableobject.h" #include "util.h" +using namespace Protocol; + class RemovePeerEvent : public QEvent { public: @@ -153,7 +156,7 @@ int SignalProxy::SignalRelay::qt_metacall(QMetaObject::Call _c, int _id, void ** params << QVariant(argTypes[i], _a[i+1]); } - proxy()->dispatch(SignalProxy::RpcCall(signal.signature, params)); + proxy()->dispatch(RpcCall(signal.signature, params)); } _id -= _slots.count(); } @@ -508,7 +511,7 @@ void SignalProxy::dispatch(const T &protoMessage) } -void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::SyncMessage &syncMessage) +void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SyncMessage &syncMessage) { if (!_syncSlave.contains(syncMessage.className()) || !_syncSlave[syncMessage.className()].contains(syncMessage.objectName())) { qWarning() << QString("no registered receiver for sync call: %1::%2 (objectName=\"%3\"). Params are:").arg(syncMessage.className(), syncMessage.slotName(), syncMessage.objectName()) @@ -550,7 +553,7 @@ void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::Syn } -void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::InitRequest &initRequest) +void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const InitRequest &initRequest) { if (!_syncSlave.contains(initRequest.className())) { qWarning() << "SignalProxy::handleInitRequest() received initRequest for unregistered Class:" @@ -569,7 +572,7 @@ void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::Ini } -void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::InitData &initData) +void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const InitData &initData) { Q_UNUSED(peer) @@ -590,7 +593,7 @@ void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::Ini } -void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::RpcCall &rpcCall) +void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const RpcCall &rpcCall) { Q_UNUSED(peer) diff --git a/src/common/signalproxy.h b/src/common/signalproxy.h index 645157ef..d446fefc 100644 --- a/src/common/signalproxy.h +++ b/src/common/signalproxy.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -33,9 +33,12 @@ #include #include +#include "protocol.h" + class SyncableObject; struct QMetaObject; + class SignalProxy : public QObject { Q_OBJECT @@ -45,11 +48,6 @@ class SignalProxy : public QObject public: class AbstractPeer; - class SyncMessage; - class RpcCall; - class InitRequest; - class InitData; - enum ProxyMode { Server, Client @@ -131,10 +129,10 @@ private: template void dispatch(const T &protoMessage); - void handle(AbstractPeer *peer, const SyncMessage &syncMessage); - void handle(AbstractPeer *peer, const RpcCall &rpcCall); - void handle(AbstractPeer *peer, const InitRequest &initRequest); - void handle(AbstractPeer *peer, const InitData &initData); + void handle(AbstractPeer *peer, const Protocol::SyncMessage &syncMessage); + void handle(AbstractPeer *peer, const Protocol::RpcCall &rpcCall); + void handle(AbstractPeer *peer, const Protocol::InitRequest &initRequest); + void handle(AbstractPeer *peer, const Protocol::InitData &initData); bool invokeSlot(QObject *receiver, int methodId, const QVariantList ¶ms, QVariant &returnValue); bool invokeSlot(QObject *receiver, int methodId, const QVariantList ¶ms = QVariantList()); @@ -170,8 +168,8 @@ private: friend class SignalRelay; friend class SyncableObject; - friend class InternalConnection; - friend class RemoteConnection; + friend class InternalPeer; + friend class RemotePeer; }; @@ -182,7 +180,7 @@ class SignalProxy::ExtendedMetaObject { class MethodDescriptor { -public: + public: MethodDescriptor(const QMetaMethod &method); MethodDescriptor() : _returnType(-1), _minArgCount(-1), _receiverMode(SignalProxy::Client) {} @@ -192,7 +190,7 @@ public: inline int minArgCount() const { return _minArgCount; } inline SignalProxy::ProxyMode receiverMode() const { return _receiverMode; } -private: + private: QByteArray _methodName; QList _argTypes; int _returnType; @@ -257,10 +255,10 @@ public: virtual int lag() const = 0; public slots: - virtual void dispatch(const SyncMessage &msg) = 0; - virtual void dispatch(const RpcCall &msg) = 0; - virtual void dispatch(const InitRequest &msg) = 0; - virtual void dispatch(const InitData &msg) = 0; + virtual void dispatch(const Protocol::SyncMessage &msg) = 0; + virtual void dispatch(const Protocol::RpcCall &msg) = 0; + virtual void dispatch(const Protocol::InitRequest &msg) = 0; + virtual void dispatch(const Protocol::InitData &msg) = 0; virtual void close(const QString &reason = QString()) = 0; @@ -271,75 +269,4 @@ signals: void lagUpdated(int msecs); }; - -// ================================================== -// Protocol Messages -// ================================================== -class SignalProxy::SyncMessage -{ -public: - inline SyncMessage(const QByteArray &className, const QString &objectName, const QByteArray &slotName, const QVariantList ¶ms) - : _className(className), _objectName(objectName), _slotName(slotName), _params(params) {} - - inline QByteArray className() const { return _className; } - inline QString objectName() const { return _objectName; } - inline QByteArray slotName() const { return _slotName; } - - inline QVariantList params() const { return _params; } - -private: - QByteArray _className; - QString _objectName; - QByteArray _slotName; - QVariantList _params; -}; - - -class SignalProxy::RpcCall -{ -public: - inline RpcCall(const QByteArray &slotName, const QVariantList ¶ms) - : _slotName(slotName), _params(params) {} - - inline QByteArray slotName() const { return _slotName; } - inline QVariantList params() const { return _params; } - -private: - QByteArray _slotName; - QVariantList _params; -}; - - -class SignalProxy::InitRequest -{ -public: - inline InitRequest(const QByteArray &className, const QString &objectName) - : _className(className), _objectName(objectName) {} - - inline QByteArray className() const { return _className; } - inline QString objectName() const { return _objectName; } - -private: - QByteArray _className; - QString _objectName; -}; - - -class SignalProxy::InitData -{ -public: - inline InitData(const QByteArray &className, const QString &objectName, const QVariantMap &initData) - : _className(className), _objectName(objectName), _initData(initData) {} - - inline QByteArray className() const { return _className; } - inline QString objectName() const { return _objectName; } - - inline QVariantMap initData() const { return _initData; } - -private: - QByteArray _className; - QString _objectName; - QVariantMap _initData; -}; - #endif diff --git a/src/common/syncableobject.cpp b/src/common/syncableobject.cpp index a9417b10..2db7e469 100644 --- a/src/common/syncableobject.cpp +++ b/src/common/syncableobject.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/syncableobject.h b/src/common/syncableobject.h index 0042c507..895d6576 100644 --- a/src/common/syncableobject.h +++ b/src/common/syncableobject.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/types.h b/src/common/types.h index aa0521b7..0fbb2b77 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/util.cpp b/src/common/util.cpp index e7f531b4..75f32f2e 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/common/util.h b/src/common/util.h index 2b5e7839..bb90355e 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/abstractsqlstorage.cpp b/src/core/abstractsqlstorage.cpp index e721e4d9..ad08947d 100644 --- a/src/core/abstractsqlstorage.cpp +++ b/src/core/abstractsqlstorage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/abstractsqlstorage.h b/src/core/abstractsqlstorage.h index 104c0561..0cf91b96 100644 --- a/src/core/abstractsqlstorage.h +++ b/src/core/abstractsqlstorage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/core.cpp b/src/core/core.cpp index f5b554fb..4413211e 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -23,17 +23,16 @@ #include "core.h" #include "coresession.h" #include "coresettings.h" -#include "internalconnection.h" +#include "internalpeer.h" #include "postgresqlstorage.h" #include "quassel.h" -#include "signalproxy.h" #include "sqlitestorage.h" #include "network.h" #include "logger.h" #include "util.h" -#include "protocols/legacy/legacyconnection.h" +#include "protocols/legacy/legacypeer.h" // migration related #include @@ -57,8 +56,8 @@ const int Core::AddClientEventId = QEvent::registerEventType(); class AddClientEvent : public QEvent { public: - AddClientEvent(RemoteConnection *connection, UserId uid) : QEvent(QEvent::Type(Core::AddClientEventId)), connection(connection), userId(uid) {} - RemoteConnection *connection; + AddClientEvent(RemotePeer *p, UserId uid) : QEvent(QEvent::Type(Core::AddClientEventId)), peer(p), userId(uid) {} + RemotePeer *peer; UserId userId; }; @@ -218,8 +217,8 @@ void Core::init() Core::~Core() { - foreach(RemoteConnection *connection, clientInfo.keys()) { - connection->close(); // disconnect non authed clients + foreach(RemotePeer *peer, clientInfo.keys()) { + peer->close(); // disconnect non authed clients } qDeleteAll(sessions); qDeleteAll(_storageBackends); @@ -518,13 +517,13 @@ void Core::incomingConnection() Q_ASSERT(server); while (server->hasPendingConnections()) { QTcpSocket *socket = server->nextPendingConnection(); - RemoteConnection *connection = new LegacyConnection(socket, this); + RemotePeer *peer = new LegacyPeer(socket, this); - connect(connection, SIGNAL(disconnected()), SLOT(clientDisconnected())); - connect(connection, SIGNAL(dataReceived(QVariant)), SLOT(processClientMessage(QVariant))); - connect(connection, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError))); + connect(peer, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(peer, SIGNAL(dataReceived(QVariant)), SLOT(processClientMessage(QVariant))); + connect(peer, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError))); - clientInfo.insert(connection, QVariantMap()); + clientInfo.insert(peer, QVariantMap()); quInfo() << qPrintable(tr("Client connected from")) << qPrintable(socket->peerAddress().toString()); if (!_configured) { @@ -536,8 +535,8 @@ void Core::incomingConnection() void Core::processClientMessage(const QVariant &data) { - RemoteConnection *connection = qobject_cast(sender()); - if (!connection) { + RemotePeer *peer = qobject_cast(sender()); + if (!peer) { qWarning() << Q_FUNC_INFO << "Message not sent by RemoteConnection!"; return; } @@ -546,7 +545,7 @@ void Core::processClientMessage(const QVariant &data) if (!msg.contains("MsgType")) { // Client is way too old, does not even use the current init format qWarning() << qPrintable(tr("Antique client trying to connect... refusing.")); - connection->close(); + peer->close(); return; } @@ -561,9 +560,9 @@ void Core::processClientMessage(const QVariant &data) reply["Error"] = tr("Your Quassel Client is too old!
" "This core needs at least client/core protocol version %1.
" "Please consider upgrading your client.").arg(Quassel::buildInfo().coreNeedsProtocol); - connection->writeSocketData(reply); - qWarning() << qPrintable(tr("Client")) << connection->description() << qPrintable(tr("too old, rejecting.")); - connection->close(); + peer->writeSocketData(reply); + qWarning() << qPrintable(tr("Client")) << peer->description() << qPrintable(tr("too old, rejecting.")); + peer->close(); return; } @@ -590,7 +589,7 @@ void Core::processClientMessage(const QVariant &data) #ifdef HAVE_SSL SslServer *sslServer = qobject_cast(&_server); - QSslSocket *sslSocket = qobject_cast(connection->socket()); + QSslSocket *sslSocket = qobject_cast(peer->socket()); bool supportSsl = sslServer && sslSocket && sslServer->isCertValid(); #else bool supportSsl = false; @@ -626,15 +625,15 @@ void Core::processClientMessage(const QVariant &data) else { reply["Configured"] = true; } - clientInfo[connection] = msg; // store for future reference + clientInfo[peer] = msg; // store for future reference reply["MsgType"] = "ClientInitAck"; - connection->writeSocketData(reply); - connection->socket()->flush(); // ensure that the write cache is flushed before we switch to ssl + peer->writeSocketData(reply); + peer->socket()->flush(); // ensure that the write cache is flushed before we switch to ssl #ifdef HAVE_SSL // after we told the client that we are ssl capable we switch to ssl mode if (supportSsl && msg["UseSsl"].toBool()) { - qDebug() << qPrintable(tr("Starting TLS for Client:")) << connection->description(); + qDebug() << qPrintable(tr("Starting TLS for Client:")) << peer->description(); connect(sslSocket, SIGNAL(sslErrors(const QList &)), SLOT(sslErrors(const QList &))); sslSocket->startServerEncryption(); } @@ -642,20 +641,20 @@ void Core::processClientMessage(const QVariant &data) #ifndef QT_NO_COMPRESS if (supportsCompression && msg["UseCompression"].toBool()) { - connection->socket()->setProperty("UseCompression", true); - qDebug() << "Using compression for Client:" << qPrintable(connection->socket()->peerAddress().toString()); + peer->socket()->setProperty("UseCompression", true); + qDebug() << "Using compression for Client:" << qPrintable(peer->socket()->peerAddress().toString()); } #endif } else { // for the rest, we need an initialized connection - if (!clientInfo.contains(connection)) { + if (!clientInfo.contains(peer)) { QVariantMap reply; reply["MsgType"] = "ClientLoginReject"; reply["Error"] = tr("Client not initialized!
You need to send an init message before trying to login."); - connection->writeSocketData(reply); - qWarning() << qPrintable(tr("Client")) << qPrintable(connection->socket()->peerAddress().toString()) << qPrintable(tr("did not send an init message before trying to login, rejecting.")); - connection->close(); return; + peer->writeSocketData(reply); + qWarning() << qPrintable(tr("Client")) << qPrintable(peer->socket()->peerAddress().toString()) << qPrintable(tr("did not send an init message before trying to login, rejecting.")); + peer->close(); return; } if (msg["MsgType"] == "CoreSetupData") { QVariantMap reply; @@ -667,7 +666,7 @@ void Core::processClientMessage(const QVariant &data) else { reply["MsgType"] = "CoreSetupAck"; } - connection->writeSocketData(reply); + peer->writeSocketData(reply); } else if (msg["MsgType"] == "ClientLogin") { QVariantMap reply; @@ -675,13 +674,13 @@ void Core::processClientMessage(const QVariant &data) if (uid == 0) { reply["MsgType"] = "ClientLoginReject"; reply["Error"] = tr("Invalid username or password!
The username/password combination you supplied could not be found in the database."); - connection->writeSocketData(reply); + peer->writeSocketData(reply); return; } reply["MsgType"] = "ClientLoginAck"; - connection->writeSocketData(reply); - quInfo() << qPrintable(tr("Client")) << qPrintable(connection->socket()->peerAddress().toString()) << qPrintable(tr("initialized and authenticated successfully as \"%1\" (UserId: %2).").arg(msg["User"].toString()).arg(uid.toInt())); - setupClientSession(connection, uid); + peer->writeSocketData(reply); + quInfo() << qPrintable(tr("Client")) << qPrintable(peer->socket()->peerAddress().toString()) << qPrintable(tr("initialized and authenticated successfully as \"%1\" (UserId: %2).").arg(msg["User"].toString()).arg(uid.toInt())); + setupClientSession(peer, uid); } } } @@ -690,12 +689,12 @@ void Core::processClientMessage(const QVariant &data) // Potentially called during the initialization phase (before handing the connection off to the session) void Core::clientDisconnected() { - RemoteConnection *connection = qobject_cast(sender()); - Q_ASSERT(connection); + RemotePeer *peer = qobject_cast(sender()); + Q_ASSERT(peer); - quInfo() << qPrintable(tr("Non-authed client disconnected.")) << qPrintable(connection->socket()->peerAddress().toString()); - clientInfo.remove(connection); - connection->deleteLater(); + quInfo() << qPrintable(tr("Non-authed client disconnected.")) << qPrintable(peer->socket()->peerAddress().toString()); + clientInfo.remove(peer); + peer->deleteLater(); // make server listen again if still not configured if (!_configured) { @@ -707,12 +706,12 @@ void Core::clientDisconnected() } -void Core::setupClientSession(RemoteConnection *connection, UserId uid) +void Core::setupClientSession(RemotePeer *peer, UserId uid) { // From now on everything is handled by the client session - disconnect(connection, 0, this, 0); - connection->socket()->flush(); - clientInfo.remove(connection); + disconnect(peer, 0, this, 0); + peer->socket()->flush(); + clientInfo.remove(peer); // Find or create session for validated user SessionThread *session; @@ -722,15 +721,15 @@ void Core::setupClientSession(RemoteConnection *connection, UserId uid) else { session = createSession(uid); if (!session) { - qWarning() << qPrintable(tr("Could not initialize session for client:")) << qPrintable(connection->socket()->peerAddress().toString()); - connection->close(); + qWarning() << qPrintable(tr("Could not initialize session for client:")) << qPrintable(peer->socket()->peerAddress().toString()); + peer->close(); return; } } // as we are currently handling an event triggered by incoming data on this socket // it is unsafe to directly move the socket to the client thread. - QCoreApplication::postEvent(this, new AddClientEvent(connection, uid)); + QCoreApplication::postEvent(this, new AddClientEvent(peer, uid)); } @@ -738,27 +737,27 @@ void Core::customEvent(QEvent *event) { if (event->type() == AddClientEventId) { AddClientEvent *addClientEvent = static_cast(event); - addClientHelper(addClientEvent->connection, addClientEvent->userId); + addClientHelper(addClientEvent->peer, addClientEvent->userId); return; } } -void Core::addClientHelper(RemoteConnection *connection, UserId uid) +void Core::addClientHelper(RemotePeer *peer, UserId uid) { // Find or create session for validated user if (!sessions.contains(uid)) { - qWarning() << qPrintable(tr("Could not find a session for client:")) << qPrintable(connection->socket()->peerAddress().toString()); - connection->close(); + qWarning() << qPrintable(tr("Could not find a session for client:")) << qPrintable(peer->socket()->peerAddress().toString()); + peer->close(); return; } SessionThread *session = sessions[uid]; - session->addClient(connection); + session->addClient(peer); } -void Core::setupInternalClientSession(InternalConnection *clientConnection) +void Core::setupInternalClientSession(InternalPeer *clientPeer) { if (!_configured) { stopListening(); @@ -774,9 +773,9 @@ void Core::setupInternalClientSession(InternalConnection *clientConnection) return; } - InternalConnection *coreConnection = new InternalConnection(this); - coreConnection->setPeer(clientConnection); - clientConnection->setPeer(coreConnection); + InternalPeer *corePeer = new InternalPeer(this); + corePeer->setPeer(clientPeer); + clientPeer->setPeer(corePeer); // Find or create session for validated user SessionThread *sessionThread; @@ -785,7 +784,7 @@ void Core::setupInternalClientSession(InternalConnection *clientConnection) else sessionThread = createSession(uid); - sessionThread->addClient(coreConnection); + sessionThread->addClient(corePeer); } @@ -816,9 +815,9 @@ void Core::sslErrors(const QList &errors) void Core::socketError(QAbstractSocket::SocketError err) { - RemoteConnection *connection = qobject_cast(sender()); - if (connection && err != QAbstractSocket::RemoteHostClosedError) - qWarning() << "Core::socketError()" << connection->socket() << err << connection->socket()->errorString(); + RemotePeer *peer = qobject_cast(sender()); + if (peer && err != QAbstractSocket::RemoteHostClosedError) + qWarning() << "Core::socketError()" << peer->socket() << err << peer->socket()->errorString(); } diff --git a/src/core/core.h b/src/core/core.h index 48c015de..ebe80619 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,7 +42,7 @@ #include "types.h" class CoreSession; -class RemoteConnection; +class RemotePeer; struct NetworkInfo; class SessionThread; class SignalProxy; @@ -485,7 +485,7 @@ public slots: /** \note This method is threadsafe. */ void syncStorage(); - void setupInternalClientSession(InternalConnection *clientConnection); + void setupInternalClientSession(InternalPeer *clientConnection); signals: //! Sent when a BufferInfo is updated in storage. @@ -520,8 +520,8 @@ private: static Core *instanceptr; SessionThread *createSession(UserId userId, bool restoreState = false); - void setupClientSession(RemoteConnection *connection, UserId uid); - void addClientHelper(RemoteConnection *connection, UserId uid); + void setupClientSession(RemotePeer *peer, UserId uid); + void addClientHelper(RemotePeer *peer, UserId uid); //void processCoreSetup(QTcpSocket *socket, QVariantMap &msg); QString setupCoreForInternalUsage(); QString setupCore(QVariantMap setupData); @@ -548,7 +548,7 @@ private: OidentdConfigGenerator *_oidentdConfigGenerator; - QHash clientInfo; + QHash clientInfo; QHash _storageBackends; diff --git a/src/core/corealiasmanager.cpp b/src/core/corealiasmanager.cpp index f7f5cf6b..d811ea15 100644 --- a/src/core/corealiasmanager.cpp +++ b/src/core/corealiasmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corealiasmanager.h b/src/core/corealiasmanager.h index 25b9ddfc..814bf924 100644 --- a/src/core/corealiasmanager.h +++ b/src/core/corealiasmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreapplication.cpp b/src/core/coreapplication.cpp index 3dabe76b..3e3f9d17 100644 --- a/src/core/coreapplication.cpp +++ b/src/core/coreapplication.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreapplication.h b/src/core/coreapplication.h index e2f8ccfd..2bd53868 100644 --- a/src/core/coreapplication.h +++ b/src/core/coreapplication.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebacklogmanager.cpp b/src/core/corebacklogmanager.cpp index d380db86..371ae602 100644 --- a/src/core/corebacklogmanager.cpp +++ b/src/core/corebacklogmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebacklogmanager.h b/src/core/corebacklogmanager.h index 6b76b090..d1f225c0 100644 --- a/src/core/corebacklogmanager.h +++ b/src/core/corebacklogmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebasichandler.cpp b/src/core/corebasichandler.cpp index f12b6422..c08b1c73 100644 --- a/src/core/corebasichandler.cpp +++ b/src/core/corebasichandler.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebasichandler.h b/src/core/corebasichandler.h index 95f3c709..53f0de48 100644 --- a/src/core/corebasichandler.h +++ b/src/core/corebasichandler.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebuffersyncer.cpp b/src/core/corebuffersyncer.cpp index af5794a0..847148ba 100644 --- a/src/core/corebuffersyncer.cpp +++ b/src/core/corebuffersyncer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebuffersyncer.h b/src/core/corebuffersyncer.h index bea39cf2..46b06dc0 100644 --- a/src/core/corebuffersyncer.h +++ b/src/core/corebuffersyncer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebufferviewconfig.cpp b/src/core/corebufferviewconfig.cpp index 46b13055..efb73562 100644 --- a/src/core/corebufferviewconfig.cpp +++ b/src/core/corebufferviewconfig.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebufferviewconfig.h b/src/core/corebufferviewconfig.h index ae974d9e..8248e28e 100644 --- a/src/core/corebufferviewconfig.h +++ b/src/core/corebufferviewconfig.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebufferviewmanager.cpp b/src/core/corebufferviewmanager.cpp index 5832807a..b0cbe4ce 100644 --- a/src/core/corebufferviewmanager.cpp +++ b/src/core/corebufferviewmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corebufferviewmanager.h b/src/core/corebufferviewmanager.h index f232156f..0e1b4dfd 100644 --- a/src/core/corebufferviewmanager.h +++ b/src/core/corebufferviewmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corecoreinfo.cpp b/src/core/corecoreinfo.cpp index a7fb4ad5..549e503f 100644 --- a/src/core/corecoreinfo.cpp +++ b/src/core/corecoreinfo.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corecoreinfo.h b/src/core/corecoreinfo.h index 719a3517..05ba7bb8 100644 --- a/src/core/corecoreinfo.h +++ b/src/core/corecoreinfo.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreeventmanager.h b/src/core/coreeventmanager.h index de4878e6..b64e7bf9 100644 --- a/src/core/coreeventmanager.h +++ b/src/core/coreeventmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreidentity.cpp b/src/core/coreidentity.cpp index bdd4f18a..8e6fc596 100644 --- a/src/core/coreidentity.cpp +++ b/src/core/coreidentity.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreidentity.h b/src/core/coreidentity.h index 80db0d0e..39ee2a45 100644 --- a/src/core/coreidentity.h +++ b/src/core/coreidentity.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreignorelistmanager.cpp b/src/core/coreignorelistmanager.cpp index 42cfee5e..c1de5e2a 100644 --- a/src/core/coreignorelistmanager.cpp +++ b/src/core/coreignorelistmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreignorelistmanager.h b/src/core/coreignorelistmanager.h index 7904e167..40abe951 100644 --- a/src/core/coreignorelistmanager.h +++ b/src/core/coreignorelistmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreircchannel.cpp b/src/core/coreircchannel.cpp index 98995bff..99d18815 100644 --- a/src/core/coreircchannel.cpp +++ b/src/core/coreircchannel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreircchannel.h b/src/core/coreircchannel.h index 84932d5d..c7746044 100644 --- a/src/core/coreircchannel.h +++ b/src/core/coreircchannel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreirclisthelper.cpp b/src/core/coreirclisthelper.cpp index dfbba297..bb7d1dec 100644 --- a/src/core/coreirclisthelper.cpp +++ b/src/core/coreirclisthelper.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreirclisthelper.h b/src/core/coreirclisthelper.h index 4e65918c..301d3e95 100644 --- a/src/core/coreirclisthelper.h +++ b/src/core/coreirclisthelper.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreircuser.cpp b/src/core/coreircuser.cpp index 5bb0bcf4..79f5d38a 100644 --- a/src/core/coreircuser.cpp +++ b/src/core/coreircuser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreircuser.h b/src/core/coreircuser.h index 751e86f6..cc5a9f8a 100644 --- a/src/core/coreircuser.h +++ b/src/core/coreircuser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 512ac104..101f5276 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 7b6048a3..3b31f0de 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corenetworkconfig.cpp b/src/core/corenetworkconfig.cpp index a18f231c..c654d521 100644 --- a/src/core/corenetworkconfig.cpp +++ b/src/core/corenetworkconfig.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/corenetworkconfig.h b/src/core/corenetworkconfig.h index f9558828..e045697c 100644 --- a/src/core/corenetworkconfig.h +++ b/src/core/corenetworkconfig.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -45,6 +45,7 @@ public slots: virtual inline void requestSetAutoWhoInterval(int interval) { setAutoWhoInterval(interval); } virtual inline void requestSetAutoWhoNickLimit(int nickLimit) { setAutoWhoNickLimit(nickLimit); } virtual inline void requestSetAutoWhoDelay(int delay) { setAutoWhoDelay(delay); } + virtual inline void requestSetStandardCtcp(bool enabled) { setStandardCtcp(enabled); } }; diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index 0ac23b73..d44cf2b5 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ #include "coreusersettings.h" #include "ctcpparser.h" #include "eventstringifier.h" -#include "internalconnection.h" +#include "internalpeer.h" #include "ircchannel.h" #include "ircparser.h" #include "ircuser.h" @@ -46,7 +46,7 @@ #include "storage.h" #include "util.h" -#include "protocols/legacy/legacyconnection.h" +#include "protocols/legacy/legacypeer.h" class ProcessMessagesEvent : public QEvent { @@ -206,28 +206,28 @@ void CoreSession::restoreSessionState() } -void CoreSession::addClient(RemoteConnection *connection) +void CoreSession::addClient(RemotePeer *peer) { QVariantMap reply; reply["MsgType"] = "SessionInit"; reply["SessionState"] = sessionState(); - connection->writeSocketData(reply); - signalProxy()->addPeer(connection); + peer->writeSocketData(reply); + signalProxy()->addPeer(peer); } -void CoreSession::addClient(InternalConnection *connection) +void CoreSession::addClient(InternalPeer *peer) { - signalProxy()->addPeer(connection); + signalProxy()->addPeer(peer); emit sessionState(sessionState()); } void CoreSession::removeClient(SignalProxy::AbstractPeer *peer) { - RemoteConnection *connection = qobject_cast(peer); - if (connection) - quInfo() << qPrintable(tr("Client")) << connection->description() << qPrintable(tr("disconnected (UserId: %1).").arg(user().toInt())); + RemotePeer *p = qobject_cast(peer); + if (p) + quInfo() << qPrintable(tr("Client")) << p->description() << qPrintable(tr("disconnected (UserId: %1).").arg(user().toInt())); } diff --git a/src/core/coresession.h b/src/core/coresession.h index fffb7686..fdb952f7 100644 --- a/src/core/coresession.h +++ b/src/core/coresession.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,11 +42,11 @@ class CoreSessionEventProcessor; class CtcpParser; class EventManager; class EventStringifier; -class InternalConnection; +class InternalPeer; class IrcParser; class MessageEvent; class NetworkConnection; -class RemoteConnection; +class RemotePeer; struct NetworkInfo; @@ -89,8 +89,8 @@ public: void restoreSessionState(); public slots: - void addClient(RemoteConnection *connection); - void addClient(InternalConnection *connection); + void addClient(RemotePeer *peer); + void addClient(InternalPeer *peer); void msgFromClient(BufferInfo, QString message); diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index 1e9bf050..692257a5 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -116,14 +116,22 @@ void CoreSessionEventProcessor::processIrcEventAuthenticate(IrcEvent *e) CoreNetwork *net = coreNetwork(e); - QString construct = net->saslAccount(); - construct.append(QChar(QChar::Null)); - construct.append(net->saslAccount()); - construct.append(QChar(QChar::Null)); - construct.append(net->saslPassword()); - QByteArray saslData = QByteArray(construct.toAscii().toBase64()); - saslData.prepend("AUTHENTICATE "); - net->putRawLine(saslData); +#ifdef HAVE_SSL + if (net->identityPtr()->sslCert().isNull()) { +#endif + QString construct = net->saslAccount(); + construct.append(QChar(QChar::Null)); + construct.append(net->saslAccount()); + construct.append(QChar(QChar::Null)); + construct.append(net->saslPassword()); + QByteArray saslData = QByteArray(construct.toAscii().toBase64()); + saslData.prepend("AUTHENTICATE "); + net->putRawLine(saslData); +#ifdef HAVE_SSL + } else { + net->putRawLine("AUTHENTICATE +"); + } +#endif } @@ -133,9 +141,19 @@ void CoreSessionEventProcessor::processIrcEventCap(IrcEvent *e) // additional CAP messages (ls, multi-prefix, et cetera). if (e->params().count() == 3) { - if (e->params().at(2) == "sasl") { + if (e->params().at(2).startsWith("sasl")) { // Freenode (at least) sends "sasl " with a trailing space for some reason! // FIXME use event - coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE PLAIN")); // Only working with PLAIN atm, blowfish later + // if the current identity has a cert set, use SASL EXTERNAL +#ifdef HAVE_SSL + if (!coreNetwork(e)->identityPtr()->sslCert().isNull()) { + coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE EXTERNAL")); + } else { +#endif + // Only working with PLAIN atm, blowfish later + coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE PLAIN")); +#ifdef HAVE_SSL + } +#endif } } } diff --git a/src/core/coresessioneventprocessor.h b/src/core/coresessioneventprocessor.h index 07bb7d85..6a163c6c 100644 --- a/src/core/coresessioneventprocessor.h +++ b/src/core/coresessioneventprocessor.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coresettings.cpp b/src/core/coresettings.cpp index a740942f..8d0e4b98 100644 --- a/src/core/coresettings.cpp +++ b/src/core/coresettings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coresettings.h b/src/core/coresettings.h index d8f533ee..22a88706 100644 --- a/src/core/coresettings.h +++ b/src/core/coresettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreuserinputhandler.cpp b/src/core/coreuserinputhandler.cpp index bb677c38..53f4c2e0 100644 --- a/src/core/coreuserinputhandler.cpp +++ b/src/core/coreuserinputhandler.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreuserinputhandler.h b/src/core/coreuserinputhandler.h index 288e2e86..ccd9bd2a 100644 --- a/src/core/coreuserinputhandler.h +++ b/src/core/coreuserinputhandler.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreusersettings.cpp b/src/core/coreusersettings.cpp index 64ac7ea4..d9c26089 100644 --- a/src/core/coreusersettings.cpp +++ b/src/core/coreusersettings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/coreusersettings.h b/src/core/coreusersettings.h index db75535a..bcc9d543 100644 --- a/src/core/coreusersettings.h +++ b/src/core/coreusersettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/ctcpparser.cpp b/src/core/ctcpparser.cpp index 1f1660fc..7517db6f 100644 --- a/src/core/ctcpparser.cpp +++ b/src/core/ctcpparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,6 +20,7 @@ #include "ctcpparser.h" +#include "corenetworkconfig.h" #include "coresession.h" #include "ctcpevent.h" #include "messageevent.h" @@ -36,14 +37,24 @@ CtcpParser::CtcpParser(CoreSession *coreSession, QObject *parent) _ctcpMDequoteHash[MQUOTE + 'r'] = QByteArray(1, '\r'); _ctcpMDequoteHash[MQUOTE + MQUOTE] = MQUOTE; - QByteArray XQUOTE = QByteArray("\134"); - _ctcpXDelimDequoteHash[XQUOTE + XQUOTE] = XQUOTE; - _ctcpXDelimDequoteHash[XQUOTE + QByteArray("a")] = XDELIM; + setStandardCtcp(_coreSession->networkConfig()->standardCtcp()); + connect(_coreSession->networkConfig(), SIGNAL(standardCtcpSet(bool)), this, SLOT(setStandardCtcp(bool))); connect(this, SIGNAL(newEvent(Event *)), _coreSession->eventManager(), SLOT(postEvent(Event *))); } +void CtcpParser::setStandardCtcp(bool enabled) +{ + QByteArray XQUOTE = QByteArray("\134"); + if (enabled) + _ctcpXDelimDequoteHash[XQUOTE + XQUOTE] = XQUOTE; + else + _ctcpXDelimDequoteHash.remove(XQUOTE + XQUOTE); + _ctcpXDelimDequoteHash[XQUOTE + QByteArray("a")] = XDELIM; +} + + void CtcpParser::displayMsg(NetworkEvent *event, Message::Type msgType, const QString &msg, const QString &sender, const QString &target, Message::Flags msgFlags) { @@ -148,8 +159,6 @@ void CtcpParser::processIrcEventRawPrivmsg(IrcEventRawMessage *event) void CtcpParser::parse(IrcEventRawMessage *e, Message::Type messagetype) { - QByteArray ctcp; - //lowlevel message dequote QByteArray dequotedMessage = lowLevelDequote(e->rawMessage()); @@ -161,6 +170,53 @@ void CtcpParser::parse(IrcEventRawMessage *e, Message::Type messagetype) ? Message::Redirected : Message::None; + if (coreSession()->networkConfig()->standardCtcp()) + parseStandard(e, messagetype, dequotedMessage, ctcptype, flags); + else + parseSimple(e, messagetype, dequotedMessage, ctcptype, flags); +} + + +// only accept CTCPs in their simplest form, i.e. one ctcp, from start to +// end, no text around it; not as per the 'specs', but makes people happier +void CtcpParser::parseSimple(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags) +{ + if (dequotedMessage.count(XDELIM) != 2 || dequotedMessage[0] != '\001' || dequotedMessage[dequotedMessage.count() -1] != '\001') { + displayMsg(e, messagetype, targetDecode(e, dequotedMessage), e->prefix(), e->target(), flags); + } else { + int spacePos = -1; + QString ctcpcmd, ctcpparam; + + QByteArray ctcp = xdelimDequote(dequotedMessage.mid(1, dequotedMessage.count() - 2)); + spacePos = ctcp.indexOf(' '); + if (spacePos != -1) { + ctcpcmd = targetDecode(e, ctcp.left(spacePos)); + ctcpparam = targetDecode(e, ctcp.mid(spacePos + 1)); + } else { + ctcpcmd = targetDecode(e, ctcp); + ctcpparam = QString(); + } + ctcpcmd = ctcpcmd.toUpper(); + + // we don't want to block /me messages by the CTCP ignore list + if (ctcpcmd == QLatin1String("ACTION") || !coreSession()->ignoreListManager()->ctcpMatch(e->prefix(), e->network()->networkName(), ctcpcmd)) { + QUuid uuid = QUuid::createUuid(); + _replies.insert(uuid, CtcpReply(coreNetwork(e), nickFromMask(e->prefix()))); + CtcpEvent *event = new CtcpEvent(EventManager::CtcpEvent, e->network(), e->prefix(), e->target(), + ctcptype, ctcpcmd, ctcpparam, e->timestamp(), uuid); + emit newEvent(event); + CtcpEvent *flushEvent = new CtcpEvent(EventManager::CtcpEventFlush, e->network(), e->prefix(), e->target(), + ctcptype, "INVALID", QString(), e->timestamp(), uuid); + emit newEvent(flushEvent); + } + } +} + + +void CtcpParser::parseStandard(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags) +{ + QByteArray ctcp; + QList ctcpEvents; QUuid uuid; // needed to group all replies together diff --git a/src/core/ctcpparser.h b/src/core/ctcpparser.h index a33751fb..5847785b 100644 --- a/src/core/ctcpparser.h +++ b/src/core/ctcpparser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -26,6 +26,7 @@ #include "corenetwork.h" #include "eventmanager.h" #include "ircevent.h" +#include "ctcpevent.h" class CoreSession; class CtcpEvent; @@ -63,6 +64,8 @@ protected: Message::Flags msgFlags = Message::None); void parse(IrcEventRawMessage *event, Message::Type msgType); + void parseSimple(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags); + void parseStandard(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags); QByteArray lowLevelQuote(const QByteArray &); QByteArray lowLevelDequote(const QByteArray &); @@ -72,6 +75,9 @@ protected: QByteArray pack(const QByteArray &ctcpTag, const QByteArray &message); void packedReply(CoreNetwork *network, const QString &bufname, const QList &replies); +private slots: + void setStandardCtcp(bool enabled); + private: inline QString targetDecode(IrcEventRawMessage *e, const QByteArray &msg) { return coreNetwork(e)->userDecode(e->target(), msg); } diff --git a/src/core/eventstringifier.cpp b/src/core/eventstringifier.cpp index 0c1a80f2..26a2bbe6 100644 --- a/src/core/eventstringifier.cpp +++ b/src/core/eventstringifier.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -615,7 +615,7 @@ void EventStringifier::processIrcEvent333(IrcEvent *e) QDateTime topicSetTime = QDateTime::fromTime_t(e->params()[2].toInt()); displayMsg(e, Message::Topic, tr("Topic set by %1 on %2") .arg(e->params()[1], - QLocale().toString(topicSetTime, QLocale().dateTimeFormat()), QString(), channel)); + QLocale().toString(topicSetTime, QLocale().dateTimeFormat())), QString(), channel); } diff --git a/src/core/eventstringifier.h b/src/core/eventstringifier.h index e2f61c0f..f3cfd468 100644 --- a/src/core/eventstringifier.h +++ b/src/core/eventstringifier.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/ircparser.cpp b/src/core/ircparser.cpp index 44e6cd19..f3db4fce 100644 --- a/src/core/ircparser.cpp +++ b/src/core/ircparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/ircparser.h b/src/core/ircparser.h index 67016c20..04b7d06e 100644 --- a/src/core/ircparser.h +++ b/src/core/ircparser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/netsplit.cpp b/src/core/netsplit.cpp index cd38cc77..ce2eef86 100644 --- a/src/core/netsplit.cpp +++ b/src/core/netsplit.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/netsplit.h b/src/core/netsplit.h index da636784..1838c0fc 100644 --- a/src/core/netsplit.h +++ b/src/core/netsplit.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/oidentdconfiggenerator.cpp b/src/core/oidentdconfiggenerator.cpp index 3d9a0550..6a77665e 100644 --- a/src/core/oidentdconfiggenerator.cpp +++ b/src/core/oidentdconfiggenerator.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/oidentdconfiggenerator.h b/src/core/oidentdconfiggenerator.h index 4d097cb0..0612ae0f 100644 --- a/src/core/oidentdconfiggenerator.h +++ b/src/core/oidentdconfiggenerator.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/postgresqlstorage.cpp b/src/core/postgresqlstorage.cpp index c13a5aab..39657046 100644 --- a/src/core/postgresqlstorage.cpp +++ b/src/core/postgresqlstorage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -279,21 +279,26 @@ void PostgreSqlStorage::setUserSetting(UserId userId, const QString &settingName out << data; QSqlDatabase db = logDb(); - QSqlQuery query(db); - query.prepare(queryString("insert_user_setting")); - query.bindValue(":userid", userId.toInt()); - query.bindValue(":settingname", settingName); - query.bindValue(":settingvalue", rawData); - safeExec(query); + QSqlQuery selectQuery(db); + selectQuery.prepare(queryString("select_user_setting")); + selectQuery.bindValue(":userid", userId.toInt()); + selectQuery.bindValue(":settingname", settingName); + safeExec(selectQuery); - if (query.lastError().isValid()) { - QSqlQuery updateQuery(db); - updateQuery.prepare(queryString("update_user_setting")); - updateQuery.bindValue(":userid", userId.toInt()); - updateQuery.bindValue(":settingname", settingName); - updateQuery.bindValue(":settingvalue", rawData); - safeExec(updateQuery); + QString setQueryString; + if (!selectQuery.first()) { + setQueryString = queryString("insert_user_setting"); + } + else { + setQueryString = queryString("update_user_setting"); } + + QSqlQuery setQuery(db); + setQuery.prepare(setQueryString); + setQuery.bindValue(":userid", userId.toInt()); + setQuery.bindValue(":settingname", settingName); + setQuery.bindValue(":settingvalue", rawData); + safeExec(setQuery); } diff --git a/src/core/postgresqlstorage.h b/src/core/postgresqlstorage.h index 79ec9c58..5be3f80f 100644 --- a/src/core/postgresqlstorage.h +++ b/src/core/postgresqlstorage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/sessionthread.cpp b/src/core/sessionthread.cpp index 49790dfd..e886db5a 100644 --- a/src/core/sessionthread.cpp +++ b/src/core/sessionthread.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,8 +20,8 @@ #include "core.h" #include "coresession.h" -#include "internalconnection.h" -#include "remoteconnection.h" +#include "internalpeer.h" +#include "remotepeer.h" #include "sessionthread.h" #include "signalproxy.h" @@ -86,13 +86,13 @@ void SessionThread::addClient(QObject *peer) void SessionThread::addClientToSession(QObject *peer) { - RemoteConnection *connection = qobject_cast(peer); - if (connection) { - addRemoteClientToSession(connection); + RemotePeer *remote = qobject_cast(peer); + if (remote) { + addRemoteClientToSession(remote); return; } - InternalConnection *internal = qobject_cast(peer); + InternalPeer *internal = qobject_cast(peer); if (internal) { addInternalClientToSession(internal); return; @@ -102,27 +102,27 @@ void SessionThread::addClientToSession(QObject *peer) } -void SessionThread::addRemoteClientToSession(RemoteConnection *connection) +void SessionThread::addRemoteClientToSession(RemotePeer *remotePeer) { - connection->setParent(0); - connection->moveToThread(session()->thread()); - emit addRemoteClient(connection); + remotePeer->setParent(0); + remotePeer->moveToThread(session()->thread()); + emit addRemoteClient(remotePeer); } -void SessionThread::addInternalClientToSession(InternalConnection *connection) +void SessionThread::addInternalClientToSession(InternalPeer *internalPeer) { - connection->setParent(0); - connection->moveToThread(session()->thread()); - emit addInternalClient(connection); + internalPeer->setParent(0); + internalPeer->moveToThread(session()->thread()); + emit addInternalClient(internalPeer); } void SessionThread::run() { _session = new CoreSession(user(), _restoreState); - connect(this, SIGNAL(addRemoteClient(RemoteConnection*)), _session, SLOT(addClient(RemoteConnection*))); - connect(this, SIGNAL(addInternalClient(InternalConnection*)), _session, SLOT(addClient(InternalConnection*))); + connect(this, SIGNAL(addRemoteClient(RemotePeer*)), _session, SLOT(addClient(RemotePeer*))); + connect(this, SIGNAL(addInternalClient(InternalPeer*)), _session, SLOT(addClient(InternalPeer*))); connect(_session, SIGNAL(sessionState(QVariant)), Core::instance(), SIGNAL(sessionState(QVariant))); emit initialized(); exec(); diff --git a/src/core/sessionthread.h b/src/core/sessionthread.h index aacefceb..b36b2433 100644 --- a/src/core/sessionthread.h +++ b/src/core/sessionthread.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -27,8 +27,8 @@ #include "types.h" class CoreSession; -class InternalConnection; -class RemoteConnection; +class InternalPeer; +class RemotePeer; class QIODevice; class SessionThread : public QThread @@ -54,8 +54,8 @@ signals: void initialized(); void shutdown(); - void addRemoteClient(RemoteConnection *); - void addInternalClient(InternalConnection *); + void addRemoteClient(RemotePeer *peer); + void addInternalClient(InternalPeer *peer); private: CoreSession *_session; @@ -66,8 +66,8 @@ private: bool isSessionInitialized(); void addClientToSession(QObject *peer); - void addRemoteClientToSession(RemoteConnection *connection); - void addInternalClientToSession(InternalConnection *client); + void addRemoteClientToSession(RemotePeer *remotePeer); + void addInternalClientToSession(InternalPeer *internalPeer); }; diff --git a/src/core/sqlitestorage.cpp b/src/core/sqlitestorage.cpp index 3df55d54..7dc5fea7 100644 --- a/src/core/sqlitestorage.cpp +++ b/src/core/sqlitestorage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/sqlitestorage.h b/src/core/sqlitestorage.h index fb84b342..ea3c578f 100644 --- a/src/core/sqlitestorage.h +++ b/src/core/sqlitestorage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/sslserver.cpp b/src/core/sslserver.cpp index e8bfe3b0..ee19c20d 100644 --- a/src/core/sslserver.cpp +++ b/src/core/sslserver.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/sslserver.h b/src/core/sslserver.h index d8a8bba6..dbf28025 100644 --- a/src/core/sslserver.h +++ b/src/core/sslserver.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/storage.cpp b/src/core/storage.cpp index 49c6d337..38cb1004 100644 --- a/src/core/storage.cpp +++ b/src/core/storage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/core/storage.h b/src/core/storage.h index 62de488d..4654dddc 100644 --- a/src/core/storage.h +++ b/src/core/storage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/CMakeLists.txt b/src/qtui/CMakeLists.txt index 86217b8f..8d8dce05 100644 --- a/src/qtui/CMakeLists.txt +++ b/src/qtui/CMakeLists.txt @@ -182,6 +182,11 @@ if(INDICATEQT_FOUND) include_directories(${INDICATEQT_INCLUDE_DIRS}) endif(INDICATEQT_FOUND) +if(HAVE_NOTIFICATION_CENTER) + set(SOURCES ${SOURCES} osxnotificationbackend.mm) + set(MOC_HDRS ${MOC_HDRS} osxnotificationbackend.h) +endif() + foreach(FORM ${FORMS}) set(FORMPATH ${FORMPATH} ui/${FORM}) endforeach(FORM ${FORMS}) diff --git a/src/qtui/aboutdlg.cpp b/src/qtui/aboutdlg.cpp index 7dabe231..e6721c6b 100644 --- a/src/qtui/aboutdlg.cpp +++ b/src/qtui/aboutdlg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,7 +47,7 @@ QString AboutDlg::about() const { QString res; res = tr("A modern, distributed IRC Client

" - "©2005-2012 by the Quassel Project
" + "©2005-2013 by the Quassel Project
" "http://quassel-irc.org
" "#quassel on Freenode

" "Quassel IRC is dual-licensed under GPLv2 and " diff --git a/src/qtui/aboutdlg.h b/src/qtui/aboutdlg.h index a2e76ac5..f2f85421 100644 --- a/src/qtui/aboutdlg.h +++ b/src/qtui/aboutdlg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/awaylogfilter.cpp b/src/qtui/awaylogfilter.cpp index f916e759..6016c7db 100644 --- a/src/qtui/awaylogfilter.cpp +++ b/src/qtui/awaylogfilter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/awaylogfilter.h b/src/qtui/awaylogfilter.h index 0c7f7c4e..dccaa833 100644 --- a/src/qtui/awaylogfilter.h +++ b/src/qtui/awaylogfilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/awaylogview.cpp b/src/qtui/awaylogview.cpp index e841ffdd..bc98ea93 100644 --- a/src/qtui/awaylogview.cpp +++ b/src/qtui/awaylogview.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/awaylogview.h b/src/qtui/awaylogview.h index 0288fbe0..60bae8b6 100644 --- a/src/qtui/awaylogview.h +++ b/src/qtui/awaylogview.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/bufferwidget.cpp b/src/qtui/bufferwidget.cpp index b0448e41..d6324201 100644 --- a/src/qtui/bufferwidget.cpp +++ b/src/qtui/bufferwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/bufferwidget.h b/src/qtui/bufferwidget.h index d03327e0..0ad7faf6 100644 --- a/src/qtui/bufferwidget.h +++ b/src/qtui/bufferwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/channellistdlg.cpp b/src/qtui/channellistdlg.cpp index 8014ca90..97db2203 100644 --- a/src/qtui/channellistdlg.cpp +++ b/src/qtui/channellistdlg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/channellistdlg.h b/src/qtui/channellistdlg.h index 74985a23..bb25fb22 100644 --- a/src/qtui/channellistdlg.h +++ b/src/qtui/channellistdlg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index 85642666..cbbb54bb 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatitem.h b/src/qtui/chatitem.h index 59f027b0..0bf8ee27 100644 --- a/src/qtui/chatitem.h +++ b/src/qtui/chatitem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp index addb2f1f..ed931bd3 100644 --- a/src/qtui/chatline.cpp +++ b/src/qtui/chatline.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatline.h b/src/qtui/chatline.h index 96b0718c..8fde09d6 100644 --- a/src/qtui/chatline.h +++ b/src/qtui/chatline.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatlinemodel.cpp b/src/qtui/chatlinemodel.cpp index 17cdfd3b..42dd04e0 100644 --- a/src/qtui/chatlinemodel.cpp +++ b/src/qtui/chatlinemodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatlinemodel.h b/src/qtui/chatlinemodel.h index e8901e5d..92aadc55 100644 --- a/src/qtui/chatlinemodel.h +++ b/src/qtui/chatlinemodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatlinemodelitem.cpp b/src/qtui/chatlinemodelitem.cpp index 7d23b3d3..480c1b55 100644 --- a/src/qtui/chatlinemodelitem.cpp +++ b/src/qtui/chatlinemodelitem.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatlinemodelitem.h b/src/qtui/chatlinemodelitem.h index 6e798250..36e659c7 100644 --- a/src/qtui/chatlinemodelitem.h +++ b/src/qtui/chatlinemodelitem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatmonitorfilter.cpp b/src/qtui/chatmonitorfilter.cpp index 3622634a..7605d6b9 100644 --- a/src/qtui/chatmonitorfilter.cpp +++ b/src/qtui/chatmonitorfilter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatmonitorfilter.h b/src/qtui/chatmonitorfilter.h index 52a9c089..3fd5a2d3 100644 --- a/src/qtui/chatmonitorfilter.h +++ b/src/qtui/chatmonitorfilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatmonitorview.cpp b/src/qtui/chatmonitorview.cpp index efa6c49f..2c73e35f 100644 --- a/src/qtui/chatmonitorview.cpp +++ b/src/qtui/chatmonitorview.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatmonitorview.h b/src/qtui/chatmonitorview.h index 899758d1..464c6d50 100644 --- a/src/qtui/chatmonitorview.h +++ b/src/qtui/chatmonitorview.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 631e10de..2ae3d88b 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index 4f6fcaec..1de870ef 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatview.cpp b/src/qtui/chatview.cpp index ebd81b84..17dc0740 100644 --- a/src/qtui/chatview.cpp +++ b/src/qtui/chatview.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatview.h b/src/qtui/chatview.h index b1756606..7869ab2d 100644 --- a/src/qtui/chatview.h +++ b/src/qtui/chatview.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatviewsearchbar.cpp b/src/qtui/chatviewsearchbar.cpp index 321ebdd7..2e43559c 100644 --- a/src/qtui/chatviewsearchbar.cpp +++ b/src/qtui/chatviewsearchbar.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatviewsearchbar.h b/src/qtui/chatviewsearchbar.h index 1a126908..fe822849 100644 --- a/src/qtui/chatviewsearchbar.h +++ b/src/qtui/chatviewsearchbar.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatviewsearchcontroller.cpp b/src/qtui/chatviewsearchcontroller.cpp index cbbdcbb0..8f3423d5 100644 --- a/src/qtui/chatviewsearchcontroller.cpp +++ b/src/qtui/chatviewsearchcontroller.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatviewsearchcontroller.h b/src/qtui/chatviewsearchcontroller.h index 6d8b8e8a..fc67a76f 100644 --- a/src/qtui/chatviewsearchcontroller.h +++ b/src/qtui/chatviewsearchcontroller.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatviewsettings.cpp b/src/qtui/chatviewsettings.cpp index 06240804..0b50be82 100644 --- a/src/qtui/chatviewsettings.cpp +++ b/src/qtui/chatviewsettings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/chatviewsettings.h b/src/qtui/chatviewsettings.h index 723ed9ab..66c0db52 100644 --- a/src/qtui/chatviewsettings.h +++ b/src/qtui/chatviewsettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/columnhandleitem.cpp b/src/qtui/columnhandleitem.cpp index 6f791387..676ce948 100644 --- a/src/qtui/columnhandleitem.cpp +++ b/src/qtui/columnhandleitem.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/columnhandleitem.h b/src/qtui/columnhandleitem.h index ce15c31c..b9846577 100644 --- a/src/qtui/columnhandleitem.h +++ b/src/qtui/columnhandleitem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/coreconfigwizard.cpp b/src/qtui/coreconfigwizard.cpp index 97fb6d81..9fbc0741 100644 --- a/src/qtui/coreconfigwizard.cpp +++ b/src/qtui/coreconfigwizard.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/coreconfigwizard.h b/src/qtui/coreconfigwizard.h index e5f66a2c..bed887bd 100644 --- a/src/qtui/coreconfigwizard.h +++ b/src/qtui/coreconfigwizard.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/coreconnectdlg.cpp b/src/qtui/coreconnectdlg.cpp index d28971ef..fa57976e 100644 --- a/src/qtui/coreconnectdlg.cpp +++ b/src/qtui/coreconnectdlg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/coreconnectdlg.h b/src/qtui/coreconnectdlg.h index cea9304e..a458578a 100644 --- a/src/qtui/coreconnectdlg.h +++ b/src/qtui/coreconnectdlg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/coreconnectionstatuswidget.cpp b/src/qtui/coreconnectionstatuswidget.cpp index f43d6ebe..ac4642ee 100644 --- a/src/qtui/coreconnectionstatuswidget.cpp +++ b/src/qtui/coreconnectionstatuswidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/coreconnectionstatuswidget.h b/src/qtui/coreconnectionstatuswidget.h index e204b9c2..f6432e66 100644 --- a/src/qtui/coreconnectionstatuswidget.h +++ b/src/qtui/coreconnectionstatuswidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/coreinfodlg.cpp b/src/qtui/coreinfodlg.cpp index 2ab087e5..0ab8a814 100644 --- a/src/qtui/coreinfodlg.cpp +++ b/src/qtui/coreinfodlg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/coreinfodlg.h b/src/qtui/coreinfodlg.h index b1783a90..24ba25fa 100644 --- a/src/qtui/coreinfodlg.h +++ b/src/qtui/coreinfodlg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/debugbufferviewoverlay.cpp b/src/qtui/debugbufferviewoverlay.cpp index e1430f26..81372dcd 100644 --- a/src/qtui/debugbufferviewoverlay.cpp +++ b/src/qtui/debugbufferviewoverlay.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/debugbufferviewoverlay.h b/src/qtui/debugbufferviewoverlay.h index 3ce70e20..7703fb8a 100644 --- a/src/qtui/debugbufferviewoverlay.h +++ b/src/qtui/debugbufferviewoverlay.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/debugconsole.cpp b/src/qtui/debugconsole.cpp index 59851808..66588ce5 100644 --- a/src/qtui/debugconsole.cpp +++ b/src/qtui/debugconsole.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/debugconsole.h b/src/qtui/debugconsole.h index 106db0bb..c2050922 100644 --- a/src/qtui/debugconsole.h +++ b/src/qtui/debugconsole.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/debuglogwidget.cpp b/src/qtui/debuglogwidget.cpp index eeffe7c2..90716d54 100644 --- a/src/qtui/debuglogwidget.cpp +++ b/src/qtui/debuglogwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/debuglogwidget.h b/src/qtui/debuglogwidget.h index 61e17a98..513c674b 100644 --- a/src/qtui/debuglogwidget.h +++ b/src/qtui/debuglogwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/debugmessagemodelfilter.cpp b/src/qtui/debugmessagemodelfilter.cpp index 9074b165..655fd00e 100644 --- a/src/qtui/debugmessagemodelfilter.cpp +++ b/src/qtui/debugmessagemodelfilter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/debugmessagemodelfilter.h b/src/qtui/debugmessagemodelfilter.h index 60f5bd06..b8fbe04e 100644 --- a/src/qtui/debugmessagemodelfilter.h +++ b/src/qtui/debugmessagemodelfilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/inputwidget.cpp b/src/qtui/inputwidget.cpp index bfc0a226..c246f2e7 100644 --- a/src/qtui/inputwidget.cpp +++ b/src/qtui/inputwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/inputwidget.h b/src/qtui/inputwidget.h index dac21789..5fa41930 100644 --- a/src/qtui/inputwidget.h +++ b/src/qtui/inputwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/ircconnectionwizard.cpp b/src/qtui/ircconnectionwizard.cpp index de6d0c6e..2665f015 100644 --- a/src/qtui/ircconnectionwizard.cpp +++ b/src/qtui/ircconnectionwizard.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/ircconnectionwizard.h b/src/qtui/ircconnectionwizard.h index a81e5fa6..c545536e 100644 --- a/src/qtui/ircconnectionwizard.h +++ b/src/qtui/ircconnectionwizard.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/knotificationbackend.cpp b/src/qtui/knotificationbackend.cpp index da55338d..4c508ecd 100644 --- a/src/qtui/knotificationbackend.cpp +++ b/src/qtui/knotificationbackend.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/knotificationbackend.h b/src/qtui/knotificationbackend.h index b9b387d4..394cdc98 100644 --- a/src/qtui/knotificationbackend.h +++ b/src/qtui/knotificationbackend.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/legacysystemtray.cpp b/src/qtui/legacysystemtray.cpp index 280c7dd2..a3e706aa 100644 --- a/src/qtui/legacysystemtray.cpp +++ b/src/qtui/legacysystemtray.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/legacysystemtray.h b/src/qtui/legacysystemtray.h index 6fec76c4..370b1ab1 100644 --- a/src/qtui/legacysystemtray.h +++ b/src/qtui/legacysystemtray.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/mainpage.cpp b/src/qtui/mainpage.cpp index 702e60ef..d32e49ba 100644 --- a/src/qtui/mainpage.cpp +++ b/src/qtui/mainpage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/mainpage.h b/src/qtui/mainpage.h index 1e37a5ba..290f0121 100644 --- a/src/qtui/mainpage.h +++ b/src/qtui/mainpage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index a3048b22..bf7cda34 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -108,6 +108,10 @@ #include "indicatornotificationbackend.h" #endif +#ifdef HAVE_NOTIFICATION_CENTER + #include "osxnotificationbackend.h" +#endif + #include "settingspages/aliasessettingspage.h" #include "settingspages/appearancesettingspage.h" #include "settingspages/backlogsettingspage.h" @@ -218,6 +222,10 @@ void MainWin::init() QtUi::registerNotificationBackend(new IndicatorNotificationBackend(this)); #endif +#ifdef HAVE_NOTIFICATION_CENTER + QtUi::registerNotificationBackend(new OSXNotificationBackend(this)); +#endif + // we assume that at this point, all configurable actions are defined! QtUi::loadShortcuts(); diff --git a/src/qtui/mainwin.h b/src/qtui/mainwin.h index 07e4e634..9104654e 100644 --- a/src/qtui/mainwin.h +++ b/src/qtui/mainwin.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/markerlineitem.cpp b/src/qtui/markerlineitem.cpp index dc3aee37..96290cec 100644 --- a/src/qtui/markerlineitem.cpp +++ b/src/qtui/markerlineitem.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/markerlineitem.h b/src/qtui/markerlineitem.h index 79fb7201..b739fae5 100644 --- a/src/qtui/markerlineitem.h +++ b/src/qtui/markerlineitem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/monoapplication.cpp b/src/qtui/monoapplication.cpp index ab3bf027..69ca4482 100644 --- a/src/qtui/monoapplication.cpp +++ b/src/qtui/monoapplication.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -24,7 +24,7 @@ #include "core.h" #include "qtui.h" -class InternalConnection; +class InternalPeer; MonolithicApplication::MonolithicApplication(int &argc, char **argv) : QtUiApplication(argc, argv), @@ -70,6 +70,6 @@ void MonolithicApplication::startInternalCore() } Core *core = Core::instance(); CoreConnection *connection = Client::coreConnection(); - connect(connection, SIGNAL(connectToInternalCore(InternalConnection*)), core, SLOT(setupInternalClientSession(InternalConnection*))); + connect(connection, SIGNAL(connectToInternalCore(InternalPeer*)), core, SLOT(setupInternalClientSession(InternalPeer*))); connect(core, SIGNAL(sessionState(QVariant)), connection, SLOT(internalSessionStateReceived(QVariant))); } diff --git a/src/qtui/monoapplication.h b/src/qtui/monoapplication.h index 198f07df..1ef8254c 100644 --- a/src/qtui/monoapplication.h +++ b/src/qtui/monoapplication.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/msgprocessorstatuswidget.cpp b/src/qtui/msgprocessorstatuswidget.cpp index 0c8dfe00..8c719d8e 100644 --- a/src/qtui/msgprocessorstatuswidget.cpp +++ b/src/qtui/msgprocessorstatuswidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/msgprocessorstatuswidget.h b/src/qtui/msgprocessorstatuswidget.h index 10c74fdb..e1a73076 100644 --- a/src/qtui/msgprocessorstatuswidget.h +++ b/src/qtui/msgprocessorstatuswidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/nicklistwidget.cpp b/src/qtui/nicklistwidget.cpp index 0b67a9e6..674e89d1 100644 --- a/src/qtui/nicklistwidget.cpp +++ b/src/qtui/nicklistwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/nicklistwidget.h b/src/qtui/nicklistwidget.h index f144e778..15b5a585 100644 --- a/src/qtui/nicklistwidget.h +++ b/src/qtui/nicklistwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/osxnotificationbackend.h b/src/qtui/osxnotificationbackend.h new file mode 100644 index 00000000..55a8d58e --- /dev/null +++ b/src/qtui/osxnotificationbackend.h @@ -0,0 +1,66 @@ +/*************************************************************************** + * Copyright (C) 2005-2012 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * 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., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef OSXNOTIFICATIONBACKEND_H_ +#define OSXNOTIFICATIONBACKEND_H_ + +#include "abstractnotificationbackend.h" +#include "settingspage.h" + +class OSXNotificationBackend : public AbstractNotificationBackend +{ + Q_OBJECT + +public: + OSXNotificationBackend(QObject *parent = 0); + + void notify(const Notification &); + void close(uint notificationId); + virtual SettingsPage *createConfigWidget() const; + +private slots: + void enabledChanged(const QVariant &value); + +private: + class ConfigWidget; + + bool _enabled; +}; + +class OSXNotificationBackend::ConfigWidget : public SettingsPage +{ + Q_OBJECT + +public: + ConfigWidget(QWidget *parent = 0); + void save(); + void load(); + bool hasDefaults() const; + void defaults(); + +private slots: + void widgetChanged(); + +private: + QCheckBox *_enabledBox; + bool _enabled; +}; + +#endif // OSXNOTIFICATIONBACKEND_H_ diff --git a/src/qtui/osxnotificationbackend.mm b/src/qtui/osxnotificationbackend.mm new file mode 100644 index 00000000..738ee265 --- /dev/null +++ b/src/qtui/osxnotificationbackend.mm @@ -0,0 +1,126 @@ +/*************************************************************************** + * Copyright (C) 2005-2012 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * 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., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include "clientsettings.h" +#include "osxnotificationbackend.h" + +#include +#include + +#import + +namespace { + +void SendNotificationCenterMessage(NSString* title, NSString* subtitle) { + NSUserNotificationCenter* center = + [NSUserNotificationCenter defaultUserNotificationCenter]; + NSUserNotification* notification = + [[NSUserNotification alloc] init]; + + [notification setTitle: title]; + [notification setSubtitle: subtitle]; + + [center deliverNotification: notification]; + + [notification release]; +} + +} + +OSXNotificationBackend::OSXNotificationBackend(QObject *parent) + : AbstractNotificationBackend(parent), + _enabled(true) +{ + NotificationSettings notificationSettings; + notificationSettings.initAndNotify("OSXNotification/Enabled", this, SLOT(enabledChanged(QVariant)), true); +} + +void OSXNotificationBackend::enabledChanged(const QVariant &value) +{ + _enabled = value.toBool(); +} + +void OSXNotificationBackend::notify(const Notification ¬ification) +{ + if (!_enabled) + { + return; + } + + NSString* message = [[NSString alloc] initWithUTF8String:notification.sender.toUtf8().constData()]; + NSString* summary = [[NSString alloc] initWithUTF8String:notification.message.toUtf8().constData()]; + + SendNotificationCenterMessage(message, summary); + + [message release]; + [summary release]; +} + +void OSXNotificationBackend::close(uint notificationId) +{ +} + +SettingsPage *OSXNotificationBackend::createConfigWidget() const +{ + return new ConfigWidget(); +} + +OSXNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent) + : SettingsPage("Internal", "OSXNotification", parent) +{ + _enabledBox = new QCheckBox(tr("Show OS X notifications")); + connect(_enabledBox, SIGNAL(toggled(bool)), this, SLOT(widgetChanged())); + QHBoxLayout *layout = new QHBoxLayout(this); + layout->addWidget(_enabledBox); +} + +void OSXNotificationBackend::ConfigWidget::widgetChanged() +{ + bool changed = (_enabled != _enabledBox->isChecked()); + if (changed != hasChanged()) + setChangedState(changed); +} + +bool OSXNotificationBackend::ConfigWidget::hasDefaults() const +{ + return true; +} + +void OSXNotificationBackend::ConfigWidget::defaults() +{ + _enabledBox->setChecked(true); + widgetChanged(); +} + +void OSXNotificationBackend::ConfigWidget::load() +{ + NotificationSettings s; + _enabled = s.value("OSXNotification/Enabled", false).toBool(); + _enabledBox->setChecked(_enabled); + setChangedState(false); +} + + +void OSXNotificationBackend::ConfigWidget::save() +{ + NotificationSettings s; + s.setValue("OSXNotification/Enabled", _enabledBox->isChecked()); + load(); +} diff --git a/src/qtui/phononnotificationbackend.cpp b/src/qtui/phononnotificationbackend.cpp index 72270a8c..bcc7c76d 100644 --- a/src/qtui/phononnotificationbackend.cpp +++ b/src/qtui/phononnotificationbackend.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,7 +20,8 @@ #include -#include +#include +#include #include "phononnotificationbackend.h" @@ -33,6 +34,7 @@ PhononNotificationBackend::PhononNotificationBackend(QObject *parent) : AbstractNotificationBackend(parent), _media(0) { + _audioAvailable = !Phonon::BackendCapabilities::availableAudioOutputDevices().isEmpty(); NotificationSettings notificationSettings; _enabled = notificationSettings.value("Phonon/Enabled", true).toBool(); createMediaObject(notificationSettings.value("Phonon/AudioFile", QString()).toString()); @@ -51,9 +53,13 @@ PhononNotificationBackend::~PhononNotificationBackend() void PhononNotificationBackend::notify(const Notification ¬ification) { - if (_enabled && _media && (notification.type == Highlight || notification.type == PrivMsg)) { - _media->stop(); - _media->play(); + if (_enabled && (notification.type == Highlight || notification.type == PrivMsg)) { + if (_audioAvailable) { + _media->stop(); + _media->play(); + } + else + QApplication::beep(); } } @@ -92,8 +98,7 @@ void PhononNotificationBackend::createMediaObject(const QString &file) return; } - _media = Phonon::createPlayer(Phonon::NotificationCategory, - Phonon::MediaSource(file)); + _media = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(file)); } @@ -104,6 +109,7 @@ PhononNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent) audioPreview(0) { ui.setupUi(this); + _audioAvailable = !Phonon::BackendCapabilities::availableAudioOutputDevices().isEmpty(); ui.enabled->setIcon(SmallIcon("media-playback-start")); ui.play->setIcon(SmallIcon("media-playback-start")); ui.open->setIcon(SmallIcon("document-open")); @@ -122,12 +128,20 @@ PhononNotificationBackend::ConfigWidget::~ConfigWidget() void PhononNotificationBackend::ConfigWidget::widgetChanged() { - ui.play->setEnabled(ui.enabled->isChecked() && !ui.filename->text().isEmpty()); + if (! _audioAvailable) { + ui.play->setEnabled(ui.enabled->isChecked()); + ui.open->setEnabled(false); + ui.filename->setEnabled(false); + ui.filename->setText(QString()); + } + else { + ui.play->setEnabled(ui.enabled->isChecked() && !ui.filename->text().isEmpty()); - bool changed = (enabled != ui.enabled->isChecked() - || filename != ui.filename->text()); + bool changed = (enabled != ui.enabled->isChecked() || filename != ui.filename->text()); - if (changed != hasChanged()) setChangedState(changed); + if (changed != hasChanged()) + setChangedState(changed); + } } @@ -180,12 +194,15 @@ void PhononNotificationBackend::ConfigWidget::on_open_clicked() void PhononNotificationBackend::ConfigWidget::on_play_clicked() { - if (!ui.filename->text().isEmpty()) { - if (audioPreview) - delete audioPreview; + if (_audioAvailable) { + if (!ui.filename->text().isEmpty()) { + if (audioPreview) + delete audioPreview; - audioPreview = Phonon::createPlayer(Phonon::NotificationCategory, - Phonon::MediaSource(ui.filename->text())); - audioPreview->play(); + audioPreview = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(ui.filename->text())); + audioPreview->play(); + } } + else + QApplication::beep(); } diff --git a/src/qtui/phononnotificationbackend.h b/src/qtui/phononnotificationbackend.h index 936aa105..b6ae1bea 100644 --- a/src/qtui/phononnotificationbackend.h +++ b/src/qtui/phononnotificationbackend.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -49,6 +49,7 @@ private: class ConfigWidget; bool _enabled; + bool _audioAvailable; Phonon::MediaObject *_media; }; @@ -75,6 +76,7 @@ private: Ui::PhononNotificationConfigWidget ui; bool enabled; + bool _audioAvailable; QString filename; Phonon::MediaObject *audioPreview; }; diff --git a/src/qtui/qtui.cpp b/src/qtui/qtui.cpp index 05f73634..9c7cbbf8 100644 --- a/src/qtui/qtui.cpp +++ b/src/qtui/qtui.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/qtui.h b/src/qtui/qtui.h index bd11f9e5..8ad7aa3c 100644 --- a/src/qtui/qtui.h +++ b/src/qtui/qtui.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/qtuiapplication.cpp b/src/qtui/qtuiapplication.cpp index fc94e973..e13fa0ff 100644 --- a/src/qtui/qtuiapplication.cpp +++ b/src/qtui/qtuiapplication.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/qtuiapplication.h b/src/qtui/qtuiapplication.h index 557379f1..6f4a7e26 100644 --- a/src/qtui/qtuiapplication.h +++ b/src/qtui/qtuiapplication.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/qtuimessageprocessor.cpp b/src/qtui/qtuimessageprocessor.cpp index cd41c1af..679705c3 100644 --- a/src/qtui/qtuimessageprocessor.cpp +++ b/src/qtui/qtuimessageprocessor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/qtuimessageprocessor.h b/src/qtui/qtuimessageprocessor.h index 8e178be1..3eab6372 100644 --- a/src/qtui/qtuimessageprocessor.h +++ b/src/qtui/qtuimessageprocessor.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/qtuisettings.cpp b/src/qtui/qtuisettings.cpp index 045b2b39..5b1012e0 100644 --- a/src/qtui/qtuisettings.cpp +++ b/src/qtui/qtuisettings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/qtuisettings.h b/src/qtui/qtuisettings.h index ed93b040..8335e836 100644 --- a/src/qtui/qtuisettings.h +++ b/src/qtui/qtuisettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/qtuistyle.cpp b/src/qtui/qtuistyle.cpp index 5769b4fa..11f6c43a 100644 --- a/src/qtui/qtuistyle.cpp +++ b/src/qtui/qtuistyle.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/qtuistyle.h b/src/qtui/qtuistyle.h index dbc9c343..f6651f99 100644 --- a/src/qtui/qtuistyle.h +++ b/src/qtui/qtuistyle.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingsdlg.cpp b/src/qtui/settingsdlg.cpp index 4dbfae20..11a8bcaa 100644 --- a/src/qtui/settingsdlg.cpp +++ b/src/qtui/settingsdlg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingsdlg.h b/src/qtui/settingsdlg.h index 950e8089..82cefdb9 100644 --- a/src/qtui/settingsdlg.h +++ b/src/qtui/settingsdlg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspagedlg.cpp b/src/qtui/settingspagedlg.cpp index 7cbbdbe4..b978df6e 100644 --- a/src/qtui/settingspagedlg.cpp +++ b/src/qtui/settingspagedlg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspagedlg.h b/src/qtui/settingspagedlg.h index fb62d5f2..471bbadd 100644 --- a/src/qtui/settingspagedlg.h +++ b/src/qtui/settingspagedlg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/aliasesmodel.cpp b/src/qtui/settingspages/aliasesmodel.cpp index aed4c1a7..a63ad067 100644 --- a/src/qtui/settingspages/aliasesmodel.cpp +++ b/src/qtui/settingspages/aliasesmodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/aliasesmodel.h b/src/qtui/settingspages/aliasesmodel.h index 0e18ed7e..a7b85629 100644 --- a/src/qtui/settingspages/aliasesmodel.h +++ b/src/qtui/settingspages/aliasesmodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/aliasessettingspage.cpp b/src/qtui/settingspages/aliasessettingspage.cpp index 49b3a813..3a9794ba 100644 --- a/src/qtui/settingspages/aliasessettingspage.cpp +++ b/src/qtui/settingspages/aliasessettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/aliasessettingspage.h b/src/qtui/settingspages/aliasessettingspage.h index ce9c2075..0201f514 100644 --- a/src/qtui/settingspages/aliasessettingspage.h +++ b/src/qtui/settingspages/aliasessettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/appearancesettingspage.cpp b/src/qtui/settingspages/appearancesettingspage.cpp index ab6276ad..1a664762 100644 --- a/src/qtui/settingspages/appearancesettingspage.cpp +++ b/src/qtui/settingspages/appearancesettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/appearancesettingspage.h b/src/qtui/settingspages/appearancesettingspage.h index 77828259..c026a8ff 100644 --- a/src/qtui/settingspages/appearancesettingspage.h +++ b/src/qtui/settingspages/appearancesettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/backlogsettingspage.cpp b/src/qtui/settingspages/backlogsettingspage.cpp index 7d3d90a4..8afcbbcc 100644 --- a/src/qtui/settingspages/backlogsettingspage.cpp +++ b/src/qtui/settingspages/backlogsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/backlogsettingspage.h b/src/qtui/settingspages/backlogsettingspage.h index 3df67915..15f08b96 100644 --- a/src/qtui/settingspages/backlogsettingspage.h +++ b/src/qtui/settingspages/backlogsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/bufferviewsettingspage.cpp b/src/qtui/settingspages/bufferviewsettingspage.cpp index bb3c99f3..f2ef7a17 100644 --- a/src/qtui/settingspages/bufferviewsettingspage.cpp +++ b/src/qtui/settingspages/bufferviewsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/bufferviewsettingspage.h b/src/qtui/settingspages/bufferviewsettingspage.h index e52e8de8..880d5382 100644 --- a/src/qtui/settingspages/bufferviewsettingspage.h +++ b/src/qtui/settingspages/bufferviewsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/chatmonitorsettingspage.cpp b/src/qtui/settingspages/chatmonitorsettingspage.cpp index c27cbad0..67c4b0b2 100644 --- a/src/qtui/settingspages/chatmonitorsettingspage.cpp +++ b/src/qtui/settingspages/chatmonitorsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/chatmonitorsettingspage.h b/src/qtui/settingspages/chatmonitorsettingspage.h index be15f71d..26e22fc6 100644 --- a/src/qtui/settingspages/chatmonitorsettingspage.h +++ b/src/qtui/settingspages/chatmonitorsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/chatviewsettingspage.cpp b/src/qtui/settingspages/chatviewsettingspage.cpp index b45f7f04..afbe4444 100644 --- a/src/qtui/settingspages/chatviewsettingspage.cpp +++ b/src/qtui/settingspages/chatviewsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/chatviewsettingspage.h b/src/qtui/settingspages/chatviewsettingspage.h index 5500a84c..0ec253fc 100644 --- a/src/qtui/settingspages/chatviewsettingspage.h +++ b/src/qtui/settingspages/chatviewsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/connectionsettingspage.cpp b/src/qtui/settingspages/connectionsettingspage.cpp index edec88a1..4fcc70a6 100644 --- a/src/qtui/settingspages/connectionsettingspage.cpp +++ b/src/qtui/settingspages/connectionsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -85,6 +85,8 @@ QVariant ConnectionSettingsPage::loadAutoWidgetValue(const QString &widgetName) return config->autoWhoNickLimit(); if (widgetName == "autoWhoDelay") return config->autoWhoDelay(); + if (widgetName == "standardCtcp") + return config->standardCtcp(); return SettingsPage::loadAutoWidgetValue(widgetName); } @@ -109,6 +111,8 @@ void ConnectionSettingsPage::saveAutoWidgetValue(const QString &widgetName, cons config->requestSetAutoWhoNickLimit(value.toInt()); else if (widgetName == "autoWhoDelay") config->requestSetAutoWhoDelay(value.toInt()); + else if (widgetName == "standardCtcp") + config->requestSetStandardCtcp(value.toBool()); else SettingsPage::saveAutoWidgetValue(widgetName, value); diff --git a/src/qtui/settingspages/connectionsettingspage.h b/src/qtui/settingspages/connectionsettingspage.h index e3bb7ddb..e4170197 100644 --- a/src/qtui/settingspages/connectionsettingspage.h +++ b/src/qtui/settingspages/connectionsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/connectionsettingspage.ui b/src/qtui/settingspages/connectionsettingspage.ui index 484454c3..e1ca2480 100644 --- a/src/qtui/settingspages/connectionsettingspage.ui +++ b/src/qtui/settingspages/connectionsettingspage.ui @@ -244,6 +244,16 @@ + + + + Enable standard-compliant CTCP behavior + + + + + + diff --git a/src/qtui/settingspages/coreaccountsettingspage.cpp b/src/qtui/settingspages/coreaccountsettingspage.cpp index 863b9256..87099866 100644 --- a/src/qtui/settingspages/coreaccountsettingspage.cpp +++ b/src/qtui/settingspages/coreaccountsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/coreaccountsettingspage.h b/src/qtui/settingspages/coreaccountsettingspage.h index f9a0c648..831ab5ee 100644 --- a/src/qtui/settingspages/coreaccountsettingspage.h +++ b/src/qtui/settingspages/coreaccountsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/coreconnectionsettingspage.cpp b/src/qtui/settingspages/coreconnectionsettingspage.cpp index 4113a4e7..176386ad 100644 --- a/src/qtui/settingspages/coreconnectionsettingspage.cpp +++ b/src/qtui/settingspages/coreconnectionsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/coreconnectionsettingspage.h b/src/qtui/settingspages/coreconnectionsettingspage.h index 91f27d17..d1be23b8 100644 --- a/src/qtui/settingspages/coreconnectionsettingspage.h +++ b/src/qtui/settingspages/coreconnectionsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/highlightsettingspage.cpp b/src/qtui/settingspages/highlightsettingspage.cpp index d9e3d160..a915504d 100644 --- a/src/qtui/settingspages/highlightsettingspage.cpp +++ b/src/qtui/settingspages/highlightsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/highlightsettingspage.h b/src/qtui/settingspages/highlightsettingspage.h index 244eef77..3fd382cc 100644 --- a/src/qtui/settingspages/highlightsettingspage.h +++ b/src/qtui/settingspages/highlightsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/identitiessettingspage.cpp b/src/qtui/settingspages/identitiessettingspage.cpp index 198b8ba4..094e9e00 100644 --- a/src/qtui/settingspages/identitiessettingspage.cpp +++ b/src/qtui/settingspages/identitiessettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/identitiessettingspage.h b/src/qtui/settingspages/identitiessettingspage.h index f8861ce1..4ae1e6d8 100644 --- a/src/qtui/settingspages/identitiessettingspage.h +++ b/src/qtui/settingspages/identitiessettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/identityeditwidget.cpp b/src/qtui/settingspages/identityeditwidget.cpp index 27e0609d..f670753f 100644 --- a/src/qtui/settingspages/identityeditwidget.cpp +++ b/src/qtui/settingspages/identityeditwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/identityeditwidget.h b/src/qtui/settingspages/identityeditwidget.h index d60199c4..75db71f2 100644 --- a/src/qtui/settingspages/identityeditwidget.h +++ b/src/qtui/settingspages/identityeditwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/ignorelistmodel.cpp b/src/qtui/settingspages/ignorelistmodel.cpp index d9040095..876a141e 100644 --- a/src/qtui/settingspages/ignorelistmodel.cpp +++ b/src/qtui/settingspages/ignorelistmodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/ignorelistmodel.h b/src/qtui/settingspages/ignorelistmodel.h index 6e36c7bf..8940dbf6 100644 --- a/src/qtui/settingspages/ignorelistmodel.h +++ b/src/qtui/settingspages/ignorelistmodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/ignorelistsettingspage.cpp b/src/qtui/settingspages/ignorelistsettingspage.cpp index 832ddd93..d37ae94c 100644 --- a/src/qtui/settingspages/ignorelistsettingspage.cpp +++ b/src/qtui/settingspages/ignorelistsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/ignorelistsettingspage.h b/src/qtui/settingspages/ignorelistsettingspage.h index 1a01a50e..fc9931eb 100644 --- a/src/qtui/settingspages/ignorelistsettingspage.h +++ b/src/qtui/settingspages/ignorelistsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/inputwidgetsettingspage.cpp b/src/qtui/settingspages/inputwidgetsettingspage.cpp index 93a10d2c..737ae132 100644 --- a/src/qtui/settingspages/inputwidgetsettingspage.cpp +++ b/src/qtui/settingspages/inputwidgetsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/inputwidgetsettingspage.h b/src/qtui/settingspages/inputwidgetsettingspage.h index d301336e..d866b7cc 100644 --- a/src/qtui/settingspages/inputwidgetsettingspage.h +++ b/src/qtui/settingspages/inputwidgetsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/itemviewsettingspage.cpp b/src/qtui/settingspages/itemviewsettingspage.cpp index ae1dd11a..4ab43a43 100644 --- a/src/qtui/settingspages/itemviewsettingspage.cpp +++ b/src/qtui/settingspages/itemviewsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/itemviewsettingspage.h b/src/qtui/settingspages/itemviewsettingspage.h index 6f597adb..8a9db1c9 100644 --- a/src/qtui/settingspages/itemviewsettingspage.h +++ b/src/qtui/settingspages/itemviewsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/keysequencewidget.cpp b/src/qtui/settingspages/keysequencewidget.cpp index 6e4fea6b..88d600ed 100644 --- a/src/qtui/settingspages/keysequencewidget.cpp +++ b/src/qtui/settingspages/keysequencewidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This class has been inspired by KDE's KKeySequenceWidget and uses * diff --git a/src/qtui/settingspages/keysequencewidget.h b/src/qtui/settingspages/keysequencewidget.h index 25971e70..30075783 100644 --- a/src/qtui/settingspages/keysequencewidget.h +++ b/src/qtui/settingspages/keysequencewidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This class has been inspired by KDE's KKeySequenceWidget and uses * diff --git a/src/qtui/settingspages/networkssettingspage.cpp b/src/qtui/settingspages/networkssettingspage.cpp index 3aeaf708..4d66b6f6 100644 --- a/src/qtui/settingspages/networkssettingspage.cpp +++ b/src/qtui/settingspages/networkssettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -35,12 +35,20 @@ NetworksSettingsPage::NetworksSettingsPage(QWidget *parent) : SettingsPage(tr("IRC"), tr("Networks"), parent) +#ifdef HAVE_SSL + , _cid(0) +#endif { ui.setupUi(this); // hide SASL options for older cores if (!(Client::coreFeatures() & Quassel::SaslAuthentication)) ui.sasl->hide(); + if (!(Client::coreFeatures() & Quassel::SaslExternal)) + ui.saslExtInfo->hide(); +#ifndef HAVE_SSL + ui.saslExtInfo->hide(); +#endif // set up icons ui.renameNetwork->setIcon(SmallIcon("edit-rename")); @@ -469,6 +477,20 @@ void NetworksSettingsPage::displayNetwork(NetworkId id) _ignoreWidgetChanges = true; if (id != 0) { NetworkInfo info = networkInfos[id]; + +#ifdef HAVE_SSL + // this is only needed when the core supports SASL EXTERNAL + if (Client::coreFeatures() & Quassel::SaslExternal) { + if (_cid) { + disconnect(_cid, SIGNAL(sslSettingsUpdated()), this, SLOT(sslUpdated())); + delete _cid; + } + _cid = new CertIdentity(*Client::identity(info.identity), this); + _cid->enableEditSsl(true); + connect(_cid, SIGNAL(sslSettingsUpdated()), this, SLOT(sslUpdated())); + } +#endif + ui.identityList->setCurrentIndex(ui.identityList->findData(info.identity.toInt())); ui.serverList->clear(); foreach(Network::Server server, info.serverList) { @@ -506,6 +528,12 @@ void NetworksSettingsPage::displayNetwork(NetworkId id) } else { // just clear widgets +#ifdef HAVE_SSL + if (_cid) { + disconnect(_cid, SIGNAL(sslSettingsUpdated()), this, SLOT(sslUpdated())); + delete _cid; + } +#endif ui.identityList->setCurrentIndex(-1); ui.serverList->clear(); ui.performEdit->clear(); @@ -549,6 +577,26 @@ void NetworksSettingsPage::saveToNetworkInfo(NetworkInfo &info) } +#ifdef HAVE_SSL +void NetworksSettingsPage::sslUpdated() +{ + if (_cid && !_cid->sslKey().isNull()) { + ui.saslAccount->setDisabled(true); + ui.saslAccountLabel->setDisabled(true); + ui.saslPassword->setDisabled(true); + ui.saslPasswordLabel->setDisabled(true); + ui.saslExtInfo->setHidden(false); + } else { + ui.saslAccount->setDisabled(false); + ui.saslAccountLabel->setDisabled(false); + ui.saslPassword->setDisabled(false); + ui.saslPasswordLabel->setDisabled(false); + ui.saslExtInfo->setHidden(true); + } +} +#endif + + /*** Network list ***/ void NetworksSettingsPage::on_networkList_itemSelectionChanged() diff --git a/src/qtui/settingspages/networkssettingspage.h b/src/qtui/settingspages/networkssettingspage.h index a6588842..ef9f8835 100644 --- a/src/qtui/settingspages/networkssettingspage.h +++ b/src/qtui/settingspages/networkssettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 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 "network.h" #include "settingspage.h" +#include "clientidentity.h" #include "ui_networkssettingspage.h" #include "ui_networkadddlg.h" @@ -65,6 +66,10 @@ private slots: void clientIdentityRemoved(IdentityId); void clientIdentityUpdated(); +#ifdef HAVE_SSL + void sslUpdated(); +#endif + void on_networkList_itemSelectionChanged(); void on_addNetwork_clicked(); void on_deleteNetwork_clicked(); @@ -86,6 +91,9 @@ private: NetworkId currentId; QHash networkInfos; bool _ignoreWidgetChanges; +#ifdef HAVE_SSL + CertIdentity *_cid; +#endif QPixmap connectedIcon, connectingIcon, disconnectedIcon; diff --git a/src/qtui/settingspages/networkssettingspage.ui b/src/qtui/settingspages/networkssettingspage.ui index 7665e101..7ef574ac 100644 --- a/src/qtui/settingspages/networkssettingspage.ui +++ b/src/qtui/settingspages/networkssettingspage.ui @@ -6,8 +6,8 @@ 0 0 - 515 - 503 + 510 + 505 @@ -607,7 +607,7 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne - + true @@ -617,7 +617,7 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne - + true @@ -629,6 +629,16 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne + + + + <html><head/><body><p><span style=" font-weight:600;">Note:</span> because the identity has an ssl certificate set, SASL EXTERNAL will be used.</p></body></html> + + + true + + + diff --git a/src/qtui/settingspages/notificationssettingspage.cpp b/src/qtui/settingspages/notificationssettingspage.cpp index 7e587fb5..2a79f675 100644 --- a/src/qtui/settingspages/notificationssettingspage.cpp +++ b/src/qtui/settingspages/notificationssettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/notificationssettingspage.h b/src/qtui/settingspages/notificationssettingspage.h index c1dca615..8fd6ae19 100644 --- a/src/qtui/settingspages/notificationssettingspage.h +++ b/src/qtui/settingspages/notificationssettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/previewbufferview.cpp b/src/qtui/settingspages/previewbufferview.cpp index 309a1c2d..76e029b3 100644 --- a/src/qtui/settingspages/previewbufferview.cpp +++ b/src/qtui/settingspages/previewbufferview.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/previewbufferview.h b/src/qtui/settingspages/previewbufferview.h index 03ecf227..6f762b5a 100644 --- a/src/qtui/settingspages/previewbufferview.h +++ b/src/qtui/settingspages/previewbufferview.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/shortcutsmodel.cpp b/src/qtui/settingspages/shortcutsmodel.cpp index 2ee0eee8..47679839 100644 --- a/src/qtui/settingspages/shortcutsmodel.cpp +++ b/src/qtui/settingspages/shortcutsmodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/shortcutsmodel.h b/src/qtui/settingspages/shortcutsmodel.h index b6a0df30..dfd6c8a6 100644 --- a/src/qtui/settingspages/shortcutsmodel.h +++ b/src/qtui/settingspages/shortcutsmodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/shortcutssettingspage.cpp b/src/qtui/settingspages/shortcutssettingspage.cpp index a9bfaf8c..40fd8df4 100644 --- a/src/qtui/settingspages/shortcutssettingspage.cpp +++ b/src/qtui/settingspages/shortcutssettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/shortcutssettingspage.h b/src/qtui/settingspages/shortcutssettingspage.h index 8a6fcfec..9eb9b526 100644 --- a/src/qtui/settingspages/shortcutssettingspage.h +++ b/src/qtui/settingspages/shortcutssettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/topicwidgetsettingspage.cpp b/src/qtui/settingspages/topicwidgetsettingspage.cpp index 2e71dde8..8a9584e8 100644 --- a/src/qtui/settingspages/topicwidgetsettingspage.cpp +++ b/src/qtui/settingspages/topicwidgetsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/settingspages/topicwidgetsettingspage.h b/src/qtui/settingspages/topicwidgetsettingspage.h index c4f48ef3..e5827a86 100644 --- a/src/qtui/settingspages/topicwidgetsettingspage.h +++ b/src/qtui/settingspages/topicwidgetsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/simplenetworkeditor.cpp b/src/qtui/simplenetworkeditor.cpp index 1c0d7ec9..1591e75f 100644 --- a/src/qtui/simplenetworkeditor.cpp +++ b/src/qtui/simplenetworkeditor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/simplenetworkeditor.h b/src/qtui/simplenetworkeditor.h index 5db021f3..aaca86ae 100644 --- a/src/qtui/simplenetworkeditor.h +++ b/src/qtui/simplenetworkeditor.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/sslinfodlg.cpp b/src/qtui/sslinfodlg.cpp index 1aabb79c..e0b6a492 100644 --- a/src/qtui/sslinfodlg.cpp +++ b/src/qtui/sslinfodlg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/sslinfodlg.h b/src/qtui/sslinfodlg.h index b3a1bed1..ef372a92 100644 --- a/src/qtui/sslinfodlg.h +++ b/src/qtui/sslinfodlg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/statusnotifieritem.cpp b/src/qtui/statusnotifieritem.cpp index 1b6cb4a0..e96cd4eb 100644 --- a/src/qtui/statusnotifieritem.cpp +++ b/src/qtui/statusnotifieritem.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This contains code from KStatusNotifierItem, part of the KDE libs * diff --git a/src/qtui/statusnotifieritem.h b/src/qtui/statusnotifieritem.h index df95c464..30050b15 100644 --- a/src/qtui/statusnotifieritem.h +++ b/src/qtui/statusnotifieritem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This contains code from KStatusNotifierItem, part of the KDE libs * diff --git a/src/qtui/systemtray.cpp b/src/qtui/systemtray.cpp index 5bae0845..bb80eeb1 100644 --- a/src/qtui/systemtray.cpp +++ b/src/qtui/systemtray.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/systemtray.h b/src/qtui/systemtray.h index 9556ce9b..65b6e8d8 100644 --- a/src/qtui/systemtray.h +++ b/src/qtui/systemtray.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/systraynotificationbackend.cpp b/src/qtui/systraynotificationbackend.cpp index 2f2e11a2..ae16ac2e 100644 --- a/src/qtui/systraynotificationbackend.cpp +++ b/src/qtui/systraynotificationbackend.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/systraynotificationbackend.h b/src/qtui/systraynotificationbackend.h index 17028388..8493d7ce 100644 --- a/src/qtui/systraynotificationbackend.h +++ b/src/qtui/systraynotificationbackend.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/taskbarnotificationbackend.cpp b/src/qtui/taskbarnotificationbackend.cpp index 5ffdf71f..9d07bfac 100644 --- a/src/qtui/taskbarnotificationbackend.cpp +++ b/src/qtui/taskbarnotificationbackend.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/taskbarnotificationbackend.h b/src/qtui/taskbarnotificationbackend.h index b9e6dea9..041125cb 100644 --- a/src/qtui/taskbarnotificationbackend.h +++ b/src/qtui/taskbarnotificationbackend.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/titlesetter.cpp b/src/qtui/titlesetter.cpp index 67d439ca..31385a0e 100644 --- a/src/qtui/titlesetter.cpp +++ b/src/qtui/titlesetter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/titlesetter.h b/src/qtui/titlesetter.h index 5bc1c785..1acb20de 100644 --- a/src/qtui/titlesetter.h +++ b/src/qtui/titlesetter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/topicwidget.cpp b/src/qtui/topicwidget.cpp index 4af94b6b..8b8e16d4 100644 --- a/src/qtui/topicwidget.cpp +++ b/src/qtui/topicwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/topicwidget.h b/src/qtui/topicwidget.h index e41451c4..2a6bc6ce 100644 --- a/src/qtui/topicwidget.h +++ b/src/qtui/topicwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/verticaldock.cpp b/src/qtui/verticaldock.cpp index bf82e5f5..3ec7a96e 100644 --- a/src/qtui/verticaldock.cpp +++ b/src/qtui/verticaldock.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/verticaldock.h b/src/qtui/verticaldock.h index 0327a71d..7a11e20f 100644 --- a/src/qtui/verticaldock.h +++ b/src/qtui/verticaldock.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/webpreviewitem.cpp b/src/qtui/webpreviewitem.cpp index 37f231ac..7ee73922 100644 --- a/src/qtui/webpreviewitem.cpp +++ b/src/qtui/webpreviewitem.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/qtui/webpreviewitem.h b/src/qtui/webpreviewitem.h index a347bc7f..f28d1696 100644 --- a/src/qtui/webpreviewitem.h +++ b/src/qtui/webpreviewitem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/abstractbuffercontainer.cpp b/src/uisupport/abstractbuffercontainer.cpp index 3d937024..5c016035 100644 --- a/src/uisupport/abstractbuffercontainer.cpp +++ b/src/uisupport/abstractbuffercontainer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/abstractbuffercontainer.h b/src/uisupport/abstractbuffercontainer.h index 12b0d4a1..c35c8388 100644 --- a/src/uisupport/abstractbuffercontainer.h +++ b/src/uisupport/abstractbuffercontainer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/abstractitemview.cpp b/src/uisupport/abstractitemview.cpp index c79715fe..e8eb141d 100644 --- a/src/uisupport/abstractitemview.cpp +++ b/src/uisupport/abstractitemview.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/abstractitemview.h b/src/uisupport/abstractitemview.h index b75c9ff9..56b58aec 100644 --- a/src/uisupport/abstractitemview.h +++ b/src/uisupport/abstractitemview.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/abstractnotificationbackend.cpp b/src/uisupport/abstractnotificationbackend.cpp index 810ac895..c392c287 100644 --- a/src/uisupport/abstractnotificationbackend.cpp +++ b/src/uisupport/abstractnotificationbackend.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/abstractnotificationbackend.h b/src/uisupport/abstractnotificationbackend.h index 4c4e094c..f2a4eb88 100644 --- a/src/uisupport/abstractnotificationbackend.h +++ b/src/uisupport/abstractnotificationbackend.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/action.cpp b/src/uisupport/action.cpp index 983e385f..9a8c7add 100644 --- a/src/uisupport/action.cpp +++ b/src/uisupport/action.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/action.h b/src/uisupport/action.h index 81157a22..77b9dc00 100644 --- a/src/uisupport/action.h +++ b/src/uisupport/action.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/actioncollection.cpp b/src/uisupport/actioncollection.cpp index a6368792..58a6348d 100644 --- a/src/uisupport/actioncollection.cpp +++ b/src/uisupport/actioncollection.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/actioncollection.h b/src/uisupport/actioncollection.h index 866cd947..5774eb35 100644 --- a/src/uisupport/actioncollection.h +++ b/src/uisupport/actioncollection.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/bufferhotlistfilter.cpp b/src/uisupport/bufferhotlistfilter.cpp index 42dc813f..da68ebac 100644 --- a/src/uisupport/bufferhotlistfilter.cpp +++ b/src/uisupport/bufferhotlistfilter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/bufferhotlistfilter.h b/src/uisupport/bufferhotlistfilter.h index 2db49c09..f9dde62a 100644 --- a/src/uisupport/bufferhotlistfilter.h +++ b/src/uisupport/bufferhotlistfilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index 2d804167..d48d7c42 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/bufferview.h b/src/uisupport/bufferview.h index 8afa877c..ce7483e1 100644 --- a/src/uisupport/bufferview.h +++ b/src/uisupport/bufferview.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/bufferviewfilter.cpp b/src/uisupport/bufferviewfilter.cpp index 30839f67..f5ae4447 100644 --- a/src/uisupport/bufferviewfilter.cpp +++ b/src/uisupport/bufferviewfilter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/bufferviewfilter.h b/src/uisupport/bufferviewfilter.h index 462c3230..5b816fbd 100644 --- a/src/uisupport/bufferviewfilter.h +++ b/src/uisupport/bufferviewfilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/bufferviewoverlayfilter.cpp b/src/uisupport/bufferviewoverlayfilter.cpp index a90f8e86..9870fb56 100644 --- a/src/uisupport/bufferviewoverlayfilter.cpp +++ b/src/uisupport/bufferviewoverlayfilter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/bufferviewoverlayfilter.h b/src/uisupport/bufferviewoverlayfilter.h index 9849e2b1..fda73776 100644 --- a/src/uisupport/bufferviewoverlayfilter.h +++ b/src/uisupport/bufferviewoverlayfilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/clearablelineedit.cpp b/src/uisupport/clearablelineedit.cpp index 4a495e84..11d6239a 100644 --- a/src/uisupport/clearablelineedit.cpp +++ b/src/uisupport/clearablelineedit.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/clearablelineedit.h b/src/uisupport/clearablelineedit.h index c5fc73dd..5c4abb20 100644 --- a/src/uisupport/clearablelineedit.h +++ b/src/uisupport/clearablelineedit.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/clickable.cpp b/src/uisupport/clickable.cpp index 3e704179..73382917 100644 --- a/src/uisupport/clickable.cpp +++ b/src/uisupport/clickable.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/clickable.h b/src/uisupport/clickable.h index 80e9af36..295256cd 100644 --- a/src/uisupport/clickable.h +++ b/src/uisupport/clickable.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/clickablelabel.cpp b/src/uisupport/clickablelabel.cpp index 34661e86..2bb635e7 100644 --- a/src/uisupport/clickablelabel.cpp +++ b/src/uisupport/clickablelabel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/clickablelabel.h b/src/uisupport/clickablelabel.h index f8bab08b..759fda16 100644 --- a/src/uisupport/clickablelabel.h +++ b/src/uisupport/clickablelabel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/colorbutton.cpp b/src/uisupport/colorbutton.cpp index 5c8572ae..29327e81 100644 --- a/src/uisupport/colorbutton.cpp +++ b/src/uisupport/colorbutton.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/colorbutton.h b/src/uisupport/colorbutton.h index 0df56929..e93be888 100644 --- a/src/uisupport/colorbutton.h +++ b/src/uisupport/colorbutton.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/contextmenuactionprovider.cpp b/src/uisupport/contextmenuactionprovider.cpp index d14a689d..d0f6458e 100644 --- a/src/uisupport/contextmenuactionprovider.cpp +++ b/src/uisupport/contextmenuactionprovider.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/contextmenuactionprovider.h b/src/uisupport/contextmenuactionprovider.h index ca22d303..112d3317 100644 --- a/src/uisupport/contextmenuactionprovider.h +++ b/src/uisupport/contextmenuactionprovider.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/flatproxymodel.cpp b/src/uisupport/flatproxymodel.cpp index cef6459e..81c55686 100644 --- a/src/uisupport/flatproxymodel.cpp +++ b/src/uisupport/flatproxymodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/flatproxymodel.h b/src/uisupport/flatproxymodel.h index aa358072..0adf6183 100644 --- a/src/uisupport/flatproxymodel.h +++ b/src/uisupport/flatproxymodel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/fontselector.cpp b/src/uisupport/fontselector.cpp index 9ddbcb66..e9a3f5f6 100644 --- a/src/uisupport/fontselector.cpp +++ b/src/uisupport/fontselector.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/fontselector.h b/src/uisupport/fontselector.h index 3c7b2941..8a36e8c2 100644 --- a/src/uisupport/fontselector.h +++ b/src/uisupport/fontselector.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/graphicalui.cpp b/src/uisupport/graphicalui.cpp index 19a28c20..83b0ce5b 100644 --- a/src/uisupport/graphicalui.cpp +++ b/src/uisupport/graphicalui.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This contains code from KStatusNotifierItem, part of the KDE libs * diff --git a/src/uisupport/graphicalui.h b/src/uisupport/graphicalui.h index dcd03942..eb7562d0 100644 --- a/src/uisupport/graphicalui.h +++ b/src/uisupport/graphicalui.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/icon.cpp b/src/uisupport/icon.cpp index 63249999..19e9f88f 100644 --- a/src/uisupport/icon.cpp +++ b/src/uisupport/icon.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/icon.h b/src/uisupport/icon.h index f1865439..4cecb2ad 100644 --- a/src/uisupport/icon.h +++ b/src/uisupport/icon.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/iconloader.cpp b/src/uisupport/iconloader.cpp index 4f37c328..f000d189 100644 --- a/src/uisupport/iconloader.cpp +++ b/src/uisupport/iconloader.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/iconloader.h b/src/uisupport/iconloader.h index 0efed6af..c5c01ccb 100644 --- a/src/uisupport/iconloader.h +++ b/src/uisupport/iconloader.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * Based in part on KDE's kiconloader.h * diff --git a/src/uisupport/kcmdlinewrapper.cpp b/src/uisupport/kcmdlinewrapper.cpp index f106a199..0d4f30f2 100644 --- a/src/uisupport/kcmdlinewrapper.cpp +++ b/src/uisupport/kcmdlinewrapper.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/kcmdlinewrapper.h b/src/uisupport/kcmdlinewrapper.h index d306a3b8..6d4dd3a3 100644 --- a/src/uisupport/kcmdlinewrapper.h +++ b/src/uisupport/kcmdlinewrapper.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp index 05f630da..aed4af79 100644 --- a/src/uisupport/multilineedit.cpp +++ b/src/uisupport/multilineedit.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/multilineedit.h b/src/uisupport/multilineedit.h index 3eb729d2..70daa53f 100644 --- a/src/uisupport/multilineedit.h +++ b/src/uisupport/multilineedit.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/networkmodelcontroller.cpp b/src/uisupport/networkmodelcontroller.cpp index 7eb6c53e..1259b6ae 100644 --- a/src/uisupport/networkmodelcontroller.cpp +++ b/src/uisupport/networkmodelcontroller.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/networkmodelcontroller.h b/src/uisupport/networkmodelcontroller.h index 4b44523e..48fc5eb1 100644 --- a/src/uisupport/networkmodelcontroller.h +++ b/src/uisupport/networkmodelcontroller.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/nickview.cpp b/src/uisupport/nickview.cpp index bdec1872..05515e68 100644 --- a/src/uisupport/nickview.cpp +++ b/src/uisupport/nickview.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/nickview.h b/src/uisupport/nickview.h index 7ddd2ba1..21ffa027 100644 --- a/src/uisupport/nickview.h +++ b/src/uisupport/nickview.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/nickviewfilter.cpp b/src/uisupport/nickviewfilter.cpp index 74638522..8d223d5d 100644 --- a/src/uisupport/nickviewfilter.cpp +++ b/src/uisupport/nickviewfilter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/nickviewfilter.h b/src/uisupport/nickviewfilter.h index def0e122..716294ed 100644 --- a/src/uisupport/nickviewfilter.h +++ b/src/uisupport/nickviewfilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/qssparser.cpp b/src/uisupport/qssparser.cpp index 237533bf..01fda884 100644 --- a/src/uisupport/qssparser.cpp +++ b/src/uisupport/qssparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/qssparser.h b/src/uisupport/qssparser.h index c5838925..c52b3ea8 100644 --- a/src/uisupport/qssparser.h +++ b/src/uisupport/qssparser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/resizingstackedwidget.cpp b/src/uisupport/resizingstackedwidget.cpp index db5d20df..78c95025 100644 --- a/src/uisupport/resizingstackedwidget.cpp +++ b/src/uisupport/resizingstackedwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/resizingstackedwidget.h b/src/uisupport/resizingstackedwidget.h index 5b7a8a1d..7015469f 100644 --- a/src/uisupport/resizingstackedwidget.h +++ b/src/uisupport/resizingstackedwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/settingspage.cpp b/src/uisupport/settingspage.cpp index 1a9d1d8c..e5792b63 100644 --- a/src/uisupport/settingspage.cpp +++ b/src/uisupport/settingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/settingspage.h b/src/uisupport/settingspage.h index 1f2ffa13..3875ea01 100644 --- a/src/uisupport/settingspage.h +++ b/src/uisupport/settingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/styledlabel.cpp b/src/uisupport/styledlabel.cpp index 4aae71a0..1a56daad 100644 --- a/src/uisupport/styledlabel.cpp +++ b/src/uisupport/styledlabel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/styledlabel.h b/src/uisupport/styledlabel.h index b0dd215f..a43498a2 100644 --- a/src/uisupport/styledlabel.h +++ b/src/uisupport/styledlabel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/tabcompleter.cpp b/src/uisupport/tabcompleter.cpp index baae742b..da6b0741 100644 --- a/src/uisupport/tabcompleter.cpp +++ b/src/uisupport/tabcompleter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/tabcompleter.h b/src/uisupport/tabcompleter.h index 7d1aa6a1..3d3a1e93 100644 --- a/src/uisupport/tabcompleter.h +++ b/src/uisupport/tabcompleter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/toolbaractionprovider.cpp b/src/uisupport/toolbaractionprovider.cpp index c69ce08b..a7ef447b 100644 --- a/src/uisupport/toolbaractionprovider.cpp +++ b/src/uisupport/toolbaractionprovider.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/toolbaractionprovider.h b/src/uisupport/toolbaractionprovider.h index 391e0379..a4e61c42 100644 --- a/src/uisupport/toolbaractionprovider.h +++ b/src/uisupport/toolbaractionprovider.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/uisettings.cpp b/src/uisupport/uisettings.cpp index 361572ed..c8fce00c 100644 --- a/src/uisupport/uisettings.cpp +++ b/src/uisupport/uisettings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/uisettings.h b/src/uisupport/uisettings.h index 877b1750..c1db196e 100644 --- a/src/uisupport/uisettings.h +++ b/src/uisupport/uisettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index 1e78e385..df23a62e 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -561,15 +561,43 @@ UiStyle::StyledString UiStyle::styleString(const QString &s_, quint32 baseFormat QString UiStyle::mircToInternal(const QString &mirc_) { - QString mirc = mirc_; - mirc.replace('%', "%%"); // escape % just to be sure - mirc.replace('\t', " "); // tabs break layout, also this is italics in Konversation - mirc.replace('\x02', "%B"); - mirc.replace('\x0f', "%O"); - mirc.replace('\x12', "%R"); - mirc.replace('\x16', "%R"); - mirc.replace('\x1d', "%S"); - mirc.replace('\x1f', "%U"); + QString mirc; + mirc.reserve(mirc_.size()); + foreach (const QChar &c, mirc_) { + if ((c < '\x20' || c == '\x7f') && c != '\x03') { + switch (c.unicode()) { + case '\x02': + mirc += "%B"; + break; + case '\x0f': + mirc += "%O"; + break; + case '\x12': + case '\x16': + mirc += "%R"; + break; + case '\x1d': + mirc += "%S"; + break; + case '\x1f': + mirc += "%U"; + break; + case '\x7f': + mirc += QChar(0x2421); + break; + default: + mirc += QChar(0x2400 + c.unicode()); + } + } else { + if (c == '\t') { + mirc += " "; + continue; + } + if (c == '%') + mirc += c; + mirc += c; + } + } // Now we bring the color codes (\x03) in a sane format that can be parsed more easily later. // %Dcfxx is foreground, %Dcbxx is background color, where xx is a 2 digit dec number denoting the color code. diff --git a/src/uisupport/uistyle.h b/src/uisupport/uistyle.h index fd059742..993aab39 100644 --- a/src/uisupport/uistyle.h +++ b/src/uisupport/uistyle.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify *