forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -152,8 +152,13 @@ bool ClangFormatPlugin::initialize(const QStringList &arguments, QString *errorS
|
|||||||
openClangFormatConfigAction->setData(doc->filePath().toString());
|
openClangFormatConfigAction->setData(doc->filePath().toString());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return true;
|
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
|
} // namespace ClangFormat
|
||||||
|
Reference in New Issue
Block a user