summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/firstuse.cpp16
-rw-r--r--core/launcher/firstuse.h1
-rw-r--r--core/launcher/main.cpp3
3 files changed, 12 insertions, 8 deletions
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp
index 2dc6a72..3f769ae 100644
--- a/core/launcher/firstuse.cpp
+++ b/core/launcher/firstuse.cpp
@@ -32,5 +32,4 @@
#include <qtopia/custom.h>
-#if defined(QPE_NEED_CALIBRATION)
+
#include "calibrate.h"
-#endif
#include "documentlist.h"
@@ -170,3 +169,6 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) :
calcMaxWindowRect();
-#if defined(QPE_NEED_CALIBRATION)
+
+ m_calHandler = ( QWSServer::mouseHandler() && QWSServer::mouseHandler()->inherits("QCalibratedMouseHandler") ) ? true : false;
+
+ if ( m_calHandler) {
if ( !QFile::exists("/etc/pointercal") ) {
@@ -175,3 +177,4 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) :
}
-#endif
+ }
+
Config config("locale");
@@ -493,2 +496,3 @@ void FirstUse::updateButtons()
next->setText(tr("Next >>"));
+
next->setEnabled( !waitingForLaunch );
@@ -506,4 +510,3 @@ void FirstUse::mouseReleaseEvent( QMouseEvent * )
if ( currApp < 0 ) {
-#if defined(QPE_NEED_CALIBRATION)
- if ( needCalibrate ) {
+ if ( m_calHandler && needCalibrate ) {
releaseMouse();
@@ -513,3 +516,2 @@ void FirstUse::mouseReleaseEvent( QMouseEvent * )
}
-#endif
nextDialog();
diff --git a/core/launcher/firstuse.h b/core/launcher/firstuse.h
index 44a95a8..98858f8 100644
--- a/core/launcher/firstuse.h
+++ b/core/launcher/firstuse.h
@@ -81,2 +81,3 @@ private:
bool needRestart;
+ bool m_calHandler : 1;
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 075985d..ad40536 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -200,3 +200,4 @@ static bool firstUse()
bool needFirstUse = FALSE;
- if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
+ if ( QWSServer::mouseHandler() &&
+ QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
if ( !QFile::exists( "/etc/pointercal" ) )