summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-15 19:27:42 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-15 19:27:42 (GMT)
commit6e2c3e7306883cd4618742e37861e326e9c91895 (patch)
treeacef1cbd0595b1e34de10935c1326bc582ad98ab /src/gui/graphicsview
parent03c01176ebf423085e56ceabcf8335ca5027a786 (diff)
parentf95a1d74c6a8672aac180ff8d9e8ba2e13074865 (diff)
downloadQt-6e2c3e7306883cd4618742e37861e326e9c91895.zip
Qt-6e2c3e7306883cd4618742e37861e326e9c91895.tar.gz
Qt-6e2c3e7306883cd4618742e37861e326e9c91895.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QFileDialog : Fix completer showing up on the MyComputer view. Amend previous commit 4e2eb2945dbc3865e2901f12d663ed89e8f0dfbf to fix compilation with QT_NO_DEBUG_STREAM Compile with QT_NO_DEBUG_STREAM Docs: HTML comments marks so Creator can extract data efficiently. Work around memory leak issue in grid and linear layouts.
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsgridlayout.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp7
2 files changed, 6 insertions, 8 deletions
diff --git a/src/gui/graphicsview/qgraphicsgridlayout.cpp b/src/gui/graphicsview/qgraphicsgridlayout.cpp
index 83db3ec..062b5ac 100644
--- a/src/gui/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsgridlayout.cpp
@@ -94,14 +94,13 @@ public:
#endif
};
+Q_GLOBAL_STATIC(QWidget, globalStyleInfoWidget);
+
QLayoutStyleInfo QGraphicsGridLayoutPrivate::styleInfo() const
{
- static QWidget *wid = 0;
- if (!wid)
- wid = new QWidget;
QGraphicsItem *item = parentItem();
QStyle *style = (item && item->isWidget()) ? static_cast<QGraphicsWidget*>(item)->style() : QApplication::style();
- return QLayoutStyleInfo(style, wid);
+ return QLayoutStyleInfo(style, globalStyleInfoWidget());
}
/*!
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp
index b828722..37408ef 100644
--- a/src/gui/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp
@@ -171,14 +171,13 @@ int QGraphicsLinearLayoutPrivate::gridColumn(int index) const
return int(qMin(uint(index), uint(engine.columnCount())));
}
+Q_GLOBAL_STATIC(QWidget, globalStyleInfoWidget)
+
QLayoutStyleInfo QGraphicsLinearLayoutPrivate::styleInfo() const
{
- static QWidget *wid = 0;
- if (!wid)
- wid = new QWidget;
QGraphicsItem *item = parentItem();
QStyle *style = (item && item->isWidget()) ? static_cast<QGraphicsWidget*>(item)->style() : QApplication::style();
- return QLayoutStyleInfo(style, wid);
+ return QLayoutStyleInfo(style, globalStyleInfoWidget());
}
/*!