diff options
author | Marco Bubke <marco.bubke@qt.io> | 2019-05-07 11:28:50 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2019-06-11 11:25:21 +0000 |
commit | 4d3bb1c85859be07001a76fad24de457811a7d63 (patch) | |
tree | 90da51970795fe6ce23b5c990749d808dd6f596b /src | |
parent | e32fcbfbd181e555b02e09af3c031be70112afb0 (diff) |
ClangFormat: Provide an error message for Clang Format
If an patch is not applied to libFormat in Clang we do nothing. It would
be better to provide feedback if the plugin is loaded.
Change-Id: Iea9900cf7683b521497cc6403638498a9ca5e2e9
Fixes: QTCREATORBUG-22404
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/clangformat/clangformatplugin.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/clangformat/clangformatplugin.cpp b/src/plugins/clangformat/clangformatplugin.cpp index e82802ab30..49f4fe049f 100644 --- a/src/plugins/clangformat/clangformatplugin.cpp +++ b/src/plugins/clangformat/clangformatplugin.cpp @@ -152,8 +152,13 @@ bool ClangFormatPlugin::initialize(const QStringList &arguments, QString *errorS openClangFormatConfigAction->setData(doc->filePath().toString()); }); } -#endif return true; +#else + *errorString = "Disabling ClangFormat plugin as it is not built against a suitable version of " + "Clang's libFormat. For more information, see the Qt Creator README at " + "https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/README.md"; + return false; +#endif } } // namespace ClangFormat |