Trying to workaroundinate a weird bug with connection states not always being sent
authorManuel Nickschas <sputnick@quassel-irc.org>
Sat, 2 Feb 2008 00:48:40 +0000 (00:48 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 2 Feb 2008 00:48:40 +0000 (00:48 +0000)
to the client... :/

src/common/global.cpp
src/common/network.cpp
src/common/network.h
src/qtui/ui/topicwidget.ui
version.inc

index 26abdf9..edf795e 100644 (file)
@@ -81,7 +81,7 @@ void Global::registerMetaTypes() {
   qRegisterMetaTypeStreamOperators<BufferInfo>("BufferInfo");
   qRegisterMetaTypeStreamOperators<NetworkInfo>("NetworkInfo");
   qRegisterMetaTypeStreamOperators<Identity>("Identity");
-  qRegisterMetaTypeStreamOperators<int>("Network::ConnectionState");
+  qRegisterMetaTypeStreamOperators<qint8>("Network::ConnectionState");
 
   qRegisterMetaType<IdentityId>("IdentityId");
   qRegisterMetaType<BufferId>("BufferId");
index da1be33..d3ecab5 100644 (file)
@@ -95,7 +95,8 @@ bool Network::isConnected() const {
   return _connected;
 }
 
-Network::ConnectionState Network::connectionState() const {
+//Network::ConnectionState Network::connectionState() const {
+int Network::connectionState() const {
   return _connectionState;
 }
 
@@ -369,8 +370,11 @@ void Network::setConnected(bool connected) {
   emit connectedSet(connected);
 }
 
-void Network::setConnectionState(ConnectionState state) {
+//void Network::setConnectionState(ConnectionState state) {
+void Network::setConnectionState(int state) {
   _connectionState = (ConnectionState)state;
+  //qDebug() << "netstate" << networkId() << networkName() << state;
+  emit connectionStateSet(state);
   emit connectionStateSet(_connectionState);
 }
 
index 4c04ceb..25b02bc 100644 (file)
@@ -53,7 +53,8 @@ class Network : public SyncableObject {
   Q_PROPERTY(QByteArray codecForDecoding READ codecForDecoding WRITE setCodecForDecoding STORED false)
   Q_PROPERTY(IdentityId identityId READ identity WRITE setIdentity STORED false)
   Q_PROPERTY(bool isConnected READ isConnected WRITE setConnected STORED false)
-  Q_PROPERTY(Network::ConnectionState connectionState READ connectionState WRITE setConnectionState STORED false)
+  //Q_PROPERTY(Network::ConnectionState connectionState READ connectionState WRITE setConnectionState STORED false)
+  Q_PROPERTY(int connectionState READ connectionState WRITE setConnectionState STORED false)
 
 public:
   enum ConnectionState { Disconnected, Connecting, Initializing, Initialized, Disconnecting };
@@ -72,7 +73,8 @@ public:
   bool isChannelName(const QString &channelname) const;
 
   bool isConnected() const;
-  Network::ConnectionState connectionState() const;
+  //Network::ConnectionState connectionState() const;
+  int connectionState() const;
 
   QString prefixToMode(const QString &prefix);
   QString prefixToMode(const QCharRef &prefix);
@@ -122,7 +124,8 @@ public slots:
   void setNetworkName(const QString &networkName);
   void setCurrentServer(const QString &currentServer);
   void setConnected(bool isConnected);
-  void setConnectionState(Network::ConnectionState state);
+  //void setConnectionState(Network::ConnectionState state);
+  void setConnectionState(int state);
   void setMyNick(const QString &mynick);
   void setIdentity(IdentityId);
 
@@ -172,6 +175,7 @@ signals:
   void currentServerSet(const QString &currentServer);
   void connectedSet(bool isConnected);
   void connectionStateSet(Network::ConnectionState);
+  void connectionStateSet(int);
   void connectionError(const QString &errorMsg);
   void myNickSet(const QString &mynick);
   void identitySet(IdentityId);
index 03c87f0..5307a83 100644 (file)
@@ -55,7 +55,7 @@
       <string>...</string>
      </property>
      <property name="icon" >
-      <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/configure.png</iconset>
+      <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/configure.png</iconset>
      </property>
      <property name="iconSize" >
       <size>
index 833ddf3..0d5ba33 100644 (file)
@@ -5,14 +5,14 @@
 
   quasselVersion = "0.2.0-pre";
   quasselDate = "2008-02-01";
-  quasselBuild = 433;
+  quasselBuild = 435;
 
   //! Minimum client build number the core needs
-  clientBuildNeeded = 428;
+  clientBuildNeeded = 435;
   clientVersionNeeded = quasselVersion;
 
   //! Minimum core build number the client needs
-  coreBuildNeeded = 428;
+  coreBuildNeeded = 435;
   coreVersionNeeded = quasselVersion;
 
 }