diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2009-11-30 12:07:11 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2009-11-30 12:07:11 (GMT) |
commit | ef8619e587d85de29ee01def2e920c4a7ca6829a (patch) | |
tree | a5b2d94837d3d4efa63d4f89e59e05cbb7b0d57a | |
parent | 98a23b974509bd1b6d9459e6c79677bdcbaa0108 (diff) | |
parent | 0d09c6bfa5da53fedc794d6dc99f5675bdf59d49 (diff) | |
download | Qt-ef8619e587d85de29ee01def2e920c4a7ca6829a.zip Qt-ef8619e587d85de29ee01def2e920c4a7ca6829a.tar.gz Qt-ef8619e587d85de29ee01def2e920c4a7ca6829a.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit.pri | 2 | ||||
-rw-r--r-- | src/tools/moc/generator.cpp | 3 | ||||
-rw-r--r-- | tests/auto/moc/namespaced-flags.h | 5 | ||||
-rw-r--r-- | tests/auto/moc/tst_moc.cpp | 9 | ||||
-rw-r--r-- | tests/auto/qspinbox/tst_qspinbox.cpp | 2 |
6 files changed, 18 insertions, 5 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h b/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h index 6ce6a3e..9e75e7a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h @@ -155,7 +155,7 @@ namespace WTF { typedef IntegralConstant<bool, true> true_type; typedef IntegralConstant<bool, false> false_type; -#if defined(_MSC_VER) && (_MSC_VER >= 1400) +#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER) // VC8 (VS2005) and later have built-in compiler support for HasTrivialConstructor / HasTrivialDestructor, // but for some unexplained reason it doesn't work on built-in types. template <typename T> struct HasTrivialConstructor : public IntegralConstant<bool, __has_trivial_constructor(T)>{ }; diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri index 10291b4..5188662 100644 --- a/src/3rdparty/webkit/WebKit.pri +++ b/src/3rdparty/webkit/WebKit.pri @@ -11,7 +11,7 @@ isEmpty(OUTPUT_DIR) { DEFINES += BUILDING_QT__=1 building-libs { - win32-msvc*: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32 + win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32 } else { CONFIG(QTDIR_build) { QT += webkit diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 1ed6586..8fcc0df 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -292,7 +292,8 @@ void Generator::generateCode() QList<QByteArray> extraList; for (int i = 0; i < cdef->propertyList.count(); ++i) { const PropertyDef &p = cdef->propertyList.at(i); - if (!isVariantType(p.type) && !metaTypes.contains(p.type)) { + if (!isVariantType(p.type) && !metaTypes.contains(p.type) && !p.type.contains('*') && + !p.type.contains('<') && !p.type.contains('>')) { int s = p.type.lastIndexOf("::"); if (s > 0) { QByteArray scope = p.type.left(s); diff --git a/tests/auto/moc/namespaced-flags.h b/tests/auto/moc/namespaced-flags.h index d3f9548..b366447 100644 --- a/tests/auto/moc/namespaced-flags.h +++ b/tests/auto/moc/namespaced-flags.h @@ -62,13 +62,18 @@ namespace Foo { Q_OBJECT //Q_PROPERTY( Bar::Flags flags READ flags WRITE setFlags ) // triggers assertion Q_PROPERTY( Foo::Bar::Flags flags READ flags WRITE setFlags ) // fails to compile, or with the same assertion if moc fix is applied + Q_PROPERTY( QList<Foo::Bar::Flags> flagsList READ flagsList WRITE setFlagsList ) public: explicit Baz( QObject * parent=0 ) : QObject( parent ), mFlags() {} void setFlags( Bar::Flags f ) { mFlags = f; } Bar::Flags flags() const { return mFlags; } + + void setFlagsList( const QList<Bar::Flags> &f ) { mList = f; } + QList<Bar::Flags> flagsList() const { return mList; } private: Bar::Flags mFlags; + QList<Bar::Flags> mList; }; } diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp index 69d6ca7..2316ba2 100644 --- a/tests/auto/moc/tst_moc.cpp +++ b/tests/auto/moc/tst_moc.cpp @@ -489,7 +489,6 @@ private slots: void constructors(); void typenameWithUnsigned(); void warnOnVirtualSignal(); - signals: void sigWithUnsignedArg(unsigned foo); void sigWithSignedArg(signed foo); @@ -817,6 +816,8 @@ void tst_Moc::structQObject() #include "namespaced-flags.h" +Q_DECLARE_METATYPE(QList<Foo::Bar::Flags>); + void tst_Moc::namespacedFlags() { Foo::Baz baz; @@ -829,6 +830,12 @@ void tst_Moc::namespacedFlags() QVERIFY(v.isValid()); QVERIFY(baz.setProperty("flags", v)); QVERIFY(baz.flags() == bar.flags()); + + QList<Foo::Bar::Flags> l; + l << baz.flags(); + QVariant v2 = baz.setProperty("flagsList", QVariant::fromValue(l)); + QCOMPARE(l, baz.flagsList()); + QCOMPARE(l, qvariant_cast<QList<Foo::Bar::Flags> >(baz.property("flagsList"))); } void tst_Moc::warnOnMultipleInheritance() diff --git a/tests/auto/qspinbox/tst_qspinbox.cpp b/tests/auto/qspinbox/tst_qspinbox.cpp index b5e37f2..cd65135 100644 --- a/tests/auto/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/qspinbox/tst_qspinbox.cpp @@ -758,7 +758,7 @@ void tst_QSpinBox::editingFinished() box->activateWindow(); box->setFocus(); - QTRY_COMPARE(qApp->focusWidget(), box); + QTRY_COMPARE(qApp->focusWidget(), (QWidget *)box); QSignalSpy editingFinishedSpy1(box, SIGNAL(editingFinished())); QSignalSpy editingFinishedSpy2(box2, SIGNAL(editingFinished())); |