소스 검색

Replace QApplication::eventLoop()->processEvents with QCoreApplication::processEvents().

git-svn-id: file:///var/svn/tigccpp/trunk@950 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 17 년 전
부모
커밋
ebf6c95ed7
6개의 변경된 파일18개의 추가작업 그리고 18개의 파일을 삭제
  1. 2 2
      ktigcc/assistant.cpp
  2. 2 2
      ktigcc/callbacks.cpp
  3. 4 4
      ktigcc/mainform.ui.h
  4. 3 3
      ktigcc/parsing.cpp
  5. 3 3
      ktigcc/preferencesdlg.ui.h
  6. 4 4
      ktigcc/tpr.cpp

+ 2 - 2
ktigcc/assistant.cpp

@@ -1,7 +1,7 @@
 /*
    ktigcc - TIGCC IDE for KDE
 
-   Copyright (C) 2006 Kevin Kofler
+   Copyright (C) 2006-2007 Kevin Kofler
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -108,7 +108,7 @@ void AssistantClient::openAssistant(const QString &page)
     // Wait for Qt Assistant to actually open.
     while (procIO && !socket) {
       usleep(10000);
-      QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput,10);
+      QCoreApplication::processEvents(QEventLoop::ExcludeUserInput,10);
     }
     if (!procIO) goto start_new;
     Q3TextStream stream(static_cast<QIODevice *>(socket));

+ 2 - 2
ktigcc/callbacks.cpp

@@ -1,7 +1,7 @@
 /*
    ktigcc - TIGCC IDE for KDE
 
-   Copyright (C) 2006 Kevin Kofler
+   Copyright (C) 2006-2007 Kevin Kofler
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ static KProgressDialog *sendingProgress=0;
 static void callback_ticalcs_refresh(void)
 {
   if (sendingProgress) {
-    QApplication::eventLoop()->processEvents(QEventLoop::AllEvents,100);
+    QCoreApplication::processEvents(QEventLoop::AllEvents,100);
     if (sendingProgress->wasCancelled()) ticalcsUpdate.cancel=TRUE;
   }
 }

+ 4 - 4
ktigcc/mainform.ui.h

@@ -686,9 +686,9 @@ class DnDListView : public K3ListView {
   }
   // K3ListView::rename won't work properly if I don't do this. :-/
   virtual void rename(Q3ListViewItem *item, int c) {
-    QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput,1000);
+    QCoreApplication::processEvents(QEventLoop::ExcludeUserInput,1000);
     ensureItemVisible(item);
-    QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput,1000);
+    QCoreApplication::processEvents(QEventLoop::ExcludeUserInput,1000);
     K3ListView::rename(item,c);
   }
 };
@@ -4845,7 +4845,7 @@ void MainForm::debugRun()
             }
             do {
               usleep(100000);
-              QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput,100);
+              QCoreApplication::processEvents(QEventLoop::ExcludeUserInput,100);
               if (!tiemuInstance(&instanceName)) return;
             } while (instanceName.isNull());
           }
@@ -4854,7 +4854,7 @@ void MainForm::debugRun()
           bool ready;
           do {
             usleep(100000);
-            QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput,100);
+            QCoreApplication::processEvents(QEventLoop::ExcludeUserInput,100);
             ready=tiemuDCOP->ready_for_transfers();
             if (!tiemuDCOP->ok()) {
               KMessageBox::error(this,"DCOP function call failed.");

+ 3 - 3
ktigcc/parsing.cpp

@@ -1,7 +1,7 @@
 /*
    ktigcc - TIGCC IDE for KDE
 
-   Copyright (C) 2006 Kevin Kofler
+   Copyright (C) 2006-2007 Kevin Kofler
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -86,7 +86,7 @@ SourceFileFunctions getCFunctions(const QString &text)
         } else qWarning("Invalid result from ctags.");
       } else {
         usleep(10000);
-        QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput,10);
+        QCoreApplication::processEvents(QEventLoop::ExcludeUserInput,10);
       }
     }
   }
@@ -236,7 +236,7 @@ CompletionInfo parseFileCompletion(const QString &fileText,
         }
       } else {
         usleep(10000);
-        QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput,10);
+        QCoreApplication::processEvents(QEventLoop::ExcludeUserInput,10);
       }
     }
   }

+ 3 - 3
ktigcc/preferencesdlg.ui.h

@@ -13,7 +13,7 @@
 /*
    ktigcc - TIGCC IDE for KDE
 
-   Copyright (C) 2006 Kevin Kofler
+   Copyright (C) 2006-2007 Kevin Kofler
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -87,9 +87,9 @@ class RenamableKListViewItem : public K3ListViewItem {
   virtual void startRename(int col)
   {
     // K3ListView::rename won't work properly if I don't do this. :-/
-    QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput,1000);
+    QCoreApplication::processEvents(QEventLoop::ExcludeUserInput,1000);
     listView()->ensureItemVisible(this);
-    QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput,1000);
+    QCoreApplication::processEvents(QEventLoop::ExcludeUserInput,1000);
     static_cast<K3ListView *>(listView())->rename(this,col);
   }
 };

+ 4 - 4
ktigcc/tpr.cpp

@@ -3,7 +3,7 @@
    
    tpr handling routines adapted from tprbuilder
    Copyright (C) 2002 Romain Liévin
-   Copyright (C) 2002-2006 Kevin Kofler
+   Copyright (C) 2002-2007 Kevin Kofler
    Copyright (C) 2006 Joey Adams
 
    This program is free software; you can redistribute it and/or modify
@@ -967,7 +967,7 @@ int saveAndSplitFileText(const char *fileName, const QString &fileText,
               INSERT_STRING(QString(c)+text[curPos+1]);
               // Allow the UI to respond, splitting is a lengthy operation.
               if ((curPos++)&127)
-                QApplication::eventLoop()->processEvents(QEventLoop::AllEvents,1000);
+                QCoreApplication::processEvents(QEventLoop::AllEvents,1000);
               curPos++;
               curCol++;
               break;
@@ -979,7 +979,7 @@ int saveAndSplitFileText(const char *fileName, const QString &fileText,
               INSERT_STRING(QString(c)+text[curPos+1]);
               // Allow the UI to respond, splitting is a lengthy operation.
               if ((curPos++)&127)
-                QApplication::eventLoop()->processEvents(QEventLoop::AllEvents,1000);
+                QCoreApplication::processEvents(QEventLoop::AllEvents,1000);
               curCol++;
               break;
             }
@@ -996,7 +996,7 @@ int saveAndSplitFileText(const char *fileName, const QString &fileText,
       } else curCol++;
       // Allow the UI to respond, splitting is a lengthy operation.
       if (curPos&127)
-        QApplication::eventLoop()->processEvents(QEventLoop::AllEvents,1000);
+        QCoreApplication::processEvents(QEventLoop::AllEvents,1000);
     }
     NEW_LINE();