From 60ea0acdd5f443edb36f9a127d13488d709ad337 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 3 Apr 2011 20:48:17 +0000 Subject: Add QT_X_USER_TIME macros git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1226980 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- qtinterface/tqapplication.cpp | 23 ++++++++++++++++++++++- qtinterface/tqt.h.cmake | 11 +++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) (limited to 'qtinterface') diff --git a/qtinterface/tqapplication.cpp b/qtinterface/tqapplication.cpp index 7f381b6..eb3ada7 100644 --- a/qtinterface/tqapplication.cpp +++ b/qtinterface/tqapplication.cpp @@ -22,6 +22,27 @@ Boston, MA 02110-1301, USA. #include #include +#ifdef USE_QT3 +extern Time qt_x_time; +extern Time qt_x_user_time; + +void set_tqt_x_time(Time x) { + qt_x_time = x; +} + +Time get_tqt_x_time(void) { + return qt_x_time; +} + +void set_tqt_x_user_time(Time x) { + qt_x_user_time = x; +} + +Time get_tqt_x_user_time(void) { + return qt_x_user_time; +} +#endif + #ifdef USE_QT4 // void QApplication::processOneEvent() @@ -44,4 +65,4 @@ void QApplication::removeTranslator( QTranslator * mf ) #warning "!!! WARNING: QApplication::removeTranslator() UNIMPLEMENTED !!!" } -#endif // USE_QT4 \ No newline at end of file +#endif // USE_QT4 diff --git a/qtinterface/tqt.h.cmake b/qtinterface/tqt.h.cmake index e81c27c..7628444 100644 --- a/qtinterface/tqt.h.cmake +++ b/qtinterface/tqt.h.cmake @@ -1004,8 +1004,15 @@ Boston, MA 02110-1301, USA. #define tqwhatsThisCursor Qt::whatsThisCursor #define tqbusyCursor Qt::busyCursor -#define SET_QTX_TIME(x) (qt_x_time = x) -#define GET_QTX_TIME(x) qt_x_time +extern void set_tqt_x_time(Time x); +extern Time get_tqt_x_time(void); +extern void set_tqt_x_user_time(Time x); +extern Time get_tqt_x_user_time(void); + +#define SET_QT_X_TIME(x) set_tqt_x_time(x) +#define GET_QT_X_TIME(x) get_tqt_x_time() +#define SET_QT_X_USER_TIME(x) set_tqt_x_time(x) +#define GET_QT_X_USER_TIME(x) get_tqt_x_time() #endif // USE_QT3 -- cgit v1.2.1