ClangFormat: Fix path for the overridden project configuration

Change-Id: I4748c994016851293a6ad5490208fb4e4bbc7999
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2019-03-06 14:45:47 +01:00
parent 7e5e99d551
commit 0abcf7b618

View File

@@ -102,6 +102,7 @@ void ClangFormatConfigWidget::showGlobalCheckboxes()
static bool projectConfigExists()
{
return Utils::FileName::fromString(Core::ICore::userResourcePath())
.appendPath("clang-format")
.appendPath(currentProjectUniqueId())
.appendPath((Constants::SETTINGS_FILE_NAME))
.exists();
@@ -208,7 +209,7 @@ void ClangFormatConfigWidget::apply()
QString filePath = Core::ICore::userResourcePath();
if (m_project)
filePath += "/" + currentProjectUniqueId();
filePath += "/clang-format/" + currentProjectUniqueId();
filePath += "/" + QLatin1String(Constants::SETTINGS_FILE_NAME);
QFile file(filePath);