LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   qt-creator won't build on Current (https://www.linuxquestions.org/questions/slackware-14/qt-creator-wont-build-on-current-4175675452/)

aikempshall 05-18-2020 02:31 AM

qt-creator won't build on Current
 
I have an experimental system using slackware current, multilib, ktown and various SlackBuilds from ponce.org


In the last day or so I've tried to compile qt-creator. It fails because

Quote:

clangformatutils.cpp: In function 'clang::format::FormatStyle ClangFormat::qtcStyle()':
clangformatutils.cpp:60:43: error: cannot convert 'bool' to 'clang::format::FormatStyle::ShortBlockStyle' in assignment
60 | style.AllowShortBlocksOnASingleLine = false;
| ^~~~~
clangformatutils.cpp:71:49: error: cannot convert 'bool' to 'clang::format::FormatStyle::BraceWrappingAfterControlStatementStyle' in assignment
71 | style.BraceWrapping.AfterControlStatement = false;

I've made a patch which appears to fix the problem. Raised this with the SlackBuild maintainer as my patch follows on from the maintainers patch clang-9.patch which is still required.

Code:

--- a/src/plugins/clangformat/clangformatutils.cpp      2020-05-17 15:52:42.270567700 +0100
+++ b/src/plugins/clangformat/clangformatutils.cpp      2020-05-17 15:54:48.325316377 +0100
@@ -57,7 +57,7 @@
    style.AlignOperands = true;
    style.AlignTrailingComments = true;
    style.AllowAllParametersOfDeclarationOnNextLine = true;
-    style.AllowShortBlocksOnASingleLine = false;
+    style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
    style.AllowShortCaseLabelsOnASingleLine = false;
    style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
    style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never;
@@ -68,7 +68,7 @@
    style.BinPackArguments = false;
    style.BinPackParameters = false;
    style.BraceWrapping.AfterClass = true;
-    style.BraceWrapping.AfterControlStatement = false;
+    style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_Never;
    style.BraceWrapping.AfterEnum = false;
    style.BraceWrapping.AfterFunction = true;
    style.BraceWrapping.AfterNamespace = false;

qt-creator stands up after installing. Not tested.


All times are GMT -5. The time now is 10:07 AM.