diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index 145bbb5d6a3..eb10a113bcc 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -174,29 +174,6 @@ QString CMakeManager::mimeType() const return QLatin1String(Constants::CMAKEPROJECTMIMETYPE); } -// need to refactor this out -// we probably want the process instead of this function -// cmakeproject then could even run the cmake process in the background, adding the files afterwards -// sounds like a plan -void CMakeManager::createXmlFile(Utils::QtcProcess *proc, const QString &executable, - const QString &arguments, const QString &sourceDirectory, - const QDir &buildDirectory, const Utils::Environment &env) -{ - QString buildDirectoryPath = buildDirectory.absolutePath(); - buildDirectory.mkpath(buildDirectoryPath); - proc->setWorkingDirectory(buildDirectoryPath); - proc->setEnvironment(env); - - const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? - QString(QLatin1Char('.')) : sourceDirectory; - QString args; - Utils::QtcProcess::addArg(&args, srcdir); - Utils::QtcProcess::addArgs(&args, arguments); - - proc->setCommand(executable, args); - proc->start(); -} - QString CMakeManager::findCbpFile(const QDir &directory) { // Find the cbp file diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h index 0fa0b6f4586..9a666d96f02 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h @@ -32,12 +32,6 @@ class QAction; class QDir; QT_END_NAMESPACE -namespace ProjectExplorer { class Node; } -namespace Utils { -class Environment; -class QtcProcess; -} // namespace Utils - namespace CMakeProjectManager { namespace Internal { @@ -52,9 +46,6 @@ public: ProjectExplorer::Project *openProject(const QString &fileName, QString *errorString) override; QString mimeType() const override; - static void createXmlFile(Utils::QtcProcess *process, const QString &executable, - const QString &arguments, const QString &sourceDirectory, - const QDir &buildDirectory, const Utils::Environment &env); static QString findCbpFile(const QDir &); private: