forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.6'
Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri Change-Id: I3b2d81462b2dfb9753863c87c79ffbbf8d536aac
This commit is contained in:
@@ -3112,11 +3112,11 @@
|
||||
\li log(x)
|
||||
\li Returns the natural logarithm (base E) of x
|
||||
\row
|
||||
\li max(x, y)
|
||||
\li Returns the higher value of x and y
|
||||
\li max([value1[, value2[, ...]]])
|
||||
\li Returns the highest value of the given numbers
|
||||
\row
|
||||
\li min(x, y)
|
||||
\li Returns the lower value of x and y
|
||||
\li min([value1[, value2[, ...]]])
|
||||
\li Returns the lowest value of the given numbers
|
||||
\row
|
||||
\li oct(x)
|
||||
\li Returns the octal representation of x
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
Utils::FileName Android::AndroidQtSupport::apkPath(ProjectExplorer::Target *target) const
|
||||
Utils::FileName Android::AndroidQtSupport::apkPath(const ProjectExplorer::Target *target) const
|
||||
{
|
||||
if (!target)
|
||||
return Utils::FileName();
|
||||
|
||||
@@ -60,9 +60,9 @@ public:
|
||||
virtual QStringList soLibSearchPath(const ProjectExplorer::Target *target) const = 0;
|
||||
virtual QStringList androidExtraLibs(const ProjectExplorer::Target *target) const = 0;
|
||||
virtual QStringList projectTargetApplications(const ProjectExplorer::Target *target) const = 0;
|
||||
virtual Utils::FileName apkPath(ProjectExplorer::Target *target) const;
|
||||
virtual Utils::FileName androiddeployqtPath(ProjectExplorer::Target *target) const = 0;
|
||||
virtual Utils::FileName androiddeployJsonPath(ProjectExplorer::Target *target) const = 0;
|
||||
virtual Utils::FileName apkPath(const ProjectExplorer::Target *target) const;
|
||||
virtual Utils::FileName androiddeployqtPath(const ProjectExplorer::Target *target) const = 0;
|
||||
virtual Utils::FileName androiddeployJsonPath(const ProjectExplorer::Target *target) const = 0;
|
||||
virtual void manifestSaved(const ProjectExplorer::Target *target) = 0;
|
||||
virtual Utils::FileName manifestSourcePath(const ProjectExplorer::Target *target) = 0;
|
||||
};
|
||||
|
||||
@@ -133,8 +133,8 @@ void JavaScriptFilter::setupEngine()
|
||||
"function floor(x) { return Math.floor(x); }\n"
|
||||
"function hex(x) { return '0x' + x.toString(16); }\n"
|
||||
"function log(x) { return Math.log(x); }\n"
|
||||
"function max(x, y) { return Math.max(x, y); }\n"
|
||||
"function min(x, y) { return Math.min(x, y); }\n"
|
||||
"function max() { return Math.max.apply(null, arguments); }\n"
|
||||
"function min() { return Math.min.apply(null, arguments); }\n"
|
||||
"function oct(x) { return '0' + x.toString(8); }\n"
|
||||
"function pi() { return Math.PI; }\n"
|
||||
"function pow(x, y) { return Math.pow(x, y); }\n"
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <qmakeprojectmanager/qmakeproject.h>
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QRegularExpression>
|
||||
|
||||
using namespace QmakeProjectManager;
|
||||
|
||||
namespace QmakeAndroidSupport {
|
||||
@@ -46,25 +50,36 @@ bool QmakeAndroidSupport::canHandle(const ProjectExplorer::Target *target) const
|
||||
|
||||
QStringList QmakeAndroidSupport::soLibSearchPath(const ProjectExplorer::Target *target) const
|
||||
{
|
||||
QStringList res;
|
||||
QSet<QString> res;
|
||||
QmakeProject *project = qobject_cast<QmakeProject*>(target->project());
|
||||
Q_ASSERT(project);
|
||||
if (!project)
|
||||
return res;
|
||||
return {};
|
||||
|
||||
foreach (QmakeProFile *file, project->allProFiles()) {
|
||||
TargetInformation info = file->targetInformation();
|
||||
res << info.buildDir.toString();
|
||||
res.insert(info.buildDir.toString());
|
||||
Utils::FileName destDir = info.destDir;
|
||||
if (!destDir.isEmpty()) {
|
||||
if (destDir.toFileInfo().isRelative())
|
||||
destDir = Utils::FileName::fromString(QDir::cleanPath(info.buildDir.toString()
|
||||
+ '/' + destDir.toString()));
|
||||
res << destDir.toString();
|
||||
}
|
||||
res.insert(destDir.toString());
|
||||
}
|
||||
QFile deploymentSettings(androiddeployJsonPath(target).toString());
|
||||
if (deploymentSettings.open(QIODevice::ReadOnly)) {
|
||||
QJsonParseError error;
|
||||
QJsonDocument doc = QJsonDocument::fromJson(deploymentSettings.readAll(), &error);
|
||||
if (error.error != QJsonParseError::NoError)
|
||||
continue;
|
||||
|
||||
return res;
|
||||
auto rootObj = doc.object();
|
||||
auto it = rootObj.find("stdcpp-path");
|
||||
if (it != rootObj.constEnd())
|
||||
res.insert(QFileInfo(it.value().toString()).absolutePath());
|
||||
}
|
||||
}
|
||||
return res.toList();
|
||||
}
|
||||
|
||||
QStringList QmakeAndroidSupport::androidExtraLibs(const ProjectExplorer::Target *target) const
|
||||
@@ -97,7 +112,7 @@ QStringList QmakeAndroidSupport::projectTargetApplications(const ProjectExplorer
|
||||
return apps;
|
||||
}
|
||||
|
||||
Utils::FileName QmakeAndroidSupport::androiddeployqtPath(ProjectExplorer::Target *target) const
|
||||
Utils::FileName QmakeAndroidSupport::androiddeployqtPath(const ProjectExplorer::Target *target) const
|
||||
{
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
|
||||
if (!version)
|
||||
@@ -110,7 +125,7 @@ Utils::FileName QmakeAndroidSupport::androiddeployqtPath(ProjectExplorer::Target
|
||||
return Utils::FileName::fromString(command);
|
||||
}
|
||||
|
||||
Utils::FileName QmakeAndroidSupport::androiddeployJsonPath(ProjectExplorer::Target *target) const
|
||||
Utils::FileName QmakeAndroidSupport::androiddeployJsonPath(const ProjectExplorer::Target *target) const
|
||||
{
|
||||
const auto *pro = static_cast<QmakeProject *>(target->project());
|
||||
QmakeAndroidBuildApkStep *buildApkStep
|
||||
|
||||
@@ -39,8 +39,8 @@ public:
|
||||
QStringList soLibSearchPath(const ProjectExplorer::Target *target) const override;
|
||||
QStringList androidExtraLibs(const ProjectExplorer::Target *target) const override;
|
||||
QStringList projectTargetApplications(const ProjectExplorer::Target *target) const override;
|
||||
Utils::FileName androiddeployqtPath(ProjectExplorer::Target *target) const override;
|
||||
Utils::FileName androiddeployJsonPath(ProjectExplorer::Target *target) const override;
|
||||
Utils::FileName androiddeployqtPath(const ProjectExplorer::Target *target) const override;
|
||||
Utils::FileName androiddeployJsonPath(const ProjectExplorer::Target *target) const override;
|
||||
|
||||
void manifestSaved(const ProjectExplorer::Target *target) override;
|
||||
Utils::FileName manifestSourcePath(const ProjectExplorer::Target *target) override;
|
||||
|
||||
@@ -214,7 +214,9 @@ void DesignDocument::updateFileName(const Utils::FileName & /*oldFileName*/, con
|
||||
|
||||
Utils::FileName DesignDocument::fileName() const
|
||||
{
|
||||
if (editor())
|
||||
return editor()->document()->filePath();
|
||||
return Utils::FileName();
|
||||
}
|
||||
|
||||
Kit *DesignDocument::currentKit() const
|
||||
|
||||
Reference in New Issue
Block a user