From 1e2671435fb828f088e6ca034a8724991907389f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 9 May 2019 11:31:25 +0200 Subject: Test that extraction of translations works from .qrc files with QtQuickCompiler After commit f01e72a82b59c214ce4b0a6ecefb604bc66ddd3e in qtdeclarative, we can test this scenario now. Task-number: QTBUG-75501 Change-Id: I64baa98da6b17c24b1e309c4dc93525a4fa8d057 Reviewed-by: Ulf Hermann --- tests/auto/linguist/lupdate/testdata/good/parseqrc/project.pro | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.pro b/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.pro index 5000c7396..0dbc9e9d0 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.pro +++ b/tests/auto/linguist/lupdate/testdata/good/parseqrc/project.pro @@ -5,3 +5,5 @@ RESOURCES += project.qrc RESOURCES += main.qml TRANSLATIONS = project.ts + +CONFIG += qtquickcompiler -- cgit v1.2.1 From b22049ea14b62a2a743fd5fbd23563c566ef528a Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 6 May 2019 12:31:08 +0200 Subject: qdoc: Add id attribute for all HTML headings The HTML generator only added an id tag for h2 (\section1) headings for unknown reasons. \section2 and up relied on the obsolete method of using anchors for the section headings. Remove this restriction to make the output more consistent. Change-Id: I577d62cf59cefd199224dacf29ced61518b4b7fc Reviewed-by: Paul Wicking Reviewed-by: Martin Smith --- src/qdoc/htmlgenerator.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp index 39ac26445..23cd581e6 100644 --- a/src/qdoc/htmlgenerator.cpp +++ b/src/qdoc/htmlgenerator.cpp @@ -1157,11 +1157,8 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark break; case Atom::SectionHeadingLeft: { int unit = atom->string().toInt() + hOffset(relative); - out() << "'; + out() << ""; inSectionHeading_ = true; break; } -- cgit v1.2.1 From c16960e5ec013c2fbe1343be3f43b133c98a9189 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Tue, 28 May 2019 23:45:34 +0200 Subject: doc: fix widget leak in calculatorform snippet This patch makes the widget in the main function stack based so it's properly destroyed when the application exits. Change-Id: Iae3a1419f1411a186cec4201134cf807d4d0f8e7 Reviewed-by: Paul Wicking Reviewed-by: Sze Howe Koh --- .../src/designer/doc/snippets/uitools/calculatorform/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/designer/src/designer/doc/snippets/uitools/calculatorform/main.cpp b/src/designer/src/designer/doc/snippets/uitools/calculatorform/main.cpp index d13c530ae..e34c812a3 100644 --- a/src/designer/src/designer/doc/snippets/uitools/calculatorform/main.cpp +++ b/src/designer/src/designer/doc/snippets/uitools/calculatorform/main.cpp @@ -57,11 +57,11 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - QWidget *widget = new QWidget; + QWidget widget; Ui::CalculatorForm ui; - ui.setupUi(widget); + ui.setupUi(&widget); - widget->show(); + widget.show(); return app.exec(); } //! [1] -- cgit v1.2.1 From e33ac6f1b1ebb882684f24f7d026267584d9393a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 31 May 2019 13:25:47 +0200 Subject: qdoc: Accept include paths without -I This update lets qdoc accept include paths with or without the -I and with or without a space between the -I and the path. Without the space is preferred. Task-number: QTBUG-74675 Change-Id: I4a1dcc04a3c9a6586e24b50bccf0f1f37d02ed4c Reviewed-by: Paul Wicking --- src/qdoc/clangcodeparser.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index 5bda5296b..add84b9a9 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1021,8 +1021,19 @@ void ClangCodeParser::initializeParser(const Config &config) printParsingErrors_ = 1; version_ = config.getString(CONFIG_VERSION); const auto args = config.getStringList(CONFIG_INCLUDEPATHS); - includePaths_.resize(args.size()); - std::transform(args.begin(), args.end(), includePaths_.begin(), + QStringList squeezedArgs; + int i = 0; + while (i < args.size()) { + if (args.at(i) != QLatin1String("-I")) { + if (args.at(i).startsWith(QLatin1String("-I"))) + squeezedArgs << args.at(i); + else + squeezedArgs << QLatin1String("-I") + args.at(i); + } + i++; + } + includePaths_.resize(squeezedArgs.size()); + std::transform(squeezedArgs.begin(), squeezedArgs.end(), includePaths_.begin(), [](const QString &s) { return s.toUtf8(); }); CppCodeParser::initializeParser(config); pchFileDir_.reset(nullptr); -- cgit v1.2.1