diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-29 14:10:51 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-29 14:11:15 (GMT) |
commit | 2f85cc0cb758b0efe4d7b5af1b79eda13be970f3 (patch) | |
tree | c54cab37a367b18cde6a3f909dbec336465ba71f /src/gui/widgets | |
parent | d4a80a0161be902aaf0981aa7399b29402a67e5e (diff) | |
download | Qt-2f85cc0cb758b0efe4d7b5af1b79eda13be970f3.zip Qt-2f85cc0cb758b0efe4d7b5af1b79eda13be970f3.tar.gz Qt-2f85cc0cb758b0efe4d7b5af1b79eda13be970f3.tar.bz2 |
Fix some coverity warnings
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qdockarealayout.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/qdockwidget.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/qmenu.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/qmenu_p.h | 4 |
4 files changed, 6 insertions, 8 deletions
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index ea5e323..9828413 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -223,7 +223,7 @@ static quintptr tabId(const QDockAreaLayoutItem &item) QDockAreaLayoutInfo::QDockAreaLayoutInfo() : sep(0), dockPos(QInternal::LeftDock), o(Qt::Horizontal), mainWindow(0) #ifndef QT_NO_TABBAR - , tabbed(false), tabBar(0), tabBarShape(QTabBar::RoundedSouth) + , tabbed(false), tabBar(0), tabBarShape(QTabBar::RoundedSouth), tabBarVisible(false) #endif { } @@ -233,7 +233,7 @@ QDockAreaLayoutInfo::QDockAreaLayoutInfo(int _sep, QInternal::DockPosition _dock QMainWindow *window) : sep(_sep), dockPos(_dockPos), o(_o), mainWindow(window) #ifndef QT_NO_TABBAR - , tabbed(false), tabBar(0), tabBarShape(static_cast<QTabBar::Shape>(tbshape)) + , tabbed(false), tabBar(0), tabBarShape(static_cast<QTabBar::Shape>(tbshape)), tabBarVisible(false) #endif { #ifdef QT_NO_TABBAR diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp index 4350520..5810c81 100644 --- a/src/gui/widgets/qdockwidget.cpp +++ b/src/gui/widgets/qdockwidget.cpp @@ -1322,8 +1322,7 @@ void QDockWidget::changeEvent(QEvent *event) QMainWindow *win = qobject_cast<QMainWindow*>(parentWidget()); if (QMainWindowLayout *winLayout = (win ? qobject_cast<QMainWindowLayout*>(win->layout()) : 0)) - if (QDockAreaLayoutInfo *info = - (winLayout ? winLayout->layoutState.dockAreaLayout.info(this) : 0)) + if (QDockAreaLayoutInfo *info = winLayout->layoutState.dockAreaLayout.info(this)) info->updateTabBar(); } #endif // QT_NO_TABBAR diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 0aa584f..56b8cb1 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -150,7 +150,6 @@ private: void QMenuPrivate::init() { Q_Q(QMenu); - activationRecursionGuard = false; #ifndef QT_NO_WHATSTHIS q->setAttribute(Qt::WA_CustomWhatsThis); #endif @@ -2712,7 +2711,7 @@ void QMenu::mouseMoveEvent(QMouseEvent *e) d->motions++; if (d->motions == 0) // ignore first mouse move event (see enterEvent()) return; - d->hasHadMouse |= rect().contains(e->pos()); + d->hasHadMouse = d->hasHadMouse || rect().contains(e->pos()); QAction *action = d->actionAt(e->pos()); if (!action) { diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h index 7bc78ba..50a9f2f 100644 --- a/src/gui/widgets/qmenu_p.h +++ b/src/gui/widgets/qmenu_p.h @@ -126,9 +126,9 @@ class QMenuPrivate : public QWidgetPrivate Q_DECLARE_PUBLIC(QMenu) public: QMenuPrivate() : itemsDirty(0), maxIconWidth(0), tabWidth(0), ncols(0), - collapsibleSeparators(true), hasHadMouse(0), aboutToHide(0), motions(0), + collapsibleSeparators(true), activationRecursionGuard(false), hasHadMouse(0), aboutToHide(0), motions(0), currentAction(0), scroll(0), eventLoop(0), tearoff(0), tornoff(0), tearoffHighlighted(0), - hasCheckableItems(0), sloppyAction(0) + hasCheckableItems(0), sloppyAction(0), doChildEffects(false) #ifdef Q_WS_MAC ,mac_menu(0) #endif |