forked from qt-creator/qt-creator
ClangFormat: Enable plugin by default
... and remove the compile- and run-time warnings.
Users can easily opt out of using clang-format via the settings dialog
these days (globally and per project), so loading the plugin does no
harm.
As of b88b73d9c1
, clang formatting should
work without our custom patch, so there is no need to warn against that
either.
Change-Id: I5336857c6e27d9162084c2dacf187acb0015dc6a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
\"Name\" : \"ClangFormat\",
|
\"Name\" : \"ClangFormat\",
|
||||||
\"Version\" : \"$$QTCREATOR_VERSION\",
|
\"Version\" : \"$$QTCREATOR_VERSION\",
|
||||||
\"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
|
\"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
|
||||||
\"DisabledByDefault\" : true,
|
|
||||||
\"Vendor\" : \"The Qt Company Ltd\",
|
\"Vendor\" : \"The Qt Company Ltd\",
|
||||||
\"Copyright\" : \"(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd\",
|
\"Copyright\" : \"(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd\",
|
||||||
\"License\" : [ \"Commercial Usage\",
|
\"License\" : [ \"Commercial Usage\",
|
||||||
|
@@ -127,25 +127,6 @@ bool ClangFormatPlugin::initialize(const QStringList &arguments, QString *errorS
|
|||||||
openClangFormatConfigAction->setData(doc->filePath().toVariant());
|
openClangFormatConfigAction->setData(doc->filePath().toVariant());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#ifndef KEEP_LINE_BREAKS_FOR_NON_EMPTY_LINES_BACKPORTED
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma message( \
|
|
||||||
"ClangFormat: building against unmodified Clang, see README.md for more info")
|
|
||||||
#else
|
|
||||||
#warning ClangFormat: building against unmodified Clang, see README.md for more info
|
|
||||||
#endif
|
|
||||||
static const Id clangFormatFormatWarningKey = "ClangFormatFormatWarning";
|
|
||||||
if (!ICore::infoBar()->canInfoBeAdded(clangFormatFormatWarningKey))
|
|
||||||
return true;
|
|
||||||
InfoBarEntry
|
|
||||||
info(clangFormatFormatWarningKey,
|
|
||||||
tr("The ClangFormat plugin has been built against an unmodified Clang. "
|
|
||||||
"You might experience formatting glitches in certain circumstances. "
|
|
||||||
"See https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/README.md for more "
|
|
||||||
"information."),
|
|
||||||
InfoBarEntry::GlobalSuppression::Enabled);
|
|
||||||
ICore::infoBar()->addInfo(info);
|
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user