diff options
Diffstat (limited to 'qtjava/javalib/qtjava/QtUtils.cpp')
-rw-r--r-- | qtjava/javalib/qtjava/QtUtils.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/qtjava/javalib/qtjava/QtUtils.cpp b/qtjava/javalib/qtjava/QtUtils.cpp index 531e69c8..ee56ebc1 100644 --- a/qtjava/javalib/qtjava/QtUtils.cpp +++ b/qtjava/javalib/qtjava/QtUtils.cpp @@ -1,6 +1,6 @@ -#include <qapplication.h> -#include <qmutex.h> +#include <tqapplication.h> +#include <tqmutex.h> #include <qtjava/QtSupport.h> #include <qtjava/QtUtils.h> @@ -10,12 +10,12 @@ #define SYNC_EVENT2 60002 #define ASYNC_EVENT 60003 -class QRunEvent : public QCustomEvent +class QRunEvent : public TQCustomEvent { public: QRunEvent(int type, jobject r) : - QCustomEvent(type), + TQCustomEvent(type), runnable(r), res(0), lock(0) @@ -23,7 +23,7 @@ public: jobject runnable; jobject *res; - QMutex *lock; + TQMutex *lock; }; @@ -39,15 +39,15 @@ QtUtils::~QtUtils() } void QtUtils::postSync(JNIEnv* env, jobject runnable) { - QMutex lock; + TQMutex lock; QRunEvent *e = new QRunEvent(SYNC_EVENT1, env->NewGlobalRef(runnable)); e->lock = &lock; lock.lock(); //post the event to the QT-UI thread //and trigger its processing - QApplication::postEvent(this, e); - QApplication::sendPostedEvents(); + TQApplication::postEvent(this, e); + TQApplication::sendPostedEvents(); //the lock is gained only //after executing the runnable @@ -56,7 +56,7 @@ void QtUtils::postSync(JNIEnv* env, jobject runnable) { } jobject QtUtils::postSyncRet(JNIEnv* env, jobject runnable) { - QMutex lock; + TQMutex lock; jobject res; QRunEvent *e = new QRunEvent(SYNC_EVENT2, env->NewGlobalRef(runnable)); e->lock = &lock; @@ -65,8 +65,8 @@ jobject QtUtils::postSyncRet(JNIEnv* env, jobject runnable) { //post the event to the QT-UI thread and //trigger its processing - QApplication::postEvent(this, e); - QApplication::sendPostedEvents(); + TQApplication::postEvent(this, e); + TQApplication::sendPostedEvents(); //the lock is gained only //after executing the runnable @@ -83,10 +83,10 @@ void QtUtils::postAsync(JNIEnv *env, jobject runnable) { QRunEvent *e = new QRunEvent(ASYNC_EVENT, env->NewGlobalRef(runnable)); //post the event to the QT-UI thread, //it will be processed in the next Qt-loop iterations - QApplication::postEvent(this, e); + TQApplication::postEvent(this, e); } -void QtUtils::customEvent(QCustomEvent *e) { +void QtUtils::customEvent(TQCustomEvent *e) { if (e->type() >= SYNC_EVENT1 && e->type() <= ASYNC_EVENT) { QRunEvent *re = (QRunEvent*) e; JNIEnv *env = QtSupport::GetEnv(); |