projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Well, if we check for a settings version, maybe we should set it too...
[quassel.git]
/
src
/
core
/
coresession.cpp
diff --git
a/src/core/coresession.cpp
b/src/core/coresession.cpp
index
491e99a
..
c90e7f6
100644
(file)
--- a/
src/core/coresession.cpp
+++ b/
src/core/coresession.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-0
8
by the Quassel Project *
+ * Copyright (C) 2005-0
9
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-68,7
+68,7
@@
CoreSession::CoreSession(UserId uid, bool restoreState, QObject *parent)
p->attachSignal(this, SIGNAL(networkCreated(NetworkId)));
p->attachSignal(this, SIGNAL(networkRemoved(NetworkId)));
p->attachSignal(this, SIGNAL(networkCreated(NetworkId)));
p->attachSignal(this, SIGNAL(networkRemoved(NetworkId)));
- p->attachSlot(SIGNAL(createNetwork(const NetworkInfo &
)), this, SLOT(createNetwork(const NetworkInfo
&)));
+ p->attachSlot(SIGNAL(createNetwork(const NetworkInfo &
, const QStringList &)), this, SLOT(createNetwork(const NetworkInfo &, const QStringList
&)));
p->attachSlot(SIGNAL(removeNetwork(NetworkId)), this, SLOT(removeNetwork(NetworkId)));
loadSettings();
p->attachSlot(SIGNAL(removeNetwork(NetworkId)), this, SLOT(removeNetwork(NetworkId)));
loadSettings();
@@
-133,12
+133,6
@@
void CoreSession::loadSettings() {
foreach(CoreIdentity identity, Core::identities(user())) {
createIdentity(identity);
}
foreach(CoreIdentity identity, Core::identities(user())) {
createIdentity(identity);
}
- if(!_identities.count()) {
- Identity identity;
- identity.setToDefaults();
- identity.setIdentityName(tr("Default Identity"));
- createIdentity(identity, QVariantMap());
- }
foreach(NetworkInfo info, Core::networks(user())) {
createNetwork(info);
foreach(NetworkInfo info, Core::networks(user())) {
createNetwork(info);
@@
-188,7
+182,6
@@
void CoreSession::removeClient(QIODevice *iodev) {
QHash<QString, QString> CoreSession::persistentChannels(NetworkId id) const {
return Core::persistentChannels(user(), id);
QHash<QString, QString> CoreSession::persistentChannels(NetworkId id) const {
return Core::persistentChannels(user(), id);
- return QHash<QString, QString>();
}
// FIXME switch to BufferId
}
// FIXME switch to BufferId
@@
-313,7
+306,7
@@
void CoreSession::removeIdentity(IdentityId id) {
/*** Network Handling ***/
/*** Network Handling ***/
-void CoreSession::createNetwork(const NetworkInfo &info_) {
+void CoreSession::createNetwork(const NetworkInfo &info_
, const QStringList &persistentChans
) {
NetworkInfo info = info_;
int id;
NetworkInfo info = info_;
int id;
@@
-337,6
+330,11
@@
void CoreSession::createNetwork(const NetworkInfo &info_) {
_networks[id] = net;
signalProxy()->synchronize(net);
emit networkCreated(id);
_networks[id] = net;
signalProxy()->synchronize(net);
emit networkCreated(id);
+ // create persistent chans
+ foreach(QString channel, persistentChans) {
+ Core::bufferInfo(user(), info.networkId, BufferInfo::ChannelBuffer, channel, true);
+ Core::setChannelPersistent(user(), info.networkId, channel, true);
+ }
} else {
qWarning() << qPrintable(tr("CoreSession::createNetwork(): Trying to create a network that already exists, updating instead!"));
_networks[info.networkId]->requestSetNetworkInfo(info);
} else {
qWarning() << qPrintable(tr("CoreSession::createNetwork(): Trying to create a network that already exists, updating instead!"));
_networks[info.networkId]->requestSetNetworkInfo(info);