diff options
author | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-06 12:30:32 (GMT) |
---|---|---|
committer | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-06 12:30:32 (GMT) |
commit | d0432c7d7c06c83ccaa2266217e5b1823fa8dba6 (patch) | |
tree | da296c3f94aeecee7385f820f3947018536cf1cf | |
parent | 4dd8985db4653a3f4f406f4fe7c910ffd02643b3 (diff) | |
download | Qt-d0432c7d7c06c83ccaa2266217e5b1823fa8dba6.zip Qt-d0432c7d7c06c83ccaa2266217e5b1823fa8dba6.tar.gz Qt-d0432c7d7c06c83ccaa2266217e5b1823fa8dba6.tar.bz2 |
Replaced usage of QSoftKeyStack with QActions having SoftKeyRole
-rw-r--r-- | src/gui/widgets/qmainwindow.cpp | 62 | ||||
-rw-r--r-- | src/gui/widgets/qmainwindow.h | 9 |
2 files changed, 1 insertions, 70 deletions
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index a12c32b..90c5db9 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -66,11 +66,6 @@ extern OSWindowRef qt_mac_window_for(const QWidget *); // qwidget_mac.cpp QT_END_NAMESPACE #endif -#ifndef QT_NO_SOFTKEYSTACK -#include <qsoftkeystack.h> -#endif -#include <qsoftkeyaction.h> - QT_BEGIN_NAMESPACE class QMainWindowPrivate : public QWidgetPrivate @@ -85,9 +80,6 @@ public: #if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR) , hasOldCursor(false) , cursorAdjusted(false) #endif -#ifndef QT_NO_SOFTKEYSTACK - , softKeyStack(0) -#endif { } QMainWindowLayout *layout; QSize iconSize; @@ -107,10 +99,6 @@ public: uint hasOldCursor : 1; uint cursorAdjusted : 1; #endif - -#ifndef QT_NO_SOFTKEYSTACK - QSoftKeyStack *softKeyStack; -#endif }; void QMainWindowPrivate::init() @@ -122,9 +110,6 @@ void QMainWindowPrivate::init() explicitIconSize = false; q->setAttribute(Qt::WA_Hover); -//#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SOFTKEYSTACK) -// softKeyStack = new QSoftKeyStack(q); -//#endif } /* @@ -534,53 +519,6 @@ void QMainWindow::setMenuWidget(QWidget *menuBar) } #endif // QT_NO_MENUBAR -#ifndef QT_NO_SOFTKEYSTACK -/*! - Returns the softkey stack for the main window. This function creates - and returns an empty soft key stack if the stack does not exist. - - \sa softKeyStack() -*/ -QSoftKeyStack *QMainWindow::softKeyStack() const -{ - if (!d_func()->softKeyStack) { - QMainWindow *self = const_cast<QMainWindow *>(this); - QSoftKeyStack* softKeyStack = new QSoftKeyStack(self); - self->setSoftKeyStack(softKeyStack); - } - return d_func()->softKeyStack; -} - -/*! - Sets the softkey stack for the main window to \a softKeyStack. - - Note: QMainWindow takes ownership of the \a softKeyStack pointer and - deletes it at the appropriate time. - - \sa softKeyStack() -*/ -void QMainWindow::setSoftKeyStack(QSoftKeyStack *softKeyStack) -{ - Q_D(QMainWindow); - if (d->softKeyStack && d->softKeyStack != softKeyStack) { - QSoftKeyStack *oldSoftKeyStack = d->softKeyStack; - delete oldSoftKeyStack; - } - d->softKeyStack = softKeyStack; -} - -/*! - Returns true if QMainWindow has a softkeystack and false otherwise - - \sa softKeyStack() -*/ -bool QMainWindow::hasSoftKeyStack() const -{ - Q_D(const QMainWindow); - return d->softKeyStack != 0; -} -#endif // QT_NO_SOFTKEYSTACK - #ifndef QT_NO_STATUSBAR /*! Returns the status bar for the main window. This function creates diff --git a/src/gui/widgets/qmainwindow.h b/src/gui/widgets/qmainwindow.h index 81457d6..9983c7a 100644 --- a/src/gui/widgets/qmainwindow.h +++ b/src/gui/widgets/qmainwindow.h @@ -59,7 +59,6 @@ class QMenuBar; class QStatusBar; class QToolBar; class QMenu; -class QSoftKeyStack; class Q_GUI_EXPORT QMainWindow : public QWidget { @@ -130,13 +129,7 @@ public: QWidget *menuWidget() const; void setMenuWidget(QWidget *menubar); #endif - -#ifndef QT_NO_SOFTKEYSTACK - QSoftKeyStack *softKeyStack() const; - void setSoftKeyStack(QSoftKeyStack *softKeyStack); - bool hasSoftKeyStack() const; -#endif - + #ifndef QT_NO_STATUSBAR QStatusBar *statusBar() const; void setStatusBar(QStatusBar *statusbar); |