gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r7216 - gnunet-qt/src/plugins/stats


From: gnunet
Subject: [GNUnet-SVN] r7216 - gnunet-qt/src/plugins/stats
Date: Sat, 14 Jun 2008 15:13:27 -0600 (MDT)

Author: durner
Date: 2008-06-14 15:13:27 -0600 (Sat, 14 Jun 2008)
New Revision: 7216

Modified:
   gnunet-qt/src/plugins/stats/statsPlugin.cc
   gnunet-qt/src/plugins/stats/statsPlugin.h
   gnunet-qt/src/plugins/stats/statsThread.h
Log:
do UI work in main thread

Modified: gnunet-qt/src/plugins/stats/statsPlugin.cc
===================================================================
--- gnunet-qt/src/plugins/stats/statsPlugin.cc  2008-06-14 20:04:55 UTC (rev 
7215)
+++ gnunet-qt/src/plugins/stats/statsPlugin.cc  2008-06-14 21:13:27 UTC (rev 
7216)
@@ -48,8 +48,8 @@
   this->errorContext = errorContext;
   statsThread = new GStatsThread(config, errorContext);
   
-  connect(statsThread, SIGNAL(stat(const char *, qulonglong)), this,
-    SLOT(processStat(const char *, qulonglong)), Qt::DirectConnection);
+  connect(statsThread, SIGNAL(stat(QString, qulonglong)), this,
+    SLOT(processStat(QString, qulonglong)), Qt::QueuedConnection);
   
   treeStats->setColumnWidth(0, 550);
   statsThread->start();
@@ -64,13 +64,11 @@
   delete statsThread;
 }
 
-void GStatsPlugin::processStat(const char *name, qulonglong value)
+void GStatsPlugin::processStat(QString strName, qulonglong value)
 {
     int count;
     bool found;
-    QString strName;
-    
-    strName = QString::fromUtf8(name);
+
     found = false;
     
     /* populate statistics tree */
@@ -103,7 +101,7 @@
     if (strName == "# of connected peers")
     {
       QPixmap icon;
-    
+      
       if (value == 0)
         icon.load(":/pixmaps/network-status-offline.png");
       else

Modified: gnunet-qt/src/plugins/stats/statsPlugin.h
===================================================================
--- gnunet-qt/src/plugins/stats/statsPlugin.h   2008-06-14 20:04:55 UTC (rev 
7215)
+++ gnunet-qt/src/plugins/stats/statsPlugin.h   2008-06-14 21:13:27 UTC (rev 
7216)
@@ -44,7 +44,7 @@
   int setNetworkStatus(const QPixmap &icon, const QString strStatus);
 
 protected slots:
-  void processStat(const char *name, qulonglong value);
+  void processStat(QString strName, qulonglong value);
 
 protected:
   struct GNUNET_GC_Configuration *config;

Modified: gnunet-qt/src/plugins/stats/statsThread.h
===================================================================
--- gnunet-qt/src/plugins/stats/statsThread.h   2008-06-14 20:04:55 UTC (rev 
7215)
+++ gnunet-qt/src/plugins/stats/statsThread.h   2008-06-14 21:13:27 UTC (rev 
7216)
@@ -45,7 +45,7 @@
   struct GNUNET_GE_Context *errorContext;
   bool stopSignalled;
 signals:
-  void stat(const char *name, qulonglong value);
+  void stat(QString strName, qulonglong value);
 };
 
 #endif /*STATSTHREAD_H_*/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]