Commit 83da9cf6 authored by Przemyslaw Gorszkowski's avatar Przemyslaw Gorszkowski
Browse files

Beautifier: create temporary file in input file dir

It fixes finding .clang-format file for "clang-format -style=file"

Task-number: QTCREATORBUG-12057
Change-Id: Idd02de1535eef30e1a1eaf146ef0f9ac9d54c5fa
Reviewed-by: default avatarOrgad Shaneh <>
Reviewed-by: default avatarEike Ziller <>
parent 560fd9bc
......@@ -123,7 +123,8 @@ QString BeautifierPlugin::format(const QString &text, QStringList command, const
// Save text to temporary file
QFileInfo fi(fileName);
Utils::TempFileSaver sourceFile(QLatin1String("qtc_beautifier_XXXXXXXX.") + fi.suffix());
Utils::TempFileSaver sourceFile(fi.absolutePath() + QLatin1String("/qtc_beautifier_XXXXXXXX.")
+ fi.suffix());
if (!sourceFile.finalize()) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment