diff options
author | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-06 18:40:00 +0200 |
---|---|---|
committer | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-06 18:40:00 +0200 |
commit | 93922e26a2411c0f11e7cdc49b306823e23cda8b (patch) | |
tree | 8ae5ae8eff95dc4793d67d50e04d1855cfcc07e4 /src/gui | |
parent | fcb5ca1ef0a1c1639624d951b03750abc631e60d (diff) | |
download | qt4-tools-93922e26a2411c0f11e7cdc49b306823e23cda8b.tar.gz |
Fixes to make gui compile after clean configure. Removal
of QSoftKeyStack broke compilation on clean environment...
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_p.h | 3 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/qkeyeventsoftkey.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/qkeyeventsoftkey.h | 8 | ||||
-rw-r--r-- | src/gui/widgets/widgets.pri | 12 |
6 files changed, 18 insertions, 14 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 187e2cd4c8..69e630edd8 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -61,6 +61,7 @@ #ifndef QT_NO_ACCESSIBILITY #include <qaccessible.h> #endif +#include <qkeyeventsoftkey.h> QT_BEGIN_NAMESPACE @@ -2003,7 +2004,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event) if (QApplication::keypadNavigationEnabled()) { if (!hasEditFocus()) { setEditFocus(true); - QKeyEventSoftKey::addSoftKey(QAction::Back, Qt::Key_Back, this); + QKeyEventSoftKey::addSoftKey(QAction::BackSoftKey, Qt::Key_Back, this); return; } } diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 9a606dca79..2119849eb8 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -84,6 +84,9 @@ class RDrawableWindow; class CCoeControl; class CAknTitlePane; class CAknContextPane; +// The following 2 defines may only be needed for s60. To be seen. +#define SOFTKEYSTART 5000 +#define SOFTKEYEND (5000 + Qt::Key_Context4-Qt::Key_Context1) #endif QT_BEGIN_NAMESPACE diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index a23469e0a7..4e0320695d 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -62,9 +62,6 @@ QWidget *QWidgetPrivate::mouseGrabber = 0; QWidget *QWidgetPrivate::keyboardGrabber = 0; #define QSoftkeySet QList <QAction*> -// The following 2 defines may only be needed for s60. To be seen. -#define SOFTKEYSTART 5000 -#define SOFTKEYEND (5000 + Qt::Key_Context4-Qt::Key_Context1) static void mapSoftKeys(const QSoftkeySet &softkeys) { diff --git a/src/gui/widgets/qkeyeventsoftkey.cpp b/src/gui/widgets/qkeyeventsoftkey.cpp index e836dfe64a..08f5c6f3c2 100644 --- a/src/gui/widgets/qkeyeventsoftkey.cpp +++ b/src/gui/widgets/qkeyeventsoftkey.cpp @@ -39,6 +39,8 @@ ** ****************************************************************************/ +#include "qapplication.h" +#include "qevent.h" #include "qkeyeventsoftkey.h" QT_BEGIN_NAMESPACE @@ -75,4 +77,3 @@ QT_END_NAMESPACE #include "moc_qkeyeventsoftkey.cpp" -#endif // QT_NO_ACTION diff --git a/src/gui/widgets/qkeyeventsoftkey.h b/src/gui/widgets/qkeyeventsoftkey.h index 92cf0df203..fd69907421 100644 --- a/src/gui/widgets/qkeyeventsoftkey.h +++ b/src/gui/widgets/qkeyeventsoftkey.h @@ -42,20 +42,22 @@ #ifndef QKEYEVENSOFTKEY_H #define QKEYEVENSOFTKEY_H +#include <QtCore/qobject.h> +#include "QtGui/qaction.h" QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Gui) -#include "qaction.h" -class QKeyEventSoftKey : QObject + +class Q_GUI_EXPORT QKeyEventSoftKey : QObject { Q_OBJECT public: QKeyEventSoftKey(QAction *softKeyAction, Qt::Key key, QObject *parent); - static void addSoftKey(QAction::StandardRole standardRole, Qt::Key key, QWidget *actionWidget); + static void addSoftKey(QAction::SoftKeyRole standardRole, Qt::Key key, QWidget *actionWidget); static void removeSoftkey(QWidget *focussedWidget); private: QAction *m_softKeyAction; diff --git a/src/gui/widgets/widgets.pri b/src/gui/widgets/widgets.pri index 150eed7e9c..d0f981c3bd 100644 --- a/src/gui/widgets/widgets.pri +++ b/src/gui/widgets/widgets.pri @@ -25,6 +25,7 @@ HEADERS += \ widgets/qframe.h \ widgets/qframe_p.h \ widgets/qgroupbox.h \ + widgets/qkeyeventsoftkey.h \ widgets/qlabel.h \ widgets/qlabel_p.h \ widgets/qlcdnumber.h \ @@ -78,8 +79,8 @@ HEADERS += \ widgets/qtoolbararealayout_p.h \ widgets/qplaintextedit.h \ widgets/qplaintextedit_p.h \ - widgets/qprintpreviewwidget.h \ - widgets/qkeyeventsoftkey.h \ + widgets/qprintpreviewwidget.h + SOURCES += \ widgets/qabstractbutton.cpp \ widgets/qabstractslider.cpp \ @@ -97,6 +98,7 @@ SOURCES += \ widgets/qfontcombobox.cpp \ widgets/qframe.cpp \ widgets/qgroupbox.cpp \ + widgets/qkeyeventsoftkey.cpp \ widgets/qlabel.cpp \ widgets/qlcdnumber.cpp \ widgets/qlineedit.cpp \ @@ -138,8 +140,7 @@ SOURCES += \ widgets/qwidgetanimator.cpp \ widgets/qtoolbararealayout.cpp \ widgets/qplaintextedit.cpp \ - widgets/qprintpreviewwidget.cpp \ - widgets/qkeyeventsoftkey.cpp \ + widgets/qprintpreviewwidget.cpp !embedded:mac { HEADERS += widgets/qmacnativewidget_mac.h \ @@ -162,6 +163,5 @@ wince*: { } symbian*: { - SOURCES += \ - widgets/qmenu_symbian.cpp \ + SOURCES += widgets/qmenu_symbian.cpp } |