Skip to content
Snippets Groups Projects
Commit 4220fade authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Change default deploy directory prefix.

Also set build directory for profile reader.
parent c072293e
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,8 @@ MaemoDeployableListModel::MaemoDeployableListModel(const Qt4ProFileNode *proFile
: QAbstractTableModel(parent),
m_proFileNode(proFileNode),
m_modified(false),
m_proFileWrapper(new MaemoProFileWrapper(m_proFileNode->path(), proFileOption))
m_proFileWrapper(new MaemoProFileWrapper(m_proFileNode->path(),
m_proFileNode->buildDir(), proFileOption))
{
buildModel();
}
......@@ -59,8 +60,8 @@ bool MaemoDeployableListModel::buildModel()
const MaemoProFileWrapper::InstallsList &installs = m_proFileWrapper->installs();
if (installs.targetPath.isEmpty()) {
const QString remoteDir = m_proFileNode->projectType() == LibraryTemplate
? QLatin1String("/usr/local/lib")
: QLatin1String("/usr/local/bin");
? QLatin1String("/usr/lib")
: QLatin1String("/usr/bin");
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(),
remoteDir));
QFile projectFile(m_proFileNode->path());
......
......@@ -27,9 +27,9 @@ namespace {
MaemoProFileWrapper::MaemoProFileWrapper(const QString &proFileName,
const QSharedPointer<ProFileOption> &proFileOption)
const QString &buildDir, const QSharedPointer<ProFileOption> &proFileOption)
: m_proFileName(proFileName), m_proDir(QFileInfo(m_proFileName).dir()),
m_proFileOption(proFileOption)
m_buildDir(buildDir), m_proFileOption(proFileOption)
{
parseProFile(ParseFromFile);
}
......@@ -223,6 +223,7 @@ QString MaemoProFileWrapper::absFilePath(const QString &relFilePath) const
void MaemoProFileWrapper::parseProFile(ParseType type) const
{
m_proFileReader.reset(new ProFileReader(m_proFileOption.data()));
m_proFileReader->setOutputDir(m_buildDir);
m_proFileReader->setCumulative(false);
// TODO: Set output dir to build dir?
if (type == ParseFromLines) {
......
......@@ -19,7 +19,7 @@ class ProFileReader;
class MaemoProFileWrapper
{
public:
MaemoProFileWrapper(const QString &proFileName,
MaemoProFileWrapper(const QString &proFileName, const QString &buildDir,
const QSharedPointer<ProFileOption> &proFileOption);
~MaemoProFileWrapper();
......@@ -68,6 +68,7 @@ private:
const QString m_proFileName;
const QDir m_proDir;
const QString m_buildDir;
const QSharedPointer<ProFileOption> m_proFileOption;
mutable QStringList m_proFileContents;
mutable QScopedPointer<ProFileReader> m_proFileReader;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment