projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
win32 block added
[quassel.git]
/
src
/
common
/
ircuser.cpp
diff --git
a/src/common/ircuser.cpp
b/src/common/ircuser.cpp
index
a313fc6
..
5f05f0f
100644
(file)
--- a/
src/common/ircuser.cpp
+++ b/
src/common/ircuser.cpp
@@
-21,20
+21,20
@@
#include "ircuser.h"
#include "util.h"
#include "ircuser.h"
#include "util.h"
-#include "network
info
.h"
+#include "network.h"
#include "signalproxy.h"
#include "ircchannel.h"
#include <QTextCodec>
#include <QDebug>
#include "signalproxy.h"
#include "ircchannel.h"
#include <QTextCodec>
#include <QDebug>
-IrcUser::IrcUser(const QString &hostmask, Network
Info *networkinfo
)
- : SyncableObject(network
info
),
+IrcUser::IrcUser(const QString &hostmask, Network
*network
)
+ : SyncableObject(network),
_initialized(false),
_nick(nickFromMask(hostmask)),
_user(userFromMask(hostmask)),
_host(hostFromMask(hostmask)),
_initialized(false),
_nick(nickFromMask(hostmask)),
_user(userFromMask(hostmask)),
_host(hostFromMask(hostmask)),
-
networkInfo(networkinfo
),
+
_network(network
),
_codecForEncoding(0),
_codecForDecoding(0)
{
_codecForEncoding(0),
_codecForDecoding(0)
{
@@
-48,9
+48,6
@@
IrcUser::~IrcUser() {
// ====================
// PUBLIC:
// ====================
// ====================
// PUBLIC:
// ====================
-bool IrcUser::initialized() const {
- return _initialized;
-}
QString IrcUser::user() const {
return _user;
QString IrcUser::user() const {
return _user;
@@
-81,6
+78,10
@@
QStringList IrcUser::channels() const {
return chanList;
}
return chanList;
}
+Network* IrcUser::network() const {
+ return _network;
+}
+
QTextCodec *IrcUser::codecForEncoding() const {
return _codecForEncoding;
}
QTextCodec *IrcUser::codecForEncoding() const {
return _codecForEncoding;
}
@@
-106,7
+107,7
@@
void IrcUser::setCodecForDecoding(QTextCodec *codec) {
}
QString IrcUser::decodeString(const QByteArray &text) const {
}
QString IrcUser::decodeString(const QByteArray &text) const {
- if(!codecForDecoding()) return network
Info
->decodeString(text);
+ if(!codecForDecoding()) return network
()
->decodeString(text);
return ::decodeString(text, codecForDecoding());
}
return ::decodeString(text, codecForDecoding());
}
@@
-114,7
+115,7
@@
QByteArray IrcUser::encodeString(const QString string) const {
if(codecForEncoding()) {
return codecForEncoding()->fromUnicode(string);
}
if(codecForEncoding()) {
return codecForEncoding()->fromUnicode(string);
}
- return network
Info
->encodeString(string);
+ return network
()
->encodeString(string);
}
// ====================
}
// ====================
@@
-143,7
+144,7
@@
void IrcUser::setNick(const QString &nick) {
}
void IrcUser::updateObjectName() {
}
void IrcUser::updateObjectName() {
- QString newName = QString::number(network
Info->networkId
()) + "/" + _nick;
+ QString newName = QString::number(network
()->networkId().toInt
()) + "/" + _nick;
QString oldName = objectName();
if(oldName != newName) {
setObjectName(newName);
QString oldName = objectName();
if(oldName != newName) {
setObjectName(newName);
@@
-172,7
+173,7
@@
void IrcUser::joinChannel(IrcChannel *channel) {
}
void IrcUser::joinChannel(const QString &channelname) {
}
void IrcUser::joinChannel(const QString &channelname) {
- joinChannel(network
Info
->newIrcChannel(channelname));
+ joinChannel(network
()
->newIrcChannel(channelname));
}
void IrcUser::partChannel(IrcChannel *channel) {
}
void IrcUser::partChannel(IrcChannel *channel) {
@@
-185,7
+186,7
@@
void IrcUser::partChannel(IrcChannel *channel) {
}
void IrcUser::partChannel(const QString &channelname) {
}
void IrcUser::partChannel(const QString &channelname) {
- IrcChannel *channel = network
Info
->ircChannel(channelname);
+ IrcChannel *channel = network
()
->ircChannel(channelname);
if(channel == 0) {
qWarning() << "IrcUser::partChannel(): received part for unknown Channel" << channelname;
} else {
if(channel == 0) {
qWarning() << "IrcUser::partChannel(): received part for unknown Channel" << channelname;
} else {
@@
-228,8
+229,3
@@
void IrcUser::initSetChannels(const QStringList channels) {
}
}
}
}
-void IrcUser::setInitialized() {
- _initialized = true;
- emit initDone();
-}
-