Replace {from,to}Ascii with {from,to}Latin1
[quassel.git] / src / common / network.cpp
index d18f713..1aa907d 100644 (file)
@@ -288,20 +288,6 @@ void Network::removeChansAndUsers()
     QList<IrcChannel *> channels = ircChannels();
     _ircChannels.clear();
 
-    foreach(IrcChannel *channel, channels) {
-        proxy()->detachObject(channel);
-        disconnect(channel, 0, this, 0);
-    }
-    foreach(IrcUser *user, users) {
-        proxy()->detachObject(user);
-        disconnect(user, 0, this, 0);
-    }
-
-    // the second loop is needed because quit can have sideffects
-    foreach(IrcUser *user, users) {
-        user->quit();
-    }
-
     qDeleteAll(users);
     qDeleteAll(channels);
 }
@@ -469,7 +455,7 @@ QByteArray Network::encodeString(const QString &string) const
     if (_defaultCodecForEncoding) {
         return _defaultCodecForEncoding->fromUnicode(string);
     }
-    return string.toAscii();
+    return string.toLatin1();
 }
 
 
@@ -490,7 +476,7 @@ QByteArray Network::encodeServerString(const QString &string) const
     if (_defaultCodecForServer) {
         return _defaultCodecForServer->fromUnicode(string);
     }
-    return string.toAscii();
+    return string.toLatin1();
 }