Syncing my state before starting to reorganize the UI parts of the source...
[quassel.git] / src / client / client.cpp
index 2cb2e12..73316ca 100644 (file)
@@ -85,10 +85,10 @@ Buffer *Client::buffer(uint bufferUid) {
 
 Buffer *Client::buffer(BufferInfo id) {
   Buffer *buff = buffer(id.uid());
-  
+
   if(!buff) {
     Client *client = Client::instance();
-    Buffer *buff = new Buffer(id, client);
+    buff = new Buffer(id, client);
 
     connect(buff, SIGNAL(userInput(BufferInfo, QString)),
            client, SLOT(userInput(BufferInfo, QString)));
@@ -102,7 +102,7 @@ Buffer *Client::buffer(BufferInfo id) {
     client->_buffers[id.uid()] = buff;
     emit client->bufferUpdated(buff);
   }
-  
+  Q_ASSERT(buff);
   return buff;
 }
 
@@ -199,7 +199,6 @@ bool Client::isConnected() {
 void Client::connectToCore(const QVariantMap &conn) {
   // TODO implement SSL
   coreConnectionInfo = conn;
-  
   if(isConnected()) {
     emit coreConnectionError(tr("Already connected to Core!"));
     return;
@@ -265,7 +264,7 @@ void Client::coreSocketDisconnected() {
   foreach(NetworkInfo *networkinfo, _networkInfo.values()) {
     delete networkinfo;
   }
-  Q_ASSERT(_networkinfo.empty());
+  Q_ASSERT(_networkInfo.empty());
 
   coreConnectionInfo.clear();
   sessionData.clear();