forked from qt-creator/qt-creator
Maemo: Change default deploy directory prefix.
Also set build directory for profile reader.
This commit is contained in:
@@ -45,7 +45,8 @@ MaemoDeployableListModel::MaemoDeployableListModel(const Qt4ProFileNode *proFile
|
|||||||
: QAbstractTableModel(parent),
|
: QAbstractTableModel(parent),
|
||||||
m_proFileNode(proFileNode),
|
m_proFileNode(proFileNode),
|
||||||
m_modified(false),
|
m_modified(false),
|
||||||
m_proFileWrapper(new MaemoProFileWrapper(m_proFileNode->path(), proFileOption))
|
m_proFileWrapper(new MaemoProFileWrapper(m_proFileNode->path(),
|
||||||
|
m_proFileNode->buildDir(), proFileOption))
|
||||||
{
|
{
|
||||||
buildModel();
|
buildModel();
|
||||||
}
|
}
|
||||||
@@ -59,8 +60,8 @@ bool MaemoDeployableListModel::buildModel()
|
|||||||
const MaemoProFileWrapper::InstallsList &installs = m_proFileWrapper->installs();
|
const MaemoProFileWrapper::InstallsList &installs = m_proFileWrapper->installs();
|
||||||
if (installs.targetPath.isEmpty()) {
|
if (installs.targetPath.isEmpty()) {
|
||||||
const QString remoteDir = m_proFileNode->projectType() == LibraryTemplate
|
const QString remoteDir = m_proFileNode->projectType() == LibraryTemplate
|
||||||
? QLatin1String("/usr/local/lib")
|
? QLatin1String("/usr/lib")
|
||||||
: QLatin1String("/usr/local/bin");
|
: QLatin1String("/usr/bin");
|
||||||
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(),
|
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(),
|
||||||
remoteDir));
|
remoteDir));
|
||||||
QFile projectFile(m_proFileNode->path());
|
QFile projectFile(m_proFileNode->path());
|
||||||
|
@@ -27,9 +27,9 @@ namespace {
|
|||||||
|
|
||||||
|
|
||||||
MaemoProFileWrapper::MaemoProFileWrapper(const QString &proFileName,
|
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_proFileName(proFileName), m_proDir(QFileInfo(m_proFileName).dir()),
|
||||||
m_proFileOption(proFileOption)
|
m_buildDir(buildDir), m_proFileOption(proFileOption)
|
||||||
{
|
{
|
||||||
parseProFile(ParseFromFile);
|
parseProFile(ParseFromFile);
|
||||||
}
|
}
|
||||||
@@ -223,6 +223,7 @@ QString MaemoProFileWrapper::absFilePath(const QString &relFilePath) const
|
|||||||
void MaemoProFileWrapper::parseProFile(ParseType type) const
|
void MaemoProFileWrapper::parseProFile(ParseType type) const
|
||||||
{
|
{
|
||||||
m_proFileReader.reset(new ProFileReader(m_proFileOption.data()));
|
m_proFileReader.reset(new ProFileReader(m_proFileOption.data()));
|
||||||
|
m_proFileReader->setOutputDir(m_buildDir);
|
||||||
m_proFileReader->setCumulative(false);
|
m_proFileReader->setCumulative(false);
|
||||||
// TODO: Set output dir to build dir?
|
// TODO: Set output dir to build dir?
|
||||||
if (type == ParseFromLines) {
|
if (type == ParseFromLines) {
|
||||||
|
@@ -19,7 +19,7 @@ class ProFileReader;
|
|||||||
class MaemoProFileWrapper
|
class MaemoProFileWrapper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MaemoProFileWrapper(const QString &proFileName,
|
MaemoProFileWrapper(const QString &proFileName, const QString &buildDir,
|
||||||
const QSharedPointer<ProFileOption> &proFileOption);
|
const QSharedPointer<ProFileOption> &proFileOption);
|
||||||
~MaemoProFileWrapper();
|
~MaemoProFileWrapper();
|
||||||
|
|
||||||
@@ -68,6 +68,7 @@ private:
|
|||||||
|
|
||||||
const QString m_proFileName;
|
const QString m_proFileName;
|
||||||
const QDir m_proDir;
|
const QDir m_proDir;
|
||||||
|
const QString m_buildDir;
|
||||||
const QSharedPointer<ProFileOption> m_proFileOption;
|
const QSharedPointer<ProFileOption> m_proFileOption;
|
||||||
mutable QStringList m_proFileContents;
|
mutable QStringList m_proFileContents;
|
||||||
mutable QScopedPointer<ProFileReader> m_proFileReader;
|
mutable QScopedPointer<ProFileReader> m_proFileReader;
|
||||||
|
Reference in New Issue
Block a user