diff options
author | Alessandro Portale <aportale@trolltech.com> | 2009-05-29 14:23:06 (GMT) |
---|---|---|
committer | Alessandro Portale <aportale@trolltech.com> | 2009-05-29 14:23:06 (GMT) |
commit | 8506cc8ce89c23fbfe27f9fb4d4e0cd7c90e9b24 (patch) | |
tree | 2575bfca7a3e81cd52da1039ace40a822f29ea47 /src/gui | |
parent | 3ce13251dd954ae28179b0663c6498055dbb7681 (diff) | |
download | Qt-8506cc8ce89c23fbfe27f9fb4d4e0cd7c90e9b24.zip Qt-8506cc8ce89c23fbfe27f9fb4d4e0cd7c90e9b24.tar.gz Qt-8506cc8ce89c23fbfe27f9fb4d4e0cd7c90e9b24.tar.bz2 |
Making hasSoftKeyStack() const. +coding conventions.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qmainwindow.cpp | 14 | ||||
-rw-r--r-- | src/gui/widgets/qmainwindow.h | 5 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index 618023e..6843d4e 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -67,7 +67,7 @@ QT_END_NAMESPACE #endif #ifndef QT_NO_SOFTKEYSTACK -#include <QSoftKeyStack.h> +#include <qsoftkeystack.h> #endif QT_BEGIN_NAMESPACE @@ -85,7 +85,7 @@ public: , hasOldCursor(false) , cursorAdjusted(false) #endif #ifndef QT_NO_SOFTKEYSTACK - , softKeyStack(0) + , softKeyStack(0) #endif { } QMainWindowLayout *layout; @@ -108,7 +108,7 @@ public: #endif #ifndef QT_NO_SOFTKEYSTACK - QSoftKeyStack* softKeyStack; + QSoftKeyStack *softKeyStack; #endif }; @@ -565,12 +565,10 @@ void QMainWindow::setSoftKeyStack(QSoftKeyStack *softKeyStack) \sa softKeyStack() */ -bool QMainWindow::hasSoftKeyStack() +bool QMainWindow::hasSoftKeyStack() const { - Q_D(QMainWindow); - if (d->softKeyStack ) - return true; - return false; + Q_D(const QMainWindow); + return d->softKeyStack != 0; } #endif // QT_NO_SOFTKEYSTACK diff --git a/src/gui/widgets/qmainwindow.h b/src/gui/widgets/qmainwindow.h index 01b275e..81457d6 100644 --- a/src/gui/widgets/qmainwindow.h +++ b/src/gui/widgets/qmainwindow.h @@ -59,9 +59,8 @@ class QMenuBar; class QStatusBar; class QToolBar; class QMenu; -#ifndef QT_NO_SOFTKEYSTACK class QSoftKeyStack; -#endif + class Q_GUI_EXPORT QMainWindow : public QWidget { Q_OBJECT @@ -135,7 +134,7 @@ public: #ifndef QT_NO_SOFTKEYSTACK QSoftKeyStack *softKeyStack() const; void setSoftKeyStack(QSoftKeyStack *softKeyStack); - bool hasSoftKeyStack(); + bool hasSoftKeyStack() const; #endif #ifndef QT_NO_STATUSBAR |