From cf5b70ae1ac7cbd6143d73d1aff52d08ec909fd2 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 3 Jun 2011 19:05:31 +0200 Subject: Doc: Added a snippet to show how to test the Qt version. --- doc/src/snippets/qmake/qt_version.pro | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/src/snippets/qmake/qt_version.pro diff --git a/doc/src/snippets/qmake/qt_version.pro b/doc/src/snippets/qmake/qt_version.pro new file mode 100644 index 0000000..ac0338b --- /dev/null +++ b/doc/src/snippets/qmake/qt_version.pro @@ -0,0 +1,7 @@ +#! [checking for a specific version of Qt] +contains(QT_VERSION, "4.7.4") { + message(4.7.4) +} else { + message(Some other version) +} +#! [checking for a specific version of Qt] -- cgit v0.12 From c68d24b7bafa3058d44c0a30ade329972403b6c6 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 7 Jun 2011 23:43:39 +0200 Subject: Doc: Fixed file name of a header file to use lower case characters. --- examples/widgets/symbianvibration/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/widgets/symbianvibration/mainwindow.cpp b/examples/widgets/symbianvibration/mainwindow.cpp index 67cf220..c5338c2 100644 --- a/examples/widgets/symbianvibration/mainwindow.cpp +++ b/examples/widgets/symbianvibration/mainwindow.cpp @@ -1,7 +1,7 @@ #include #include "mainwindow.h" #include "vibrationsurface.h" -#include "XQVibra.h" +#include "xqvibra.h" //! [0] MainWindow::MainWindow(QWidget *parent) -- cgit v0.12 From 9aa5f949f092032589917a0bfe16e78828d0dabe Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 8 Jun 2011 02:44:38 +0200 Subject: Doc: Speculative attempt to fix build breakage. Case sensitivity problems strike again. --- examples/widgets/symbianvibration/xqvibra_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/widgets/symbianvibration/xqvibra_p.h b/examples/widgets/symbianvibration/xqvibra_p.h index 7b4e9d8..dc37b30 100644 --- a/examples/widgets/symbianvibration/xqvibra_p.h +++ b/examples/widgets/symbianvibration/xqvibra_p.h @@ -3,7 +3,7 @@ // INCLUDES #include "xqvibra.h" -#include +#include #include // CLASS DECLARATION -- cgit v0.12 From 7b4e52045d17bcc4b3bb1e0973c3af2e48381c5e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 8 Jun 2011 16:36:29 +0200 Subject: qdoc: Fixed code to match comments in QML files. Fixed API types. --- tools/qdoc3/qmlvisitor.cpp | 11 +++++------ tools/qdoc3/qmlvisitor.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/qdoc3/qmlvisitor.cpp b/tools/qdoc3/qmlvisitor.cpp index fe96f9a..98e188d 100644 --- a/tools/qdoc3/qmlvisitor.cpp +++ b/tools/qdoc3/qmlvisitor.cpp @@ -67,15 +67,15 @@ QmlDocVisitor::~QmlDocVisitor() { } -QDeclarativeJS::AST::SourceLocation QmlDocVisitor::precedingComment(unsigned offset) const +QDeclarativeJS::AST::SourceLocation QmlDocVisitor::precedingComment(quint32 offset) const { QDeclarativeJS::AST::SourceLocation currentLoc; foreach (const QDeclarativeJS::AST::SourceLocation &loc, engine->comments()) { - if (loc.begin() > lastEndOffset && loc.end() < offset) - currentLoc = loc; - else + if (loc.begin() >= offset) break; + else if (loc.begin() > lastEndOffset && loc.end() < offset) + currentLoc = loc; } if (currentLoc.isValid()) { QString comment = document.mid(currentLoc.offset, currentLoc.length); @@ -195,7 +195,7 @@ bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member) qmlPropGroup->setDefault(); QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlPropGroup, name, type, false); qmlPropNode->setWritable(!member->isReadonlyMember); - applyDocumentation(member->firstSourceLocation(), qmlPropNode); + applyDocumentation(member->firstSourceLocation(), qmlPropGroup); } } break; @@ -204,7 +204,6 @@ bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member) return false; } - //current->doc = precedingComment(member->firstSourceLocation().begin()); return true; } diff --git a/tools/qdoc3/qmlvisitor.h b/tools/qdoc3/qmlvisitor.h index 34ed8c1..1d3a401 100644 --- a/tools/qdoc3/qmlvisitor.h +++ b/tools/qdoc3/qmlvisitor.h @@ -67,7 +67,7 @@ public: bool visit(QDeclarativeJS::AST::IdentifierPropertyName *idproperty); private: - QDeclarativeJS::AST::SourceLocation precedingComment(unsigned offset) const; + QDeclarativeJS::AST::SourceLocation precedingComment(quint32 offset) const; void applyDocumentation(QDeclarativeJS::AST::SourceLocation location, Node *node); QDeclarativeJS::Engine *engine; -- cgit v0.12