diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-07-02 08:51:51 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-07-02 08:53:25 (GMT) |
commit | 906b3bfd27ba87b5b09899345e7484ecab7ab022 (patch) | |
tree | 2680ff824ef4327bef1ad4f06f4742c4213aa3a4 /tools/designer/src/lib | |
parent | 29e6a5c1b1a17b8080c2dcae92dcea11b591907d (diff) | |
download | Qt-906b3bfd27ba87b5b09899345e7484ecab7ab022.zip Qt-906b3bfd27ba87b5b09899345e7484ecab7ab022.tar.gz Qt-906b3bfd27ba87b5b09899345e7484ecab7ab022.tar.bz2 |
Designer: Fix compiler warnings.
Warnings introduced by 312c028d44a80f5d6029eb166a0de731f8452525
and gcc 4.5.
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'tools/designer/src/lib')
-rw-r--r-- | tools/designer/src/lib/shared/qdesigner_menu.cpp | 8 | ||||
-rw-r--r-- | tools/designer/src/lib/shared/qdesigner_toolbar.cpp | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tools/designer/src/lib/shared/qdesigner_menu.cpp b/tools/designer/src/lib/shared/qdesigner_menu.cpp index ba512e4..31a226a 100644 --- a/tools/designer/src/lib/shared/qdesigner_menu.cpp +++ b/tools/designer/src/lib/shared/qdesigner_menu.cpp @@ -77,6 +77,7 @@ using namespace qdesigner_internal; static inline void extendClickableArea(QRect *subMenuRect, Qt::LayoutDirection dir) { switch (dir) { + case Qt::LayoutDirectionAuto: // Should never happen case Qt::LeftToRight: subMenuRect->setLeft(subMenuRect->left() - 20); break; @@ -931,8 +932,8 @@ void QDesignerMenu::moveUp(bool ctrl) if (ctrl) (void) swap(m_currentIndex, m_currentIndex - 1); - - m_currentIndex = qMax(0, --m_currentIndex); + --m_currentIndex; + m_currentIndex = qMax(0, m_currentIndex); // Always re-select, swapping destroys order update(); selectCurrentAction(); @@ -947,7 +948,8 @@ void QDesignerMenu::moveDown(bool ctrl) if (ctrl) (void) swap(m_currentIndex + 1, m_currentIndex); - m_currentIndex = qMin(actions().count() - 1, ++m_currentIndex); + ++m_currentIndex; + m_currentIndex = qMin(actions().count() - 1, m_currentIndex); update(); if (!ctrl) selectCurrentAction(); diff --git a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp index 02a2f6d..e3bc64c 100644 --- a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp +++ b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp @@ -467,6 +467,7 @@ QRect ToolBarEventFilter::freeArea(const QToolBar *tb) switch (tb->orientation()) { case Qt::Horizontal: switch (tb->layoutDirection()) { + case Qt::LayoutDirectionAuto: // Should never happen case Qt::LeftToRight: rc.setX(exclusionRectangle.right() + 1); break; |