forked from qt-creator/qt-creator
Clang: Consolidate all ClangCompilerOptionsBuilder into one implementation
We used the same code in different but don't shared it. From a bug fixing perspective it's actually not that smart. Change-Id: Iaaffc883229e259ff77f95b5cf0a8f0d8b5117df Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -27,11 +27,11 @@
|
||||
|
||||
#include "projectpartutilities.h"
|
||||
|
||||
#include <refactoringcompileroptionsbuilder.h>
|
||||
|
||||
#include <refactoringserverinterface.h>
|
||||
#include <requestsourcelocationforrenamingmessage.h>
|
||||
|
||||
#include <cpptools/clangcompileroptionsbuilder.h>
|
||||
#include <cpptools/cpptoolsreuse.h>
|
||||
|
||||
#include <QTextCursor>
|
||||
@@ -56,13 +56,18 @@ void RefactoringEngine::startLocalRenaming(const QTextCursor &textCursor,
|
||||
CppTools::ProjectPart *projectPart,
|
||||
RenameCallback &&renameSymbolsCallback)
|
||||
{
|
||||
using CppTools::ClangCompilerOptionsBuilder;
|
||||
|
||||
setUsable(false);
|
||||
|
||||
client.setLocalRenamingCallback(std::move(renameSymbolsCallback));
|
||||
|
||||
auto commandLine = RefactoringCompilerOptionsBuilder::build(projectPart,
|
||||
fileKindInProjectPart(projectPart, filePath.toString()),
|
||||
CppTools::getPchUsage());
|
||||
Utils::SmallStringVector commandLine{ClangCompilerOptionsBuilder::build(
|
||||
projectPart,
|
||||
fileKindInProjectPart(projectPart, filePath.toString()),
|
||||
CppTools::getPchUsage(),
|
||||
CLANG_VERSION,
|
||||
CLANG_RESOURCE_DIR)};
|
||||
|
||||
commandLine.push_back(filePath.toString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user