summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-30 18:21:02 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-30 18:21:02 +0200
commit7ffb18d137102553928f66209d13a85aa341392e (patch)
tree0262a12552e343550d70cd759bb1df1942d9863c /src
parenta32aedc044948965d91a21b9731d3c70a7dfb45c (diff)
parent09ce407aaa4a00013a606bf0011faf6cbc654c72 (diff)
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: Doc: Added links and notes to modules, ActiveQt and XMLPatterns docs. Compile on MingW struct -> class, it's better. Add a a layout property in QGraphicsWidget. Fix QFileSystemModel to not install useless watchers on the filesystem
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp10
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h3
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp1
-rw-r--r--src/gui/graphicsview/qgraphicswidget.h2
-rw-r--r--src/gui/text/qfontengine_win.cpp2
-rw-r--r--src/gui/text/qfontengine_win_p.h2
-rw-r--r--src/xmlpatterns/api/qxmlresultitems.cpp4
7 files changed, 23 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index 6fd947ce3b..3757ad7295 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -1361,6 +1361,16 @@ QModelIndex QFileSystemModel::setRootPath(const QString &newPath)
if (!showDrives && !newPathDir.exists())
return d->index(rootPath());
+ //We remove the watcher on the previous path
+ if (!rootPath().isEmpty()) {
+ //This remove the watcher for the old rootPath
+ d->fileInfoGatherer.removePath(rootPath());
+ //This line "marks" the node as dirty, so the next fetchMore
+ //call on the path will ask the gatherer to install a watcher again
+ //But it doesn't re-fetch everything
+ d->node(rootPath())->populatedChildren = false;
+ }
+
// We have a new valid root path
d->rootDir = newPathDir;
QModelIndex newRootIndex;
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 669ae1b06c..eb5fac7da4 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -74,7 +74,8 @@ class QGraphicsItemPrivate;
#ifndef QDECLARATIVELISTPROPERTY
#define QDECLARATIVELISTPROPERTY
template<typename T>
-struct QDeclarativeListProperty {
+class QDeclarativeListProperty {
+public:
typedef void (*AppendFunction)(QDeclarativeListProperty<T> *, T*);
typedef int (*CountFunction)(QDeclarativeListProperty<T> *);
typedef T *(*AtFunction)(QDeclarativeListProperty<T> *, int);
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 131ee879c4..654a432923 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -801,6 +801,7 @@ void QGraphicsWidget::setLayout(QGraphicsLayout *l)
l->setParentLayoutItem(this);
l->d_func()->reparentChildItems(this);
l->invalidate();
+ emit layoutChanged();
}
/*!
diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h
index 468a134418..730674cae9 100644
--- a/src/gui/graphicsview/qgraphicswidget.h
+++ b/src/gui/graphicsview/qgraphicswidget.h
@@ -82,6 +82,7 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay
Q_PROPERTY(Qt::WindowFlags windowFlags READ windowFlags WRITE setWindowFlags)
Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle)
Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry NOTIFY geometryChanged)
+ Q_PROPERTY(QGraphicsLayout* layout READ layout WRITE setLayout NOTIFY layoutChanged)
public:
QGraphicsWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
~QGraphicsWidget();
@@ -176,6 +177,7 @@ public:
Q_SIGNALS:
void geometryChanged();
+ void layoutChanged();
public Q_SLOTS:
bool close();
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index d126a2e0ad..eea196eb4c 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -654,6 +654,7 @@ static const ushort char_table[] = {
static const int char_table_entries = sizeof(char_table)/sizeof(ushort);
+#ifndef Q_CC_MINGW
void QFontEngineWin::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing)
{
HDC hdc = shared_dc();
@@ -678,6 +679,7 @@ void QFontEngineWin::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *
}
#endif
}
+#endif // Q_CC_MINGW
qreal QFontEngineWin::minLeftBearing() const
{
diff --git a/src/gui/text/qfontengine_win_p.h b/src/gui/text/qfontengine_win_p.h
index f19e48eb5e..68b53b5235 100644
--- a/src/gui/text/qfontengine_win_p.h
+++ b/src/gui/text/qfontengine_win_p.h
@@ -106,7 +106,9 @@ public:
virtual QImage alphaMapForGlyph(glyph_t, const QTransform &xform);
virtual QImage alphaRGBMapForGlyph(glyph_t t, int margin, const QTransform &xform);
+#ifndef Q_CC_MINGW
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
+#endif
int getGlyphIndexes(const QChar *ch, int numChars, QGlyphLayout *glyphs, bool mirrored) const;
void getCMap();
diff --git a/src/xmlpatterns/api/qxmlresultitems.cpp b/src/xmlpatterns/api/qxmlresultitems.cpp
index c474082eb1..98c5bdc813 100644
--- a/src/xmlpatterns/api/qxmlresultitems.cpp
+++ b/src/xmlpatterns/api/qxmlresultitems.cpp
@@ -70,6 +70,10 @@ QT_BEGIN_NAMESPACE
sequence and returns it, and current() always returns the QXmlItem
that next() returned the last time it was called.
+ \note When using the QXmlResultItems overload of QXmlQuery::evaluateTo()
+ to execute a query, it is advisable to create a new instance of this
+ class for each new set of results rather than reusing an old instance.
+
\sa QXmlItem::isNode(), QXmlItem::isAtomicValue(), QXmlNodeModelIndex
*/