forked from qt-creator/qt-creator
CMake: Remove unused function CMakeManager::createXmlFile
Change-Id: I084b5dd4f07d709fdf5a1fd65884df8c741bbb86 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -174,29 +174,6 @@ QString CMakeManager::mimeType() const
|
|||||||
return QLatin1String(Constants::CMAKEPROJECTMIMETYPE);
|
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)
|
QString CMakeManager::findCbpFile(const QDir &directory)
|
||||||
{
|
{
|
||||||
// Find the cbp file
|
// Find the cbp file
|
||||||
|
|||||||
@@ -32,12 +32,6 @@ class QAction;
|
|||||||
class QDir;
|
class QDir;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace ProjectExplorer { class Node; }
|
|
||||||
namespace Utils {
|
|
||||||
class Environment;
|
|
||||||
class QtcProcess;
|
|
||||||
} // namespace Utils
|
|
||||||
|
|
||||||
namespace CMakeProjectManager {
|
namespace CMakeProjectManager {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -52,9 +46,6 @@ public:
|
|||||||
ProjectExplorer::Project *openProject(const QString &fileName, QString *errorString) override;
|
ProjectExplorer::Project *openProject(const QString &fileName, QString *errorString) override;
|
||||||
QString mimeType() const 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 &);
|
static QString findCbpFile(const QDir &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user