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

List:       kde-commits
Subject:    kdewebdev/quanta/utility
From:       Andras Mantia <amantia () kde ! org>
Date:       2004-05-04 10:11:57
Message-ID: 20040504101157.3C42B903E () office ! kde ! org
[Download RAW message or body]

CVS commit by amantia: 

Don't remain blocked in an internal even loop if the script action is not found.


  M +15 -11    tagaction.cpp   1.95
  M +1 -1      tagaction.h   1.24


--- kdewebdev/quanta/utility/tagaction.cpp  #1.94:1.95
@@ -94,9 +94,9 @@ TagAction::~TagAction()
 }
 
-void TagAction::insertTag(bool inputFromFile, bool outputToFile)
+bool TagAction::insertTag(bool inputFromFile, bool outputToFile)
 {
   QuantaView *view = ViewManager::ref()->activeView();
   if ( !view || !view->document())
-     return;
+     return false;
 
   QString space="";
@@ -331,4 +331,5 @@ void TagAction::insertTag(bool inputFrom
     {
       KMessageBox::error(quantaApp, i18n("<qt>There was an error running \
<b>%1</b>.<br>Check that you have the <i>%2</i> executable installed and it is \
accessible.</qt>").arg(command + " " + args).arg(command), i18n("Script Not Found")); \
+      return false;  }
   }
@@ -336,4 +337,5 @@ void TagAction::insertTag(bool inputFrom
  }
 #endif
+  return true;
 }
 
@@ -490,13 +492,15 @@ void TagAction::slotProcessExited(KProce
 void TagAction::execute()
 {
-  insertTag(true, true);
+  if (insertTag(true, true))
+  {
  //To avoid lock-ups, start a timer.
   timer = new QTimer(this);
   connect(timer, SIGNAL(timeout()), SLOT(slotTimeout()));
-  timer->start(180*1000, true);
+      timer->start(10*1000, true);
   QExtFileInfo internalFileInfo;
   loopStarted = true;
   internalFileInfo.enter_loop();
   delete timer;
+  }
 }
 

--- kdewebdev/quanta/utility/tagaction.h  #1.23:1.24
@@ -74,5 +74,5 @@ public:
 
 public slots:
-    virtual void insertTag(bool inputFromFile = false, bool outputToFile = false);
+    virtual bool insertTag(bool inputFromFile = false, bool outputToFile = false);
 
 


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

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