diff options
-rw-r--r-- | recipes-qt/qt5/qt5-creator/0001-clangformat-AllowShortIfStatementsOnASingleLine-is-n.patch | 36 | ||||
-rw-r--r-- | recipes-qt/qt5/qt5-creator_git.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qt5-creator/0001-clangformat-AllowShortIfStatementsOnASingleLine-is-n.patch b/recipes-qt/qt5/qt5-creator/0001-clangformat-AllowShortIfStatementsOnASingleLine-is-n.patch new file mode 100644 index 00000000..1bc3632d --- /dev/null +++ b/recipes-qt/qt5/qt5-creator/0001-clangformat-AllowShortIfStatementsOnASingleLine-is-n.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 453c075b67b9d9254bf7331e1e3be287f240a9e0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 3 Sep 2019 13:31:12 -0700 | ||
4 | Subject: [PATCH] clangformat: AllowShortIfStatementsOnASingleLine is not | ||
5 | boolean anymore | ||
6 | |||
7 | https://reviews.llvm.org/D59087 has implemented multiple states for AllowShortIfStatementsOnASingleLine | ||
8 | |||
9 | Fixes | ||
10 | ../../../../git/src/plugins/clangformat/clangformatutils.cpp:63:49: error: assigning to 'clang::format::FormatStyle::ShortIfStyle' from incompatible type 'bool' | ||
11 | style.AllowShortIfStatementsOnASingleLine = false; | ||
12 | ^~~~~ | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | src/plugins/clangformat/clangformatutils.cpp | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp | ||
22 | index 09a3150c89..7d8a95ae18 100644 | ||
23 | --- a/src/plugins/clangformat/clangformatutils.cpp | ||
24 | +++ b/src/plugins/clangformat/clangformatutils.cpp | ||
25 | @@ -60,7 +60,7 @@ static clang::format::FormatStyle qtcStyle() | ||
26 | style.AllowShortBlocksOnASingleLine = false; | ||
27 | style.AllowShortCaseLabelsOnASingleLine = false; | ||
28 | style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; | ||
29 | - style.AllowShortIfStatementsOnASingleLine = false; | ||
30 | + style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never; | ||
31 | style.AllowShortLoopsOnASingleLine = false; | ||
32 | style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_None; | ||
33 | style.AlwaysBreakBeforeMultilineStrings = false; | ||
34 | -- | ||
35 | 2.23.0 | ||
36 | |||
diff --git a/recipes-qt/qt5/qt5-creator_git.bb b/recipes-qt/qt5/qt5-creator_git.bb index 107fee53..a3960042 100644 --- a/recipes-qt/qt5/qt5-creator_git.bb +++ b/recipes-qt/qt5/qt5-creator_git.bb | |||
@@ -25,6 +25,7 @@ PV = "4.9.2+git${SRCPV}" | |||
25 | # 4.9.2.meta-qt5.1 | 25 | # 4.9.2.meta-qt5.1 |
26 | SRC_URI = " \ | 26 | SRC_URI = " \ |
27 | git://code.qt.io/qt-creator/qt-creator.git;branch=4.9 \ | 27 | git://code.qt.io/qt-creator/qt-creator.git;branch=4.9 \ |
28 | file://0001-clangformat-AllowShortIfStatementsOnASingleLine-is-n.patch \ | ||
28 | " | 29 | " |
29 | SRC_URI_append_libc-musl = " file://0001-Link-with-libexecinfo-on-musl.patch" | 30 | SRC_URI_append_libc-musl = " file://0001-Link-with-libexecinfo-on-musl.patch" |
30 | 31 | ||