Author: coolo Date: Fri Feb 15 14:28:41 2008 New Revision: 44516 URL: http://svn.opensuse.org/viewcvs/yast?rev=44516&view=rev Log: there was a reason argc wasn't a local variable, but it took a while for me to figure it out again (with the help of gdb wizard matz) Modified: trunk/qt/src/YQUI.h trunk/qt/src/YQUI_core.cc Modified: trunk/qt/src/YQUI.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI.h?rev=44516&r1=44515&r2=44516&view=diff ============================================================================== --- trunk/qt/src/YQUI.h (original) +++ trunk/qt/src/YQUI.h Fri Feb 15 14:28:41 2008 @@ -137,7 +137,7 @@ /** * Return 'true' if defaultsize windows should not get window manager - * borders / frames. + * borders / frames. **/ bool noBorder() const { return _noborder; } /** @@ -205,7 +205,7 @@ * Show mouse cursor indicating busy state. **/ void busyCursor(); - + /** * Show normal mouse cursor not indicating busy status. **/ @@ -263,7 +263,7 @@ **/ bool usingVisionImpairedPalette() const { return _usingVisionImpairedPalette; } - + protected: /** @@ -290,7 +290,7 @@ * Reimplemented from YUI. **/ virtual void idleLoop( int fd_ycp ); - + /** * Timeout during TimeoutUserInput() / WaitForEvent() **/ @@ -298,7 +298,7 @@ void leaveIdleLoop(); - + // // Data members // @@ -381,17 +381,20 @@ /* * Reads the style sheet, parses some comments and passes it to qapp - */ + */ QY2Styler * _styler; YQUISignalReceiver * _signalReceiver; + + // Qt copies the _reference_ to argc, so we need to store argc forever + int _ui_argc; }; /** * Helper class that acts as a Qt signal receiver for YQUI. * YQUI itself cannot be a QObject to avoid problems with starting up the UI - * with multiple threads. + * with multiple threads. **/ class YQUISignalReceiver : public QObject { Modified: trunk/qt/src/YQUI_core.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI_core.cc?rev=44516&r1=44515&r2=44516&view=diff ============================================================================== --- trunk/qt/src/YQUI_core.cc (original) +++ trunk/qt/src/YQUI_core.cc Fri Feb 15 14:28:41 2008 @@ -106,13 +106,13 @@ cmdLine.replace( 0, "YaST2" ); } - int argc = cmdLine.argc(); + _ui_argc = cmdLine.argc(); char ** argv = cmdLine.argv(); // YaST2 has no use for the glib event loop setenv( "QT_NO_GLIB", "1", 1 ); - new QApplication( argc, argv ); + new QApplication( _ui_argc, argv ); _signalReceiver = new YQUISignalReceiver(); _busyCursorTimer = new QTimer( _signalReceiver ); @@ -126,7 +126,7 @@ // Qt keeps track to a global QApplication in qApp. Q_CHECK_PTR( qApp ); - processCommandLineArgs( argc, argv ); + processCommandLineArgs( _ui_argc, argv ); calcDefaultSize(); _styler = new QY2Styler( qApp ); @@ -225,7 +225,7 @@ yuiMilestone() << "YQUI constructor end. Thread ID: " << hex << QThread::currentThreadId () << dec << endl; - + qApp->processEvents(); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org