forked from qt-creator/qt-creator
CppEditor: Tell users about clangd configuration files
It's not feasible to map every possible setting into our UI, so instead teach people how to use the clangd configuration mechanism. Change-Id: Id11e81e25b687a4f49af4e090203faca3a75722d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -88,7 +88,6 @@
|
||||
#include <QPair>
|
||||
#include <QPointer>
|
||||
#include <QRegularExpression>
|
||||
#include <QStandardPaths>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <QtConcurrent>
|
||||
@@ -603,10 +602,9 @@ public:
|
||||
|
||||
void setupClangdConfigFile()
|
||||
{
|
||||
const Utils::FilePath baseDir = Utils::FilePath::fromString(
|
||||
QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation)) / "clangd";
|
||||
const Utils::FilePath targetConfigFile = CppEditor::ClangdSettings::clangdUserConfigFilePath();
|
||||
const Utils::FilePath baseDir = targetConfigFile.parentDir();
|
||||
baseDir.ensureWritableDir();
|
||||
const Utils::FilePath targetConfigFile = baseDir / "config.yaml";
|
||||
Utils::FileReader configReader;
|
||||
const QByteArray firstLine = "# This file was generated by Qt Creator and will be overwritten "
|
||||
"unless you remove this line.";
|
||||
|
||||
Reference in New Issue
Block a user