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

List:       kde-commits
Subject:    koffice/libs/guiutils
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2009-04-08 8:09:59
Message-ID: 1239178199.093223.14340.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 950936 by rempt:

use debug areas for progress updater debug

 M  +2 -3      KoProgressBar.cpp  
 M  +12 -11    KoProgressUpdater.cpp  
 M  +9 -8      KoUpdater.cpp  
 M  +4 -4      KoUpdaterPrivate.cpp  


--- trunk/koffice/libs/guiutils/KoProgressBar.cpp #950935:950936
@@ -19,8 +19,7 @@
 
 #include "KoProgressBar.h"
 
-#include <QApplication>
-#include <QDebug>
+#include <kdebug.h>
 
 KoProgressBar::KoProgressBar( QWidget * parent )
  : QProgressBar( parent )
@@ -38,7 +37,7 @@
 
 void KoProgressBar::setValue( int value )
 {
-    qDebug() << "KoProgressBar::setValue " << value;
+    kDebug(30004) << "KoProgressBar::setValue " << value;
 
     if( value >= minimum() && value < maximum() )
     {
--- trunk/koffice/libs/guiutils/KoProgressUpdater.cpp #950935:950936
@@ -22,8 +22,9 @@
 #include <QApplication>
 #include <QString>
 #include <QTimer>
-#include <QDebug>
 
+#include <kdebug.h>
+
 #include "KoUpdaterPrivate.h"
 #include "KoUpdater.h"
 #include "KoProgressProxy.h"
@@ -57,7 +58,7 @@
 KoProgressUpdater::KoProgressUpdater(KoProgressProxy *progressBar)
     : d ( new Private(this, progressBar) )
 {
-    qDebug() << "Creating KoProgressUpdater in " << thread() << ", app thread: " << qApp->thread();
+    kDebug(30004) << "Creating KoProgressUpdater in " << thread() << ", app thread: " << qApp->thread();
     Q_ASSERT(d->progressBar);
     connect( &d->updateGuiTimer, SIGNAL( timeout() ), SLOT( updateUi() ));
 
@@ -76,7 +77,7 @@
 
 void KoProgressUpdater::start(int range, const QString &text)
 {
-    qDebug() << "KoProgressUpdater::start " << range << ", " << text << " in " << thread();
+    kDebug(30004) << "KoProgressUpdater::start " << range << ", " << text << " in " << thread();
 
     qDeleteAll(d->subtasks);
     d->subtasks.clear();
@@ -95,7 +96,7 @@
 
 QPointer<KoUpdater> KoProgressUpdater::startSubtask(int weight)
 {
-    qDebug() << "KoProgressUpdater::startSubtask() in " << thread();
+    kDebug(30004) << "KoProgressUpdater::startSubtask() in " << thread();
     KoUpdaterPrivate *p = new KoUpdaterPrivate(this, weight);
     d->totalWeight += weight;
     d->subtasks.append(p);
@@ -109,7 +110,7 @@
 
 void KoProgressUpdater::cancel()
 {
-    qDebug() << "KoProgressUpdater::cancel in " << thread();
+    kDebug(30004) << "KoProgressUpdater::cancel in " << thread();
     foreach(KoUpdaterPrivate *updater, d->subtasks) {
         updater->setProgress(100);
         updater->interrupt();
@@ -121,7 +122,7 @@
 {
     d->updated = true;
     if ( !d->updateGuiTimer.isActive() ) {
-        qDebug() << "KoProgressUpdater::update(), starting timer in " << thread();
+        kDebug(30004) << "KoProgressUpdater::update(), starting timer in " << thread();
         d->updateGuiTimer.start( 100 ); // 10 updates/second should be enough?
     }
 
@@ -130,7 +131,7 @@
 
 void KoProgressUpdater::updateUi() {
 
-    qDebug() << "KoProgressUpdater::updateUi() in " << thread();
+    kDebug(30004) << "KoProgressUpdater::updateUi() in " << thread();
 
     d->updateGuiTimer.stop(); // 10 upd ates/second should be enough?
 
@@ -148,7 +149,7 @@
         foreach(QPointer<KoUpdaterPrivate> updater, d->subtasks) {
 
             if(updater->interrupted()) {
-                qDebug() << "\tthe updater got interruped, returning";
+                kDebug(30004) << "\tthe updater got interruped, returning";
                 d->currentProgress = -1;
                 return;
             }
@@ -166,17 +167,17 @@
         d->updated = false;
 
     }
-    qDebug() << "\tupdateUi currentProgress " << d->currentProgress;
+    kDebug(30004) << "\tupdateUi currentProgress " << d->currentProgress;
 
     if( d->currentProgress == -1 ) {
 
         d->progressBar->setValue( d->progressBar->maximum() );
         // should we hide the progressbar after a little while?
-        qDebug() << "\t current progress is -1, returning";
+        kDebug(30004) << "\t current progress is -1, returning";
         return;
     }
 
-    qDebug() << "\tsetting value!" << d->currentProgress;
+    kDebug(30004) << "\tsetting value!" << d->currentProgress;
     d->progressBar->setValue(d->currentProgress);
 }
 
--- trunk/koffice/libs/guiutils/KoUpdater.cpp #950935:950936
@@ -22,14 +22,15 @@
 #include "KoUpdater.h"
 
 #include <QApplication>
-#include <QDebug>
 
+#include <kdebug.h>
+
 #include "KoProgressUpdater.h"
 #include "KoUpdaterPrivate.h"
 
 KoUpdater::KoUpdater(KoUpdaterPrivate *p)
 {
-    qDebug() << "created KoUpdater in thread " << thread();
+    kDebug(30004) << "created KoUpdater in thread " << thread();
 
     d = p;
     Q_ASSERT(p);
@@ -45,23 +46,23 @@
 
 void KoUpdater::cancel()
 {
-    qDebug() << "KoUpdater::cancel in " << thread();
+    kDebug(30004) << "KoUpdater::cancel in " << thread();
     emit sigCancel();
 }
 
 void KoUpdater::setProgress(int percent)
 {
-    qDebug() << "KoUpdater::setProgress " << percent << " in " << thread();
+    kDebug(30004) << "KoUpdater::setProgress " << percent << " in " << thread();
     emit sigProgress( percent );
     qApp->processEvents();
 }
 
 int KoUpdater::progress() const
 {
-    qDebug() << "KoUpdater::progress in " << thread();
+    kDebug(30004) << "KoUpdater::progress in " << thread();
 
     if ( d.isNull() ) {
-        qDebug() << "\t Private is null!";
+        kDebug(30004) << "\t Private is null!";
         return 100;
     }
 
@@ -80,7 +81,7 @@
 
 void KoUpdater::setValue( int value )
 {
-    qDebug() << "KoUpdater::setValue " << value << " in " << thread();
+    kDebug(30004) << "KoUpdater::setValue " << value << " in " << thread();
 
     if ( value < min ) value = min;
     if ( value > max ) value = max;
@@ -103,7 +104,7 @@
 
 void KoUpdater::interrupt()
 {
-    qDebug() << "KoUpdater::interrupt() in " << thread();
+    kDebug(30004) << "KoUpdater::interrupt() in " << thread();
     m_interrupted = true;
 }
 
--- trunk/koffice/libs/guiutils/KoUpdaterPrivate.cpp #950935:950936
@@ -20,7 +20,7 @@
  */
 #include "KoUpdaterPrivate.h"
 
-#include <QDebug>
+#include <kdebug.h>
 
 KoUpdaterPrivate::~KoUpdaterPrivate()
 {
@@ -29,20 +29,20 @@
 
 void KoUpdaterPrivate::cancel()
 {
-    qDebug() << "KoUpdaterPrivate::cancel in " << thread();
+    kDebug(30004) << "KoUpdaterPrivate::cancel in " << thread();
     m_parent->cancel();
 }
 
 void KoUpdaterPrivate::interrupt()
 {
-    qDebug() << "KoUpdaterPrivate::interrupt in " << thread();
+    kDebug(30004) << "KoUpdaterPrivate::interrupt in " << thread();
     m_interrupted = true;
     emit sigInterrupted();
 }
 
 void KoUpdaterPrivate::setProgress(int percent)
 {
-    qDebug() << "KoUpdaterPrivate::setProgress" << percent << " in " << thread();
+    kDebug(30004) << "KoUpdaterPrivate::setProgress" << percent << " in " << thread();
     if(m_progress >= percent) {
         return;
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

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