From 29c556ffc9b1497cd996ceb46d646b1eaf1288be Mon Sep 17 00:00:00 2001 From: kergoth Date: Sat, 19 Apr 2003 22:07:06 +0000 Subject: Split calibrate out as a standalone application, and ensure taskbar depends on it. This makes ts debugging easier, having a seperate calibration tool around, and as a side affect fixes calibration on the C700, which previously required a reboot to take effect. --- (limited to 'core/apps/calibrate/main.cpp') diff --git a/core/apps/calibrate/main.cpp b/core/apps/calibrate/main.cpp index d1ad083..1c295eb 100644 --- a/core/apps/calibrate/main.cpp +++ b/core/apps/calibrate/main.cpp @@ -23,20 +23,24 @@ #include #include +#ifdef QWS +#include +#endif + int main( int argc, char ** argv ) { QPEApplication a( argc, argv ); int retval = 0; -#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) - if ( !QFile::exists( "/etc/pointercal" ) ) { +#ifdef QWS + if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { +#endif // Make sure calibration widget starts on top. - Calibrate *cal = new Calibrate; - a.setMainWidget(cal); - a.showMainWidget(cal); - retval = a.exec(); - delete cal; + Calibrate cal; + a.setMainWidget(&cal); + a.showMainWidget(&cal); + return a.exec(); +#ifdef QWS } #endif - return retval; } -- cgit v0.9.0.2