From 03d9d3cf641c8dde22a903870ac2b6e58ada6eec Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 12 Aug 2010 09:09:20 +0200 Subject: qdoc: All references to -assistant and -base were removed. Flags allowed are now -creator and -online. -creator is the default. --- doc/doc.pri | 2 +- tools/qdoc3/htmlgenerator.cpp | 18 +----------------- tools/qdoc3/htmlgenerator.h | 1 - tools/qdoc3/main.cpp | 15 ++++----------- 4 files changed, 6 insertions(+), 30 deletions(-) diff --git a/doc/doc.pri b/doc/doc.pri index e1efa21..a5db3c7 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -20,7 +20,7 @@ $$unixstyle { QDOC = $$replace(QDOC, "/", "\\") } ADP_DOCS_QDOCCONF_FILE = -online qt-build-docs.qdocconf -QT_DOCUMENTATION = ($$QDOC -assistant qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \ +QT_DOCUMENTATION = ($$QDOC -creator qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \ linguist.qdocconf qmake.qdocconf qdeclarative.qdocconf) && \ (cd $$QT_BUILD_TREE && \ $$GENERATOR doc-build/html-qt/qt.qhp -o doc/qch/qt.qch && \ diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 9e8d768..4603a40 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -293,12 +293,8 @@ void HtmlGenerator::initializeGenerator(const Config &config) application = Online; else if (app == "creator") application = Creator; - else if (app == "assistant") - application = Assistant; - else if (app == "base") - application = Assistant; else - application = Online; + application = Creator; projectDescription = config.getString(CONFIG_DESCRIPTION); if (projectDescription.isEmpty() && !project.isEmpty()) @@ -1841,10 +1837,6 @@ void HtmlGenerator::generateHeader(const QString& title, // CheckEmptyAndLoadList activating search out() << "\n"; break; - case Assistant: - out() << "\n"; - out() << "\n"; - break; case Creator: out() << "\n"; out() << "\n"; // offline narrow @@ -1866,11 +1858,6 @@ void HtmlGenerator::generateHeader(const QString& title, generateBreadCrumbs(title,node,marker); out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); break; - case Assistant: - out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - generateBreadCrumbs(title,node,marker); - out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - break; case Creator: out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); generateBreadCrumbs(title,node,marker); @@ -1988,9 +1975,6 @@ void HtmlGenerator::generateFooter(const Node *node) out() << " -->\n"; out() << "\n"; break; - case Assistant: - out() << "\n"; - break; case Creator: out() << "\n"; break; diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 07226f5..eab10c6 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -97,7 +97,6 @@ class HtmlGenerator : public PageGenerator enum Application { Online, - Assistant, Creator}; public: diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 38b76a4..fa7efee 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -194,10 +194,7 @@ static void processQdocconfFile(const QString &fileName) /* Set the application to which qdoc will create the output. - The three applications are: - - base or assistant: simple, basic html output - for offline viewing in the Assistant application. + The two applications are: creator: additional formatting for viewing in the Creator application. @@ -207,9 +204,9 @@ static void processQdocconfFile(const QString &fileName) */ if (appArg.isEmpty()) { qDebug() << "Warning: Application flag not specified on" - << "command line. Options are -assistant, -creator," - << "and -online (default)."; - appArg = "online"; + << "command line. Options are -creator (default)" + << "and -online."; + appArg = "creator"; } config.setStringList(CONFIG_APPLICATION, QStringList(appArg)); @@ -484,10 +481,6 @@ int main(int argc, char **argv) else if (opt == "-obsoletelinks") { obsoleteLinks = true; } - else if (opt == "-base") - appArg = "base"; - else if (opt == "-assistant") - appArg = "assistant"; else if (opt == "-creator") appArg = "creator"; else if (opt == "-online") -- cgit v0.12 From dd916743ad6182b38db40226e82b46596942ba39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 12 Aug 2010 12:34:36 +0200 Subject: Added way to destroy the share widget in the GL graphics system. This lets us destroy the share widget temporarily if we want to free up OpenGL resources for a while. Reviewed-by: Gunnar Sletta --- src/opengl/qwindowsurface_gl.cpp | 19 +++++++++++++++++++ src/opengl/qwindowsurface_gl_p.h | 1 + 2 files changed, 20 insertions(+) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 6b82ed3..b86fb78 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -199,6 +199,7 @@ public: return widget; } + // destroys the share widget and prevents recreation void cleanup() { QGLWidget *w = widget; cleanedUp = true; @@ -206,6 +207,20 @@ public: delete w; } + // destroys the share widget, but allows it to be recreated later on + void destroy() { + if (cleanedUp) + return; + + QGLWidget *w = widget; + + // prevent potential recursions + cleanedUp = true; + widget = 0; + delete w; + cleanedUp = false; + } + static bool cleanedUp; private: @@ -233,6 +248,10 @@ QGLWidget* qt_gl_share_widget() return _qt_gl_share_widget()->shareWidget(); } +void qt_destroy_gl_share_widget() +{ + _qt_gl_share_widget()->destroy(); +} struct QGLWindowSurfacePrivate { diff --git a/src/opengl/qwindowsurface_gl_p.h b/src/opengl/qwindowsurface_gl_p.h index 5e670fe..ffc2e86 100644 --- a/src/opengl/qwindowsurface_gl_p.h +++ b/src/opengl/qwindowsurface_gl_p.h @@ -67,6 +67,7 @@ class QWidget; struct QGLWindowSurfacePrivate; Q_OPENGL_EXPORT QGLWidget* qt_gl_share_widget(); +Q_OPENGL_EXPORT void qt_destroy_gl_share_widget(); class QGLWindowSurfaceGLPaintDevice : public QGLPaintDevice { -- cgit v0.12 From c622cb1c9c11ef6b51f1e2da61f94b83650f6703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 10 Aug 2010 11:50:16 +0200 Subject: Fixed autotest failure in tst_qgl::clipTest. Change fb00d5003ac5d91953a95d8164180f8f56a2b0f2 introduced a slight behavioural change by leaving the surface handle dangling. We need to unset the surface handle even if we don't own it to make sure we don't access it again. Reviewed-by: Gunnar Sletta --- src/opengl/qgl_egl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 3763926..a154325 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -240,6 +240,7 @@ void QGLContextPrivate::destroyEglSurfaceForDevice() if (QGLWidget *wgl = qobject_cast(w)) { if (wgl->d_func()->eglSurfaceWindowId != wgl->winId()) { qWarning("WARNING: Potential EGL surface leak! Not destroying surface."); + eglSurface = EGL_NO_SURFACE; return; } } -- cgit v0.12 From 2efd51c2808874c9217cdaea905754ae72d4e443 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Thu, 12 Aug 2010 15:32:23 +0200 Subject: Destroy the old runtime system only when existing pixmaps were migrated. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 2448 Reviewed-by: Samuel Rødal --- src/gui/painting/qgraphicssystem_runtime.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index e1e0ad0..2828e9d 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -366,7 +366,7 @@ void QRuntimeGraphicsSystem::setGraphicsSystem(const QString &name) #ifdef QT_DEBUG qDebug() << "QRuntimeGraphicsSystem::setGraphicsSystem( " << name << " )"; #endif - delete m_graphicsSystem; + QGraphicsSystem *oldSystem = m_graphicsSystem; m_graphicsSystem = QGraphicsSystemFactory::create(name); m_graphicsSystemName = name; @@ -393,6 +393,8 @@ void QRuntimeGraphicsSystem::setGraphicsSystem(const QString &name) proxy->m_windowSurface.reset(m_graphicsSystem->createWindowSurface(widget)); qt_widget_private(widget)->invalidateBuffer(widget->rect()); } + + delete oldSystem; } void QRuntimeGraphicsSystem::removePixmapData(QRuntimePixmapData *pixmapData) const -- cgit v0.12