Merge remote-tracking branch 'origin/3.1'

Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/qtsupport/qtversionmanager.cpp
	src/shared/qbs

Change-Id: If7a93fb018799fe6ada76e79c24ab5b43dfa6fc2
This commit is contained in:
Eike Ziller
2014-04-02 13:24:34 +02:00
268 changed files with 6338 additions and 7906 deletions

View File

@@ -31,6 +31,7 @@
#include "androidextralibrarylistmodel.h"
#include <qmakeprojectmanager/qmakeproject.h>
#include <qmakeprojectmanager/qmakenodes.h>
#include <proparser/prowriter.h>
using namespace Android;
using namespace Internal;
@@ -70,7 +71,7 @@ int AndroidExtraLibraryListModel::columnCount(const QModelIndex &) const
QVariant AndroidExtraLibraryListModel::data(const QModelIndex &index, int role) const
{
Q_ASSERT(index.row() >= 0 && index.row() < m_entries.size());
const QString &entry = m_entries.at(index.row());
const QString &entry = QDir::cleanPath(m_entries.at(index.row()));
switch (role) {
case Qt::DisplayRole: return entry;
default: return QVariant();
@@ -83,6 +84,10 @@ void AndroidExtraLibraryListModel::proFileUpdated(QmakeProjectManager::QmakeProF
if (node != root)
return;
m_scope = QLatin1String("contains(ANDROID_TARGET_ARCH,")
+ node->singleVariableValue(QmakeProjectManager::AndroidArchVar)
+ QLatin1Char(')');
if (parseInProgress) {
emit enabledChanged(false);
return;
@@ -120,11 +125,13 @@ void AndroidExtraLibraryListModel::addEntries(const QStringList &list)
beginInsertRows(QModelIndex(), m_entries.size(), m_entries.size() + list.size());
foreach (QString path, list)
m_entries += QDir(m_project->projectDirectory()).relativeFilePath(path);
foreach (const QString &path, list)
m_entries += QLatin1String("$$PWD/") + QDir(m_project->projectDirectory()).relativeFilePath(path);
QmakeProjectManager::QmakeProFileNode *node = m_project->rootQmakeProjectNode();
node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries.join(QLatin1String(" ")));
node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries, m_scope,
QmakeProjectManager::Internal::ProWriter::ReplaceValues
| QmakeProjectManager::Internal::ProWriter::MultiLine);
endInsertRows();
}
@@ -156,5 +163,5 @@ void AndroidExtraLibraryListModel::removeEntries(QModelIndexList list)
}
QmakeProjectManager::QmakeProFileNode *node = m_project->rootQmakeProjectNode();
node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries.join(QLatin1String(" ")));
node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries, m_scope);
}

View File

@@ -68,6 +68,7 @@ private slots:
private:
QmakeProjectManager::QmakeProject *m_project;
QStringList m_entries;
QString m_scope;
};
} // namespace Internal

View File

@@ -252,7 +252,7 @@ void CreateAndroidManifestWizard::createAndroidManifestFile()
QString value = QLatin1String("$$PWD/")
+ QDir(m_target->project()->projectDirectory()).relativeFilePath(dir);
bool result =
m_node->setProVariable(QLatin1String("ANDROID_PACKAGE_SOURCE_DIR"), value);
m_node->setProVariable(QLatin1String("ANDROID_PACKAGE_SOURCE_DIR"), QStringList(value));
QStringList unChanged;
m_node->addFiles(QStringList(fileName), &unChanged);