Qtopia-interest Archive, February 2008
[PATCH] Avoid linking errors in the neo keyboard plugin
Message 1 in thread
Hey,
if plain qmake project files were used I would not add the qtopiacore
subdirectory at all. I would like to get some pointers to the qtopia magic on
the project files or how to condtionally add the qtopiacore subdirectory.
The easy part is to compile the subdirectory but not define anything and I
have done this.
From b8026901b1f0aa2efad925e4829867d9ac8d500c Mon Sep 17 00:00:00 2001
From: Holger Freyther <zecke@xxxxxxxxxxx>
Date: Tue, 19 Feb 2008 15:12:11 +0100
Subject: [PATCH] neo kbddrivers: Make it compile for Q_WS_X11
We can not make compiling this driver optional as the above pro
file is not TEMPLATE = subdirs. The best we can do is to guard the
header and implementation with a Q_WS_QWS and generate an empty library.
---
.../ficgta01/ficgta01kbddriverplugin.cpp | 5 +++++
.../kbddrivers/ficgta01/ficgta01kbddriverplugin.h | 6 ++++++
.../kbddrivers/ficgta01/ficgta01kbdhandler.cpp | 2 +-
.../kbddrivers/ficgta01/ficgta01kbdhandler.h | 4 +++-
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git
a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.cpp
b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.cpp
index 0332268..bdbb056 100644
---
a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.cpp
+++
b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.cpp
@@ -19,11 +19,14 @@
**
****************************************************************************/
+
#include "ficgta01kbddriverplugin.h"
#include "ficgta01kbdhandler.h"
#include <qtopiaglobal.h>
+#ifdef Q_WS_QWS
+
Ficgta01KbdDriverPlugin::Ficgta01KbdDriverPlugin( QObject *parent )
: QKbdDriverPlugin( parent )
{}
@@ -52,3 +55,5 @@ QStringList Ficgta01KbdDriverPlugin::keys() const
}
QTOPIA_EXPORT_QT_PLUGIN(Ficgta01KbdDriverPlugin)
+
+#endif
diff --git
a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.h
b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.h
index e1984b1..4f11ce0 100644
---
a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.h
+++
b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.h
@@ -22,6 +22,10 @@
#ifndef FICGTA01KBDDRIVERPLUGIN_H
#define FICGTA01KBDDRIVERPLUGIN_H
+#include <qglobal.h>
+
+#ifdef Q_WS_QWS
+
#include <QtGui/QWSKeyboardHandlerFactoryInterface>
class Ficgta01KbdDriverPlugin : public QKbdDriverPlugin {
@@ -35,4 +39,6 @@ public:
QStringList keys()const;
};
+#endif
+
#endif // FICGTA01KBDDRIVERPLUGIN_H
diff --git
a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.cpp
b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.cpp
index 10dbc57..d1c362e 100644
---
a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.cpp
+++
b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.cpp
@@ -21,7 +21,7 @@
#include "ficgta01kbdhandler.h"
-#ifdef QT_QWS_FICGTA01
+#if defined(QT_QWS_FICGTA01) && defined(Q_WS_QWS)
#include <QFile>
#include <QTextStream>
#include <QScreen>
diff --git
a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.h
b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.h
index 802c882..61b94be 100644
---
a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.h
+++
b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.h
@@ -25,7 +25,6 @@
#ifdef QT_QWS_FICGTA01
#include <QObject>
-#include <QWSKeyboardHandler>
#include <QDebug>
#include <QValueSpaceItem>
@@ -33,6 +32,8 @@
#include <QtopiaIpcAdaptor>
#include <QTimer>
+#ifdef Q_WS_QWS
+#include <QWSKeyboardHandler>
class QSocketNotifier;
@@ -60,6 +61,7 @@ private Q_SLOTS:
void timerUpdate();
};
+#endif
#endif // QT_QWS_FICGTA01
--
[ signature omitted ]
Message 2 in thread
On Thursday 21 February 2008 10:25, Holger Freyther wrote:
> Hey,
>
> if plain qmake project files were used I would not add the
> qtopiacore subdirectory at all. I would like to get some pointers
> to the qtopia magic on the project files or how to condtionally
> add the qtopiacore subdirectory.
>
You should be able to prevent it from compiling by removing
references to that directory from
devices/ficgta01/src/projects.pri .
--
[ signature omitted ]
Message 3 in thread
Hi,
A better fix is this:
==== //depot/qtopia/4.3/devices/ficgta01/src/projects.pri#7 -
//depot/qtopia/4.3/devices/ficgta01/src/projects.pri ====
@@ -1,10 +1,10 @@
PROJECTS*=\
- plugins/qtopiacore/kbddrivers/ficgta01\
plugins/audiohardware/ficgta01\
devtools
-
-
+!x11 {
+ PROJECTS*= plugins/qtopiacore/kbddrivers/ficgta01
+}
enable_modem {
for(p,PHONEVENDORS) {
will apply this
Holger Freyther wrote:
> Hey,
>
> if plain qmake project files were used I would not add the qtopiacore
> subdirectory at all. I would like to get some pointers to the qtopia magic on
> the project files or how to condtionally add the qtopiacore subdirectory.
>
>
> The easy part is to compile the subdirectory but not define anything and I
> have done this.
>
> From b8026901b1f0aa2efad925e4829867d9ac8d500c Mon Sep 17 00:00:00 2001
> From: Holger Freyther <zecke@xxxxxxxxxxx>
> Date: Tue, 19 Feb 2008 15:12:11 +0100
> Subject: [PATCH] neo kbddrivers: Make it compile for Q_WS_X11
> We can not make compiling this driver optional as the above pro
> file is not TEMPLATE = subdirs. The best we can do is to guard the
> header and implementation with a Q_WS_QWS and generate an empty library.
>
> ---
> .../ficgta01/ficgta01kbddriverplugin.cpp | 5 +++++
> .../kbddrivers/ficgta01/ficgta01kbddriverplugin.h | 6 ++++++
> .../kbddrivers/ficgta01/ficgta01kbdhandler.cpp | 2 +-
> .../kbddrivers/ficgta01/ficgta01kbdhandler.h | 4 +++-
> 4 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git
> a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.cpp
> b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.cpp
> index 0332268..bdbb056 100644
> ---
> a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.cpp
> +++
> b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.cpp
> @@ -19,11 +19,14 @@
> **
> ****************************************************************************/
>
> +
> #include "ficgta01kbddriverplugin.h"
> #include "ficgta01kbdhandler.h"
>
> #include <qtopiaglobal.h>
>
> +#ifdef Q_WS_QWS
> +
> Ficgta01KbdDriverPlugin::Ficgta01KbdDriverPlugin( QObject *parent )
> : QKbdDriverPlugin( parent )
> {}
> @@ -52,3 +55,5 @@ QStringList Ficgta01KbdDriverPlugin::keys() const
> }
>
> QTOPIA_EXPORT_QT_PLUGIN(Ficgta01KbdDriverPlugin)
> +
> +#endif
> diff --git
> a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.h
> b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.h
> index e1984b1..4f11ce0 100644
> ---
> a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.h
> +++
> b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbddriverplugin.h
> @@ -22,6 +22,10 @@
> #ifndef FICGTA01KBDDRIVERPLUGIN_H
> #define FICGTA01KBDDRIVERPLUGIN_H
>
> +#include <qglobal.h>
> +
> +#ifdef Q_WS_QWS
> +
> #include <QtGui/QWSKeyboardHandlerFactoryInterface>
>
> class Ficgta01KbdDriverPlugin : public QKbdDriverPlugin {
> @@ -35,4 +39,6 @@ public:
> QStringList keys()const;
> };
>
> +#endif
> +
> #endif // FICGTA01KBDDRIVERPLUGIN_H
> diff --git
> a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.cpp
> b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.cpp
> index 10dbc57..d1c362e 100644
> ---
> a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.cpp
> +++
> b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.cpp
> @@ -21,7 +21,7 @@
>
> #include "ficgta01kbdhandler.h"
>
> -#ifdef QT_QWS_FICGTA01
> +#if defined(QT_QWS_FICGTA01) && defined(Q_WS_QWS)
> #include <QFile>
> #include <QTextStream>
> #include <QScreen>
> diff --git
> a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.h
> b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.h
> index 802c882..61b94be 100644
> ---
> a/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.h
> +++
> b/devices/ficgta01/src/plugins/qtopiacore/kbddrivers/ficgta01/ficgta01kbdhandler.h
> @@ -25,7 +25,6 @@
> #ifdef QT_QWS_FICGTA01
>
> #include <QObject>
> -#include <QWSKeyboardHandler>
> #include <QDebug>
>
> #include <QValueSpaceItem>
> @@ -33,6 +32,8 @@
> #include <QtopiaIpcAdaptor>
> #include <QTimer>
>
> +#ifdef Q_WS_QWS
> +#include <QWSKeyboardHandler>
>
>
> class QSocketNotifier;
> @@ -60,6 +61,7 @@ private Q_SLOTS:
> void timerUpdate();
>
> };
> +#endif
>
>
> #endif // QT_QWS_FICGTA01
--
[ signature omitted ]
Message 4 in thread
On Thursday 21 February 2008 20:24:37 Lorn Potter wrote:
> Hi,
> A better fix is this:
>
> ==== //depot/qtopia/4.3/devices/ficgta01/src/projects.pri#7 -
> //depot/qtopia/4.3/devices/ficgta01/src/projects.pri ====
> @@ -1,10 +1,10 @@
> PROJECTS*=\
> - plugins/qtopiacore/kbddrivers/ficgta01\
> plugins/audiohardware/ficgta01\
> devtools
>
> -
> -
> +!x11 {
> + PROJECTS*= plugins/qtopiacore/kbddrivers/ficgta01
> +}
>
Hi Lorn,
yeah Rohan pointed me to that file as well. It wasn't too obvious to find. I
don't know if qws gets added to the CONFIG but if it is it might be better to
check for that? Imagine some one starts to build it against Qt/Mac (it
probably almost compiles)...
anyway thanks for taking a look and hinting me to the projects.pri!
z.
--
[ signature omitted ]
Message 5 in thread
Holger Freyther wrote:
> On Thursday 21 February 2008 20:24:37 Lorn Potter wrote:
>> Hi,
>> A better fix is this:
>>
>> ==== //depot/qtopia/4.3/devices/ficgta01/src/projects.pri#7 -
>> //depot/qtopia/4.3/devices/ficgta01/src/projects.pri ====
>> @@ -1,10 +1,10 @@
>> PROJECTS*=\
>> - plugins/qtopiacore/kbddrivers/ficgta01\
>> plugins/audiohardware/ficgta01\
>> devtools
>>
>> -
>> -
>> +!x11 {
>> + PROJECTS*= plugins/qtopiacore/kbddrivers/ficgta01
>> +}
>>
>
> Hi Lorn,
> yeah Rohan pointed me to that file as well. It wasn't too obvious to find. I
> don't know if qws gets added to the CONFIG but if it is it might be better to
> check for that? Imagine some one starts to build it against Qt/Mac (it
> probably almost compiles)...
i will jump that hurdle when the time comes. :)
>
> anyway thanks for taking a look and hinting me to the projects.pri!
> z.
>
> --
> To unsubscribe - send "unsubscribe" in the subject to qtopia-interest-request@xxxxxxxxxxxxx
>
>
--
[ signature omitted ]