diff options
author | Jyri Tahtela <jyri.tahtela@nokia.com> | 2011-05-16 12:36:03 (GMT) |
---|---|---|
committer | Jyri Tahtela <jyri.tahtela@nokia.com> | 2011-05-16 12:36:03 (GMT) |
commit | 82639818e567922e0255af039b9c397d13e4d9b7 (patch) | |
tree | 6a6746acc321e21f546023a740b53b59297d64eb /src | |
parent | 1eea52e5b18ef2167d375285e3838bd7883cfd7d (diff) | |
parent | 7e4a9187bb11b794e45d95d2e9fae026d6b0d07d (diff) | |
download | Qt-82639818e567922e0255af039b9c397d13e4d9b7.zip Qt-82639818e567922e0255af039b9c397d13e4d9b7.tar.gz Qt-82639818e567922e0255af039b9c397d13e4d9b7.tar.bz2 |
Merge remote-tracking branch 'qt/4.8'
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativedirparser.cpp | 17 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativedirparser_p.h | 16 | ||||
-rw-r--r-- | src/opengl/qgl.h | 2 | ||||
-rw-r--r-- | src/opengl/qgl_x11egl.cpp | 14 |
4 files changed, 48 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp index 0a7a749..d4abbee 100644 --- a/src/declarative/qml/qdeclarativedirparser.cpp +++ b/src/declarative/qml/qdeclarativedirparser.cpp @@ -160,6 +160,16 @@ bool QDeclarativeDirParser::parse() Component entry(sections[1], sections[2], -1, -1); entry.internal = true; _components.append(entry); + } else if (sections[0] == QLatin1String("typeinfo")) { + if (sectionCount != 2) { + reportError(lineNumber, -1, + QString::fromUtf8("typeinfo requires 1 argument, but %1 were provided").arg(sectionCount - 1)); + continue; + } +#ifdef QT_CREATOR + TypeInfo typeInfo(sections[1]); + _typeInfos.append(typeInfo); +#endif } else if (sectionCount == 2) { // No version specified (should only be used for relative qmldir files) @@ -229,4 +239,11 @@ QList<QDeclarativeDirParser::Component> QDeclarativeDirParser::components() cons return _components; } +#ifdef QT_CREATOR +QList<TypeInfo> QDeclarativeDirParser::typeInfos() const +{ + return _typeInfos; +} +#endif + QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativedirparser_p.h b/src/declarative/qml/qdeclarativedirparser_p.h index 7db7d8c..d40833a 100644 --- a/src/declarative/qml/qdeclarativedirparser_p.h +++ b/src/declarative/qml/qdeclarativedirparser_p.h @@ -109,6 +109,19 @@ public: QList<Component> components() const; QList<Plugin> plugins() const; +#ifdef QT_CREATOR + struct TypeInfo + { + TypeInfo() {} + TypeInfo(const QString &fileName) + : fileName(fileName) {} + + QString fileName; + }; + + QList<TypeInfo> typeInfos() const; +#endif + private: void reportError(int line, int column, const QString &message); @@ -118,6 +131,9 @@ private: QString _source; QList<Component> _components; QList<Plugin> _plugins; +#ifdef QT_CREATOR + QList<TypeInfo> _typeInfos; +#endif unsigned _isParsed: 1; }; diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index eb877c9..1f4eda3 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -401,7 +401,7 @@ protected: #if defined(Q_WS_WIN) virtual int choosePixelFormat(void* pfd, HDC pdc); #endif -#if defined(Q_WS_X11) && defined(QT_NO_EGL) +#if defined(Q_WS_X11) virtual void* tryVisual(const QGLFormat& f, int bufDepth = 1); virtual void* chooseVisual(); #endif diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index a491bef..4dd7fc2 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -257,6 +257,20 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) return true; } +void *QGLContext::chooseVisual() +{ + qFatal("QGLContext::chooseVisual - this method must not be called as Qt is built with EGL support"); + return 0; +} + +void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) +{ + Q_UNUSED(f); + Q_UNUSED(bufDepth); + qFatal("QGLContext::tryVisual - this method must not be called as Qt is built with EGL support"); + return 0; +} + void QGLWidget::resizeEvent(QResizeEvent *) { Q_D(QGLWidget); |