Commit 5d2a23df authored by Andre Hartmann's avatar Andre Hartmann Committed by Daniel Teske
Browse files

Generic Project Wizard adds files with relative path.



Existing files are added to the project using their relative
path to the project file.

Task-Number: QTCREATORBUG-6405

Change-Id: I09853d0ebb2387d7da80fc91498ce9994c162cb7
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 58a6a7e4
......@@ -206,7 +206,6 @@ Core::GeneratedFiles GenericProjectWizard::generateFiles(const QWizard *w,
const QString filesFileName = QFileInfo(dir, projectName + QLatin1String(".files")).absoluteFilePath();
const QString includesFileName = QFileInfo(dir, projectName + QLatin1String(".includes")).absoluteFilePath();
const QString configFileName = QFileInfo(dir, projectName + QLatin1String(".config")).absoluteFilePath();
const QStringList sources = wizard->selectedFiles();
const QStringList paths = wizard->selectedPaths();
Core::ICore *core = Core::ICore::instance();
......@@ -231,6 +230,10 @@ Core::GeneratedFiles GenericProjectWizard::generateFiles(const QWizard *w,
generatedCreatorFile.setContents(QLatin1String("[General]\n"));
generatedCreatorFile.setAttributes(Core::GeneratedFile::OpenProjectAttribute);
QStringList sources = wizard->selectedFiles();
for (int i = 0; i < sources.length(); ++i)
sources[i] = dir.relativeFilePath(sources[i]);
Core::GeneratedFile generatedFilesFile(filesFileName);
generatedFilesFile.setContents(sources.join(QLatin1String("\n")));
......
Markdown is supported
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