Commit 8f3c5467 authored by ck's avatar ck
Browse files

Maemo: Add packaging template files to project.

Reviewed-by: kh1
parent 2d5c6ed4
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h> #include <projectexplorer/session.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qt4projectmanager/qt4nodes.h>
#include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h> #include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qt4projectmanager/qt4target.h> #include <qt4projectmanager/qt4target.h>
...@@ -141,11 +143,17 @@ void MaemoTemplatesManager::createTemplatesIfNecessary(ProjectExplorer::Target * ...@@ -141,11 +143,17 @@ void MaemoTemplatesManager::createTemplatesIfNecessary(ProjectExplorer::Target *
} }
QDir debianDir(packagingTemplatesDir + QLatin1String("/debian")); QDir debianDir(packagingTemplatesDir + QLatin1String("/debian"));
const QStringList &files const QStringList &files = debianDir.entryList(QDir::Files);
= debianDir.entryList(QStringList() << QLatin1String("*.??"), QStringList filesToAddToProject;
QDir::Files); foreach (const QString &fileName, files) {
foreach (const QString &fileName, files) if (fileName.endsWith(QLatin1String(".ex"), Qt::CaseInsensitive)) {
debianDir.remove(fileName); debianDir.remove(fileName);
} else
filesToAddToProject << debianDir.absolutePath()
+ QLatin1Char('/') + fileName;
}
qobject_cast<Qt4Project *>(m_activeProject)->rootProjectNode()
->addFiles(UnknownFileType, filesToAddToProject);
const QString rulesFilePath const QString rulesFilePath
= packagingTemplatesDir + QLatin1String("/debian/rules"); = packagingTemplatesDir + QLatin1String("/debian/rules");
......
Supports Markdown
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