summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicslayout.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp2
-rw-r--r--src/gui/graphicsview/qgridlayoutengine_p.h2
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp4
-rw-r--r--src/gui/widgets/qmenu.cpp5
5 files changed, 15 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicslayout.cpp b/src/gui/graphicsview/qgraphicslayout.cpp
index 86b4589..3e95735 100644
--- a/src/gui/graphicsview/qgraphicslayout.cpp
+++ b/src/gui/graphicsview/qgraphicslayout.cpp
@@ -307,10 +307,13 @@ void QGraphicsLayout::invalidate()
// does not call the base implementation? In addition, updateGeometry()
// does more than we need.
layoutItem->d_func()->sizeHintCacheDirty = true;
- layoutItem = layoutItem->parentLayoutItem();
+ layoutItem->d_func()->sizeHintWithConstraintCacheDirty = true;
+ layoutItem = layoutItem->parentLayoutItem();
}
- if (layoutItem)
+ if (layoutItem) {
layoutItem->d_func()->sizeHintCacheDirty = true;
+ layoutItem->d_func()->sizeHintWithConstraintCacheDirty = true;
+ }
bool postIt = layoutItem ? !layoutItem->isLayout() : false;
if (postIt) {
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index 016cfbf..df13039 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -128,6 +128,7 @@ QGraphicsLayoutItemPrivate::~QGraphicsLayoutItemPrivate()
void QGraphicsLayoutItemPrivate::init()
{
sizeHintCacheDirty = true;
+ sizeHintWithConstraintCacheDirty = true;
sizePolicy = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
}
@@ -828,6 +829,7 @@ void QGraphicsLayoutItem::updateGeometry()
{
Q_D(QGraphicsLayoutItem);
d->sizeHintCacheDirty = true;
+ d->sizeHintWithConstraintCacheDirty = true;
}
/*!
diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h
index 44efbba..1b2e2ec 100644
--- a/src/gui/graphicsview/qgridlayoutengine_p.h
+++ b/src/gui/graphicsview/qgridlayoutengine_p.h
@@ -433,7 +433,7 @@ private:
// Lazily computed from the above user input
mutable int q_cachedEffectiveFirstRows[NOrientations];
mutable int q_cachedEffectiveLastRows[NOrientations];
- mutable quint8 q_cachedConstraintOrientation : 2;
+ mutable quint8 q_cachedConstraintOrientation : 3;
// Layout item input
mutable QLayoutStyleInfo q_cachedDataForStyleInfo;
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index dc8d938..0d9819e 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -782,14 +782,14 @@ void QSortFilterProxyModelPrivate::source_items_inserted(
if (orthogonal_source_to_proxy.isEmpty()) {
const int ortho_end = (orient == Qt::Horizontal) ? model->rowCount(source_parent) : model->columnCount(source_parent);
+ orthogonal_source_to_proxy.resize(ortho_end);
+
for (int ortho_item = 0; ortho_item < ortho_end; ++ortho_item) {
if ((orient == Qt::Horizontal) ? q->filterAcceptsRow(ortho_item, source_parent)
: q->filterAcceptsColumn(ortho_item, source_parent)) {
orthogonal_proxy_to_source.append(ortho_item);
}
}
- orthogonal_source_to_proxy.resize(orthogonal_proxy_to_source.size());
-
if (orient == Qt::Horizontal) {
// We're reacting to columnsInserted, but we've just inserted new rows. Sort them.
sort_source_rows(orthogonal_proxy_to_source, source_parent);
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 4bea6de..74c2a9e 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1320,6 +1320,9 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
Conversely, actions can be added to widgets with the addAction(),
addActions() and insertAction() functions.
+ \warning To make QMenu visible on the screen, exec() or popup() should be
+ used instead of show().
+
\section1 QMenu on Qt for Windows CE
If a menu is integrated into the native menubar on Windows Mobile we
@@ -1795,10 +1798,12 @@ QSize QMenu::sizeHint() const
void QMenu::popup(const QPoint &p, QAction *atAction)
{
Q_D(QMenu);
+#ifndef Q_OS_SYMBIAN
if (d->scroll) { // reset scroll state from last popup
d->scroll->scrollOffset = 0;
d->scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
}
+#endif
d->tearoffHighlighted = 0;
d->motions = 0;
d->doChildEffects = true;