summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/testlib/qtestevent.h5
-rw-r--r--src/testlib/qtestkeyboard.h2
-rw-r--r--src/testlib/qtestmouse.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/testlib/qtestevent.h b/src/testlib/qtestevent.h
index a8376ee..dfbba33 100644
--- a/src/testlib/qtestevent.h
+++ b/src/testlib/qtestevent.h
@@ -71,6 +71,7 @@ public:
virtual ~QTestEvent() {}
};
+#ifdef QT_GUI_LIB
class QTestKeyEvent: public QTestEvent
{
public:
@@ -135,6 +136,8 @@ private:
QPoint _pos;
int _delay;
};
+#endif //QT_GUI_LIB
+
class QTestDelayEvent: public QTestEvent
{
@@ -159,6 +162,7 @@ public:
inline void clear()
{ qDeleteAll(*this); QList<QTestEvent *>::clear(); }
+#ifdef QT_GUI_LIB
inline void addKeyClick(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
{ addKeyEvent(QTest::Click, qtKey, modifiers, msecs); }
inline void addKeyPress(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
@@ -194,6 +198,7 @@ public:
{ append(new QTestMouseEvent(QTest::MouseDClick, button, stateKey, pos, delay)); }
inline void addMouseMove(QPoint pos = QPoint(), int delay=-1)
{ append(new QTestMouseEvent(QTest::MouseMove, Qt::NoButton, 0, pos, delay)); }
+#endif //QT_GUI_LIB
inline void addDelay(int msecs)
{ append(new QTestDelayEvent(msecs)); }
diff --git a/src/testlib/qtestkeyboard.h b/src/testlib/qtestkeyboard.h
index 2e475b2..af81075 100644
--- a/src/testlib/qtestkeyboard.h
+++ b/src/testlib/qtestkeyboard.h
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifndef QTESTKEYBOARD_H
+#if !defined(QTESTKEYBOARD_H) && defined(QT_GUI_LIB)
#define QTESTKEYBOARD_H
#if 0
diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h
index 2825c58..7ea927c 100644
--- a/src/testlib/qtestmouse.h
+++ b/src/testlib/qtestmouse.h
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifndef QTESTMOUSE_H
+#if !defined(QTESTMOUSE_H) && defined(QT_GUI_LIB)
#define QTESTMOUSE_H
#if 0