[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim/akonadi/clients/akonadiconsole
From:       Volker Krause <vkrause () kde ! org>
Date:       2008-05-18 10:01:23
Message-ID: 1211104883.042999.11865.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 809069 by vkrause:

- fix per-connection tabs
- escape data so we also see stuff enclosed in angle brackets


 M  +2 -2      connectionpage.cpp  
 M  +11 -1     debugwidget.cpp  


--- trunk/KDE/kdepim/akonadi/clients/akonadiconsole/connectionpage.cpp #809068:809069
@@ -51,7 +51,7 @@
     str += identifier + ' ';
   }
   if ( mShowAllConnections || identifier == mIdentifier ) {
-    str += QString( "<font color=\"red\">%1</font>" ).arg( msg );
+    str += QString( "<font color=\"red\">%1</font>" ).arg( Qt::escape( msg ) );
     mDataView->append( str );
   }
 }
@@ -63,7 +63,7 @@
     str += identifier + ' ';
   }
   if ( mShowAllConnections || identifier == mIdentifier ) {
-    str += QString( "<font color=\"blue\">%1</font>" ).arg( msg );
+    str += QString( "<font color=\"blue\">%1</font>" ).arg( Qt::escape( msg ) );
     mDataView->append( str );
   }
 }
--- trunk/KDE/kdepim/akonadi/clients/akonadiconsole/debugwidget.cpp #809068:809069
@@ -60,6 +60,12 @@
   connect( iface, SIGNAL( errorEmitted( const QString&, const QString& ) ),
            this, SLOT( errorEmitted( const QString&, const QString& ) ) );
 
+  // in case we started listening when the connection is already ongoing
+  connect( iface, SIGNAL( connectionDataInput( const QString&, const QString& ) ),
+           this, SLOT( connectionStarted( const QString&, const QString& ) ) );
+  connect( iface, SIGNAL( connectionDataOutput( const QString&, const QString& ) ),
+           this, SLOT( connectionStarted( const QString&, const QString& ) ) );
+
   QHBoxLayout *buttonLayout = new QHBoxLayout;
   layout->addLayout( buttonLayout );
 
@@ -75,8 +81,12 @@
 
 void DebugWidget::connectionStarted( const QString &identifier, const QString &msg )
 {
+  Q_UNUSED( msg );
+  if ( mPageHash.contains( identifier ) )
+    return;
+
   ConnectionPage *page = new ConnectionPage( identifier );
-  mConnectionPages->addTab( page, msg );
+  mConnectionPages->addTab( page, identifier );
 
   mPageHash.insert( identifier, page );
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic