projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
97dd282
)
Fix CoreFeatures; disable SASL support if core isn't new enough
author
Manuel Nickschas
<sputnick@quassel-irc.org>
Sun, 14 Feb 2010 22:23:33 +0000
(23:23 +0100)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Sun, 14 Feb 2010 22:23:33 +0000
(23:23 +0100)
src/client/coreconnection.cpp
patch
|
blob
|
history
src/client/networkmodel.cpp
patch
|
blob
|
history
src/common/quassel.h
patch
|
blob
|
history
src/qtui/settingspages/networkssettingspage.cpp
patch
|
blob
|
history
diff --git
a/src/client/coreconnection.cpp
b/src/client/coreconnection.cpp
index
460b3b7
..
f523914
100644
(file)
--- a/
src/client/coreconnection.cpp
+++ b/
src/client/coreconnection.cpp
@@
-474,6
+474,8
@@
void CoreConnection::clientInitAck(const QVariantMap &msg) {
return;
}
return;
}
+ Client::setCoreFeatures((Quassel::Features)msg["CoreFeatures"].toUInt());
+
#ifndef QT_NO_COMPRESS
if(msg["SupportsCompression"].toBool()) {
_socket->setProperty("UseCompression", true);
#ifndef QT_NO_COMPRESS
if(msg["SupportsCompression"].toBool()) {
_socket->setProperty("UseCompression", true);
diff --git
a/src/client/networkmodel.cpp
b/src/client/networkmodel.cpp
index
8feb777
..
bb0eca5
100644
(file)
--- a/
src/client/networkmodel.cpp
+++ b/
src/client/networkmodel.cpp
@@
-235,7
+235,7
@@
void BufferItem::clearActivityLevel() {
_firstUnreadMsgId = MsgId();
// FIXME remove with core proto v11
_firstUnreadMsgId = MsgId();
// FIXME remove with core proto v11
- if(!
Client::coreFeatures() & Quassel::SynchronizedMarkerLine
) {
+ if(!
(Client::coreFeatures() & Quassel::SynchronizedMarkerLine)
) {
_markerLineMsgId = _lastSeenMsgId;
}
_markerLineMsgId = _lastSeenMsgId;
}
@@
-319,7
+319,7
@@
void BufferItem::setLastSeenMsgId(MsgId msgId) {
_lastSeenMsgId = msgId;
// FIXME remove with core protocol v11
_lastSeenMsgId = msgId;
// FIXME remove with core protocol v11
- if(!
Client::coreFeatures() & Quassel::SynchronizedMarkerLine
) {
+ if(!
(Client::coreFeatures() & Quassel::SynchronizedMarkerLine)
) {
if(!isCurrentBuffer())
_markerLineMsgId = msgId;
}
if(!isCurrentBuffer())
_markerLineMsgId = msgId;
}
diff --git
a/src/common/quassel.h
b/src/common/quassel.h
index
b42ee47
..
86469c4
100644
(file)
--- a/
src/common/quassel.h
+++ b/
src/common/quassel.h
@@
-67,8
+67,9
@@
public:
*/
enum Feature {
SynchronizedMarkerLine = 0x0001,
*/
enum Feature {
SynchronizedMarkerLine = 0x0001,
+ SaslAuthentication = 0x0002,
- NumFeatures = 0x000
1
+ NumFeatures = 0x000
2
};
Q_DECLARE_FLAGS(Features, Feature);
};
Q_DECLARE_FLAGS(Features, Feature);
diff --git
a/src/qtui/settingspages/networkssettingspage.cpp
b/src/qtui/settingspages/networkssettingspage.cpp
index
2ea60db
..
15ee3af
100644
(file)
--- a/
src/qtui/settingspages/networkssettingspage.cpp
+++ b/
src/qtui/settingspages/networkssettingspage.cpp
@@
-37,6
+37,10
@@
NetworksSettingsPage::NetworksSettingsPage(QWidget *parent)
: SettingsPage(tr("IRC"), tr("Networks"), parent) {
ui.setupUi(this);
: SettingsPage(tr("IRC"), tr("Networks"), parent) {
ui.setupUi(this);
+ // hide SASL options for older cores
+ if(!(Client::coreFeatures() & Quassel::SaslAuthentication))
+ ui.sasl->hide();
+
// set up icons
ui.renameNetwork->setIcon(SmallIcon("edit-rename"));
ui.addNetwork->setIcon(SmallIcon("list-add"));
// set up icons
ui.renameNetwork->setIcon(SmallIcon("edit-rename"));
ui.addNetwork->setIcon(SmallIcon("list-add"));