Author: coolo
Date: Mon Nov 26 16:10:34 2007
New Revision: 42404
URL: http://svn.opensuse.org/viewcvs/yast?rev=42404&view=rev
Log:
don't loop too much, just takes CPU
Modified:
branches/tmp/coolo/qt4-port/src/YQUI_core.cc
branches/tmp/coolo/qt4-port/src/pkg/Makefile.am
Modified: branches/tmp/coolo/qt4-port/src/YQUI_core.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQUI_core.cc?rev=42404&r1=42403&r2=42404&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQUI_core.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQUI_core.cc Mon Nov 26 16:10:34 2007
@@ -104,6 +104,9 @@
new QApplication( _ui_argc, _ui_argv);
_busy_cursor_timer = new QTimer( qApp );
+ _busy_cursor_timer->setSingleShot( true );
+
+ _user_input_timer.setSingleShot( true );
_normalPalette = qApp->palette();
@@ -433,7 +436,7 @@
{
init_ui();
- //y2milestone( "userInput %ld", QThread::currentThreadId () );
+ // y2milestone( "userInput %ld", timeout_millisec );
YEvent * event = 0;
YQDialog * dialog = dynamic_cast ( YDialog::currentDialog( false ) );
@@ -444,7 +447,7 @@
if ( dialog )
{
if ( timeout_millisec > 0 )
- _user_input_timer.start( timeout_millisec, true ); // single shot
+ _user_input_timer.start( timeout_millisec ); // single shot
dialog->activate( true );
@@ -454,7 +457,10 @@
normalCursor();
_do_exit_loop = true; // should exit_loop() be called in sendEvent()?
- _eventLoop->processEvents();
+ while ( ! pendingEvent() )
+ {
+ _eventLoop->processEvents(QEventLoop::WaitForMoreEvents);
+ }
_do_exit_loop = false;
@@ -464,7 +470,7 @@
// Display a busy cursor, but only if there is no other activity within
// BUSY_CURSOR_TIMEOUT milliseconds (avoid cursor flicker)
- _busy_cursor_timer->start( BUSY_CURSOR_TIMEOUT, true ); // single shot
+ _busy_cursor_timer->start( BUSY_CURSOR_TIMEOUT ); // single shot
}
if ( _user_input_timer.isActive() )
Modified: branches/tmp/coolo/qt4-port/src/pkg/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/Makefile.am?rev=42404&r1=42403&r2=42404&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/Makefile.am (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/Makefile.am Mon Nov 26 16:10:34 2007
@@ -16,17 +16,17 @@
# plugin, libtool forces 'lib' prefix
# plugin_LTLIBRARIES = libpy2qt_pkg.la
-plugin_LTLIBRARIES = libpy2qt_pkg.la
-libpy2qt_pkg_la_LDFLAGS = -version-info 2:0
+plugin_LTLIBRARIES = libpy2qt4_pkg.la
+libpy2qt4_pkg_la_LDFLAGS = -version-info 2:0
-libpy2qt_pkg_la_LIBADD = \
+libpy2qt4_pkg_la_LIBADD = \
-L$(plugindir) -lpy2UI \
-L$(QTLIBDIR) -lQtGui -lQt3Support \
${ZYPP_LIBS}
noinst_HEADERS = $(wildcard *.h)
-libpy2qt_pkg_la_SOURCES = \
+libpy2qt4_pkg_la_SOURCES = \
YQPackageSelector.cc \
YQPackageSelectorBase.cc \
YQPackageSelectorHelp.cc \
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org