forked from qt-creator/qt-creator
ProjectExplorer: filepathify actualTabSettings
Change-Id: I4b08b96d56bfeed0348d82bb96ff70d5f8ad583b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -246,8 +246,7 @@ void CppRefactoringChangesData::indentSelection(const QTextCursor &selection,
|
||||
if (textDocument) { // use the indenter from the textDocument if there is one, can be ClangFormat
|
||||
textDocument->indenter()->indent(selection, QChar::Null, textDocument->tabSettings());
|
||||
} else {
|
||||
const auto &tabSettings = ProjectExplorer::actualTabSettings(filePath.toString(),
|
||||
textDocument);
|
||||
const auto &tabSettings = ProjectExplorer::actualTabSettings(filePath, textDocument);
|
||||
auto indenter = createIndenter(filePath, selection.document());
|
||||
indenter->indent(selection, QChar::Null, tabSettings);
|
||||
}
|
||||
@@ -260,8 +259,7 @@ void CppRefactoringChangesData::reindentSelection(const QTextCursor &selection,
|
||||
if (textDocument) { // use the indenter from the textDocument if there is one, can be ClangFormat
|
||||
textDocument->indenter()->reindent(selection, textDocument->tabSettings());
|
||||
} else {
|
||||
const auto &tabSettings = ProjectExplorer::actualTabSettings(filePath.toString(),
|
||||
textDocument);
|
||||
const auto &tabSettings = ProjectExplorer::actualTabSettings(filePath, textDocument);
|
||||
auto indenter = createIndenter(filePath, selection.document());
|
||||
indenter->reindent(selection, tabSettings);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user