From bd87b2af9dde0633e56a792665cdec7a9675da95 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 25 Nov 2012 14:05:14 -0600 Subject: [PATCH 1/2] Automated update from Qt3 --- ChangeLog.immodule | 14 ++-- changes-3.4 | 2 +- changes-3.5 | 2 +- changes.immodule | 2 +- configure | 2 +- doc/html/clientserver-example.html | 2 +- doc/html/debug.html | 10 +-- doc/html/distributor-example.html | 2 +- doc/html/dnd.html | 2 +- doc/html/fileiconview-example.html | 2 +- doc/html/functions.html | 48 ++++++------- doc/html/grapher-nsplugin-example.html | 2 +- doc/html/httpd-example.html | 2 +- doc/html/i18n.html | 4 +- doc/html/iconview-example.html | 10 +-- doc/html/life-example.html | 2 +- doc/html/mac-differences.html | 2 +- doc/html/motif-walkthrough-10.html | 4 +- doc/html/motif-walkthrough-4.html | 2 +- doc/html/motif-walkthrough-7.html | 4 +- doc/html/motif-walkthrough-8.html | 4 +- doc/html/network.html | 12 ++-- doc/html/ntqapplication.html | 64 +++++++++--------- doc/html/ntqasciicache.html | 2 +- doc/html/ntqasciidict.html | 2 +- doc/html/ntqcache.html | 2 +- doc/html/ntqclipboard.html | 2 +- doc/html/ntqcolor.html | 44 ++++++------ doc/html/ntqcstring.html | 36 +++++----- doc/html/ntqdatetime.html | 2 +- doc/html/ntqdict.html | 2 +- doc/html/ntqdir.html | 12 ++-- doc/html/ntqerrormessage.html | 2 +- doc/html/ntqfileinfo.html | 4 +- doc/html/ntqfontdatabase.html | 4 +- doc/html/ntqftp.html | 2 +- doc/html/ntqguardedptr.html | 2 +- doc/html/ntqhttp.html | 2 +- doc/html/ntqimage.html | 16 ++--- doc/html/ntqintcache.html | 2 +- doc/html/ntqintdict.html | 2 +- doc/html/ntqlocalfs.html | 2 +- doc/html/ntqmemarray.html | 10 +-- doc/html/ntqobject.html | 10 +-- doc/html/ntqptrdict.html | 2 +- doc/html/ntqsqlcursor.html | 2 +- doc/html/ntqsqlquery.html | 4 +- doc/html/ntqstring.html | 2 +- doc/html/ntqthread.html | 2 +- doc/html/ntqurloperator.html | 6 +- doc/html/ntqvaluelist.html | 2 +- doc/html/ntqvaluevector.html | 2 +- doc/html/ntqvariant.html | 2 +- doc/html/ntqwidget.html | 2 +- doc/html/plugins-howto.html | 2 +- doc/html/porting2.html | 6 +- doc/html/progress-example.html | 2 +- doc/html/qaxserver-example-opengl.html | 2 +- doc/html/qbytearray.html | 20 +++--- doc/html/qcanvasview.html | 2 +- doc/html/qd-preface.png | Bin 153599 -> 153600 bytes doc/html/qdatasource.html | 2 +- doc/html/qdir-example.html | 2 +- doc/html/qglformat.html | 6 +- doc/html/qmag-example.html | 4 +- doc/html/qt.dcf | 50 +++++++------- doc/html/qtime.html | 2 +- doc/html/sql-overview-extract-main-cpp.html | 2 +- doc/html/sql-overview-order1-main-cpp.html | 2 +- doc/html/sql-overview-order2-main-cpp.html | 2 +- doc/html/sql-overview-retrieve1-main-cpp.html | 2 +- doc/html/sql-overview-retrieve2-main-cpp.html | 2 +- doc/html/sql.html | 12 ++-- doc/html/t10-lcdrange-cpp.html | 2 +- doc/html/t11-lcdrange-cpp.html | 2 +- doc/html/t12-lcdrange-cpp.html | 2 +- doc/html/t13-lcdrange-cpp.html | 2 +- doc/html/t14-lcdrange-cpp.html | 2 +- doc/html/t8-lcdrange-cpp.html | 2 +- doc/html/t9-lcdrange-cpp.html | 2 +- doc/html/tictac-example.html | 2 +- doc/html/tutorial1-04.html | 2 +- doc/html/tutorial1-08.html | 4 +- 83 files changed, 266 insertions(+), 266 deletions(-) diff --git a/ChangeLog.immodule b/ChangeLog.immodule index 44acfd9c..8d9acb48 100644 --- a/ChangeLog.immodule +++ b/ChangeLog.immodule @@ -94,7 +94,7 @@ * src/kernel/ntqinputcontext.h - (identifierName, language): Change return type from QCString to QString - - (addMenusTo): Make Qt3 specific + - (addMenusTo): Make TQt3 specific * src/kernel/qinputcontext.cpp - (identifierName): * Change return type from QCString to QString @@ -126,7 +126,7 @@ defined(Q_WS_X11) * src/input/qinputcontextinterface_p.h - - Modify a coding style to follow Trolltech's one for Qt3 + - Modify a coding style to follow Trolltech's one for TQt3 * src/input/ntqinputcontextplugin.h - Fix typos in comment @@ -357,7 +357,7 @@ - Add '-im' option to enable immodule feature (default yes). - Add '-im-ext' option to enable more immodule extensions (default no). Specify this option 'no' to keep binary compatibility with - standard Qt3 + standard TQt3 * src/kernel/qt_x11.pri - Add conditional QT_NO_IM and QT_NO_IM_EXTENSIONS definition in @@ -489,7 +489,7 @@ 2004-08-10 YamaKen * plugins/src/inputmethods/simple/qsimpleinputcontext.h - - Follow Trolltech's coding style for Qt3 + - Follow Trolltech's coding style for TQt3 - Remove unnecessary headers - (UNITIZE): Moved from qsimpleinputcontext.cpp. QT_ prefix is not required since a macro does not pollute symbol space @@ -507,7 +507,7 @@ - Separate composing table definition to composetable.cpp - Remove unnecessary headers - Replace 'true' and 'false' with 'TRUE' and 'FALSE' to follow - Trolltech's coding style for Qt3 + Trolltech's coding style for TQt3 - Replace _ComposeTableElement with QComposeTableElement to follow the renaming - Replace ComposeTable with QComposeTable to follow the renaming @@ -685,7 +685,7 @@ * src/kernel/ntqinputcontext.h - (QInputContextMenu::Action): New enum - - (menus): Restrict to use with Qt3 only + - (menus): Restrict to use with TQt3 only - (qt4menus): Remove to replace with actions() - (actions): New function for Qt4 @@ -1315,7 +1315,7 @@ 4. Rename QInputContext::name() to identifierName() to avoid conflicting with QObject::name() - This patch does not break binary compatibility from vanilla Qt3. + This patch does not break binary compatibility from vanilla TQt3. But it costs immodule developer small modification. * src/kernel/ntqinputcontext.h diff --git a/changes-3.4 b/changes-3.4 index 09cc65d4..3ac69574 100644 --- a/changes-3.4 +++ b/changes-3.4 @@ -1,5 +1,5 @@ Qt 3.4 is a new feature release. It is not backwards compatible with any -prior Qt3 version due to changes in the QWidget definition. +prior TQt3 version due to changes in the QWidget definition. **************************************************************************** * General * diff --git a/changes-3.5 b/changes-3.5 index f40ce0bb..e05b7252 100644 --- a/changes-3.5 +++ b/changes-3.5 @@ -10,7 +10,7 @@ General Improvements - Technical - * Modify TQStyle API to work without requiring direct access to TQt-specific objects + * Modify TQStyle API to work without retquiring direct access to Qt-specific objects See "TQStyle API Change" section below TQStyle API Change diff --git a/changes.immodule b/changes.immodule index 15dba6ed..4a280652 100644 --- a/changes.immodule +++ b/changes.immodule @@ -105,7 +105,7 @@ General pluggable popup menu requires #ifdef'ed different code. In addition, be careful about use of classes that is deprecated in Qt4. -- Our two development tree for Qt3 'Binary Compatible' and 'ALL' have +- Our two development tree for TQt3 'Binary Compatible' and 'ALL' have been merged into this unified source tree. The source tree is called 'Unified' patch. diff --git a/configure b/configure index cce8ec09..9c3d32d9 100755 --- a/configure +++ b/configure @@ -2153,7 +2153,7 @@ Qt/X11 only: $IXN -no-inputmethod-ext Do not compile more immodule extensions support. $IXY -inputmethod-ext ... Compile more immodule extensions support. - (breaks ABI with standard Qt3). + (breaks ABI with standard TQt3). EOF fi diff --git a/doc/html/clientserver-example.html b/doc/html/clientserver-example.html index 85c38108..fd1e2479 100644 --- a/doc/html/clientserver-example.html +++ b/doc/html/clientserver-example.html @@ -127,7 +127,7 @@ public: TQServerSocket( 4242, 1, parent ) { if ( !ok() ) { - qWarning("Failed to bind to port 4242"); + tqWarning("Failed to bind to port 4242"); exit(1); } } diff --git a/doc/html/debug.html b/doc/html/debug.html index 23c84dd9..0747921e 100644 --- a/doc/html/debug.html +++ b/doc/html/debug.html @@ -59,10 +59,10 @@ option is only valid for the X11 version of TQt.

TQt includes three global functions for writing out warning and debug text.

The TQt implementation of these functions prints the text to the stderr @@ -141,12 +141,12 @@ define QT_NO_CHECK. { #if defined(QT_CHECK_NULL) if ( p == 0 ) - qWarning( "f: Null pointer not allowed" ); + tqWarning( "f: Null pointer not allowed" ); #endif #if defined(QT_CHECK_RANGE) if ( i < 0 ) - qWarning( "f: The index cannot be negative" ); + tqWarning( "f: The index cannot be negative" ); #endif } diff --git a/doc/html/distributor-example.html b/doc/html/distributor-example.html index 53abca50..87f37c1d 100644 --- a/doc/html/distributor-example.html +++ b/doc/html/distributor-example.html @@ -176,7 +176,7 @@ static char *find_pattern( char *h, const char *n, ulong hlen ) if ( nlen > hlen ) return 0; - } while ( qstrncmp( h, n, nlen ) != 0 ); + } while ( tqstrncmp( h, n, nlen ) != 0 ); return h + nlen; } diff --git a/doc/html/dnd.html b/doc/html/dnd.html index 82f90aa5..f55293c3 100644 --- a/doc/html/dnd.html +++ b/doc/html/dnd.html @@ -319,7 +319,7 @@ void MyWidget::dragMoveEvent(TQDragMoveEvent* event) feedback as the drag progresses, to start timers, to scroll the window, or whatever is appropriate (don't forget to stop the scrolling and timers in a dragLeaveEvent() though). -

The TQApplication object (available as the qApp global) also +

The TQApplication object (available as the tqApp global) also provides some drag and drop related functions: TQApplication::setStartDragTime(), TQApplication::setStartDragDistance(), and their corresponding diff --git a/doc/html/fileiconview-example.html b/doc/html/fileiconview-example.html index b2b2b0da..8815046b 100644 --- a/doc/html/fileiconview-example.html +++ b/doc/html/fileiconview-example.html @@ -689,7 +689,7 @@ TQtFileIconViewItem::~TQtFileIconViewItem() : TQIconView( parent, name ), viewDir( dir ), newFolderNum( 0 ) { if ( !iconFolderLockedLarge ) { - qAddPostRoutine( cleanup ); + tqAddPostRoutine( cleanup ); TQWMatrix m; m.scale( 0.6, 0.6 ); TQPixmap iconpix( folder_locked_icon ); diff --git a/doc/html/functions.html b/doc/html/functions.html index f5d7dee0..9a1d73f3 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -2078,43 +2078,43 @@ packImage: TQPointArray

  • putch: TQFile TQIODevice TQSocket
  • tqAddPostRoutine: - TQApplication
  • qAlpha: - TQColor
  • qBlue: - TQColor
  • qChecksum: - TQMemArray
  • qCompress: - TQByteArray
  • qDebug: + TQApplication
  • tqAlpha: + TQColor
  • tqBlue: + TQColor
  • tqChecksum: + TQMemArray
  • tqCompress: + TQByteArray
  • tqDebug: TQApplication
  • qDrawPlainRect: TQPainter
  • qDrawShadeLine: TQPainter
  • qDrawShadePanel: TQPainter
  • qDrawShadeRect: TQPainter
  • qDrawWinButton: TQPainter
  • qDrawWinPanel: - TQPainter
  • qFatal: - TQApplication
  • qGray: - TQColor
  • qGreen: - TQColor
  • qInitNetworkProtocols: + TQPainter
  • tqFatal: + TQApplication
  • tqGray: + TQColor
  • tqGreen: + TQColor
  • tqInitNetworkProtocols: TQUrlOperator
  • qInstallMsgHandler: TQApplication
  • qMakePair: TQPair
  • qName: - TQXmlAttributes
  • qRed: - TQColor
  • qRgb: - TQColor
  • qRgba: - TQColor
  • qSysInfo: - TQApplication
  • qSystemWarning: - TQApplication
  • qUncompress: - TQByteArray
  • qVersion: - TQApplication
  • qWarning: + TQXmlAttributes
  • tqRed: + TQColor
  • tqRgb: + TQColor
  • tqRgba: + TQColor
  • tqSysInfo: + TQApplication
  • tqSystemWarning: + TQApplication
  • tqUncompress: + TQByteArray
  • tqVersion: + TQApplication
  • tqWarning: TQApplication
  • qglClearColor: TQGLWidget
  • qglColor: - TQGLWidget
  • qmemmove: + TQGLWidget
  • tqmemmove: TQCString
  • qstrcmp: TQCString
  • qstrcpy: - TQCString
  • qstrdup: - TQCString
  • qstricmp: - TQCString
  • qstrlen: - TQCString
  • qstrncmp: - TQCString
  • qstrncpy: - TQCString
  • qstrnicmp: + TQCString
  • tqstrdup: + TQCString
  • tqstricmp: + TQCString
  • tqstrlen: + TQCString
  • tqstrncmp: + TQCString
  • tqstrncpy: + TQCString
  • tqstrnicmp: TQCString
  • qtHandler: TQErrorMessage
  • tqt_find_obj_child: TQObject
  • qualifiedNames: diff --git a/doc/html/grapher-nsplugin-example.html b/doc/html/grapher-nsplugin-example.html index e373bad8..bcb6acdd 100644 --- a/doc/html/grapher-nsplugin-example.html +++ b/doc/html/grapher-nsplugin-example.html @@ -232,7 +232,7 @@ Graph::~Graph() void Graph::setStyle(const char* stext) { for ( Style s = Pie; styleName[s]; s = Style(s+1) ) { - if ( qstricmp(stext,styleName[s])==0 ) { + if ( tqstricmp(stext,styleName[s])==0 ) { setStyle(s); return; } diff --git a/doc/html/httpd-example.html b/doc/html/httpd-example.html index 08673f7b..f2626a43 100644 --- a/doc/html/httpd-example.html +++ b/doc/html/httpd-example.html @@ -69,7 +69,7 @@ public: TQServerSocket(8080,1,parent) { if ( !ok() ) { - qWarning("Failed to bind to port 8080"); + tqWarning("Failed to bind to port 8080"); exit( 1 ); } } diff --git a/doc/html/i18n.html b/doc/html/i18n.html index 14b5a0be..ff2fa0c7 100644 --- a/doc/html/i18n.html +++ b/doc/html/i18n.html @@ -289,8 +289,8 @@ example: TQString s1 = "%1 of %2 files copied. Copying: %3"; TQString s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert."; - qDebug( s1.arg(5).arg(10).arg("somefile.txt").ascii() ); - qDebug( s2.arg(5).arg(10).arg("somefile.txt").ascii() ); + tqDebug( s1.arg(5).arg(10).arg("somefile.txt").ascii() ); + tqDebug( s2.arg(5).arg(10).arg("somefile.txt").ascii() );

    produces the correct output in English and Norwegian: diff --git a/doc/html/iconview-example.html b/doc/html/iconview-example.html index a7e74209..4454a967 100644 --- a/doc/html/iconview-example.html +++ b/doc/html/iconview-example.html @@ -67,18 +67,18 @@ public: public slots: void dropped( TQDropEvent *mime ) { - qDebug( "Dropped Mimesource %p into the view %p", mime, view ); - qDebug( " Formats:" ); + tqDebug( "Dropped Mimesource %p into the view %p", mime, view ); + tqDebug( " Formats:" ); int i = 0; const char *str = mime->format( i ); - qDebug( " %s", str ); + tqDebug( " %s", str ); while ( str ) { - qDebug( " %s", str ); + tqDebug( " %s", str ); str = mime->format( ++i ); } }; void moved() { - qDebug( "All selected items were moved to another widget" ); + tqDebug( "All selected items were moved to another widget" ); } protected: diff --git a/doc/html/life-example.html b/doc/html/life-example.html index da5b3ef4..1f2464e1 100644 --- a/doc/html/life-example.html +++ b/doc/html/life-example.html @@ -255,7 +255,7 @@ void LifeWidget::nextGeneration() void usage() { - qWarning( "Usage: life [-scale scale]" ); + tqWarning( "Usage: life [-scale scale]" ); } int main( int argc, char **argv ) diff --git a/doc/html/mac-differences.html b/doc/html/mac-differences.html index c5653af3..f905eeb9 100644 --- a/doc/html/mac-differences.html +++ b/doc/html/mac-differences.html @@ -204,7 +204,7 @@ do this: kCFURLPOSIXPathStyle); const char *pathPtr = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding()); - qDebug("Path = %s", pathPtr); + tqDebug("Path = %s", pathPtr); CFRelease(pluginRef); CFRelease(macPath); diff --git a/doc/html/motif-walkthrough-10.html b/doc/html/motif-walkthrough-10.html index 2644630e..b5e64017 100644 --- a/doc/html/motif-walkthrough-10.html +++ b/doc/html/motif-walkthrough-10.html @@ -51,12 +51,12 @@ us support for most of the written languages around the world. Our Page

    
     

    All functions that use the Page and Options structs need to be updated to use TQString properly. Since TQString is also an implicitly shared class, we no longer have to do any memory management with our -strings. We can remove all occurences of the qstrdup() function, +strings. We can remove all occurences of the tqstrdup() function, and we never need to use new or delete when done with a string. TQString will allocate and delete data when needed.

    Here are the MainWindow::fileOpen() and MainWindow::pageChange() functions from mainwindow.ui.h. Notice that the code no longer -uses delete or qstrdup() when storing text. +uses delete or tqstrdup() when storing text.

    
    diff --git a/doc/html/motif-walkthrough-4.html b/doc/html/motif-walkthrough-4.html
    index bb02213c..35f8a941 100644
    --- a/doc/html/motif-walkthrough-4.html
    +++ b/doc/html/motif-walkthrough-4.html
    @@ -82,7 +82,7 @@ contents of DoEditPage() to this point and remove the DoEditPage()<
     arrays.  Since the PageEditDialog and the data it contains will be
     destroyed when we return from this function, we need to convert the
     unicode TQString data into a TQCString in the local encoding and
    -duplicate it with qstrdup().
    +duplicate it with tqstrdup().
     

    
     

    The same process must be done for the minorTab text:

    
    diff --git a/doc/html/motif-walkthrough-7.html b/doc/html/motif-walkthrough-7.html
    index c6e5a2a1..8e63c9c0 100644
    --- a/doc/html/motif-walkthrough-7.html
    +++ b/doc/html/motif-walkthrough-7.html
    @@ -95,13 +95,13 @@ use new and delete when modifying members of the Page
     

    
    -

    When storing the context of the XmText widget, we use qstrdup() +

    When storing the context of the XmText widget, we use tqstrdup() to make a copy of the string returned by the XmTextGetString() function.

    
     

    The ReadDB() function in io.cpp needs similar changes. We replace all use of XtMalloc() and XtNewString() with new and -qstrdup(), respectively. +tqstrdup(), respectively.

    This needs to be done just after opening the file.

    diff --git a/doc/html/motif-walkthrough-8.html b/doc/html/motif-walkthrough-8.html index d0a2c572..1202ffdd 100644 --- a/doc/html/motif-walkthrough-8.html +++ b/doc/html/motif-walkthrough-8.html @@ -127,7 +127,7 @@ number (with an indication that the page is invalid). the new widgets in our Main Window widget.

    Note: TQTextEdit::text() returns a TQString, which needs to be converted into a normal char* array. To do this we create a copy of the -string in the local encoding. We need to make the copy using qstrdup() because the data contained in the TQCString returned by +string in the local encoding. We need to make the copy using tqstrdup() because the data contained in the TQCString returned by TQString::local8Bit() is deallocated when the TQCString is destroyed.

    
     

    The TextChanged() function does nothing more than set the modified variable to 1. Our new MainWindow::textChanged() function @@ -163,7 +163,7 @@ values. currently displayed, so we use TQTextEdit::text() instead of XmTextGetString(). Note: TQTextEdit::text() returns a TQString, which needs to be converted into a normal char* array. To do this we create a copy of the string in the local encoding. We need to make -the copy using qstrdup() because the data contained in the TQCString +the copy using tqstrdup() because the data contained in the TQCString returned by TQString::local8Bit() is deallocated when the TQCString is destroyed.

    
    diff --git a/doc/html/network.html b/doc/html/network.html
    index c7bd4013..baf1057e 100644
    --- a/doc/html/network.html
    +++ b/doc/html/network.html
    @@ -129,9 +129,9 @@ void MyClass::slotOperationFinished( TQNetworkO
         switch ( op->operation() ) {
         case TQNetworkProtocol::OpMkDir: 
             if ( op->state() == TQNetworkProtocol::StFailed )
    -            qDebug( "Couldn't create directory %s", op->arg( 0 ).latin1() );
    +            tqDebug( "Couldn't create directory %s", op->arg( 0 ).latin1() );
             else
    -            qDebug( "Successfully created directory %s", op->arg( 0 ).latin1() );
    +            tqDebug( "Successfully created directory %s", op->arg( 0 ).latin1() );
             break;
         // ... and so on
         }
    @@ -159,24 +159,24 @@ void MyClass::slotInsertEntries( const TQValueListbegin();
         for ( ; it != info.end(); ++it ) {
             const TQUrlInfo &inf = *it;
    -        qDebug( "Name: %s, Size: %d, Last Modified: %s",
    +        tqDebug( "Name: %s, Size: %d, Last Modified: %s",
                 inf.name().latin1(), inf.size(), inf.lastModified().toString().latin1() );
         }
     }
     
     void MyClass::slotStart( TQNetworkOperation * )
     {
    -    qDebug( "Start reading '%s'", op.toString().latin1() );
    +    tqDebug( "Start reading '%s'", op.toString().latin1() );
     }
     
     void MyClass::slotFinished( TQNetworkOperation *operation )
     {
         if ( operation->operation() == TQNetworkProtocol::OpListChildren ) {
             if ( operation->state() == TQNetworkProtocol::StFailed )
    -            qDebug( "Couldn't read '%s'! Following error occurred: %s",
    +            tqDebug( "Couldn't read '%s'! Following error occurred: %s",
                     op.toString().latin1(), operation->protocolDetail().latin1() );
             else
    -            qDebug( "Finished reading '%s'!", op.toString().latin1() );
    +            tqDebug( "Finished reading '%s'!", op.toString().latin1() );
         }
     }
     
    diff --git a/doc/html/ntqapplication.html b/doc/html/ntqapplication.html
    index f0df8f7d..4577524a 100644
    --- a/doc/html/ntqapplication.html
    +++ b/doc/html/ntqapplication.html
    @@ -170,13 +170,13 @@ flow and main settings.
     
     

    Related Functions

      -
    • void qAddPostRoutine ( TQtCleanUpFunction p )
    • -
    • const char * qVersion ()
    • -
    • bool qSysInfo ( int * wordSize, bool * bigEndian )
    • -
    • void qDebug ( const char * msg, ... )
    • -
    • void qWarning ( const char * msg, ... )
    • -
    • void qFatal ( const char * msg, ... )
    • -
    • void qSystemWarning ( const char * msg, int code )
    • +
    • void tqAddPostRoutine ( TQtCleanUpFunction p )
    • +
    • const char * tqVersion ()
    • +
    • bool tqSysInfo ( int * wordSize, bool * bigEndian )
    • +
    • void tqDebug ( const char * msg, ... )
    • +
    • void tqWarning ( const char * msg, ... )
    • +
    • void tqFatal ( const char * msg, ... )
    • +
    • void tqSystemWarning ( const char * msg, int code )
    • void Q_ASSERT ( bool test )
    • void TQ_CHECK_PTR ( void * p )
    • TQtMsgHandler qInstallMsgHandler ( TQtMsgHandler h )
    • @@ -196,7 +196,7 @@ application-wide settings.

      For any GUI application that uses TQt, there is precisely one TQApplication object, no matter whether the application has 0, 1, 2 or more windows at any time. -

      The TQApplication object is accessible through the global pointer qApp. Its main areas of responsibility are: +

      The TQApplication object is accessible through the global pointer tqApp. Its main areas of responsibility are:

      • It initializes the application with the user's desktop settings such as palette(), font() and doubleClickInterval(). It keeps track @@ -390,13 +390,13 @@ arguments to translate(): Initializes the window system and constructs an application object with argc command line arguments in argv. -

        The global qApp pointer refers to this application object. Only +

        The global tqApp pointer refers to this application object. Only one application object should be created.

        This application object must be constructed before any paint devices (including widgets, pixmaps, bitmaps etc.).

        Note that argc and argv might be changed. TQt removes command line arguments that it recognizes. The modified argc and argv -can also be accessed later with qApp->argc() and qApp->argv(). +can also be accessed later with tqApp->argc() and tqApp->argv(). The documentation for argv() contains a detailed description of how to process command line arguments.

        TQt debugging options (not available if TQt was compiled with the @@ -517,7 +517,7 @@ bits-per-pixel.

        TQApplication::~TQApplication () [virtual]

        Cleans up any window system resources that were allocated by this -application. Sets the global variable qApp to 0. +application. Sets the global variable tqApp to 0.

        void TQApplication::aboutTQt () [slot]

        @@ -672,7 +672,7 @@ and a few more options.

        If you run showargs -display unix:0 -font 9x15bold hello world under X11, the list box contains the three strings "showargs", "hello" and "world". -

        TQt provides a global pointer, qApp, that points to the +

        TQt provides a global pointer, tqApp, that points to the TQApplication object, and through which you can access argc() and argv() in functions other than main().

        See also argc() and TQApplication::TQApplication(). @@ -1801,12 +1801,12 @@ line number if test is FALSE.

        If b is zero, the Q_ASSERT statement will output the following -message using the qWarning() function: +message using the tqWarning() function:

                 ASSERT: "b != 0" in div.cpp (9)
             
        -

        See also qWarning() and Debugging. +

        See also tqWarning() and Debugging.

        void TQ_CHECK_PTR ( void * p )

        @@ -1825,9 +1825,9 @@ name and line number, saying that the program ran out of memory. TQ_CHECK_PTR( a ); -

        See also qWarning() and Debugging. +

        See also tqWarning() and Debugging. -

        void qAddPostRoutine ( TQtCleanUpFunction p ) +

        void tqAddPostRoutine ( TQtCleanUpFunction p )

        Adds a global routine that will be called from the TQApplication @@ -1847,12 +1847,12 @@ nothing, like this: void init_ptr() { global_ptr = new int[100]; // allocate data - qAddPostRoutine( cleanup_ptr ); // delete later + tqAddPostRoutine( cleanup_ptr ); // delete later }

        Note that for an application- or module-wide cleanup, -qAddPostRoutine() is often not suitable. People have a tendency to +tqAddPostRoutine() is often not suitable. People have a tendency to make such modules dynamically loaded, and then unload those modules long before the TQApplication destructor is called, for example.

        For modules and libraries, using a reference-counted initialization @@ -1883,7 +1883,7 @@ to call a cleanup function at the right time:

        By selecting the right parent widget/object, this can often be made to clean up the module's data at the exact right moment. -

        void qDebug ( const char * msg, ... ) +

        void tqDebug ( const char * msg, ... )

        @@ -1893,7 +1893,7 @@ has been installed). similar to the C printf() function.

        Example:

        -        qDebug( "my window handle = %x", myWidget->id() );
        +        tqDebug( "my window handle = %x", myWidget->id() );
             

        Under X11, the text is printed to stderr. Under Windows, the text @@ -1902,9 +1902,9 @@ is sent to the debugger. the '\0'-terminator).

        Warning: Passing (const char *)0 as argument to tqDebug might lead to crashes on certain platforms due to the platforms printf implementation. -

        See also qWarning(), qFatal(), qInstallMsgHandler(), and Debugging. +

        See also tqWarning(), tqFatal(), qInstallMsgHandler(), and Debugging. -

        void qFatal ( const char * msg, ... ) +

        void tqFatal ( const char * msg, ... )

        @@ -1917,7 +1917,7 @@ similar to the C printf() function. int divide( int a, int b ) { if ( b == 0 ) // program error - qFatal( "divide: cannot divide by zero" ); + tqFatal( "divide: cannot divide by zero" ); return a/b; } @@ -1928,7 +1928,7 @@ is sent to the debugger. the '\0'-terminator).

        Warning: Passing (const char *)0 as argument to tqFatal might lead to crashes on certain platforms due to the platforms printf implementation. -

        See also qDebug(), qWarning(), qInstallMsgHandler(), and Debugging. +

        See also tqDebug(), tqWarning(), qInstallMsgHandler(), and Debugging.

        TQtMsgHandler qInstallMsgHandler ( TQtMsgHandler h )

        @@ -1977,19 +1977,19 @@ done on an application-wide basis to control debug output. } -

        See also qDebug(), qWarning(), qFatal(), and Debugging. +

        See also tqDebug(), tqWarning(), tqFatal(), and Debugging. -

        bool qSysInfo ( int * wordSize, bool * bigEndian ) +

        bool tqSysInfo ( int * wordSize, bool * bigEndian )

        Obtains information about the system.

        The system's word size in bits (typically 32) is returned in *wordSize. The *bigEndian is set to TRUE if this is a big-endian machine, or to FALSE if this is a little-endian machine. -

        In debug mode, this function calls qFatal() with a message if the +

        In debug mode, this function calls tqFatal() with a message if the computer is truly weird (i.e. different endianness for 16 bit and 32 bit integers); in release mode it returns FALSE. -

        void qSystemWarning ( const char * msg, int code ) +

        void tqSystemWarning ( const char * msg, int code )

        Prints the message msg and uses code to get a system specific @@ -1999,7 +1999,7 @@ failures in platform specific API calls.

        This function does nothing when TQt is built with QT_NO_DEBUG defined. -

        const char * qVersion () +

        const char * tqVersion ()

        Returns the TQt version number as a string, for example, "2.3.0" or @@ -2008,7 +2008,7 @@ defined. 0xmmiibb (m = major, i = minor, b = bugfix). For example, TQt 3.0.5's TQT_VERSION is 0x030005. -

        void qWarning ( const char * msg, ... ) +

        void tqWarning ( const char * msg, ... )

        @@ -2021,7 +2021,7 @@ similar to the C printf() function. void f( int c ) { if ( c > 200 ) - qWarning( "f: bad argument, c == %d", c ); + tqWarning( "f: bad argument, c == %d", c ); } @@ -2031,7 +2031,7 @@ is sent to the debugger. the '\0'-terminator).

        Warning: Passing (const char *)0 as argument to tqWarning might lead to crashes on certain platforms due to the platforms printf implementation. -

        See also qDebug(), qFatal(), qInstallMsgHandler(), and Debugging. +

        See also tqDebug(), tqFatal(), qInstallMsgHandler(), and Debugging.


        diff --git a/doc/html/ntqasciicache.html b/doc/html/ntqasciicache.html index 561b1fea..13df1f01 100644 --- a/doc/html/ntqasciicache.html +++ b/doc/html/ntqasciicache.html @@ -217,7 +217,7 @@ This should be a bit bigger than count() is likely to be.

        A debug-only utility function. Prints out cache usage, hit/miss, -and distribution information using qDebug(). This function does +and distribution information using tqDebug(). This function does nothing in the release library.

        type * TQAsciiCache::take ( const char * k ) diff --git a/doc/html/ntqasciidict.html b/doc/html/ntqasciidict.html index 6f943da0..460792d7 100644 --- a/doc/html/ntqasciidict.html +++ b/doc/html/ntqasciidict.html @@ -290,7 +290,7 @@ constructor).

        Debugging-only function that prints out the dictionary -distribution using qDebug(). +distribution using tqDebug().

        type * TQAsciiDict::take ( const char * key )

        diff --git a/doc/html/ntqcache.html b/doc/html/ntqcache.html index 1d5d8ed3..ed557bf5 100644 --- a/doc/html/ntqcache.html +++ b/doc/html/ntqcache.html @@ -244,7 +244,7 @@ This should be a bit bigger than count() is likely to be.

        A debug-only utility function. Prints out cache usage, hit/miss, -and distribution information using qDebug(). This function does +and distribution information using tqDebug(). This function does nothing in the release library.

        type * TQCache::take ( const TQString & k ) diff --git a/doc/html/ntqclipboard.html b/doc/html/ntqclipboard.html index 74f235ff..2ce95aff 100644 --- a/doc/html/ntqclipboard.html +++ b/doc/html/ntqclipboard.html @@ -91,7 +91,7 @@ access it using TQApplication::clipboard // Copy text from the clipboard (paste) TQString text = cb->text(TQClipboard::Clipboard); if ( !text.isNull() ) - qDebug( "The clipboard contains: " + text ); + tqDebug( "The clipboard contains: " + text ); // Copy text into the clipboard cb->setText( "This text can be pasted by other programs", diff --git a/doc/html/ntqcolor.html b/doc/html/ntqcolor.html index 465af190..ba7d399f 100644 --- a/doc/html/ntqcolor.html +++ b/doc/html/ntqcolor.html @@ -85,14 +85,14 @@ body { background: #ffffff; color: black; }
        • TQDataStream & operator<< ( TQDataStream & s, const TQColor & c )
        • TQDataStream & operator>> ( TQDataStream & s, TQColor & c )
        • -
        • int qRed ( TQRgb rgb )
        • -
        • int qGreen ( TQRgb rgb )
        • -
        • int qBlue ( TQRgb rgb )
        • -
        • int qAlpha ( TQRgb rgba )
        • -
        • TQRgb qRgb ( int r, int g, int b )
        • -
        • TQRgb qRgba ( int r, int g, int b, int a )
        • -
        • int qGray ( int r, int g, int b )
        • -
        • int qGray ( tqRgb rgb )
        • +
        • int tqRed ( TQRgb rgb )
        • +
        • int tqGreen ( TQRgb rgb )
        • +
        • int tqBlue ( TQRgb rgb )
        • +
        • int tqAlpha ( TQRgb rgba )
        • +
        • TQRgb tqRgb ( int r, int g, int b )
        • +
        • TQRgb tqRgba ( int r, int g, int b, int a )
        • +
        • int tqGray ( int r, int g, int b )
        • +
        • int tqGray ( tqRgb rgb )

        Detailed Description

        @@ -490,7 +490,7 @@ but the value is an arbitrary 32-bit value.

        The return type TQRgb is equivalent to unsigned int.

        For an invalid color, the alpha value of the returned color is unspecified. -

        See also setRgb(), hsv(), qRed(), qBlue(), qGreen(), and isValid(). +

        See also setRgb(), hsv(), tqRed(), tqBlue(), tqGreen(), and isValid().

        void TQColor::rgb ( int * r, int * g, int * b ) const

        This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. @@ -548,20 +548,20 @@ Writes a color object, c to the stream, s. Reads a color object, c, from the stream, s.

        See also Format of the TQDataStream operators. -

        int qAlpha ( TQRgb rgba ) +

        int tqAlpha ( TQRgb rgba )

        Returns the alpha component of the RGBA quadruplet rgba. -

        int qBlue ( TQRgb rgb ) +

        int tqBlue ( TQRgb rgb )

        Returns the blue component of the RGB triplet rgb. -

        See also qRgb() and TQColor::blue(). +

        See also tqRgb() and TQColor::blue(). -

        int qGray ( int r, int g, int b ) +

        int tqGray ( int r, int g, int b )

        @@ -569,41 +569,41 @@ Reads a color object, c, from the stream, s.

        The gray value is calculated using the formula (r*11 + g*16 + b*5)/32. -

        int qGray ( tqRgb rgb ) +

        int tqGray ( tqRgb rgb )

        This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

        Returns a gray value 0..255 from the given rgb colour. -

        int qGreen ( TQRgb rgb ) +

        int tqGreen ( TQRgb rgb )

        Returns the green component of the RGB triplet rgb. -

        See also qRgb() and TQColor::green(). +

        See also tqRgb() and TQColor::green(). -

        int qRed ( TQRgb rgb ) +

        int tqRed ( TQRgb rgb )

        Returns the red component of the RGB triplet rgb. -

        See also qRgb() and TQColor::red(). +

        See also tqRgb() and TQColor::red(). -

        TQRgb qRgb ( int r, int g, int b ) +

        TQRgb tqRgb ( int r, int g, int b )

        Returns the RGB triplet (r,g,b).

        The return type TQRgb is equivalent to unsigned int. -

        See also qRgba(), qRed(), qGreen(), and qBlue(). +

        See also tqRgba(), tqRed(), tqGreen(), and tqBlue(). -

        TQRgb qRgba ( int r, int g, int b, int a ) +

        TQRgb tqRgba ( int r, int g, int b, int a )

        Returns the RGBA quadruplet (r,g,b,a).

        The return type TQRgba is equivalent to unsigned int. -

        See also qRgb(), qRed(), qGreen(), and qBlue(). +

        See also tqRgb(), tqRed(), tqGreen(), and tqBlue().


        diff --git a/doc/html/ntqcstring.html b/doc/html/ntqcstring.html index d80baeff..ad502586 100644 --- a/doc/html/ntqcstring.html +++ b/doc/html/ntqcstring.html @@ -107,15 +107,15 @@ zero-terminated char array (char *).

      Related Functions

        -
      • void * qmemmove ( void * dst, const void * src, uint len )
      • -
      • char * qstrdup ( const char * src )
      • +
      • void * tqmemmove ( void * dst, const void * src, uint len )
      • +
      • char * tqstrdup ( const char * src )
      • char * qstrcpy ( char * dst, const char * src )
      • -
      • char * qstrncpy ( char * dst, const char * src, uint len )
      • -
      • uint qstrlen ( const char * str )
      • +
      • char * tqstrncpy ( char * dst, const char * src, uint len )
      • +
      • uint tqstrlen ( const char * str )
      • int qstrcmp ( const char * str1, const char * str2 )
      • -
      • int qstrncmp ( const char * str1, const char * str2, uint len )
      • -
      • int qstricmp ( const char * str1, const char * str2 )
      • -
      • int qstrnicmp ( const char * str1, const char * str2, uint len )
      • +
      • int tqstrncmp ( const char * str1, const char * str2, uint len )
      • +
      • int tqstricmp ( const char * str1, const char * str2 )
      • +
      • int tqstrnicmp ( const char * str1, const char * str2, uint len )
      • TQDataStream & operator<< ( TQDataStream & s, const TQCString & str )
      • TQDataStream & operator>> ( TQDataStream & s, TQCString & str )
      • bool operator== ( const TQCString & s1, const TQCString & s2 )
      • @@ -1000,7 +1000,7 @@ returns FALSE.

        Reads a string into str from the stream s.

        See also Format of the TQDataStream operators. -

        void * qmemmove ( void * dst, const void * src, uint len ) +

        void * tqmemmove ( void * dst, const void * src, uint len )

        This function is normally part of the C library. TQt implements @@ -1019,7 +1019,7 @@ positive value if str1 is greater than str2.

        Special case I: Returns 0 if str1 and str2 are both 0.

        Special case II: Returns a random nonzero value if str1 is 0 or str2 is 0 (but not both). -

        See also qstrncmp(), qstricmp(), qstrnicmp(), and Note on character comparisons. +

        See also tqstrncmp(), tqstricmp(), tqstrnicmp(), and Note on character comparisons.

        char * qstrcpy ( char * dst, const char * src )

        @@ -1029,7 +1029,7 @@ or str2 is 0 (but not both).

        Copies all characters up to and including the '\0' from src into dst and returns a pointer to dst. -

        char * qstrdup ( const char * src ) +

        char * tqstrdup ( const char * src )

        Returns a duplicate string. @@ -1037,7 +1037,7 @@ into dst and returns a pointer to dst. pointer to the copy. If src is 0, it immediately returns 0.

        The returned string must be deleted using delete[]. -

        int qstricmp ( const char * str1, const char * str2 ) +

        int tqstricmp ( const char * str1, const char * str2 )

        A safe stricmp() function. @@ -1047,9 +1047,9 @@ than str2.

        Special case I: Returns 0 if str1 and str2 are both 0.

        Special case II: Returns a random nonzero value if str1 is 0 or str2 is 0 (but not both). -

        See also qstrcmp(), qstrncmp(), qstrnicmp(), and Note on character comparisons. +

        See also qstrcmp(), tqstrncmp(), tqstrnicmp(), and Note on character comparisons. -

        uint qstrlen ( const char * str ) +

        uint tqstrlen ( const char * str )

        @@ -1057,7 +1057,7 @@ or str2 is 0 (but not both).

        Returns the number of characters that precede the terminating '\0'. or 0 if str is 0. -

        int qstrncmp ( const char * str1, const char * str2, uint len ) +

        int tqstrncmp ( const char * str1, const char * str2, uint len )

        @@ -1068,9 +1068,9 @@ than str2.

        Special case I: Returns 0 if str1 and str2 are both 0.

        Special case II: Returns a random nonzero value if str1 is 0 or str2 is 0 (but not both). -

        See also qstrcmp(), qstricmp(), qstrnicmp(), and Note on character comparisons. +

        See also qstrcmp(), tqstricmp(), tqstrnicmp(), and Note on character comparisons. -

        char * qstrncpy ( char * dst, const char * src, uint len ) +

        char * tqstrncpy ( char * dst, const char * src, uint len )

        A safe strncpy() function. @@ -1080,7 +1080,7 @@ pointer to dst. Guarantees that dst is '\0'-terminated. If src or dst is 0, returns 0 immediately.

        See also qstrcpy(). -

        int qstrnicmp ( const char * str1, const char * str2, uint len ) +

        int tqstrnicmp ( const char * str1, const char * str2, uint len )

        A safe strnicmp() function. @@ -1090,7 +1090,7 @@ is equal to str2 or a positive value if str1 is greater than <

        Special case I: Returns 0 if str1 and str2 are both 0.

        Special case II: Returns a random nonzero value if str1 is 0 or str2 is 0 (but not both). -

        See also qstrcmp(), qstrncmp(), qstricmp(), and Note on character comparisons. +

        See also qstrcmp(), tqstrncmp(), tqstricmp(), and Note on character comparisons.


        diff --git a/doc/html/ntqdatetime.html b/doc/html/ntqdatetime.html index 614c23be..379b5f83 100644 --- a/doc/html/ntqdatetime.html +++ b/doc/html/ntqdatetime.html @@ -245,7 +245,7 @@ is negative if dt is earlier than this datetime).

             TQDateTime dt = TQDateTime::currentDateTime();
             TQDateTime xmas( TQDate(dt.date().year(),12,24), TQTime(17,00) );
        -    qDebug( "There are %d seconds to Christmas", dt.secsTo(xmas) );
        +    tqDebug( "There are %d seconds to Christmas", dt.secsTo(xmas) );
             

        See also addSecs(), daysTo(), and TQTime::secsTo(). diff --git a/doc/html/ntqdict.html b/doc/html/ntqdict.html index 1ef14852..f430efaa 100644 --- a/doc/html/ntqdict.html +++ b/doc/html/ntqdict.html @@ -364,7 +364,7 @@ constructor).

        Debugging-only function that prints out the dictionary -distribution using qDebug(). +distribution using tqDebug().

        type * TQDict::take ( const TQString & key )

        diff --git a/doc/html/ntqdir.html b/doc/html/ntqdir.html index 22feca59..5066c4f9 100644 --- a/doc/html/ntqdir.html +++ b/doc/html/ntqdir.html @@ -166,18 +166,18 @@ for a function in the underlying operating system use
             TQDir d( "example" );                        // "./example"
             if ( !d.exists() )
        -        qWarning( "Cannot find the example directory" );
        +        tqWarning( "Cannot find the example directory" );
             

        Traversing directories and reading a file.

             TQDir d = TQDir::root();                      // "/"
             if ( !d.cd("tmp") ) {                       // "/tmp"
        -        qWarning( "Cannot find the \"/tmp\" directory" );
        +        tqWarning( "Cannot find the \"/tmp\" directory" );
             } else {
                 TQFile f( d.filePath("ex1.txt") );       // "/tmp/ex1.txt"
                 if ( !f.open(IO_ReadWrite) )
        -            qWarning( "Cannot create the file %s", f.name() );
        +            tqWarning( "Cannot create the file %s", f.name() );
             }
             
        @@ -584,7 +584,7 @@ this function returns FALSE. If you want to test for this use TQDir d( "/tmp/root_link" ); d = d.canonicalPath(); if ( d.isRoot() ) - qWarning( "It is a root link" ); + tqWarning( "It is a root link" );

        See also root() and rootDirPath(). @@ -640,7 +640,7 @@ FALSE. TQDir d1( "/usr/local/bin" ); TQDir d2( "bin" ); if ( d1 != d2 ) - qDebug( "They differ" ); + tqDebug( "They differ" ); @@ -665,7 +665,7 @@ returns FALSE. TQDir d2( "bin" ); d2.convertToAbs(); if ( d1 == d2 ) - qDebug( "They're the same" ); + tqDebug( "They're the same" ); diff --git a/doc/html/ntqerrormessage.html b/doc/html/ntqerrormessage.html index 1876f431..5e26f216 100644 --- a/doc/html/ntqerrormessage.html +++ b/doc/html/ntqerrormessage.html @@ -64,7 +64,7 @@ TQErrorMessage like this, you create the dialog in the usual way and call the message() slot, or connect signals to it.

      • For developers. In this context the static qtHandler() installs a message handler using qInstallMsgHandler() and creates a TQErrorMessage -that displays qDebug(), qWarning() and qFatal() messages. +that displays tqDebug(), tqWarning() and tqFatal() messages.

        In both cases TQErrorMessage will queue pending messages, and display them (or not) in order, as soon as the user presses Enter or clicks OK diff --git a/doc/html/ntqfileinfo.html b/doc/html/ntqfileinfo.html index 38038845..0df6cb7b 100644 --- a/doc/html/ntqfileinfo.html +++ b/doc/html/ntqfileinfo.html @@ -411,9 +411,9 @@ always returns TRUE.

                 TQFileInfo fi( "/tmp/archive.tar.gz" );
                 if ( fi.permission( TQFileInfo::WriteUser | TQFileInfo::ReadGroup ) )
        -            qWarning( "I can change the file; my group can read the file" );
        +            tqWarning( "I can change the file; my group can read the file" );
                 if ( fi.permission( TQFileInfo::WriteGroup | TQFileInfo::WriteOther ) )
        -            qWarning( "The group or others can change the file" );
        +            tqWarning( "The group or others can change the file" );
             

        See also isReadable(), isWritable(), and isExecutable(). diff --git a/doc/html/ntqfontdatabase.html b/doc/html/ntqfontdatabase.html index 81f0cd4b..66cf97c7 100644 --- a/doc/html/ntqfontdatabase.html +++ b/doc/html/ntqfontdatabase.html @@ -115,7 +115,7 @@ int main( int argc, char **argv ) TQStringList families = fdb.families(); for ( TQStringList::Iterator f = families.begin(); f != families.end(); ++f ) { TQString family = *f; - qDebug( family ); + tqDebug( family ); TQStringList styles = fdb.styles( family ); for ( TQStringList::Iterator s = styles.begin(); s != styles.end(); ++s ) { TQString style = *s; @@ -126,7 +126,7 @@ int main( int argc, char **argv ) dstyle += TQString::number( *points ) + " "; } dstyle = dstyle.left( dstyle.length() - 1 ) + ")"; - qDebug( dstyle ); + tqDebug( dstyle ); } } return 0; diff --git a/doc/html/ntqftp.html b/doc/html/ntqftp.html index 40527178..f65d6ee2 100644 --- a/doc/html/ntqftp.html +++ b/doc/html/ntqftp.html @@ -108,7 +108,7 @@ example:

        This code will only work if the TQFtp class is registered; to -register the class, you must call qInitNetworkProtocols() before +register the class, you must call tqInitNetworkProtocols() before using a TQUrlOperator with TQFtp.

        The rest of this descrption describes the direct interface to FTP.

        The class works asynchronously, so there are no blocking diff --git a/doc/html/ntqguardedptr.html b/doc/html/ntqguardedptr.html index 9d6f8502..691b1e36 100644 --- a/doc/html/ntqguardedptr.html +++ b/doc/html/ntqguardedptr.html @@ -75,7 +75,7 @@ test the pointer for validity. if ( label) label->show(); else - qDebug("The label has been destroyed"); + tqDebug("The label has been destroyed");

        The program will output The label has been destroyed rather diff --git a/doc/html/ntqhttp.html b/doc/html/ntqhttp.html index 0b13c8fd..04706879 100644 --- a/doc/html/ntqhttp.html +++ b/doc/html/ntqhttp.html @@ -103,7 +103,7 @@ example:

        This code will only work if the TQHttp class is registered; to -register the class, you must call qInitNetworkProtocols() before +register the class, you must call tqInitNetworkProtocols() before using a TQUrlOperator with HTTP.

        The TQNetworkProtocol interface for HTTP only supports the operations operationGet() and operationPut(), i.e. diff --git a/doc/html/ntqimage.html b/doc/html/ntqimage.html index 2e04c4c0..678a44db 100644 --- a/doc/html/ntqimage.html +++ b/doc/html/ntqimage.html @@ -160,7 +160,7 @@ data. 1-bpp and 8-bpp images use a color lookup table; the pixel value is a color table index.

        32-bpp images encode an RGB value in 24 bits and ignore the color table. The most significant byte is used for the alpha buffer. -

        An entry in the color table is an RGB triplet encoded as a uint. Use the qRed(), qGreen() and qBlue() functions (ntqcolor.h) to access the components, and qRgb to make an RGB triplet (see the TQColor class +

        An entry in the color table is an RGB triplet encoded as a uint. Use the tqRed(), tqGreen() and tqBlue() functions (ntqcolor.h) to access the components, and tqRgb to make an RGB triplet (see the TQColor class documentation).

        1-bpp (monochrome) images have a color table with a most two colors. There are two different formats: big endian (MSB first) or @@ -194,7 +194,7 @@ significant byte is reserved for the alpha buffer. TQImage image; // sets 32 bit pixel at (x,y) to yellow. uint *p = (uint *)image.scanLine(y) + x; - *p = qRgb(255,255,0); + *p = tqRgb(255,255,0);

        On TQt/Embedded, scanlines are aligned to the pixel depth and may @@ -384,7 +384,7 @@ to numBytes()/height().

        Returns the color in the color table at index i. The first color is at index 0. -

        A color value is an RGB triplet. Use the qRed(), qGreen() and qBlue() functions (defined in ntqcolor.h) to +

        A color value is an RGB triplet. Use the tqRed(), tqGreen() and tqBlue() functions (defined in ntqcolor.h) to get the color value components.

        See also setColor(), numColors(), and TQColor. @@ -768,7 +768,7 @@ output. Returns the color of the pixel at the coordinates (x, y).

        If (x, y) is not on the image, the results are undefined. -

        See also setPixel(), qRed(), qGreen(), qBlue(), and valid(). +

        See also setPixel(), tqRed(), tqGreen(), tqBlue(), and valid().

        Examples: canvas/canvas.cpp and qmag/qmag.cpp.

        int TQImage::pixelIndex ( int x, int y ) const @@ -869,8 +869,8 @@ returned. pointer to TQRgb* (TQRgb has a 32-bit size) and use it to read/write the pixel value. You cannot use the uchar* pointer directly, because the pixel format depends on the byte order on -the underlying platform. Hint: use qRed(), -qGreen() and qBlue(), etc. (ntqcolor.h) to access the pixels. +the underlying platform. Hint: use tqRed(), +tqGreen() and tqBlue(), etc. (ntqcolor.h) to access the pixels.

        Warning: If you are accessing 16-bpp image data, you must handle endianness yourself. (TQt/Embedded only)

        See also bytesPerLine(), bits(), and jumpTable(). @@ -897,7 +897,7 @@ to a TQPixmap.

        Sets a color in the color table at index i to c. -

        A color value is an RGB triplet. Use the qRgb() function (defined in ntqcolor.h) to make RGB +

        A color value is an RGB triplet. Use the tqRgb() function (defined in ntqcolor.h) to make RGB triplets.

        See also color(), setNumColors(), and numColors(). @@ -928,7 +928,7 @@ Sets the pixel index or color at the coordinates (x, y) to

        If (x, y) is not valid, the result is undefined.

        If the image is a paletted image (depth() <= 8) and index_or_rgb >= numColors(), the result is undefined. -

        See also pixelIndex(), pixel(), qRgb(), qRgba(), and valid(). +

        See also pixelIndex(), pixel(), tqRgb(), tqRgba(), and valid().

        void TQImage::setText ( const char * key, const char * lang, const TQString & s )

        diff --git a/doc/html/ntqintcache.html b/doc/html/ntqintcache.html index 89ed6f16..8bd43af2 100644 --- a/doc/html/ntqintcache.html +++ b/doc/html/ntqintcache.html @@ -207,7 +207,7 @@ This should be a bit larger than count() is likely to be.

        A debug-only utility function. Prints out cache usage, hit/miss, -and distribution information using qDebug(). This function does +and distribution information using tqDebug(). This function does nothing in the release library.

        type * TQIntCache::take ( long k ) diff --git a/doc/html/ntqintdict.html b/doc/html/ntqintdict.html index da3d16f6..ea0d4d46 100644 --- a/doc/html/ntqintdict.html +++ b/doc/html/ntqintdict.html @@ -277,7 +277,7 @@ constructor).

        Debugging-only function that prints out the dictionary -distribution using qDebug(). +distribution using tqDebug().

        type * TQIntDict::take ( long key )

        diff --git a/doc/html/ntqlocalfs.html b/doc/html/ntqlocalfs.html index 007d0ea1..7829c7ac 100644 --- a/doc/html/ntqlocalfs.html +++ b/doc/html/ntqlocalfs.html @@ -58,7 +58,7 @@ example:

        This code will only work if the TQLocalFs class is registered; to -register the class, you must call qInitNetworkProtocols() before +register the class, you must call tqInitNetworkProtocols() before using a TQUrlOperator with TQLocalFs.

        If you really need to use TQLocalFs directly, don't forget to set its TQUrlOperator with setUrl(). diff --git a/doc/html/ntqmemarray.html b/doc/html/ntqmemarray.html index c20eeb6c..a38a8117 100644 --- a/doc/html/ntqmemarray.html +++ b/doc/html/ntqmemarray.html @@ -84,7 +84,7 @@ body { background: #ffffff; color: black; }

      Related Functions

        -
      • TQ_UINT16 qChecksum ( const char * data, uint len )
      • +
      • TQ_UINT16 tqChecksum ( const char * data, uint len )
      • TQDataStream & operator<< ( TQDataStream & s, const TQByteArray & a )
      • TQDataStream & operator>> ( TQDataStream & s, TQByteArray & a )
      @@ -136,10 +136,10 @@ constructor). TQValueVector provides an STL-compatible syntax and is { TQMemArray<int> a = fib( 6 ); // get first 6 fibonaccis for ( int i = 0; i < a.size(); i++ ) - qDebug( "%d: %d", i, a[i] ); + tqDebug( "%d: %d", i, a[i] ); - qDebug( "1 is found %d times", a.contains(1) ); - qDebug( "5 is found at index %d", a.find(5) ); + tqDebug( "1 is found %d times", a.contains(1) ); + tqDebug( "5 is found at index %d", a.find(5) ); return 0; } @@ -542,7 +542,7 @@ to the stream. reference to the stream.

      See also Format of the TQDataStream operators. -

      TQ_UINT16 qChecksum ( const char * data, uint len ) +

      TQ_UINT16 tqChecksum ( const char * data, uint len )

      Returns the CRC-16 checksum of len bytes starting at data. diff --git a/doc/html/ntqobject.html b/doc/html/ntqobject.html index d5d23adf..06ecf97e 100644 --- a/doc/html/ntqobject.html +++ b/doc/html/ntqobject.html @@ -522,7 +522,7 @@ TRUE; otherwise return FALSE. if ( obj == textEdit ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *k = (TQKeyEvent*)ev; - qDebug( "Ate key press %d", k->key() ); + tqDebug( "Ate key press %d", k->key() ); return TRUE; } else { return FALSE; @@ -616,7 +616,7 @@ monitored objects: if ( e->type() == TQEvent::KeyPress ) { // special processing for key press TQKeyEvent *k = (TQKeyEvent *)e; - qDebug( "Ate key press %d", k->key() ); + tqDebug( "Ate key press %d", k->key() ); return TRUE; // eat event } else { // standard event processing @@ -859,7 +859,7 @@ used to find out which timer was activated. void MyObject::timerEvent( TQTimerEvent *e ) { - qDebug( "timer event, id %d", e->timerId() ); + tqDebug( "timer event, id %d", e->timerId() ); } @@ -920,11 +920,11 @@ function. The object name is not very useful in the current version of TQt, but will become increasingly important in the future.

      If the object does not have a name, the name() function returns -"unnamed", so printf() (used in qDebug()) will not be asked to +"unnamed", so printf() (used in tqDebug()) will not be asked to output a null pointer. If you want a null pointer to be returned for unnamed objects, you can call name( 0 ).

      -        qDebug( "MyClass::setPrecision(): (%s) invalid precision %f",
      +        tqDebug( "MyClass::setPrecision(): (%s) invalid precision %f",
                       name(), newPrecision );
           
      diff --git a/doc/html/ntqptrdict.html b/doc/html/ntqptrdict.html index 3cfaf5b1..33ea4eb0 100644 --- a/doc/html/ntqptrdict.html +++ b/doc/html/ntqptrdict.html @@ -281,7 +281,7 @@ constructor).

      Debugging-only function that prints out the dictionary -distribution using qDebug(). +distribution using tqDebug().

      type * TQPtrDict::take ( void * key )

      diff --git a/doc/html/ntqsqlcursor.html b/doc/html/ntqsqlcursor.html index aaa3ad32..3fce8514 100644 --- a/doc/html/ntqsqlcursor.html +++ b/doc/html/ntqsqlcursor.html @@ -127,7 +127,7 @@ and the values returned by value() are undefined.
                  TQSqlCursor cur( "staff" ); // Specify the table/view name
                   cur.select(); // We'll retrieve every record
                   while ( cur.next() ) {
      -                qDebug( cur.value( "id" ).toString() + ": " +
      +                tqDebug( cur.value( "id" ).toString() + ": " +
                               cur.value( "surname" ).toString() + " " +
                               cur.value( "salary" ).toString() );
                   }
      diff --git a/doc/html/ntqsqlquery.html b/doc/html/ntqsqlquery.html
      index 3f5e54fa..9cda539c 100644
      --- a/doc/html/ntqsqlquery.html
      +++ b/doc/html/ntqsqlquery.html
      @@ -324,7 +324,7 @@ Returns a map of the bound values.
           TQMap<TQString, TQVariant>::ConstIterator it;
           TQMap<TQString, TQVariant> vals = query.boundValues();
           for ( it = vals.begin(); it != vals.end(); ++it )
      -        qWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
      +        tqWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
           ...
       
           // Examine the bound values - bound using positional binding
      @@ -332,7 +332,7 @@ Returns a map of the bound values.
           TQValueList<TQVariant> list = query.boundValues().values();
           int i = 0;
           for ( it = list.begin(); it != list.end(); ++it )
      -        qWarning( "Placeholder pos: %d, Value: " + (*it).toString(), i++ );
      +        tqWarning( "Placeholder pos: %d, Value: " + (*it).toString(), i++ );
           ...
       
           
      diff --git a/doc/html/ntqstring.html b/doc/html/ntqstring.html index e15ba9ba..6db0e307 100644 --- a/doc/html/ntqstring.html +++ b/doc/html/ntqstring.html @@ -467,7 +467,7 @@ natural language sentences does not usually translate well into other languages because sentence structure and word order often differ between languages.

      If there is no place marker (%1, %2, etc.), a warning -message (qWarning()) is output and the result is undefined. +message (tqWarning()) is output and the result is undefined.

      Warning: If any placeholder occurs more than once, the result is undefined.

      TQString TQString::arg ( long a, int fieldWidth = 0, int base = 10 ) const diff --git a/doc/html/ntqthread.html b/doc/html/ntqthread.html index a28028fb..8fc0e566 100644 --- a/doc/html/ntqthread.html +++ b/doc/html/ntqthread.html @@ -90,7 +90,7 @@ run() to include your code. For example: { for( int count = 0; count < 20; count++ ) { sleep( 1 ); - qDebug( "Ping!" ); + tqDebug( "Ping!" ); } } diff --git a/doc/html/ntqurloperator.html b/doc/html/ntqurloperator.html index 6a6d4c06..f8c8e0e6 100644 --- a/doc/html/ntqurloperator.html +++ b/doc/html/ntqurloperator.html @@ -78,7 +78,7 @@ body { background: #ffffff; color: black; }

    Related Functions


    Detailed Description

    @@ -130,7 +130,7 @@ necessary network protocol is registered), the URL operator emits errors. Not every protocol supports every operation, but error handling deals with this problem.

    To register the available network protocols, use the -qInitNetworkProtocols() function. The protocols currently +tqInitNetworkProtocols() function. The protocols currently supported are:

    • FTP, @@ -492,7 +492,7 @@ Stops the current network operation and removes all this TQUrlOperator's waiting network operations.

      Related Functions

      -

      void qInitNetworkProtocols () +

      void tqInitNetworkProtocols ()

      This function registers the network protocols for FTP and HTTP. diff --git a/doc/html/ntqvaluelist.html b/doc/html/ntqvaluelist.html index b40c1037..4d161c08 100644 --- a/doc/html/ntqvaluelist.html +++ b/doc/html/ntqvaluelist.html @@ -213,7 +213,7 @@ list it belongs to, however it is not dereferenceable; operator*() will not return a well-defined value. If the list is empty(), the iterator returned by begin() will equal the iterator returned by end(). -

      Another way to find an item in the list is by using the qFind() algorithm. For example: +

      Another way to find an item in the list is by using the tqFind() algorithm. For example:

           TQValueList<int> list;
           ...
      diff --git a/doc/html/ntqvaluevector.html b/doc/html/ntqvaluevector.html
      index ec0e812a..4a57ffbd 100644
      --- a/doc/html/ntqvaluevector.html
      +++ b/doc/html/ntqvaluevector.html
      @@ -234,7 +234,7 @@ example:
       therefore you can use them with many generic algorithms, for
       example, algorithms provided by the STL or the TQTL. 
       

      Another way to find an element in the vector is by using the -std::find() or qFind() algorithms. +std::find() or tqFind() algorithms. For example:

           TQValueVector<int> vec;
      diff --git a/doc/html/ntqvariant.html b/doc/html/ntqvariant.html
      index b07fde3e..450099a8 100644
      --- a/doc/html/ntqvariant.html
      +++ b/doc/html/ntqvariant.html
      @@ -215,7 +215,7 @@ return a reference to the new contents of the variant.
           TQDataStream in(...);      // (opening the previously written stream)
           in >> v;                  // Reads an Int variant
           int z = v.toInt();        // z = 123
      -    qDebug("Type is %s",      // prints "Type is int"
      +    tqDebug("Type is %s",      // prints "Type is int"
                   v.typeName());
           v.asInt() += 100;         // The variant now hold the value 223.
           v = TQVariant( TQStringList() );
      diff --git a/doc/html/ntqwidget.html b/doc/html/ntqwidget.html
      index f10de98b..dae28b81 100644
      --- a/doc/html/ntqwidget.html
      +++ b/doc/html/ntqwidget.html
      @@ -2723,7 +2723,7 @@ explicitly disabled.
       

      Set this property's value with setEnabled() and get this property's value with isEnabled().

      bool focus

      This property holds whether this widget (or its focus proxy) has the keyboard input focus. -

      Effectively equivalent to qApp->focusWidget() == this. +

      Effectively equivalent to tqApp->focusWidget() == this.

      See also setFocus(), clearFocus(), focusPolicy, and TQApplication::focusWidget().

      Get this property's value with hasFocus(). diff --git a/doc/html/plugins-howto.html b/doc/html/plugins-howto.html index de38704c..3181027d 100644 --- a/doc/html/plugins-howto.html +++ b/doc/html/plugins-howto.html @@ -65,7 +65,7 @@ by default in the standard plugin directory. run, TQt will first treat the application's executable directory as the pluginsbase. For example if the application is in C:\Program Files\MyApp and has a style plugin, TQt will look in C:\Program Files\MyApp\styles. (See TQApplication::applicationDirPath() for how to find out where the application's executable is.) TQt will also -look in the directory given by qInstallPathPlugins(). If you want +look in the directory given by tqInstallPathPlugins(). If you want TQt to look in additional places you can add as many paths as you need with calls to TQApplication::addLibraryPath(). And if you want to set your own path or paths you can use diff --git a/doc/html/porting2.html b/doc/html/porting2.html index 0276d068..c9983a87 100644 --- a/doc/html/porting2.html +++ b/doc/html/porting2.html @@ -515,10 +515,10 @@ be in the more efficient order (for typical contemporary hardware). If your code made assumptions about the order, you will get blue where you expect red and vice versa (you'll not notice the problem if you use shades of gray, green, or magenta). You should port your code to use the -creator function qRgb(int r,int g,int b) and the -access functions qRed(TQRgb), qBlue(TQRgb), and qGreen(TQRgb). +creator function tqRgb(int r,int g,int b) and the +access functions tqRed(TQRgb), tqBlue(TQRgb), and tqGreen(TQRgb). If you are using the alpha channel, it hasn't moved, but you should use -the functions qRgba(int,int,int,int) and qAlpha(TQRgb). Note also that +the functions tqRgba(int,int,int,int) and tqAlpha(TQRgb). Note also that TQColor::pixel() does not return a TQRgb (it never did on all platforms, but your code may have assumed so on your platform) - this may also produce strange color results - use TQColor::rgb() if you want a TQRgb. diff --git a/doc/html/progress-example.html b/doc/html/progress-example.html index 465316bd..63f2e907 100644 --- a/doc/html/progress-example.html +++ b/doc/html/progress-example.html @@ -313,7 +313,7 @@ private: { if ( timer_driven ) { if ( pb ) { - qWarning("This cannot happen!"); + tqWarning("This cannot happen!"); return; } rects = n; diff --git a/doc/html/qaxserver-example-opengl.html b/doc/html/qaxserver-example-opengl.html index 6647d8bc..1f062284 100644 --- a/doc/html/qaxserver-example-opengl.html +++ b/doc/html/qaxserver-example-opengl.html @@ -69,7 +69,7 @@ appropriate to create and show the application interface. TQApplication a(argc,argv); if ( !TQGLFormat::hasOpenGL() ) { - qWarning( "This system has no OpenGL support. Exiting." ); + tqWarning( "This system has no OpenGL support. Exiting." ); return -1; } diff --git a/doc/html/qbytearray.html b/doc/html/qbytearray.html index b9aa987c..2cad0823 100644 --- a/doc/html/qbytearray.html +++ b/doc/html/qbytearray.html @@ -45,10 +45,10 @@ body { background: #ffffff; color: black; }

    Related Functions

      -
    • TQByteArray qCompress ( const TQByteArray & data )
    • -
    • TQByteArray qCompress ( const uchar * data, int nbytes )
    • -
    • TQByteArray qUncompress ( const TQByteArray & data )
    • -
    • TQByteArray qUncompress ( const uchar * data, int nbytes )
    • +
    • TQByteArray tqCompress ( const TQByteArray & data )
    • +
    • TQByteArray tqCompress ( const uchar * data, int nbytes )
    • +
    • TQByteArray tqUncompress ( const TQByteArray & data )
    • +
    • TQByteArray tqUncompress ( const uchar * data, int nbytes )

    Detailed Description

    @@ -74,22 +74,22 @@ TQByteArray is implemented as a TQMemArray<cha

    Constructs a TQByteArray of size size.


    Related Functions

    -

    TQByteArray qCompress ( const TQByteArray & data ) +

    TQByteArray tqCompress ( const TQByteArray & data )

    Compresses the array data and returns the compressed byte array using zlib. -

    See also qUncompress(). +

    See also tqUncompress(). -

    TQByteArray qCompress ( const uchar * data, int nbytes ) +

    TQByteArray tqCompress ( const uchar * data, int nbytes )

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    Compresses the array data which is nbytes long and returns the compressed byte array. -

    TQByteArray qUncompress ( const TQByteArray & data ) +

    TQByteArray tqUncompress ( const TQByteArray & data )

    @@ -97,9 +97,9 @@ compressed byte array. array.

    Returns an empty TQByteArray if the input data was corrupt. -

    See also qCompress(). +

    See also tqCompress(). -

    TQByteArray qUncompress ( const uchar * data, int nbytes ) +

    TQByteArray tqUncompress ( const uchar * data, int nbytes )

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function. diff --git a/doc/html/qcanvasview.html b/doc/html/qcanvasview.html index 41662cbd..6ea947b6 100644 --- a/doc/html/qcanvasview.html +++ b/doc/html/qcanvasview.html @@ -71,7 +71,7 @@ subclass TQCanvasView. You might then reimplement TQCanvasItemList l = canvas()->collisions(e->pos()); for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { if ( (*it)->rtti() == TQCanvasRectangle::RTTI ) - qDebug("A TQCanvasRectangle lies somewhere at this point"); + tqDebug("A TQCanvasRectangle lies somewhere at this point"); } } diff --git a/doc/html/qd-preface.png b/doc/html/qd-preface.png index 2832f528b6d3d213ab1b37943799666ccc9f6577..d2f115e302cccef54a160d9ac898089b352964cf 100644 GIT binary patch delta 23 dcmeyrp0i;CXTui81s04U?LcDt0t=>ic>s4}2*LmW delta 21 dcmZqJ!1;eYXTui81s3fKEf}{iv|x&t2LNbN2yXxY diff --git a/doc/html/qdatasource.html b/doc/html/qdatasource.html index 42a1c03b..da27d4c8 100644 --- a/doc/html/qdatasource.html +++ b/doc/html/qdatasource.html @@ -65,7 +65,7 @@ If this function is called with on set to TRUE, and rewind() function to subsequently operate as described. If rewindable() is FALSE, the function should call TQDataSource::enableRewind(), which aborts with -a qFatal() error. +a tqFatal() error.

    For example, a network connection may choose to use a disk cache of input only if rewinding is enabled before the first buffer-full of data is discarded, returning FALSE in rewindable() if that first buffer diff --git a/doc/html/qdir-example.html b/doc/html/qdir-example.html index 45d7982e..618a7dd0 100644 --- a/doc/html/qdir-example.html +++ b/doc/html/qdir-example.html @@ -345,7 +345,7 @@ int main( int argc, char ** argv ) else if ( arg == "-custom" ) custom = TRUE; else if ( arg[0] == '-' ) { - qDebug("Usage: qdir [-any | -dir | -custom] [-preview] [-default f] {-filter f} [caption ...]\n" + tqDebug("Usage: qdir [-any | -dir | -custom] [-preview] [-default f] {-filter f} [caption ...]\n" " -any Get any filename, need not exist.\n" " -dir Return a directory rather than a file.\n" " -custom Opens a customized TQFileDialog with \n" diff --git a/doc/html/qglformat.html b/doc/html/qglformat.html index 0b970f45..587172f2 100644 --- a/doc/html/qglformat.html +++ b/doc/html/qglformat.html @@ -131,7 +131,7 @@ requested features the system was able to provide: if ( !w->format().stereo() ) { // ok, goggles off if ( !w->format().hasOverlay() ) { - qFatal( "Cool hardware required" ); + tqFatal( "Cool hardware required" ); } } @@ -172,9 +172,9 @@ in classes derived from TQGLWidget, for example: : TQGLWidget( TQGLFormat( StencilBuffer | AlphaChannel ), parent, name ) { if ( !format().stencil() ) - qWarning( "Could not get stencil buffer; results will be suboptimal" ); + tqWarning( "Could not get stencil buffer; results will be suboptimal" ); if ( !format().alphaChannel() ) - qWarning( "Could not get alpha channel; results will be suboptimal" ); + tqWarning( "Could not get alpha channel; results will be suboptimal" ); ... } diff --git a/doc/html/qmag-example.html b/doc/html/qmag-example.html index 3f22d973..09655703 100644 --- a/doc/html/qmag-example.html +++ b/doc/html/qmag-example.html @@ -379,8 +379,8 @@ void MagWidget::grabAround(TQPoint pos) { TQRgb px = image.pixel(x,y); pixelinfo.sprintf(" %3d,%3d,%3d #%02x%02x%02x", - qRed(px), tqGreen(px), tqBlue(px), - qRed(px), tqGreen(px), tqBlue(px)); + tqRed(px), tqGreen(px), tqBlue(px), + tqRed(px), tqGreen(px), tqBlue(px)); } TQString label; label.sprintf( "x=%d, y=%d %s", diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf index b0fe8e3f..592ce229 100644 --- a/doc/html/qt.dcf +++ b/doc/html/qt.dcf @@ -238,14 +238,14 @@ ~QApplication Q_ASSERT TQ_CHECK_PTR - qAddPostRoutine - qDebug - qFatal + tqAddPostRoutine + tqDebug + tqFatal qInstallMsgHandler - qSysInfo - qSystemWarning - qVersion - qWarning + tqSysInfo + tqSystemWarning + tqVersion + tqWarning

    @@ -673,8 +673,8 @@
    QByteArray - qCompress - qUncompress + tqCompress + tqUncompress
    @@ -1128,13 +1128,13 @@ setRgb operator<< operator>> - qAlpha - qBlue - qGray - qGreen - qRed - qRgb - qRgba + tqAlpha + tqBlue + tqGray + tqGreen + tqRed + tqRgb + tqRgba
    @@ -1360,15 +1360,15 @@ operator> operator>= operator>> - qmemmove + tqmemmove qstrcmp qstrcpy - qstrdup - qstricmp - qstrlen - qstrncmp - qstrncpy - qstrnicmp + tqstrdup + tqstricmp + tqstrlen + tqstrncmp + tqstrncpy + tqstrnicmp
    @@ -4753,7 +4753,7 @@ ~QMemArray operator<< operator>> - qChecksum + tqChecksum
    @@ -8585,7 +8585,7 @@ startedNextCopy stop ~QUrlOperator - qInitNetworkProtocols + tqInitNetworkProtocols
    diff --git a/doc/html/qtime.html b/doc/html/qtime.html index 15f48a9a..369a105b 100644 --- a/doc/html/qtime.html +++ b/doc/html/qtime.html @@ -316,7 +316,7 @@ Sets this time to the current time. This is practical for timing: TQTime t; t.start(); some_lengthy_task(); - qDebug( "Time elapsed: %d ms", t.elapsed() ); + tqDebug( "Time elapsed: %d ms", t.elapsed() );

    See also restart(), elapsed(), and currentTime(). diff --git a/doc/html/sql-overview-extract-main-cpp.html b/doc/html/sql-overview-extract-main-cpp.html index 3d6408fd..142a427c 100644 --- a/doc/html/sql-overview-extract-main-cpp.html +++ b/doc/html/sql-overview-extract-main-cpp.html @@ -68,7 +68,7 @@ int main( int argc, char *argv[] ) int id = cur.value( "id" ).toInt(); TQString name = cur.value( "forename" ).toString() + " " + cur.value( "surname" ).toString(); - qDebug( TQString::number( id ) + ": " + name ); + tqDebug( TQString::number( id ) + ": " + name ); } } diff --git a/doc/html/sql-overview-order1-main-cpp.html b/doc/html/sql-overview-order1-main-cpp.html index 4931fdb8..2c6fcb2e 100644 --- a/doc/html/sql-overview-order1-main-cpp.html +++ b/doc/html/sql-overview-order1-main-cpp.html @@ -57,7 +57,7 @@ int main( int argc, char *argv[] ) TQSqlIndex order = cur.index( fields ); cur.select( order ); while ( cur.next() ) { - qDebug( cur.value( "id" ).toString() + ": " + + tqDebug( cur.value( "id" ).toString() + ": " + cur.value( "surname" ).toString() + " " + cur.value( "forename" ).toString() ); } diff --git a/doc/html/sql-overview-order2-main-cpp.html b/doc/html/sql-overview-order2-main-cpp.html index 616ec0b3..374a3728 100644 --- a/doc/html/sql-overview-order2-main-cpp.html +++ b/doc/html/sql-overview-order2-main-cpp.html @@ -59,7 +59,7 @@ int main( int argc, char *argv[] ) cur.setValue( "surname", "Bloggs" ); cur.select( filter, order ); while ( cur.next() ) { - qDebug( cur.value( "id" ).toString() + ": " + + tqDebug( cur.value( "id" ).toString() + ": " + cur.value( "surname" ).toString() + " " + cur.value( "forename" ).toString() ); } diff --git a/doc/html/sql-overview-retrieve1-main-cpp.html b/doc/html/sql-overview-retrieve1-main-cpp.html index 5981dfe4..98d7ca28 100644 --- a/doc/html/sql-overview-retrieve1-main-cpp.html +++ b/doc/html/sql-overview-retrieve1-main-cpp.html @@ -55,7 +55,7 @@ int main( int argc, char *argv[] ) TQSqlQuery query( "SELECT id, surname FROM staff" ); if ( query.isActive() ) { while ( query.next() ) { - qDebug( query.value(0).toString() + ": " + + tqDebug( query.value(0).toString() + ": " + query.value(1).toString() ); } } diff --git a/doc/html/sql-overview-retrieve2-main-cpp.html b/doc/html/sql-overview-retrieve2-main-cpp.html index 479ad26a..b1a86764 100644 --- a/doc/html/sql-overview-retrieve2-main-cpp.html +++ b/doc/html/sql-overview-retrieve2-main-cpp.html @@ -55,7 +55,7 @@ int main( int argc, char *argv[] ) TQSqlCursor cur( "staff" ); // Specify the table/view name cur.select(); // We'll retrieve every record while ( cur.next() ) { - qDebug( cur.value( "id" ).toString() + ": " + + tqDebug( cur.value( "id" ).toString() + ": " + cur.value( "surname" ).toString() + " " + cur.value( "salary" ).toString() ); } diff --git a/doc/html/sql.html b/doc/html/sql.html index fca61765..1eb65759 100644 --- a/doc/html/sql.html +++ b/doc/html/sql.html @@ -314,7 +314,7 @@ function in connection.h. defaultDB->setPassword( DB_SALES_PASSWD ); defaultDB->setHostName( DB_SALES_HOST ); if ( ! defaultDB->open() ) { - qWarning( "Failed to open sales database: " + defaultDB->lastError().text() ); + tqWarning( "Failed to open sales database: " + defaultDB->lastError().text() ); return FALSE; } @@ -324,7 +324,7 @@ function in connection.h. oracle->setPassword( DB_ORDERS_PASSWD ); oracle->setHostName( DB_ORDERS_HOST ); if ( ! oracle->open() ) { - qWarning( "Failed to open orders database: " + oracle->lastError().text() ); + tqWarning( "Failed to open orders database: " + oracle->lastError().text() ); return FALSE; } @@ -570,7 +570,7 @@ retrieve data from it. TQSqlQuery query( "SELECT id, surname FROM staff" ); if ( query.isActive() ) { while ( query.next() ) { - qDebug( query.value(0).toString() + ": " + + tqDebug( query.value(0).toString() + ": " + query.value(1).toString() ); } } @@ -641,7 +641,7 @@ discuss subclassing TQSqlCursor. TQSqlCursor cur( "staff" ); // Specify the table/view name cur.select(); // We'll retrieve every record while ( cur.next() ) { - qDebug( cur.value( "id" ).toString() + ": " + + tqDebug( cur.value( "id" ).toString() + ": " + cur.value( "surname" ).toString() + " " + cur.value( "salary" ).toString() ); } @@ -780,7 +780,7 @@ setValue() to ensure that the value used is the one we want. int id = cur.value( "id" ).toInt(); TQString name = cur.value( "forename" ).toString() + " " + cur.value( "surname" ).toString(); - qDebug( TQString::number( id ) + ": " + name ); + tqDebug( TQString::number( id ) + ": " + name ); }

    From sql/overview/extract/main.cpp

    @@ -804,7 +804,7 @@ values ourselves with the setValue() calls. The order fields are used in the ORDER BY clause.

    Now we iterate through each matching record (if any). We retrieve the contents of the id, forename and surname fields and pass them on to -some processing function, in this example a simple qDebug() call. +some processing function, in this example a simple tqDebug() call.

    Manipulating Records

    diff --git a/doc/html/t10-lcdrange-cpp.html b/doc/html/t10-lcdrange-cpp.html index 860f407c..a0ec300e 100644 --- a/doc/html/t10-lcdrange-cpp.html +++ b/doc/html/t10-lcdrange-cpp.html @@ -71,7 +71,7 @@ void LCDRange::setValue( int value ) void LCDRange::setRange( int minVal, int maxVal ) { if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) { - qWarning( "LCDRange::setRange(%d,%d)\n" + tqWarning( "LCDRange::setRange(%d,%d)\n" "\tRange must be 0..99\n" "\tand minVal must not be greater than maxVal", minVal, maxVal ); diff --git a/doc/html/t11-lcdrange-cpp.html b/doc/html/t11-lcdrange-cpp.html index 848d8b35..53c7bba0 100644 --- a/doc/html/t11-lcdrange-cpp.html +++ b/doc/html/t11-lcdrange-cpp.html @@ -71,7 +71,7 @@ void LCDRange::setValue( int value ) void LCDRange::setRange( int minVal, int maxVal ) { if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) { - qWarning( "LCDRange::setRange(%d,%d)\n" + tqWarning( "LCDRange::setRange(%d,%d)\n" "\tRange must be 0..99\n" "\tand minVal must not be greater than maxVal", minVal, maxVal ); diff --git a/doc/html/t12-lcdrange-cpp.html b/doc/html/t12-lcdrange-cpp.html index 07668492..52cb516c 100644 --- a/doc/html/t12-lcdrange-cpp.html +++ b/doc/html/t12-lcdrange-cpp.html @@ -101,7 +101,7 @@ void LCDRange::setValue( int value ) void LCDRange::setRange( int minVal, int maxVal ) { if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) { - qWarning( "LCDRange::setRange(%d,%d)\n" + tqWarning( "LCDRange::setRange(%d,%d)\n" "\tRange must be 0..99\n" "\tand minVal must not be greater than maxVal", minVal, maxVal ); diff --git a/doc/html/t13-lcdrange-cpp.html b/doc/html/t13-lcdrange-cpp.html index c0144912..8a1e929c 100644 --- a/doc/html/t13-lcdrange-cpp.html +++ b/doc/html/t13-lcdrange-cpp.html @@ -106,7 +106,7 @@ void LCDRange::setValue( int value ) void LCDRange::setRange( int minVal, int maxVal ) { if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) { - qWarning( "LCDRange::setRange(%d,%d)\n" + tqWarning( "LCDRange::setRange(%d,%d)\n" "\tRange must be 0..99\n" "\tand minVal must not be greater than maxVal", minVal, maxVal ); diff --git a/doc/html/t14-lcdrange-cpp.html b/doc/html/t14-lcdrange-cpp.html index 44983fac..a110f76e 100644 --- a/doc/html/t14-lcdrange-cpp.html +++ b/doc/html/t14-lcdrange-cpp.html @@ -106,7 +106,7 @@ void LCDRange::setValue( int value ) void LCDRange::setRange( int minVal, int maxVal ) { if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) { - qWarning( "LCDRange::setRange(%d,%d)\n" + tqWarning( "LCDRange::setRange(%d,%d)\n" "\tRange must be 0..99\n" "\tand minVal must not be greater than maxVal", minVal, maxVal ); diff --git a/doc/html/t8-lcdrange-cpp.html b/doc/html/t8-lcdrange-cpp.html index ba8597ab..cde9d187 100644 --- a/doc/html/t8-lcdrange-cpp.html +++ b/doc/html/t8-lcdrange-cpp.html @@ -71,7 +71,7 @@ void LCDRange::setValue( int value ) void LCDRange::setRange( int minVal, int maxVal ) { if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) { - qWarning( "LCDRange::setRange(%d,%d)\n" + tqWarning( "LCDRange::setRange(%d,%d)\n" "\tRange must be 0..99\n" "\tand minVal must not be greater than maxVal", minVal, maxVal ); diff --git a/doc/html/t9-lcdrange-cpp.html b/doc/html/t9-lcdrange-cpp.html index e9a67925..daa34eb7 100644 --- a/doc/html/t9-lcdrange-cpp.html +++ b/doc/html/t9-lcdrange-cpp.html @@ -71,7 +71,7 @@ void LCDRange::setValue( int value ) void LCDRange::setRange( int minVal, int maxVal ) { if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) { - qWarning( "LCDRange::setRange(%d,%d)\n" + tqWarning( "LCDRange::setRange(%d,%d)\n" "\tRange must be 0..99\n" "\tand minVal must not be greater than maxVal", minVal, maxVal ); diff --git a/doc/html/tictac-example.html b/doc/html/tictac-example.html index d8bc0949..7a168937 100644 --- a/doc/html/tictac-example.html +++ b/doc/html/tictac-example.html @@ -554,7 +554,7 @@ int main( int argc, char **argv ) if ( argc == 2 ) // get board size n n = atoi(argv[1]); if ( n < 3 || n > 10 ) { // out of range - qWarning( "%s: Board size must be from 3x3 to 10x10", argv[0] ); + tqWarning( "%s: Board size must be from 3x3 to 10x10", argv[0] ); return 1; } TicTacToe ttt( n ); // create game diff --git a/doc/html/tutorial1-04.html b/doc/html/tutorial1-04.html index 6d0f424a..4830ac14 100644 --- a/doc/html/tutorial1-04.html +++ b/doc/html/tutorial1-04.html @@ -136,7 +136,7 @@ previous chapters. }

    Because the MyWidget class doesn't know about the application object, it -has to connect to TQt's pointer to it, qApp. +has to connect to TQt's pointer to it, tqApp.

    A widget is a software component and should know as little as possible about its environment in order to be as general and reusable as possible. diff --git a/doc/html/tutorial1-08.html b/doc/html/tutorial1-08.html index 4586ceab..bb72603e 100644 --- a/doc/html/tutorial1-08.html +++ b/doc/html/tutorial1-08.html @@ -63,7 +63,7 @@ Until now, it has been fixed at 0..99.

        void LCDRange::setRange( int minVal, int maxVal )
         {
             if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) {
    -          qWarning( "LCDRange::setRange(%d,%d)\n"
    +          tqWarning( "LCDRange::setRange(%d,%d)\n"
                        "\tRange must be 0..99\n"
                        "\tand minVal must not be greater than maxVal",
                        minVal, maxVal );
    @@ -77,7 +77,7 @@ have set up the TQLCDNumber to always display tw
     limit the possible range of minVal and maxVal to 0..99 to avoid
     overflow of the TQLCDNumber. (We could have allowed values down to -9
     but chose not to.)  If the arguments are illegal, we use TQt's
    -qWarning() function to issue a warning to the user and return
    +tqWarning() function to issue a warning to the user and return
     immediately. tqWarning() is a printf-like function that by default
     sends its output to stderr. If you want, you can install your own handler
     function using ::qInstallMsgHandler().
    
    From 84f70969d95344d402d6f6152a6373469a3718ca Mon Sep 17 00:00:00 2001
    From: Timothy Pearson 
    Date: Mon, 26 Nov 2012 22:38:41 -0600
    Subject: [PATCH 2/2] Automated update from Qt3
    
    ---
     configure                           |  29 +-
     src/kernel/ntqeventloop.h           |  20 +
     src/kernel/qeventloop_glib_p.h      | 130 ++++++
     src/kernel/qeventloop_p.h           |   6 +
     src/kernel/qeventloop_unix_glib.cpp | 593 ++++++++++++++++++++++++++
     src/kernel/qeventloop_x11_glib.cpp  | 618 ++++++++++++++++++++++++++++
     src/kernel/qt_kernel.pri            |  22 +-
     src/qt.pro                          |   8 +
     8 files changed, 1421 insertions(+), 5 deletions(-)
     create mode 100644 src/kernel/qeventloop_glib_p.h
     create mode 100644 src/kernel/qeventloop_unix_glib.cpp
     create mode 100644 src/kernel/qeventloop_x11_glib.cpp
    
    diff --git a/configure b/configure
    index 9c3d32d9..b3aeebe5 100755
    --- a/configure
    +++ b/configure
    @@ -143,6 +143,8 @@ CFG_USER_BUILD_KEY=
     CFG_ACCESSIBILITY=auto
     CFG_DLOPEN_OPENGL=no
     CFG_ENDIAN=auto
    +CFG_GLIBMAINLOOP=no
    +CFG_LIBGLIBMAINLOOP=
     D_FLAGS=
     I_FLAGS=
     L_FLAGS=
    @@ -224,7 +226,7 @@ while [ "$#" -gt 0 ]; do
     	VAL=no
     	;;
         #Qt style yes options
    -    -incremental|-qvfb|-profile|-shared|-static|-sm|-thread|-xinerama|-xshape|-tablet|-pch|-stl|-ipv6|-freetype|-big-codecs|-xcursor|-xrandr|-xrender|-xft|-xkb|-nis|-cups|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-version-script|-dlopen-opengl)
    +    -incremental|-qvfb|-profile|-shared|-static|-sm|-thread|-xinerama|-xshape|-tablet|-pch|-stl|-ipv6|-freetype|-big-codecs|-xcursor|-xrandr|-xrender|-xft|-xkb|-nis|-cups|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-version-script|-dlopen-opengl|-glibmainloop)
     	VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
     	VAL=yes
     	;;
    @@ -729,6 +731,13 @@ while [ "$#" -gt 0 ]; do
     	    UNKNOWN_OPT=yes
     	fi
     	;;
    +    glibmainloop)
    +	if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
    +	    CFG_GLIBMAINLOOP="$VAL"
    +	else
    +	    UNKNOWN_OPT=yes
    +	fi
    +	;;
         nis)
     	if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
     	    CFG_NIS="$VAL"
    @@ -2626,6 +2635,19 @@ if [ "$CFG_PNG" = "no" ]; then
         QMAKE_CONFIG="$QMAKE_CONFIG no-png"
     elif [ "$CFG_PNG" = "yes" ]; then
         QMAKE_CONFIG="$QMAKE_CONFIG png"
    +fi
    +if [ "$CFG_GLIBMAINLOOP" = "no" ]; then
    +    QMAKE_CONFIG="$QMAKE_CONFIG no-glibmainloop"
    +elif [ "$CFG_GLIBMAINLOOP" = "yes" ]; then
    +    QMAKE_CONFIG="$QMAKE_CONFIG glibmainloop"
    +
    +    GLIB_CFLAGS="`pkg-config --cflags glib-2.0`"
    +    QMAKE_VARS="$QMAKE_VARS \"QMAKE_CFLAGS_GLIB=$GLIB_CFLAGS\""
    +
    +    GLIB_LINKFLAG="`pkg-config --libs glib-2.0`"
    +    QMAKE_VARS="$QMAKE_VARS \"QMAKE_LIBS_GLIB=$GLIB_LINKFLAG\""
    +    
    +
     fi
     if [ "$CFG_GIF" = "no" ]; then
         QMAKE_CONFIG="$QMAKE_CONFIG no-gif"
    @@ -3192,6 +3214,11 @@ if [ "$CFG_PNG" = "no" ]; then
     else
         echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
     fi
    +if [ "$CFG_GLIBMAINLOOP" = "no" ]; then
    +    echo "Glib main loop support ......... $CFG_GLIBMAINLOOP"
    +else
    +    echo "Glib main loop support ......... $CFG_GLIBMAINLOOP ($CFG_LIBGLIBMAINLOOP)"
    +fi
     echo "zlib support ........ $CFG_ZLIB"
     if [ "$PLATFORM_QWS" = "yes" ]; then
         echo "Embedded support .... $CFG_EMBEDDED"
    diff --git a/src/kernel/ntqeventloop.h b/src/kernel/ntqeventloop.h
    index 9685159c..23a3b38b 100644
    --- a/src/kernel/ntqeventloop.h
    +++ b/src/kernel/ntqeventloop.h
    @@ -44,6 +44,10 @@
     #include "ntqsocketnotifier.h"
     #endif // QT_H
     
    +#if defined(QT_USE_GLIBMAINLOOP)
    +#include 
    +#endif // QT_USE_GLIBMAINLOOP
    +
     class TQEventLoopPrivate;
     class TQSocketNotifier;
     class TQTimer;
    @@ -95,6 +99,22 @@ public:
     
         virtual void wakeUp();
     
    +#if defined(QT_USE_GLIBMAINLOOP)	
    +	
    +    // glib main loop support
    +
    +    /* internal: used to fit glib-main-loop gsource concept */
    +
    +    bool gsourcePrepare(GSource *gs, int * timeout);
    +    bool gsourceCheck(GSource * gs);
    +    bool gsourceDispatch(GSource * gs);
    +
    +    bool processX11Events();
    +
    +    // end glib main loop support
    +	
    +#endif //QT_USE_GLIBMAINLOOP
    +	
     signals:
         void awake();
         void aboutToBlock();
    diff --git a/src/kernel/qeventloop_glib_p.h b/src/kernel/qeventloop_glib_p.h
    new file mode 100644
    index 00000000..ac5cb6b3
    --- /dev/null
    +++ b/src/kernel/qeventloop_glib_p.h
    @@ -0,0 +1,130 @@
    +/**
    +** TQt->glib main event loop integration by Norbert Frese 2005
    +** code based on qeventloop_p.h 3.3.5
    +**
    +*/
    +
    +/****************************************************************************
    +** $Id: qt/qeventloop_glib_p.h
    +**
    +** Definition of TQEventLoop class
    +**
    +** Copyright (C) 1992-2005 Trolltech AS.  All rights reserved.
    +**
    +** This file is part of the kernel module of the TQt GUI Toolkit.
    +**
    +** This file may be distributed and/or modified under the terms of the
    +** GNU General Public License version 2 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.GPL included in the
    +** packaging of this file.
    +**
    +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
    +** licenses for TQt/Embedded may use this file in accordance with the
    +** TQt Embedded Commercial License Agreement provided with the Software.
    +**
    +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
    +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    +**
    +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
    +**   information about TQt Commercial License Agreements.
    +** See http://www.trolltech.com/gpl/ for GPL licensing information.
    +**
    +** Contact info@trolltech.com if any conditions of this licensing are
    +** not clear to you.
    +**
    +**********************************************************************/
    +
    +#ifndef TQEVENTLOOP_GLIB_P_H
    +#define TQEVENTLOOP_GLIB_P_H
    +
    +//
    +//  W A R N I N G
    +//  -------------
    +//
    +// This file is not part of the TQt API.  This header file may
    +// change from version to version without notice, or even be
    +// removed.
    +//
    +// We mean it.
    +//
    +//
    +
    +#ifndef QT_H
    +#include "qplatformdefs.h"
    +#endif // QT_H
    +
    +// SCO OpenServer redefines raise -> kill
    +#if defined(raise)
    +# undef raise
    +#endif
    +
    +#include "ntqeventloop.h"
    +#include "ntqwindowdefs.h"
    +
    +class TQSocketNotifier;
    +
    +#include "ntqptrlist.h"
    +
    +#include 
    +
    +// uncomment this for main loop related debug-output
    +
    +// #define DEBUG_QT_GLIBMAINLOOP 1
    +
    +// Wrapper for TQSocketNotifier Object and GPollFD
    +
    +struct TQSockNotGPollFD
    +{
    +    TQSocketNotifier *obj;
    +    GPollFD gPollFD; 
    +	gushort events;  // save events
    +	bool pending;
    +};
    +
    +class TQEventLoopPrivate
    +{
    +public:
    +    TQEventLoopPrivate()
    +    {
    +	reset();
    +    }
    +
    +    void reset() {
    +        looplevel = 0;
    +        quitcode = 0;
    +        quitnow = FALSE;
    +        exitloop = FALSE;
    +        shortcut = FALSE;
    +    }
    +
    +    int looplevel;
    +    int quitcode;
    +    unsigned int quitnow  : 1;
    +    unsigned int exitloop : 1;
    +    unsigned int shortcut : 1;
    +
    +#if defined(Q_WS_X11)
    +    int xfd;
    +	
    +	GPollFD x_gPollFD; 
    +	
    +#endif // Q_WS_X11
    +
    +    int thread_pipe[2];
    +
    +	GPollFD threadPipe_gPollFD;
    +	
    +    TQPtrList sn_list;
    +    // pending socket notifiers list
    +    TQPtrList sn_pending_list;
    +	
    +	// store flags for one iteration
    +	uint pev_flags;  	
    +	
    +	// My GSource
    +	
    +	GSource * gSource;
    +
    +};
    +
    +#endif // TQEVENTLOOP_GLIB_P_H
    diff --git a/src/kernel/qeventloop_p.h b/src/kernel/qeventloop_p.h
    index 7eb32a5d..35a0ae95 100644
    --- a/src/kernel/qeventloop_p.h
    +++ b/src/kernel/qeventloop_p.h
    @@ -49,6 +49,10 @@
     //
     //
     
    +#if defined(QT_USE_GLIBMAINLOOP)
    +#include "qeventloop_glib_p.h"  // use a different header file!!!
    +#else
    +
     #ifndef QT_H
     #include "qplatformdefs.h"
     #endif // QT_H
    @@ -147,4 +151,6 @@ public:
     
     };
     
    +#endif // !QT_USE_GLIBMAINLOOP
    +
     #endif // TQEVENTLOOP_P_H
    diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp
    new file mode 100644
    index 00000000..dc973277
    --- /dev/null
    +++ b/src/kernel/qeventloop_unix_glib.cpp
    @@ -0,0 +1,593 @@
    +/**
    +** TQt->glib main event loop integration by Norbert Frese 2005
    +** code based on qeventloop_unix.cpp 3.3.5
    +**
    +*/
    +
    +/****************************************************************************
    +** $Id: qt/qeventloop_unix_glib.cpp  
    +**
    +** Implementation of TQEventLoop class
    +**
    +** Copyright (C) 2000-2005 Trolltech AS.  All rights reserved.
    +**
    +** This file is part of the kernel module of the TQt GUI Toolkit.
    +**
    +** This file may be distributed under the terms of the Q Public License
    +** as defined by Trolltech AS of Norway and appearing in the file
    +** LICENSE.TQPL included in the packaging of this file.
    +**
    +** This file may be distributed and/or modified under the terms of the
    +** GNU General Public License version 2 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.GPL included in the
    +** packaging of this file.
    +**
    +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
    +** licenses for Unix/X11 or for TQt/Embedded may use this file in accordance
    +** with the TQt Commercial License Agreement provided with the Software.
    +**
    +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
    +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    +**
    +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
    +**   information about TQt Commercial License Agreements.
    +** See http://www.trolltech.com/qpl/ for TQPL licensing information.
    +** See http://www.trolltech.com/gpl/ for GPL licensing information.
    +**
    +** Contact info@trolltech.com if any conditions of this licensing are
    +** not clear to you.
    +**
    +**********************************************************************/
    +
    +
    +#include "qeventloop_glib_p.h" // includes qplatformdefs.h
    +#include "ntqeventloop.h"
    +#include "ntqapplication.h"
    +#include "ntqbitarray.h"
    +#include 
    +#include 
    +
    +#include 
    +
    +/*****************************************************************************
    +  Timer handling; UNIX has no application timer support so we'll have to
    +  make our own from scratch.
    +
    +  NOTE: These functions are for internal use. TQObject::startTimer() and
    +	TQObject::killTimer() are for public use.
    +	The TQTimer class provides a high-level interface which translates
    +	timer events into signals.
    +
    +  qStartTimer( interval, obj )
    +	Starts a timer which will run until it is killed with qKillTimer()
    +	Arguments:
    +	    int interval	timer interval in milliseconds
    +	    TQObject *obj	where to send the timer event
    +	Returns:
    +	    int			timer identifier, or zero if not successful
    +
    +  qKillTimer( timerId )
    +	Stops a timer specified by a timer identifier.
    +	Arguments:
    +	    int timerId		timer identifier
    +	Returns:
    +	    bool		TRUE if successful
    +
    +  qKillTimer( obj )
    +	Stops all timers that are sent to the specified object.
    +	Arguments:
    +	    TQObject *obj	object receiving timer events
    +	Returns:
    +	    bool		TRUE if successful
    + *****************************************************************************/
    +
    +//
    +// Internal data structure for timers
    +//
    +
    +struct TimerInfo {				// internal timer info
    +    int	     id;				// - timer identifier
    +    timeval  interval;				// - timer interval
    +    timeval  timeout;				// - when to sent event
    +    TQObject *obj;				// - object to receive event
    +};
    +
    +typedef TQPtrList TimerList;	// list of TimerInfo structs
    +
    +static TQBitArray *timerBitVec;			// timer bit vector
    +static TimerList *timerList	= 0;		// timer list
    +
    +static void	initTimers();
    +void cleanupTimers();
    +static timeval	watchtime;			// watch if time is turned back
    +timeval		*qt_wait_timer();
    +timeval	*qt_wait_timer_max = 0;
    +
    +//
    +// Internal operator functions for timevals
    +//
    +
    +static inline bool operator<( const timeval &t1, const timeval &t2 )
    +{
    +    return t1.tv_sec < t2.tv_sec ||
    +	  (t1.tv_sec == t2.tv_sec && t1.tv_usec < t2.tv_usec);
    +}
    +
    +static inline bool operator==( const timeval &t1, const timeval &t2 )
    +{
    +    return t1.tv_sec == t2.tv_sec && t1.tv_usec == t2.tv_usec;
    +}
    +
    +static inline timeval &operator+=( timeval &t1, const timeval &t2 )
    +{
    +    t1.tv_sec += t2.tv_sec;
    +    if ( (t1.tv_usec += t2.tv_usec) >= 1000000 ) {
    +	t1.tv_sec++;
    +	t1.tv_usec -= 1000000;
    +    }
    +    return t1;
    +}
    +
    +static inline timeval operator+( const timeval &t1, const timeval &t2 )
    +{
    +    timeval tmp;
    +    tmp.tv_sec = t1.tv_sec + t2.tv_sec;
    +    if ( (tmp.tv_usec = t1.tv_usec + t2.tv_usec) >= 1000000 ) {
    +	tmp.tv_sec++;
    +	tmp.tv_usec -= 1000000;
    +    }
    +    return tmp;
    +}
    +
    +static inline timeval operator-( const timeval &t1, const timeval &t2 )
    +{
    +    timeval tmp;
    +    tmp.tv_sec = t1.tv_sec - t2.tv_sec;
    +    if ( (tmp.tv_usec = t1.tv_usec - t2.tv_usec) < 0 ) {
    +	tmp.tv_sec--;
    +	tmp.tv_usec += 1000000;
    +    }
    +    return tmp;
    +}
    +
    +
    +//
    +// Internal functions for manipulating timer data structures.
    +// The timerBitVec array is used for keeping track of timer identifiers.
    +//
    +
    +static int allocTimerId()			// find avail timer identifier
    +{
    +    int i = timerBitVec->size()-1;
    +    while ( i >= 0 && (*timerBitVec)[i] )
    +	i--;
    +    if ( i < 0 ) {
    +	i = timerBitVec->size();
    +	timerBitVec->resize( 4 * i );
    +	for( int j=timerBitVec->size()-1; j > i; j-- )
    +	    timerBitVec->clearBit( j );
    +    }
    +    timerBitVec->setBit( i );
    +    return i+1;
    +}
    +
    +static void insertTimer( const TimerInfo *ti )	// insert timer info into list
    +{
    +    TimerInfo *t = timerList->first();
    +    int index = 0;
    +#if defined(QT_DEBUG)
    +    int dangerCount = 0;
    +#endif
    +    while ( t && t->timeout < ti->timeout ) {	// list is sorted by timeout
    +#if defined(QT_DEBUG)
    +	if ( t->obj == ti->obj )
    +	    dangerCount++;
    +#endif
    +	t = timerList->next();
    +	index++;
    +    }
    +    timerList->insert( index, ti );		// inserts sorted
    +#if defined(QT_DEBUG)
    +    if ( dangerCount > 16 )
    +	tqDebug( "TQObject: %d timers now exist for object %s::%s",
    +	       dangerCount, ti->obj->className(), ti->obj->name() );
    +#endif
    +}
    +
    +static inline void getTime( timeval &t )	// get time of day
    +{
    +    gettimeofday( &t, 0 );
    +    while ( t.tv_usec >= 1000000 ) {		// NTP-related fix
    +	t.tv_usec -= 1000000;
    +	t.tv_sec++;
    +    }
    +    while ( t.tv_usec < 0 ) {
    +	if ( t.tv_sec > 0 ) {
    +	    t.tv_usec += 1000000;
    +	    t.tv_sec--;
    +	} else {
    +	    t.tv_usec = 0;
    +	    break;
    +	}
    +    }
    +}
    +
    +static void repairTimer( const timeval &time )	// repair broken timer
    +{
    +    timeval diff = watchtime - time;
    +    register TimerInfo *t = timerList->first();
    +    while ( t ) {				// repair all timers
    +	t->timeout = t->timeout - diff;
    +	t = timerList->next();
    +    }
    +}
    +
    +//
    +// Timer activation functions (called from the event loop)
    +//
    +
    +/*
    +  Returns the time to wait for the next timer, or null if no timers are
    +  waiting.
    +
    +  The result is bounded to qt_wait_timer_max if this exists.
    +*/
    +
    +timeval *qt_wait_timer()
    +{
    +    static timeval tm;
    +    bool first = TRUE;
    +    timeval currentTime;
    +    if ( timerList && timerList->count() ) {	// there are waiting timers
    +	getTime( currentTime );
    +	if ( first ) {
    +	    if ( currentTime < watchtime )	// clock was turned back
    +		repairTimer( currentTime );
    +	    first = FALSE;
    +	    watchtime = currentTime;
    +	}
    +	TimerInfo *t = timerList->first();	// first waiting timer
    +	if ( currentTime < t->timeout ) {	// time to wait
    +	    tm = t->timeout - currentTime;
    +	} else {
    +	    tm.tv_sec  = 0;			// no time to wait
    +	    tm.tv_usec = 0;
    +	}
    +	if ( qt_wait_timer_max && *qt_wait_timer_max < tm )
    +	    tm = *qt_wait_timer_max;
    +	return &tm;
    +    }
    +    if ( qt_wait_timer_max ) {
    +	tm = *qt_wait_timer_max;
    +	return &tm;
    +    }
    +    return 0;					// no timers
    +}
    +
    +// Timer initialization
    +static void initTimers()			// initialize timers
    +{
    +    timerBitVec = new TQBitArray( 128 );
    +    TQ_CHECK_PTR( timerBitVec );
    +    int i = timerBitVec->size();
    +    while( i-- > 0 )
    +	    timerBitVec->clearBit( i );
    +    timerList = new TimerList;
    +    TQ_CHECK_PTR( timerList );
    +    timerList->setAutoDelete( TRUE );
    +    gettimeofday( &watchtime, 0 );
    +}
    +
    +// Timer cleanup
    +void cleanupTimers()
    +{
    +    delete timerList;
    +    timerList = 0;
    +    delete timerBitVec;
    +    timerBitVec = 0;
    +}
    +
    +// Main timer functions for starting and killing timers
    +int qStartTimer( int interval, TQObject *obj )
    +{
    +    if ( !timerList )				// initialize timer data
    +	initTimers();
    +    int id = allocTimerId();			// get free timer id
    +    if ( id <= 0 ||
    +	 id > (int)timerBitVec->size() || !obj )// cannot create timer
    +	return 0;
    +    timerBitVec->setBit( id-1 );		// set timer active
    +    TimerInfo *t = new TimerInfo;		// create timer
    +    TQ_CHECK_PTR( t );
    +    t->id = id;
    +    t->interval.tv_sec  = interval/1000;
    +    t->interval.tv_usec = (interval%1000)*1000;
    +    timeval currentTime;
    +    getTime( currentTime );
    +    t->timeout = currentTime + t->interval;
    +    t->obj = obj;
    +    insertTimer( t );				// put timer in list
    +    return id;
    +}
    +
    +bool qKillTimer( int id )
    +{
    +    register TimerInfo *t;
    +    if ( !timerList || id <= 0 ||
    +	 id > (int)timerBitVec->size() || !timerBitVec->testBit( id-1 ) )
    +	return FALSE;				// not init'd or invalid timer
    +    t = timerList->first();
    +    while ( t && t->id != id )			// find timer info in list
    +	t = timerList->next();
    +    if ( t ) {					// id found
    +	timerBitVec->clearBit( id-1 );		// set timer inactive
    +	return timerList->remove();
    +    }
    +    else					// id not found
    +	return FALSE;
    +}
    +
    +bool qKillTimer( TQObject *obj )
    +{
    +    register TimerInfo *t;
    +    if ( !timerList )				// not initialized
    +	return FALSE;
    +    t = timerList->first();
    +    while ( t ) {				// check all timers
    +	if ( t->obj == obj ) {			// object found
    +	    timerBitVec->clearBit( t->id-1 );
    +	    timerList->remove();
    +	    t = timerList->current();
    +	} else {
    +	    t = timerList->next();
    +	}
    +    }
    +    return TRUE;
    +}
    +
    +
    +
    +
    +/*****************************************************************************
    + TQEventLoop implementations for Glib-Main-Loop
    + *****************************************************************************/
    + 
    + 
    + 
    + 
    +void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
    +{
    +	
    +	
    +	
    +    int sockfd = notifier->socket();
    +    int type = notifier->type();
    +    if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
    +#if defined(QT_CHECK_RANGE)
    +         tqWarning( "TQSocketNotifier: Internal error" );
    +#endif
    +         return;
    +    }
    +
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("register socket notifier %d\n", sockfd);
    +	#endif
    +	
    +    TQPtrList  *list = &d->sn_list;
    +    TQSockNotGPollFD *sn;
    +
    +	/*
    +    if ( ! list ) {
    +        // create new list, the TQSockNotType destructor will delete it for us
    +		list = new TQPtrList;
    +		TQ_CHECK_PTR( list );
    +		list->setAutoDelete( TRUE );
    +		d->sn_list = list;
    +    }
    +	*/
    +	
    +	gushort events=0;
    +	switch (type) {
    +		case 0: 
    +			events = G_IO_IN | G_IO_HUP;
    +			break;
    +		case 1:
    +			events = G_IO_OUT;
    +			break;
    +		case 2:
    +			events = G_IO_PRI | G_IO_ERR | G_IO_NVAL;
    +			break;
    +	}
    +	
    +    sn = new TQSockNotGPollFD;
    +    TQ_CHECK_PTR( sn );
    +    sn->obj = notifier;
    +    sn->gPollFD.fd = sockfd;
    +	sn->gPollFD.events = events; 
    +	sn->events = events; // save events!
    +	sn->pending = FALSE;
    +	
    +	list->append( sn );
    +	
    +	g_source_add_poll(d->gSource, &sn->gPollFD); 
    +	
    +}
    +
    +void TQEventLoop::unregisterSocketNotifier( TQSocketNotifier *notifier )
    +{
    +    int sockfd = notifier->socket();
    +    int type = notifier->type();
    +    if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
    +#if defined(QT_CHECK_RANGE)
    +         tqWarning( "TQSocketNotifier: Internal error" );
    +#endif
    +         return;
    +    }
    +	
    +	#ifdef DEBUG_QT_GLIBMAINLOOP 
    +		printf("unregister socket notifier %d\n", sockfd);
    +	#endif	
    +
    +    TQPtrList *list = &d->sn_list;
    +    TQSockNotGPollFD *sn;
    +    if ( ! list )
    +         return;
    +    sn = list->first();
    +    while ( sn && !(sn->obj == notifier) )
    +        sn = list->next();
    +    if ( !sn ) // not found
    +        return;
    +
    +	d->sn_pending_list.removeRef( sn );	
    +    list->remove();				// remove notifier found above
    +	g_source_remove_poll(d->gSource, &sn->gPollFD);
    +	
    +	delete sn;  // we don't autodelete - lets do it manually
    +	
    +}
    +
    +void TQEventLoop::setSocketNotifierPending( TQSocketNotifier *notifier )
    +{
    +    int sockfd = notifier->socket();
    +    int type = notifier->type();
    +    if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
    +#if defined(QT_CHECK_RANGE)
    +	tqWarning( "TQSocketNotifier: Internal error" );
    +#endif
    +	return;
    +    }
    +	
    +	#ifdef DEBUG_QT_GLIBMAINLOOP 
    +		printf("set socket notifier pending %d\n", sockfd);
    +	#endif	
    +
    +    TQPtrList *list = &d->sn_list;
    +    TQSockNotGPollFD *sn;
    +    if ( ! list )
    +        return;
    +    sn = list->first();
    +    while ( sn && !(sn->obj == notifier) )
    +        sn = list->next();
    +    if ( ! sn ) { // not found
    +        return;
    +    }
    +
    +    // We choose a random activation order to be more fair under high load.
    +    // If a constant order is used and a peer early in the list can
    +    // saturate the IO, it might grab our attention completely.
    +    // Also, if we're using a straight list, the callback routines may
    +    // delete other entries from the list before those other entries are
    +    // processed.
    +    if ( !sn->pending ) {
    +         d->sn_pending_list.insert( (rand() & 0xff) %
    +                 (d->sn_pending_list.count()+1), sn );
    +	     sn->pending = TRUE;  // add it only once!
    +    }
    +}
    +
    +void TQEventLoop::wakeUp()
    +{
    +    /*
    +      Apparently, there is not consistency among different operating
    +      systems on how to use FIONREAD.
    +
    +      FreeBSD, Linux and Solaris all expect the 3rd argument to
    +      ioctl() to be an int, which is normally 32-bit even on 64-bit
    +      machines.
    +
    +      IRIX, on the other hand, expects a size_t, which is 64-bit on
    +      64-bit machines.
    +
    +      So, the solution is to use size_t initialized to zero to make
    +      sure all bits are set to zero, preventing underflow with the
    +      FreeBSD/Linux/Solaris ioctls.
    +    */
    +    size_t nbytes = 0;
    +    char c = 0;
    +    if ( ::ioctl( d->thread_pipe[0], FIONREAD, (char*)&nbytes ) >= 0 && nbytes == 0 ) {
    +	::write(  d->thread_pipe[1], &c, 1  );
    +    }
    +}
    +
    +int TQEventLoop::timeToWait() const
    +{
    +    timeval *tm = qt_wait_timer();
    +    if ( ! tm )	// no active timers
    +	return -1;
    +    return (tm->tv_sec*1000) + (tm->tv_usec/1000);
    +}
    +
    +int TQEventLoop::activateTimers()
    +{
    +    if ( !timerList || !timerList->count() )	// no timers
    +	return 0;
    +    bool first = TRUE;
    +    timeval currentTime;
    +    int n_act = 0, maxCount = timerList->count();
    +    TimerInfo *begin = 0;
    +    register TimerInfo *t;
    +
    +    for ( ;; ) {
    +	if ( ! maxCount-- )
    +	    break;
    +	getTime( currentTime );			// get current time
    +	if ( first ) {
    +	    if ( currentTime < watchtime )	// clock was turned back
    +		repairTimer( currentTime );
    +	    first = FALSE;
    +	    watchtime = currentTime;
    +	}
    +	t = timerList->first();
    +	if ( !t || currentTime < t->timeout )	// no timer has expired
    +	    break;
    +	if ( ! begin ) {
    +	    begin = t;
    +	} else if ( begin == t ) {
    +	    // avoid sending the same timer multiple times
    +	    break;
    +	} else if ( t->interval <  begin->interval || t->interval == begin->interval ) {
    +	    begin = t;
    +	}
    +	timerList->take();			// unlink from list
    +	t->timeout += t->interval;
    +	if ( t->timeout < currentTime )
    +	    t->timeout = currentTime + t->interval;
    +	insertTimer( t );			// relink timer
    +	if ( t->interval.tv_usec > 0 || t->interval.tv_sec > 0 )
    +	    n_act++;
    +	TQTimerEvent e( t->id );
    +	TQApplication::sendEvent( t->obj, &e );	// send event
    +	if ( timerList->findRef( begin ) == -1 )
    +	    begin = 0;
    +    }
    +    return n_act;
    +}
    +
    +int TQEventLoop::activateSocketNotifiers()
    +{
    +    if ( d->sn_pending_list.isEmpty() )
    +	    return 0;
    +
    +    // activate entries
    +    int n_act = 0;
    +    TQEvent event( TQEvent::SockAct );
    +    TQPtrListIterator it( d->sn_pending_list );
    +    TQSockNotGPollFD *sn;
    +    while ( (sn=it.current()) ) {
    +        ++it;
    +        d->sn_pending_list.removeRef( sn );
    +        if ( sn->pending ) {
    +			
    +			#ifdef DEBUG_QT_GLIBMAINLOOP 
    +				printf("activate sn  : send event fd=%d\n", sn->gPollFD.fd );
    +			#endif	
    +			
    +			
    +            sn->pending = FALSE;
    +            TQApplication::sendEvent( sn->obj, &event );
    +            n_act++;
    +	    }
    +    }
    +
    +    return n_act;
    +}
    diff --git a/src/kernel/qeventloop_x11_glib.cpp b/src/kernel/qeventloop_x11_glib.cpp
    new file mode 100644
    index 00000000..62584d2a
    --- /dev/null
    +++ b/src/kernel/qeventloop_x11_glib.cpp
    @@ -0,0 +1,618 @@
    +/**
    +** TQt->glib main event loop integration by Norbert Frese 2005
    +** code based on qeventloop_x11.cpp 3.3.5
    +**
    +*/
    +
    +/****************************************************************************
    +** $Id: qt/qeventloop_x11_glib.cpp
    +**
    +** Implementation of TQEventLoop class
    +**
    +** Copyright (C) 2000-2005 Trolltech AS.  All rights reserved.
    +**
    +** This file is part of the kernel module of the TQt GUI Toolkit.
    +**
    +** This file may be distributed under the terms of the Q Public License
    +** as defined by Trolltech AS of Norway and appearing in the file
    +** LICENSE.TQPL included in the packaging of this file.
    +**
    +** This file may be distributed and/or modified under the terms of the
    +** GNU General Public License version 2 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.GPL included in the
    +** packaging of this file.
    +**
    +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
    +** licenses for Unix/X11 may use this file in accordance with the TQt Commercial
    +** License Agreement provided with the Software.
    +**
    +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
    +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    +**
    +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
    +**   information about TQt Commercial License Agreements.
    +** See http://www.trolltech.com/qpl/ for TQPL licensing information.
    +** See http://www.trolltech.com/gpl/ for GPL licensing information.
    +**
    +** Contact info@trolltech.com if any conditions of this licensing are
    +** not clear to you.
    +**
    +**********************************************************************/
    +
    +
    +#include "qeventloop_glib_p.h" // includes qplatformdefs.h
    +#include "ntqeventloop.h"
    +#include "ntqapplication.h"
    +#include "ntqbitarray.h"
    +#include "qcolor_p.h"
    +#include "qt_x11_p.h"
    +
    +#if defined(QT_THREAD_SUPPORT)
    +#  include "ntqmutex.h"
    +#endif // QT_THREAD_SUPPORT
    +
    +#include 
    +
    +#include 
    +
    +// TQt-GSource Structure and Callbacks
    +
    +typedef struct {
    +    GSource source;
    +    TQEventLoop * qeventLoop;
    +} TQtGSource;
    +
    +static gboolean qt_gsource_prepare  ( GSource *source,
    +	gint *timeout );
    +static gboolean qt_gsource_check    ( GSource *source );
    +static gboolean qt_gsource_dispatch ( GSource *source,
    +    GSourceFunc  callback, gpointer user_data );
    +
    +static GSourceFuncs qt_gsource_funcs = {
    +    qt_gsource_prepare,
    +    qt_gsource_check,
    +    qt_gsource_dispatch,
    +    NULL,
    +    NULL,
    +    NULL
    +};
    +
    +// forward main loop callbacks to TQEventLoop methods!
    +
    +static gboolean qt_gsource_prepare  ( GSource *source,
    +	gint *timeout ) 
    +{
    +    TQtGSource * qtGSource;
    +	qtGSource = (TQtGSource*) source;
    +    return qtGSource->qeventLoop->gsourcePrepare(source, timeout); 
    +}
    +
    +static gboolean qt_gsource_check    ( GSource *source ) 
    +{
    +    TQtGSource * qtGSource = (TQtGSource*) source;
    +    return qtGSource->qeventLoop->gsourceCheck(source); 
    +}
    +
    +static gboolean qt_gsource_dispatch ( GSource *source,
    +    GSourceFunc  callback, gpointer user_data ) 
    +{
    +    TQtGSource * qtGSource = (TQtGSource*) source;
    +    return qtGSource->qeventLoop->gsourceDispatch(source); 
    +}
    +
    +
    +// -------------------------------------------------
    +
    +// resolve the conflict between X11's FocusIn and TQEvent::FocusIn
    +#undef FocusOut
    +#undef FocusIn
    +
    +static const int XKeyPress = KeyPress;
    +static const int XKeyRelease = KeyRelease;
    +#undef KeyPress
    +#undef KeyRelease
    +
    +// from qapplication.cpp
    +extern bool tqt_is_gui_used;
    +
    +// from qeventloop_unix.cpp
    +extern timeval *qt_wait_timer();
    +extern void cleanupTimers();
    +
    +// ### this needs to go away at some point...
    +typedef void (*VFPTR)();
    +typedef TQValueList TQVFuncList;
    +void qt_install_preselect_handler( VFPTR );
    +void qt_remove_preselect_handler( VFPTR );
    +static TQVFuncList *qt_preselect_handler = 0;
    +void qt_install_postselect_handler( VFPTR );
    +void qt_remove_postselect_handler( VFPTR );
    +static TQVFuncList *qt_postselect_handler = 0;
    +
    +void qt_install_preselect_handler( VFPTR handler )
    +{
    +    if ( !qt_preselect_handler )
    +	qt_preselect_handler = new TQVFuncList;
    +    qt_preselect_handler->append( handler );
    +}
    +void qt_remove_preselect_handler( VFPTR handler )
    +{
    +    if ( qt_preselect_handler ) {
    +	TQVFuncList::Iterator it = qt_preselect_handler->find( handler );
    +	if ( it != qt_preselect_handler->end() )
    +		qt_preselect_handler->remove( it );
    +    }
    +}
    +void qt_install_postselect_handler( VFPTR handler )
    +{
    +    if ( !qt_postselect_handler )
    +	qt_postselect_handler = new TQVFuncList;
    +    qt_postselect_handler->prepend( handler );
    +}
    +void qt_remove_postselect_handler( VFPTR handler )
    +{
    +    if ( qt_postselect_handler ) {
    +	TQVFuncList::Iterator it = qt_postselect_handler->find( handler );
    +	if ( it != qt_postselect_handler->end() )
    +		qt_postselect_handler->remove( it );
    +    }
    +}
    +
    +
    +void TQEventLoop::init()
    +{
    +	// initialize ProcessEventFlags (all events & wait for more)
    +	
    +	d->pev_flags = AllEvents | WaitForMore;	
    +	
    +    // initialize the common parts of the event loop
    +    pipe( d->thread_pipe );
    +    fcntl(d->thread_pipe[0], F_SETFD, FD_CLOEXEC);
    +    fcntl(d->thread_pipe[1], F_SETFD, FD_CLOEXEC);
    +
    +    // intitialize the X11 parts of the event loop
    +    d->xfd = -1;
    +    if ( tqt_is_gui_used )
    +        d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() );
    +
    +    // new GSource
    +
    +    TQtGSource * qtGSource = (TQtGSource*) g_source_new(&qt_gsource_funcs,
    +                             sizeof(TQtGSource));
    +                             
    +    g_source_set_can_recurse ((GSource*)qtGSource, TRUE);
    +
    +    qtGSource->qeventLoop = this;
    +	
    +    // init main loop and attach gsource
    +	
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside init(1)\n");
    +	#endif		
    +	
    +    g_main_loop_new (NULL, 1);
    +	
    +    g_source_attach( (GSource*)qtGSource, NULL );
    +
    +	d->gSource = (GSource*) qtGSource;
    +	
    +	// poll for X11 events
    +	
    +    if ( tqt_is_gui_used ) {
    +	    
    +		
    +		d->x_gPollFD.fd = d->xfd;
    +		d->x_gPollFD.events = G_IO_IN | G_IO_HUP;
    +		g_source_add_poll(d->gSource, &d->x_gPollFD); 	
    +    }
    +
    +	// poll thread-pipe
    +	
    +	d->threadPipe_gPollFD.fd = d->thread_pipe[0];
    +	d->threadPipe_gPollFD.events = G_IO_IN | G_IO_HUP;
    +	
    +	g_source_add_poll(d->gSource, &d->threadPipe_gPollFD); 
    +	
    +	#ifdef DEBUG_QT_GLIBMAINLOOP 
    +		printf("inside init(2)\n");
    +	#endif		
    +	
    +}
    +
    +void TQEventLoop::cleanup()
    +{
    +    // cleanup the common parts of the event loop
    +    close( d->thread_pipe[0] );
    +    close( d->thread_pipe[1] );
    +    cleanupTimers();
    +
    +    // cleanup the X11 parts of the event loop
    +    d->xfd = -1;
    +	
    +	// todo: destroy gsource
    +}
    +
    +bool TQEventLoop::processEvents( ProcessEventsFlags flags )
    +{
    +
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside processEvents(1) looplevel=%d\n", d->looplevel );
    +	#endif	
    +    ProcessEventsFlags save_flags;
    +    int rval;
    +    save_flags = d->pev_flags;
    +	
    +    d->pev_flags = flags;
    +
    +    rval = g_main_context_iteration(NULL, flags & WaitForMore ? TRUE : FALSE);	
    +
    +    d->pev_flags = save_flags;
    +	
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside processEvents(2) looplevel=%d rval=%d\n", d->looplevel, rval );
    +	#endif	
    +	
    +    return rval; // were events processed?
    +}
    +
    +
    +bool TQEventLoop::processX11Events()
    +{
    +	ProcessEventsFlags flags = d->pev_flags;
    +    // process events from the X server
    +    XEvent event;
    +    int	   nevents = 0;
    +
    +#if defined(QT_THREAD_SUPPORT)
    +    TQMutexLocker locker( TQApplication::tqt_mutex );
    +#endif
    +
    +    // handle gui and posted events
    +    if ( tqt_is_gui_used ) {
    +	TQApplication::sendPostedEvents();
    +
    +	// Two loops so that posted events accumulate
    +	while ( XPending( TQPaintDevice::x11AppDisplay() ) ) {
    +	    // also flushes output buffer
    +	    while ( XPending( TQPaintDevice::x11AppDisplay() ) ) {
    +		if ( d->shortcut ) {
    +		    return FALSE;
    +		}
    +
    +		XNextEvent( TQPaintDevice::x11AppDisplay(), &event );
    +
    +		if ( flags & ExcludeUserInput ) {
    +		    switch ( event.type ) {
    +		    case ButtonPress:
    +		    case ButtonRelease:
    +		    case MotionNotify:
    +		    case XKeyPress:
    +		    case XKeyRelease:
    +		    case EnterNotify:
    +		    case LeaveNotify:
    +			continue;
    +
    +		    case ClientMessage:
    +			{
    +			    // from qapplication_x11.cpp
    +			    extern Atom tqt_wm_protocols;
    +			    extern Atom tqt_wm_take_focus;
    +			    extern Atom qt_qt_scrolldone;
    +
    +			    // only keep the wm_take_focus and
    +			    // qt_qt_scrolldone protocols, discard all
    +			    // other client messages
    +			    if ( event.xclient.format != 32 )
    +				continue;
    +
    +			    if ( event.xclient.message_type == tqt_wm_protocols ||
    +				 (Atom) event.xclient.data.l[0] == tqt_wm_take_focus )
    +				break;
    +			    if ( event.xclient.message_type == qt_qt_scrolldone )
    +				break;
    +			}
    +
    +		    default: break;
    +		    }
    +		}
    +
    +		nevents++;
    +		if ( tqApp->x11ProcessEvent( &event ) == 1 )
    +		    return TRUE;
    +	    }
    +	}
    +    }
    +
    +    if ( d->shortcut ) {
    +	return FALSE;
    +    }
    +
    +    TQApplication::sendPostedEvents();
    +
    +    const uint exclude_all = ExcludeSocketNotifiers | 0x08;
    +    // 0x08 == ExcludeTimers for X11 only
    +    if ( nevents > 0 && ( flags & exclude_all ) == exclude_all &&
    +	 ( flags & WaitForMore ) ) {
    +	    return TRUE;
    +    }
    +    return FALSE;
    +}
    +
    +
    +bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) 
    +{
    +    
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside gsourcePrepare(1)\n");
    +	#endif	
    +
    +	ProcessEventsFlags flags = d->pev_flags;
    +	
    +#if defined(QT_THREAD_SUPPORT)
    +    TQMutexLocker locker( TQApplication::tqt_mutex );
    +#endif
    +
    +    // don't block if exitLoop() or exit()/quit() has been called.
    +    bool canWait = d->exitloop || d->quitnow ? FALSE : (flags & WaitForMore);
    +
    +    // Process timers and socket notifiers - the common UNIX stuff
    +
    +    // return the maximum time we can wait for an event.
    +    static timeval zerotm;
    +    timeval *tm = 0;
    +    if ( ! ( flags & 0x08 ) ) {			// 0x08 == ExcludeTimers for X11 only
    +	    tm = qt_wait_timer();			// wait for timer or X event
    +	    if ( !canWait ) {
    +	        if ( !tm )
    +                    tm = &zerotm;
    +	        tm->tv_sec  = 0;			// no time to wait
    +	        tm->tv_usec = 0;
    +	    }
    +    }
    +
    +	// include or exclude SocketNotifiers (by setting or cleaning poll events)  
    +	
    +    if ( ! ( flags & ExcludeSocketNotifiers ) ) {
    +        TQPtrListIterator it( d->sn_list );
    +        TQSockNotGPollFD *sn;
    +        while ( (sn=it.current()) ) {
    +            ++it;		
    +		    sn->gPollFD.events = sn->events;  // restore poll events
    +		}
    +	} else {
    +        TQPtrListIterator it( d->sn_list );
    +        TQSockNotGPollFD *sn;
    +        while ( (sn=it.current()) ) {
    +            ++it;		
    +		    sn->gPollFD.events = 0;  // delete poll events
    +		}
    +	}
    +
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside gsourcePrepare(2) canwait=%d\n", canWait);
    +	#endif 
    +
    +    if ( canWait )
    +	   emit aboutToBlock();
    +
    +	
    +    if ( qt_preselect_handler ) {
    +	   TQVFuncList::Iterator it, end = qt_preselect_handler->end();
    +	   for ( it = qt_preselect_handler->begin(); it != end; ++it )
    +	       (**it)();
    +    }
    +
    +    // unlock the GUI mutex and select.  when we return from this function, there is
    +    // something for us to do
    +#if defined(QT_THREAD_SUPPORT)
    +    locker.mutex()->unlock();
    +#endif
    +
    +	#ifdef DEBUG_QT_GLIBMAINLOOP 
    +		printf("inside gsourcePrepare(2.1) canwait=%d\n", canWait);
    +	#endif 	
    +
    +	// do we have to dispatch events?
    +    if (hasPendingEvents()) { 
    +		*timeout = 0; // no time to stay in poll
    +		
    +		#ifdef DEBUG_QT_GLIBMAINLOOP
    +			printf("inside gsourcePrepare(3a)\n");
    +		#endif		
    +		
    +		return FALSE;
    +    }
    +
    +	// stay in poll until something happens?
    +	if (!tm) { // fixme
    +		*timeout = -1; // wait forever
    +		#ifdef DEBUG_QT_GLIBMAINLOOP
    +			printf("inside gsourcePrepare(3b) timeout=%d \n", *timeout);
    +		#endif	
    +		
    +		
    +		return FALSE;
    +	}
    +	
    +	// else timeout >=0 
    +	*timeout = tm->tv_sec * 1000 + tm->tv_usec/1000;
    +	
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside gsourcePrepare(3c) timeout=%d \n", *timeout);
    +	#endif	
    +	
    +
    +    return FALSE;
    +}
    +
    +
    +bool TQEventLoop::gsourceCheck(GSource *gs) {
    +	
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside gsourceCheck(1)\n");
    +	#endif	
    +	
    +	
    +	// Socketnotifier events?
    +	
    +	TQPtrList *list = &d->sn_list;
    +	
    +	//if ( list ) {
    +	
    +		
    +		TQSockNotGPollFD *sn = list->first();
    +		while ( sn ) {
    +			if ( sn->gPollFD.revents )
    +				return TRUE;
    +			sn = list->next();
    +		}
    +	//}	
    +	
    +	if (d->x_gPollFD.revents) { 
    +		#ifdef DEBUG_QT_GLIBMAINLOOP
    +			printf("inside gsourceCheck(2) xfd!\n");
    +		#endif		
    +		
    +		return TRUE;  // we got events!
    +	}
    +    if (d->threadPipe_gPollFD.revents) { 
    +		#ifdef DEBUG_QT_GLIBMAINLOOP
    +			printf("inside gsourceCheck(2) threadpipe!!\n");
    +		#endif		
    +		
    +		return TRUE;  // we got events!
    +	}
    +    if (hasPendingEvents()) {
    +		#ifdef DEBUG_QT_GLIBMAINLOOP
    +			printf("inside gsourceCheck(2) pendingEvents!\n");
    +		#endif		
    +		
    +		return TRUE; // we got more X11 events!
    +	}
    +    // check if we have timers to activate?
    + 
    +	timeval * tm =qt_wait_timer();
    +	
    +    if (tm && (tm->tv_sec == 0 && tm->tv_usec == 0 )) {
    +		 #ifdef DEBUG_QT_GLIBMAINLOOP
    +			printf("inside gsourceCheck(2) qtwaittimer!\n");
    +		 #endif		
    +		
    +         return TRUE;
    +    }
    + 
    +    // nothing to dispatch 
    +	
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside gsourceCheck(2) nothing to dispatch!\n");
    +	#endif		
    +	
    +    return FALSE;	
    +}
    +
    +
    +bool TQEventLoop::gsourceDispatch(GSource *gs) {
    +
    +    // relock the GUI mutex before processing any pending events
    +#if defined(QT_THREAD_SUPPORT)
    +    TQMutexLocker locker( TQApplication::tqt_mutex );
    +#endif	
    +#if defined(QT_THREAD_SUPPORT)
    +    locker.mutex()->lock();
    +#endif
    +
    +	int nevents=0;
    +
    +	ProcessEventsFlags flags = d->pev_flags;
    +
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside gsourceDispatch(1)\n");
    +	#endif	
    +	
    +    // we are awake, broadcast it
    +    emit awake();
    +    emit tqApp->guiThreadAwake();
    +
    +    // some other thread woke us up... consume the data on the thread pipe so that
    +    // select doesn't immediately return next time
    +	
    +	if ( d->threadPipe_gPollFD.revents) {
    +	    char c;
    +	    ::read( d->thread_pipe[0], &c, 1 );
    +    }
    +
    +    if ( qt_postselect_handler ) {
    +	    TQVFuncList::Iterator it, end = qt_postselect_handler->end();
    +	    for ( it = qt_postselect_handler->begin(); it != end; ++it )
    +	        (**it)();
    +    }
    +
    +    // activate socket notifiers
    +    if ( ! ( flags & ExcludeSocketNotifiers )) {
    +		// if select says data is ready on any socket, then set the socket notifier
    +		// to pending
    +		// if ( &d->sn_list ) {
    +			
    +	
    +			TQPtrList *list = &d->sn_list;
    +			TQSockNotGPollFD *sn = list->first();
    +			while ( sn ) {
    +				if ( sn->gPollFD.revents )
    +					setSocketNotifierPending( sn->obj );
    +				sn = list->next();
    +			}
    +		// }
    +	
    +		nevents += activateSocketNotifiers();
    +    }
    +
    +    // activate timers
    +    if ( ! ( flags & 0x08 ) ) {
    +		// 0x08 == ExcludeTimers for X11 only
    +		nevents += activateTimers();
    +    }
    +
    +
    +
    +    // return true if we handled events, false otherwise
    +    //return (nevents > 0);
    +	
    +	// now process x11 events!
    +
    +	#ifdef DEBUG_QT_GLIBMAINLOOP
    +		printf("inside gsourceDispatch(2) hasPendingEvents=%d\n", hasPendingEvents());
    +	#endif
    +	
    +	if (hasPendingEvents()) {
    +
    +		// color approx. optimization - only on X11
    +		qt_reset_color_avail();		
    +		
    +		processX11Events();
    +	
    +	}
    +	
    +#if defined(QT_THREAD_SUPPORT)
    +    locker.mutex()->unlock();
    +#endif	
    +	
    +	return TRUE;
    +	
    +}
    +
    +bool TQEventLoop::hasPendingEvents() const
    +{
    +    extern uint qGlobalPostedEventsCount(); // from qapplication.cpp
    +    return ( qGlobalPostedEventsCount() || ( tqt_is_gui_used  ? XPending( TQPaintDevice::x11AppDisplay() ) : 0));
    +}
    +
    +void TQEventLoop::appStartingUp()
    +{
    +    if ( tqt_is_gui_used )
    +        d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() );
    +}
    +
    +void TQEventLoop::appClosingDown()
    +{
    +    d->xfd = -1;
    +}
    diff --git a/src/kernel/qt_kernel.pri b/src/kernel/qt_kernel.pri
    index 0c3b867c..d589cdf2 100644
    --- a/src/kernel/qt_kernel.pri
    +++ b/src/kernel/qt_kernel.pri
    @@ -21,7 +21,7 @@ kernel {
     		  $$KERNEL_H/ntqdrawutil.h \
     		  $$KERNEL_H/ntqdropsite.h \
     		  $$KERNEL_H/ntqevent.h \
    -		  $$KERNEL_H/ntqeventloop.h\
    +		  $$KERNEL_H/ntqeventloop.h \
     		  $$KERNEL_P/qeventloop_p.h \
     		  $$KERNEL_H/ntqfocusdata.h \
     		  $$KERNEL_H/ntqfont.h \
    @@ -104,6 +104,10 @@ kernel {
     		HEADERS += $$KERNEL_P/qinputcontext_p.h
     	}
     
    +		  glibmainloop {
    +		  		HEADERS+=$$KERNEL_P/qeventloop_glib_p.h
    +		  } 
    +		  
     	win32:SOURCES += $$KERNEL_CPP/qapplication_win.cpp \
     		  $$KERNEL_CPP/qclipboard_win.cpp \
     		  $$KERNEL_CPP/qcolor_win.cpp \
    @@ -133,7 +137,6 @@ kernel {
     			  $$KERNEL_CPP/qcursor_x11.cpp \
     			  $$KERNEL_CPP/qdnd_x11.cpp \
     			  $$KERNEL_CPP/qdesktopwidget_x11.cpp \
    -			  $$KERNEL_CPP/qeventloop_x11.cpp \
     			  $$KERNEL_CPP/qfont_x11.cpp \
     			  $$KERNEL_CPP/qinputcontext.cpp \
     			  $$KERNEL_CPP/qinputcontext_x11.cpp \
    @@ -146,6 +149,12 @@ kernel {
     			  $$KERNEL_CPP/qwidget_x11.cpp \
     			  $$KERNEL_CPP/qwidgetcreate_x11.cpp \
     		          $$KERNEL_CPP/qfontengine_x11.cpp
    +             glibmainloop {
    +                  SOURCES += $$KERNEL_CPP/qeventloop_x11_glib.cpp
    +             } else {
    +                  SOURCES += $$KERNEL_CPP/qeventloop_x11.cpp
    +             }
    +
     	}
     
     	!x11:mac {
    @@ -172,8 +181,13 @@ kernel {
                  DEFINES += QMAC_ONE_PIXEL_LOCK
             } else:unix {
     	   SOURCES += $$KERNEL_CPP/qprinter_unix.cpp \
    -	              $$KERNEL_CPP/qpsprinter.cpp \
    -		      $$KERNEL_CPP/qeventloop_unix.cpp
    +	              $$KERNEL_CPP/qpsprinter.cpp
    +           glibmainloop {
    +              SOURCES += $$KERNEL_CPP/qeventloop_unix_glib.cpp
    +           } else {
    +	      SOURCES += $$KERNEL_CPP/qeventloop_unix.cpp
    +           }
    +
             }
     	unix:SOURCES += $$KERNEL_CPP/qprocess_unix.cpp \
     		        $$KERNEL_CPP/qthread_unix.cpp
    diff --git a/src/qt.pro b/src/qt.pro
    index d0315c61..a11b922d 100644
    --- a/src/qt.pro
    +++ b/src/qt.pro
    @@ -196,3 +196,11 @@ wince-* {
     		   $$CODECS_CPP/qtextcodecplugin.cpp \
     		   $$WIDGETS_CPP/qwidgetplugin.cpp 
     }
    +
    +glibmainloop {
    +	DEFINES += QT_USE_GLIBMAINLOOP
    +	QMAKE_CFLAGS += $$QMAKE_CFLAGS_GLIB
    +	QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_GLIB
    +        LIBS += $$QMAKE_LIBS_GLIB
    +}
    +