summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-10 19:40:54 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-10 19:40:54 (GMT)
commitde35f4df32f1348af48eb965b78a66dc86ad72fd (patch)
treee1cdc05b9cff69cb5345caef2ab78a28d5dfde9d /src
parentd8af71198528c1e1c9b94471426c67e6deab7576 (diff)
parent3825b81f0a561b0c1022803caee9b918d3dc6d5f (diff)
downloadQt-de35f4df32f1348af48eb965b78a66dc86ad72fd.zip
Qt-de35f4df32f1348af48eb965b78a66dc86ad72fd.tar.gz
Qt-de35f4df32f1348af48eb965b78a66dc86ad72fd.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix for torn off menus that were way too big Fixed an issue with pixmaps not being released correctly in the GL 1 engine.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qmenu.cpp9
-rw-r--r--src/opengl/qpaintengine_opengl.cpp5
2 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index d0ae90c..879ba2a 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -261,9 +261,6 @@ void QMenuPrivate::updateActionRects() const
icone = style->pixelMetric(QStyle::PM_SmallIconSize, &opt, q);
const int fw = style->pixelMetric(QStyle::PM_MenuPanelWidth, &opt, q);
const int deskFw = style->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, &opt, q);
-
- const int sfcMargin = style->sizeFromContents(QStyle::CT_Menu, &opt, QApplication::globalStrut(), q).width() - QApplication::globalStrut().width();
- const int min_column_width = q->minimumWidth() - (sfcMargin + leftmargin + rightmargin + 2 * (fw + hmargin));
const int tearoffHeight = tearoff ? style->pixelMetric(QStyle::PM_MenuTearoffHeight, &opt, q) : 0;
//for compatability now - will have to refactor this away..
@@ -337,7 +334,7 @@ void QMenuPrivate::updateActionRects() const
if (!sz.isEmpty()) {
- max_column_width = qMax(min_column_width, qMax(max_column_width, sz.width()));
+ max_column_width = qMax(max_column_width, sz.width());
//wrapping
if (!scroll &&
y+sz.height()+vmargin > dh - (deskFw * 2)) {
@@ -351,6 +348,10 @@ void QMenuPrivate::updateActionRects() const
}
max_column_width += tabWidth; //finally add in the tab width
+ const int sfcMargin = style->sizeFromContents(QStyle::CT_Menu, &opt, QApplication::globalStrut(), q).width() - QApplication::globalStrut().width();
+ const int min_column_width = q->minimumWidth() - (sfcMargin + leftmargin + rightmargin + 2 * (fw + hmargin));
+ max_column_width = qMax(min_column_width, max_column_width);
+
//calculate position
const int base_y = vmargin + fw + topmargin +
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 57918d0..fc31548 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -1453,6 +1453,11 @@ bool QOpenGLPaintEngine::end()
d->device->endPaint();
qt_mask_texture_cache()->maintainCache();
+#if defined(Q_WS_X11)
+ // clear out the references we hold for textures bound with the
+ // texture_from_pixmap extension
+ ctx->d_func()->boundPixmaps.clear();
+#endif
return true;
}