QssParser: Interpret "oblique" as italic
[quassel.git] / src / core / sessionthread.cpp
index 49790df..7b8bc10 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 
 #include "core.h"
 #include "coresession.h"
-#include "internalconnection.h"
-#include "remoteconnection.h"
+#include "internalpeer.h"
+#include "remotepeer.h"
 #include "sessionthread.h"
 #include "signalproxy.h"
 
-SessionThread::SessionThread(UserId uid, bool restoreState, QObject *parent)
+SessionThread::SessionThread(UserId uid, bool restoreState, bool strictIdentEnabled, QObject *parent)
     : QThread(parent),
     _session(0),
     _user(uid),
     _sessionInitialized(false),
-    _restoreState(restoreState)
+    _restoreState(restoreState),
+    _strictIdentEnabled(strictIdentEnabled)
 {
     connect(this, SIGNAL(initialized()), this, SLOT(setSessionInitialized()));
 }
@@ -86,13 +87,13 @@ void SessionThread::addClient(QObject *peer)
 
 void SessionThread::addClientToSession(QObject *peer)
 {
-    RemoteConnection *connection = qobject_cast<RemoteConnection *>(peer);
-    if (connection) {
-        addRemoteClientToSession(connection);
+    RemotePeer *remote = qobject_cast<RemotePeer *>(peer);
+    if (remote) {
+        addRemoteClientToSession(remote);
         return;
     }
 
-    InternalConnection *internal = qobject_cast<InternalConnection *>(peer);
+    InternalPeer *internal = qobject_cast<InternalPeer *>(peer);
     if (internal) {
         addInternalClientToSession(internal);
         return;
@@ -102,28 +103,28 @@ 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(_session, SIGNAL(sessionState(QVariant)), Core::instance(), SIGNAL(sessionState(QVariant)));
+    _session = new CoreSession(user(), _restoreState, _strictIdentEnabled);
+    connect(this, SIGNAL(addRemoteClient(RemotePeer*)), _session, SLOT(addClient(RemotePeer*)));
+    connect(this, SIGNAL(addInternalClient(InternalPeer*)), _session, SLOT(addClient(InternalPeer*)));
+    connect(_session, SIGNAL(sessionState(Protocol::SessionState)), Core::instance(), SIGNAL(sessionState(Protocol::SessionState)));
     emit initialized();
     exec();
     delete _session;