diff options
-rw-r--r-- | recipes-qt/qt5/qt5-creator/0001-clangformat-AllowShortIfStatementsOnASingleLine-is-n.patch | 53 | ||||
-rw-r--r-- | recipes-qt/qt5/qt5-creator_git.bb | 7 |
2 files changed, 3 insertions, 57 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 deleted file mode 100644 index 7338f02b..00000000 --- a/recipes-qt/qt5/qt5-creator/0001-clangformat-AllowShortIfStatementsOnASingleLine-is-n.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
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 | --- a/src/plugins/clangformat/clangformatutils.cpp | ||
22 | +++ b/src/plugins/clangformat/clangformatutils.cpp | ||
23 | @@ -57,10 +57,18 @@ static clang::format::FormatStyle qtcSty | ||
24 | style.AlignOperands = true; | ||
25 | style.AlignTrailingComments = true; | ||
26 | style.AllowAllParametersOfDeclarationOnNextLine = true; | ||
27 | +#if Q_CC_CLANG < 1000 | ||
28 | style.AllowShortBlocksOnASingleLine = false; | ||
29 | +#else | ||
30 | + style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never; | ||
31 | +#endif | ||
32 | style.AllowShortCaseLabelsOnASingleLine = false; | ||
33 | style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; | ||
34 | +#if Q_CC_CLANG < 900 | ||
35 | style.AllowShortIfStatementsOnASingleLine = false; | ||
36 | +#else | ||
37 | + style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never; | ||
38 | +#endif | ||
39 | style.AllowShortLoopsOnASingleLine = false; | ||
40 | style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_None; | ||
41 | style.AlwaysBreakBeforeMultilineStrings = false; | ||
42 | @@ -68,7 +76,11 @@ static clang::format::FormatStyle qtcSty | ||
43 | style.BinPackArguments = false; | ||
44 | style.BinPackParameters = false; | ||
45 | style.BraceWrapping.AfterClass = true; | ||
46 | +#if Q_CC_CLANG < 1000 | ||
47 | style.BraceWrapping.AfterControlStatement = false; | ||
48 | +#else | ||
49 | + style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_Never; | ||
50 | +#endif | ||
51 | style.BraceWrapping.AfterEnum = false; | ||
52 | style.BraceWrapping.AfterFunction = true; | ||
53 | style.BraceWrapping.AfterNamespace = false; | ||
diff --git a/recipes-qt/qt5/qt5-creator_git.bb b/recipes-qt/qt5/qt5-creator_git.bb index 3c3420ca..000e135e 100644 --- a/recipes-qt/qt5/qt5-creator_git.bb +++ b/recipes-qt/qt5/qt5-creator_git.bb | |||
@@ -18,14 +18,13 @@ DEPENDS += "qtbase qtscript qtxmlpatterns qtx11extras qtdeclarative qttools qtto | |||
18 | DEPENDS_append_toolchain-clang = " clang llvm-common" | 18 | DEPENDS_append_toolchain-clang = " clang llvm-common" |
19 | DEPENDS_append_libc-musl = " libexecinfo" | 19 | DEPENDS_append_libc-musl = " libexecinfo" |
20 | 20 | ||
21 | SRCREV = "8181363fa90eb651591bf71e1a840e1c998429f4" | 21 | SRCREV = "9e057a55368286058023510efc328f68250ecb5e" |
22 | PV = "4.9.2+git${SRCPV}" | 22 | PV = "4.12.0+git${SRCPV}" |
23 | 23 | ||
24 | # Patches from https://github.com/meta-qt5/qtcreator/commits/b4.9.2 | 24 | # Patches from https://github.com/meta-qt5/qtcreator/commits/b4.9.2 |
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.12 \ |
28 | file://0001-clangformat-AllowShortIfStatementsOnASingleLine-is-n.patch \ | ||
29 | " | 28 | " |
30 | SRC_URI_append_libc-musl = " file://0001-Link-with-libexecinfo-on-musl.patch" | 29 | SRC_URI_append_libc-musl = " file://0001-Link-with-libexecinfo-on-musl.patch" |
31 | 30 | ||