diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-12 16:06:35 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-12 16:06:35 (GMT) |
commit | 163a4a4c38453cd4ed32c5a436763e11ce580687 (patch) | |
tree | c9162f4b47571300ea17578401122532139561e9 /src | |
parent | 7190c7be34fe0dbcfbb10b232b40977c758d251a (diff) | |
parent | b6f1dd4151c5bbcb7d4367ec972c9026ab9e68be (diff) | |
download | Qt-163a4a4c38453cd4ed32c5a436763e11ce580687.zip Qt-163a4a4c38453cd4ed32c5a436763e11ce580687.tar.gz Qt-163a4a4c38453cd4ed32c5a436763e11ce580687.tar.bz2 |
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativeboundsignal.cpp | 28 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativelistmodel.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 2 | ||||
-rw-r--r-- | src/gui/text/qfragmentmap_p.h | 5 | ||||
-rw-r--r-- | src/gui/text/qtextobject.cpp | 5 | ||||
-rw-r--r-- | src/gui/text/qtextobject.h | 2 |
6 files changed, 39 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp index 28dfea9..47a15cb 100644 --- a/src/declarative/qml/qdeclarativeboundsignal.cpp +++ b/src/declarative/qml/qdeclarativeboundsignal.cpp @@ -225,9 +225,35 @@ QDeclarativeBoundSignalParameters::QDeclarativeBoundSignalParameters(const QMeta QMetaPropertyBuilder prop = mob.addProperty(name, "QObject*"); prop.setWritable(false); } else { + QByteArray propType = type; + if (t >= QVariant::UserType || t == QVariant::Invalid) { + //copy of QDeclarativeObjectScriptClass::enumType() + QByteArray scope; + QByteArray name; + int scopeIdx = propType.lastIndexOf("::"); + if (scopeIdx != -1) { + scope = propType.left(scopeIdx); + name = propType.mid(scopeIdx + 2); + } else { + name = propType; + } + const QMetaObject *meta; + if (scope == "Qt") + meta = &QObject::staticQtMetaObject; + else + meta = parent->parent()->metaObject(); //### assumes parent->parent() + for (int i = meta->enumeratorCount() - 1; i >= 0; --i) { + QMetaEnum m = meta->enumerator(i); + if ((m.name() == name) && (scope.isEmpty() || (m.scope() == scope))) { + t = QVariant::Int; + propType = "int"; + break; + } + } + } if (QDeclarativeMetaType::canCopy(t)) { types[ii] = t; - QMetaPropertyBuilder prop = mob.addProperty(name, type); + QMetaPropertyBuilder prop = mob.addProperty(name, propType); prop.setWritable(false); } else { types[ii] = 0x80000000 | t; diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index fb77ec3..61b2d34 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -1301,9 +1301,6 @@ int NestedListModel::count() const void NestedListModel::clear() { - _rolesOk = false; - roleStrings.clear(); - if (_root) _root->clear(); } diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index f5a9e27..354f05b 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -2885,7 +2885,7 @@ void QWidgetPrivate::setSubWindowStacking(bool set) if ([pwin isVisible] && (ptype == Qt::Window || ptype == Qt::Dialog) && ![qwin parentWindow] - && (!use_behaviour_qt473 && parent->windowModality() == Qt::ApplicationModal)) { + && (use_behaviour_qt473 || parent->windowModality() == Qt::ApplicationModal)) { NSInteger level = [qwin level]; [pwin addChildWindow:qwin ordered:NSWindowAbove]; if ([qwin level] < level) diff --git a/src/gui/text/qfragmentmap_p.h b/src/gui/text/qfragmentmap_p.h index 501bfff..4057142 100644 --- a/src/gui/text/qfragmentmap_p.h +++ b/src/gui/text/qfragmentmap_p.h @@ -195,6 +195,10 @@ public: head->root = new_root; } + inline bool isValid(uint n) const { + return n > 0 && n != head->freelist; + } + union { Header *head; Fragment *fragments; @@ -854,6 +858,7 @@ public: return data.fragment(index); } inline uint position(uint node, uint field = 0) const { return data.position(node, field); } + inline bool isValid(uint n) const { return data.isValid(n); } inline uint next(uint n) const { return data.next(n); } inline uint previous(uint n) const { return data.previous(n); } inline uint size(uint node, uint field = 0) const { return data.size(node, field); } diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index 0081550..9139561 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -891,6 +891,11 @@ QTextBlockUserData::~QTextBlockUserData() Returns true if this text block is valid; otherwise returns false. */ +bool QTextBlock::isValid() const +{ + return p != 0 && p->blockMap().isValid(n); +} + /*! \fn QTextBlock &QTextBlock::operator=(const QTextBlock &other) diff --git a/src/gui/text/qtextobject.h b/src/gui/text/qtextobject.h index fface3f..7c3cefa 100644 --- a/src/gui/text/qtextobject.h +++ b/src/gui/text/qtextobject.h @@ -205,7 +205,7 @@ public: inline QTextBlock(const QTextBlock &o) : p(o.p), n(o.n) {} inline QTextBlock &operator=(const QTextBlock &o) { p = o.p; n = o.n; return *this; } - inline bool isValid() const { return p != 0 && n != 0; } + bool isValid() const; inline bool operator==(const QTextBlock &o) const { return p == o.p && n == o.n; } inline bool operator!=(const QTextBlock &o) const { return p != o.p || n != o.n; } |