From a0fa7657a11ceb6bffc8387b4a76a274884a9508 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 10 Feb 2010 17:07:43 +0100 Subject: Added \since 4.7 tags --- src/opengl/qglshaderprogram.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 170b650..a0b332d 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -3080,6 +3080,8 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QMatrix4x4 * Returns the hardware limit for how many vertices a geometry shader can output. + \since 4.7 + \sa setGeometryShaderOutputVertexCount */ int QGLShaderProgram::maxGeometryOutputVertices() const @@ -3095,6 +3097,8 @@ int QGLShaderProgram::maxGeometryOutputVertices() const Sets the maximum number of vertices the current geometry shader program will produce, if active. + \since 4.7 + This parameter takes effect the next time the program is linked. */ void QGLShaderProgram::setGeometryOutputVertexCount(int count) @@ -3114,6 +3118,8 @@ void QGLShaderProgram::setGeometryOutputVertexCount(int count) Returns the maximum number of vertices the current geometry shader program will produce, if active. + \since 4.7 + This parameter takes effect the ntext time the program is linked. */ int QGLShaderProgram::geometryOutputVertexCount() const @@ -3137,6 +3143,8 @@ void QGLShaderProgram::setGeometryInputType(GLenum inputType) Returns the geometry shader input type, if active. This parameter takes effect the next time the program is linked. + + \since 4.7 */ GLenum QGLShaderProgram::geometryInputType() const @@ -3149,6 +3157,8 @@ GLenum QGLShaderProgram::geometryInputType() const Sets the output type from the geometry shader, if active. This parameter takes effect the next time the program is linked. + + \since 4.7 */ void QGLShaderProgram::setGeometryOutputType(GLenum outputType) { @@ -3160,6 +3170,8 @@ void QGLShaderProgram::setGeometryOutputType(GLenum outputType) Returns the geometry shader output type, if active. This parameter takes effect the next time the program is linked. + + \since 4.7 */ GLenum QGLShaderProgram::geometryOutputType() const { @@ -3209,6 +3221,8 @@ void QGLShaderProgram::shaderDestroyed() The \a context is used to resolve the GLSL extensions. If \a context is null, then QGLContext::currentContext() is used. + + \since 4.7 */ bool QGLShader::hasOpenGLShaders(ShaderType type, const QGLContext *context) { -- cgit v0.12 From 29d4342b2f87183e4bd4c2611aea157834c0f492 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 11 Feb 2010 11:45:01 +0100 Subject: Fixed cleaning of both undo- and redo-stacks. --- src/gui/text/qtextdocument_p.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index e2fdf0e..969d5b4 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -259,8 +259,7 @@ void QTextDocumentPrivate::clear() objects.clear(); title.clear(); - undoState = 0; - clearUndoRedoStacks(QTextDocument::RedoStack); + clearUndoRedoStacks(QTextDocument::UndoAndRedoStacks); text = QString(); unreachableCharacterCount = 0; modifiedState = 0; @@ -1077,7 +1076,7 @@ void QTextDocumentPrivate::clearUndoRedoStacks(QTextDocument::Stacks stacksToCle if (emitSignals) emitRedoAvailable(false); } else if (stacksToClear == QTextDocument::UndoAndRedoStacks - && (undoCommandsAvailable || redoCommandsAvailable)) { + && !undoStack.isEmpty()) { for (int i = 0; i < undoStack.size(); ++i) { QTextUndoCommand c = undoStack[i]; if (c.command & QTextUndoCommand::Custom) -- cgit v0.12 From ebfb42a9ada20c93643b05ebbb73709bd639742d Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Thu, 11 Feb 2010 14:36:11 +0100 Subject: Wrong cursor shown by the parent window after setOverrideCursor(). When calling QApplication::setOverrideCursor() and then showing a modal dialog, the parent window of the dialog reverts to the default cursor. At this point the parent window is in a disabled state, Windows uses the default cursor for the class. We need to override this behavior by handling WM_SETCURSOR. Task-number: QTBUG-6525 Reviewed-by: Denis Dzyubenko --- src/gui/kernel/qapplication_win.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 3355272..2c6e246 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -2547,6 +2547,17 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam result = true; break; } +#ifndef QT_NO_CURSOR + case WM_SETCURSOR: { + QCursor *ovr = QApplication::overrideCursor(); + if (ovr) { + SetCursor(ovr->handle()); + RETURN(TRUE); + } + result = false; + break; + } +#endif default: result = false; // event was not processed break; -- cgit v0.12 From 0601f9f764c55390a2cdd71d91c3ea25c57f2a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 11 Feb 2010 17:31:53 +0100 Subject: Fix bug in QDirPrivate::setPath, affecting QDir::cd, cdUp and setPath The changes introduced in 9d713d7e73a88fe8328b55d2ab9af8c215dcb89d made QDirPrivate rely on the order of sub-expression evaluation. In some platform/compiler combinations, the instance of QDirPrivate::Data::path being changed would be the pre-detach one. With this change, that commit is partially reverted. Also, inlined the code in initFileEngine since this makes the actions therein explicit. Reviewed-by: Olivier Goffart --- src/corelib/io/qdir.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index f5d803e..7cfdddf 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -89,8 +89,6 @@ public: QDirPrivate(const QDir *copy = 0); ~QDirPrivate(); - QString initFileEngine(const QString &file); - void updateFileLists() const; void sortFileList(QDir::SortFlags, QFileInfoList &, QStringList *, QFileInfoList *) const; @@ -146,6 +144,7 @@ public: } *data; inline void setPath(const QString &p) { + detach(false); QString path = p; if ((path.endsWith(QLatin1Char('/')) || path.endsWith(QLatin1Char('\\'))) && path.length() > 1) { @@ -155,8 +154,12 @@ public: path.truncate(path.length() - 1); } + delete data->fileEngine; + data->fileEngine = QAbstractFileEngine::create(path); + // set the path to be the qt friendly version so then we can operate on it using just / - data->path = initFileEngine(path); + data->path = data->fileEngine->fileName(QAbstractFileEngine::DefaultName); + data->clear(); } inline void reset() { detach(); @@ -310,15 +313,6 @@ inline void QDirPrivate::updateFileLists() const } } -inline QString QDirPrivate::initFileEngine(const QString &path) -{ - detach(false); - data->clear(); - delete data->fileEngine; - data->fileEngine = QAbstractFileEngine::create(path); - return data->fileEngine->fileName(QAbstractFileEngine::DefaultName); -} - void QDirPrivate::detach(bool createFileEngine) { qAtomicDetach(data); -- cgit v0.12