From 7e8d6ff0bc1e5ac3742e3e5be42ff7d3ac7c98d4 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 11 Apr 2013 18:07:53 -0500 Subject: Automated update from Qt3 --- src/kernel/qapplication.cpp | 3 ++- src/kernel/qapplication_x11.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index d67df12b0..d39f38e36 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -321,6 +321,7 @@ void tqt_init( int *, char **, TQApplication::Type ); void tqt_cleanup(); #if defined(Q_WS_X11) void tqt_init( Display* dpy, TQt::HANDLE, TQt::HANDLE ); +void tqt_init( int *, char **, Display* dpy, TQt::HANDLE, TQt::HANDLE ); #endif Q_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ); @@ -962,7 +963,7 @@ TQApplication::TQApplication(Display *dpy, int argc, char **argv, tqt_init( &argc, argv, GuiClient ); } else { - tqt_init(dpy, visual, colormap); + tqt_init( &argc, argv, dpy, visual, colormap ); } process_cmdline( &argc, argv ); diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 68eaa904e..5faeb3995 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -1652,7 +1652,7 @@ void tqt_init_internal( int *argcptr, char **argv, } #endif - if ( display ) { + if ( display && ((!argcptr) || (!argv)) ) { // TQt part of other application appForeignDpy = TRUE; @@ -2465,6 +2465,11 @@ void tqt_init( Display *display, TQt::HANDLE visual, TQt::HANDLE colormap ) tqt_init_internal( 0, 0, display, visual, colormap ); } +void tqt_init( int *argcptr, char **argv, Display *display, TQt::HANDLE visual, TQt::HANDLE colormap ) +{ + tqt_init_internal( argcptr, argv, display, visual, colormap ); +} + /***************************************************************************** tqt_cleanup() - cleans up when the application is finished -- cgit v1.2.1