qttools: remove buildpaths from the binaries

QDoc embeds a build time path to the qdoc binary and example
source path to the binary, which cause QA errors [buildpaths].

Pick-to: 6.8
Change-Id: Ib7e818e5b97ec9b753bc7ec8060d507770b71a3b
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
This commit is contained in:
Samuli Piippo 2024-10-17 12:26:15 +00:00
parent 39560e5566
commit 6e5df35989
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,25 @@
From f4b0fc8061e30edbaf7a9b23827cebfadccdd2f4 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Thu, 17 Oct 2024 10:52:56 +0000
Subject: [PATCH] qdoc: remove buildpath from default args
QDoc stored buildtime path in the code that leads to QA issues.
Task-number: QTBUG-130282
Upstream-Status: Pending
---
src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp b/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
index 385d651ec..73f207720 100644
--- a/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
+++ b/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
@@ -1487,7 +1487,6 @@ static const char *defaultArgs_[] = {
"-Wno-nullability-completeness",
"-fvisibility=default",
"-ferror-limit=0",
- ("-I" CLANG_RESOURCE_DIR)
};
/*!

View File

@ -0,0 +1,29 @@
From be7e162bd89b4778dd43513b35349ccaa6b3589f Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Fri, 18 Oct 2024 09:02:20 +0000
Subject: [PATCH] examples: don't track source path
Avoid using source path in the example binary as that causes
QA error [buildpaths]
Upstream-Status: Pending
Change-Id: Id5aebc2afa7d4ded38d6bdd43fbbb2813f4bad5d
---
examples/assistant/simpletextviewer/CMakeLists.txt | 4 ----
1 file changed, 4 deletions(-)
diff --git a/examples/assistant/simpletextviewer/CMakeLists.txt b/examples/assistant/simpletextviewer/CMakeLists.txt
index 8d459a261..89076bcd1 100644
--- a/examples/assistant/simpletextviewer/CMakeLists.txt
+++ b/examples/assistant/simpletextviewer/CMakeLists.txt
@@ -27,10 +27,6 @@ set_target_properties(simpletextviewer PROPERTIES
MACOSX_BUNDLE TRUE
)
-target_compile_definitions(simpletextviewer PUBLIC
- SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/"
-)
-
target_link_libraries(simpletextviewer PUBLIC
Qt::Core
Qt::Gui

View File

@ -20,6 +20,8 @@ include recipes-qt/qt6/qt6.inc
SRC_URI += " \
${QT_GIT}/playground/qlitehtml.git;name=qttools-qlitehtml;branch=master;protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/assistant/qlitehtml \
git://github.com/litehtml/litehtml.git;name=qttools-qlitehtml-litehtml;branch=master;destsuffix=git/src/assistant/qlitehtml/src/3rdparty/litehtml;protocol=https \
file://0001-qdoc-remove-buildpath-from-default-args.patch \
file://0002-examples-don-t-track-source-path.patch \
"
DEPENDS += "qtbase qtdeclarative qttools-native"