Commit 599be01a authored by Eike Ziller's avatar Eike Ziller
Browse files

Merge remote-tracking branch 'origin/2.7'

Conflicts:
	qtcreator.pri
	qtcreator.qbs
	share/qtcreator/qml/qmlpuppet/interfaces/interfaces.pri
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.cpp
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h
	share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/objectnodeinstance.h
	src/plugins/debugger/debuggerplugin.cpp
	src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.cpp
	src/plugins/qmldesigner/components/debugview/debugview.cpp
	src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp
	src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h
	src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
	src/plugins/qmldesigner/components/integration/stackedutilitypanelcontroller.h
	src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp
	src/plugins/qmldesigner/components/navigator/navigatorview.cpp
	src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
	src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
	src/plugins/qmldesigner/designercore/include/abstractview.h
	src/plugins/qmldesigner/designercore/include/qmldesignercorelib_global.h
	src/plugins/qmldesigner/designercore/include/rewriterview.h
	src/plugins/qmldesigner/designercore/metainfo/metainforeader.cpp
	src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
	src/plugins/qmldesigner/designercore/model/abstractview.cpp
	src/plugins/qmldesigner/designmodewidget.cpp

Change-Id: I9d8126e88397c02a87b5e4ab4da44e2bc7089134
parents ec10e0d7 f409fdd6
......@@ -25,33 +25,30 @@
\title Setting Up a Qbs Project
The Qt Build Suite (Qbs) and the Qbs plugin are still experimental, and
therefore, you must first build them from sources. You can use the Qbs
plugin only with a \QC instance you also built from sources by using the
same tool chain as for building Qbs and the Qbs plugin.
therefore, you must first enable the plugin manually. If you build \QC
yourself from our git repository, you also need to fetch the Qbs submodule to
get Qbs support. See \l{Enabling the Qbs Plugin} below.
To use Qbs to build a project, you must create a .qbs file for the project.
For more information, see the
\l{http://doc-snapshot.qt-project.org/qbs/index.html}{Qbs Manual}.
\section1 Building the Qbs Plugin
\section1 Enabling the Qbs Plugin
To build the Qbs plugin and to enable it in \QC:
If you use a \QC binary release, you need to enable the plugin by
selecting \gui Help > \gui {About Plugins} > \gui {Build Systems}
> \gui {QbsProjectManager} and restarting \QC.
\list 1
\li Clone the Qbs repository and build Qbs.
To build the Qbs plugin yourself from the \QC git repository:
\li Set values for the environment variables that specify the Qbs source
directory (QBS_SOURCE_DIR) and build directory (QBS_BUILD_DIR).
\list 1
\li To build the Qbs plugin that is located in the
\c {src\plugins\qbsprojectmanager} directory in the \QC source
directory, clone the \QC repository and build \QC.
\li Fetch the Qbs submodule in your \QC git checkout with
\c {git submodule update --init}.
\li To enable the plugin, select \gui Help > \gui {About Plugins} >
\gui {Build Systems} > \gui {QbsProjectManager}.
\li Run qmake on \QC and build \QC again.
\li To use the plugin, restart \QC.
\li Enable the Qbs plugin as described above.
\endlist
......
......@@ -1974,7 +1974,7 @@ class PlainDumper:
self.printer = printer
def __call__(self, d, value):
printer = self.printer.invoke(value)
printer = self.printer.gen_printer(value)
lister = getattr(printer, "children", None)
children = [] if lister is None else list(lister())
d.putType(self.printer.name)
......
......@@ -22,7 +22,23 @@ for(deploymentfolder, DEPLOYMENTFOLDERS) {
MAINPROFILEPWD = $$PWD
android {
android-no-sdk {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemfiles = $${item}.files
$$itemfiles = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath = /data/user/qt/$$eval($${deploymentfolder}.target)
export($$itemfiles)
export($$itempath)
INSTALLS += $$item
}
target.path = /data/user/qt
export(target.path)
INSTALLS += target
} else:android {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemfiles = $${item}.files
......
......@@ -903,11 +903,6 @@ This option is useful when you want to try your application on devices which don
<translation>Выбор и установка Ministro - общесистемных динамических библиотек Qt.
Может потребоваться при установке приложений на устройства, которые
не имеют доступа к Android Market (например, эмулятор Android).</translation>
</message>
<message>
<source>Edit Rules File</source>
<translation>Изменить файл
правил</translation>
</message>
<message>
<source>Install Ministro, system-wide Qt shared libraries installer</source>
......@@ -4667,10 +4662,6 @@ p, li { white-space: pre-wrap; }
<source>&lt;System Language&gt;</source>
<translation>&lt;Системный&gt;</translation>
</message>
<message>
<source>Done</source>
<translation>Выполнено</translation>
</message>
<message>
<source>Restart required</source>
<translation>Требуется перезапуск</translation>
......@@ -4757,12 +4748,12 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Reset warnings</source>
<translation>Сброс предупреждений</translation>
<comment>Button text</comment>
<translation>Вернуть предупреждения</translation>
</message>
<message>
<source>Reset warnings</source>
<comment>Button text</comment>
<translation>Сбросить предупреждения</translation>
<source>Re-enable all warnings which were suppressed using &quot;Don&apos;t show again&quot; button (e.g. missing highlighter).</source>
<translation>Вернуть все предупреждения, отключённые кнопкой «Больше не показывать».</translation>
</message>
</context>
<context>
......@@ -21666,15 +21657,15 @@ Do you want to ignore them?</source>
</message>
<message>
<source>debug</source>
<translation type="unfinished">отладка</translation>
<translation>отладка</translation>
</message>
<message>
<source>release</source>
<translation type="unfinished">выпуск</translation>
<translation>выпуск</translation>
</message>
<message>
<source>unknown</source>
<translation type="unfinished">неизвестно</translation>
<translation>неизвестно</translation>
</message>
<message>
<source>Failed to Open Project</source>
......@@ -22672,7 +22663,7 @@ Remote stderr was: %1</source>
<name>QmlDesigner::Internal::MetaInfoPrivate</name>
<message>
<source>Invalid meta info</source>
<translation type="unfinished">Неверная мета-информация</translation>
<translation>Неверная мета-информация</translation>
</message>
</context>
<context>
......@@ -24828,6 +24819,17 @@ Please use the stop button instead.</source>
<translation>Запустить</translation>
</message>
</context>
<context>
<name>QmlProjectManager::QmlApplicationWizardDialog</name>
<message>
<source>Creates a Qt Quick 1 UI project with a single QML file that contains the main view.&amp;lt;br/&amp;gt;You can review Qt Quick 1 UI projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Requires &amp;lt;b&amp;gt;Qt 4.8&amp;lt;/b&amp;gt; or newer.</source>
<translation>Создание проекта Qt Quick 1 с одним файлом QML, содержащим главный интерфейс.&amp;lt;br/&amp;gt; Проверять проекты Qt Quick 1 можно без пересборки в QML Viewer. Для создания и запуска этого типа проектов не требуется интегрированная среда разработки. &amp;lt;b/r&amp;gt;&amp;lt;br/&amp;gt;Требуется &amp;lt;b&amp;gt;Qt 4.8&amp;lt;/b&amp;gt; или выше.</translation>
</message>
<message>
<source>Creates a Qt Quick 2 UI project with a single QML file that contains the main view.&amp;lt;br/&amp;gt;You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Requires &amp;lt;b&amp;gt;Qt 5.0&amp;lt;/b&amp;gt; or newer.</source>
<translation>Создание проекта Qt Quick 2 с одним файлом QML, содержащим главный интерфейс.&amp;lt;br/&amp;gt; Проверять проекты Qt Quick 2 можно без пересборки в QML Scene. Для создания и запуска этого типа проектов не требуется интегрированная среда разработки. &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Требуется &amp;lt;b&amp;gt;Qt 5.0&amp;lt;/b&amp;gt; или выше.</translation>
</message>
</context>
<context>
<name>QmlProjectManager::QmlProject</name>
<message>
......@@ -24937,7 +24939,7 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi
</message>
<message>
<source>Assets</source>
<translation type="unfinished">Ресурсы</translation>
<translation>Ресурсы</translation>
</message>
<message>
<source>XML Source</source>
......@@ -25905,7 +25907,7 @@ Do you want to add it to the project?</source>
</message>
<message>
<source>BlackBerry Signing Authority</source>
<translation type="unfinished">Центр подписывания BlackBerry</translation>
<translation>Центр подписывания BlackBerry</translation>
</message>
<message>
<source>Registered: Yes</source>
......@@ -29899,7 +29901,7 @@ with a password, which you can enter below.</source>
<name>SubComponentManager::parseDirectory</name>
<message>
<source>Invalid meta info</source>
<translation type="unfinished">Неверная мета-информация</translation>
<translation>Неверная мета-информация</translation>
</message>
</context>
<context>
......@@ -106,6 +106,7 @@ QList<LookupItem> TypeOfExpression::operator()(ExpressionAST *expression,
m_scope = scope;
m_documents.append(document);
m_lookupContext = LookupContext(document, m_thisDocument, m_snapshot);
m_lookupContext.setBindings(m_bindings);
m_lookupContext.setExpandTemplates(m_expandTemplates);
......@@ -127,6 +128,7 @@ QList<LookupItem> TypeOfExpression::reference(ExpressionAST *expression,
m_scope = scope;
m_documents.append(document);
m_lookupContext = LookupContext(document, m_thisDocument, m_snapshot);
m_lookupContext.setBindings(m_bindings);
m_lookupContext.setExpandTemplates(m_expandTemplates);
......
......@@ -142,6 +142,11 @@ private:
mutable QSharedPointer<Environment> m_environment;
bool m_expandTemplates;
// FIXME: This is a temporary hack to avoid dangling pointers.
// Keep the expression documents and thus all the symbols and
// their types alive until they are not needed any more.
QList<Document::Ptr> m_documents;
};
ExpressionAST CPLUSPLUS_EXPORT *extractExpressionAST(Document::Ptr doc);
......
......@@ -57,11 +57,12 @@ QtcLibrary {
result.push("botan-1.10")
if (qbs.targetOS === "windows")
result.push("advapi32", "user32")
else {
result.push("rt")
if (qbs.targetOS === "linux" || qbs.targetOS === "mac")
result.push("dl")
}
else if (qbs.targetOS === "linux")
result.push("rt", "dl");
else if (qbs.targetOS === "mac")
result.push("dl");
else if (qbs.targetPlatform.indexOf("unix") !== -1)
result.push("rt");
return result
}
property var botanDefines: {
......
......@@ -210,7 +210,8 @@ void ConsoleProcess::stop()
bool ConsoleProcess::isRunning() const
{
return d->m_process.state() != QProcess::NotRunning;
return d->m_process.state() != QProcess::NotRunning
|| (d->m_stubSocket && d->m_stubSocket->isOpen());
}
QString ConsoleProcess::stubServerListen()
......@@ -242,8 +243,11 @@ QString ConsoleProcess::stubServerListen()
void ConsoleProcess::stubServerShutdown()
{
if (d->m_stubSocket)
if (d->m_stubSocket) {
readStubOutput(); // we could get the shutdown signal before emptying the buffer
d->m_stubSocket->disconnect(); // avoid getting queued readyRead signals
d->m_stubSocket->deleteLater(); // we might be called from the disconnected signal of m_stubSocket
}
d->m_stubSocket = 0;
if (d->m_stubServer.isListening()) {
d->m_stubServer.close();
......
......@@ -210,6 +210,11 @@ void AndroidDeployStep::setDeployQASIPackagePath(const QString &package)
void AndroidDeployStep::setUseLocalQtLibs(bool useLocal)
{
m_useLocalQtLibs = useLocal;
// ### Passes -1 for API level, which means it won't work with setups that require
// library selection based on API level. Use the old approach (command line argument)
// in these cases.
AndroidManager::setUseLocalLibs(target(), useLocal, -1);
}
bool AndroidDeployStep::runCommand(QProcess *buildProc,
......
......@@ -223,6 +223,16 @@ bool AndroidManager::setVersionName(ProjectExplorer::Target *target, const QStri
return saveManifest(target, doc);
}
bool AndroidManager::ensureIconAttribute(ProjectExplorer::Target *target)
{
QDomDocument doc;
if (!openManifest(target, doc))
return false;
QDomElement applicationElem = doc.documentElement().firstChildElement(QLatin1String("application"));
applicationElem.setAttribute(QLatin1String("android:icon"), QLatin1String("@drawable/icon"));
return saveManifest(target, doc);
}
QString AndroidManager::targetSDK(ProjectExplorer::Target *target)
{
if (!createAndroidTemplatesIfNecessary(target))
......@@ -251,7 +261,8 @@ QIcon AndroidManager::highDpiIcon(ProjectExplorer::Target *target)
bool AndroidManager::setHighDpiIcon(ProjectExplorer::Target *target, const QString &iconFilePath)
{
return setIcon(target, HighDPI, iconFilePath);
return ensureIconAttribute(target) &&
setIcon(target, HighDPI, iconFilePath);
}
QIcon AndroidManager::mediumDpiIcon(ProjectExplorer::Target *target)
......@@ -261,7 +272,8 @@ QIcon AndroidManager::mediumDpiIcon(ProjectExplorer::Target *target)
bool AndroidManager::setMediumDpiIcon(ProjectExplorer::Target *target, const QString &iconFilePath)
{
return setIcon(target, MediumDPI, iconFilePath);
return ensureIconAttribute(target) &&
setIcon(target, MediumDPI, iconFilePath);
}
QIcon AndroidManager::lowDpiIcon(ProjectExplorer::Target *target)
......@@ -271,7 +283,8 @@ QIcon AndroidManager::lowDpiIcon(ProjectExplorer::Target *target)
bool AndroidManager::setLowDpiIcon(ProjectExplorer::Target *target, const QString &iconFilePath)
{
return setIcon(target, LowDPI, iconFilePath);
return ensureIconAttribute(target) &&
setIcon(target, LowDPI, iconFilePath);
}
Utils::FileName AndroidManager::dirPath(ProjectExplorer::Target *target)
......@@ -348,6 +361,62 @@ QString AndroidManager::targetApplication(ProjectExplorer::Target *target)
return QString();
}
bool AndroidManager::setUseLocalLibs(ProjectExplorer::Target *target, bool useLocalLibs, int deviceAPILevel)
{
// For Qt 4, the "use local libs" options is handled by passing command line arguments to the
// app, so no need to alter the AndroidManifest.xml
QtSupport::BaseQtVersion *baseQtVersion = QtSupport::QtKitInformation::qtVersion(target->kit());
if (baseQtVersion == 0 || baseQtVersion->qtVersion() < QtSupport::QtVersionNumber(5,0,0))
return true;
QDomDocument doc;
if (!openManifest(target, doc))
return false;
QDomElement metadataElem = doc.documentElement().firstChildElement(QLatin1String("application")).firstChildElement(QLatin1String("activity")).firstChildElement(QLatin1String("meta-data"));
QString localLibs;
QString localJars;
QString staticInitClasses;
if (useLocalLibs) {
localLibs = loadLocalLibs(target, deviceAPILevel);
localJars = loadLocalJars(target, deviceAPILevel);
staticInitClasses = loadLocalJarsInitClasses(target, deviceAPILevel);
}
bool changedManifest = false;
while (!metadataElem.isNull()) {
if (metadataElem.attribute(QLatin1String("android:name")) == QLatin1String("android.app.use_local_qt_libs")) {
if (metadataElem.attribute(QLatin1String("android:value")).toInt() != useLocalLibs) {
metadataElem.setAttribute(QLatin1String("android:value"), int(useLocalLibs));
changedManifest = true;
}
} else if (metadataElem.attribute(QLatin1String("android:name")) == QLatin1String("android.app.load_local_libs")) {
if (metadataElem.attribute(QLatin1String("android:value")) != localLibs) {
metadataElem.setAttribute(QLatin1String("android:value"), localLibs);
changedManifest = true;
}
} else if (metadataElem.attribute(QLatin1String("android:name")) == QLatin1String("android.app.load_local_jars")) {
if (metadataElem.attribute(QLatin1String("android:value")) != localJars) {
metadataElem.setAttribute(QLatin1String("android:value"), localJars);
changedManifest = true;
}
} else if (metadataElem.attribute(QLatin1String("android:name")) == QLatin1String("android.app.static_init_classes")) {
if (metadataElem.attribute(QLatin1String("android:value")) != staticInitClasses) {
metadataElem.setAttribute(QLatin1String("android:value"), staticInitClasses);
changedManifest = true;
}
}
metadataElem = metadataElem.nextSiblingElement(QLatin1String("meta-data"));
}
if (changedManifest)
return saveManifest(target, doc);
else
return true;
}
bool AndroidManager::setTargetApplication(ProjectExplorer::Target *target, const QString &name)
{
QDomDocument doc;
......@@ -905,6 +974,8 @@ bool AndroidManager::setIcon(ProjectExplorer::Target *target, IconType type, con
const QString path = iconPath(target, type);
QFile::remove(path);
QDir dir;
dir.mkpath(QFileInfo(path).absolutePath());
return QFile::copy(iconFileName, path);
}
......
......@@ -78,12 +78,15 @@ public:
static bool setMediumDpiIcon(ProjectExplorer::Target *target, const QString &iconFilePath);
static QIcon lowDpiIcon(ProjectExplorer::Target *target);
static bool setLowDpiIcon(ProjectExplorer::Target *target, const QString &iconFilePath);
static bool ensureIconAttribute(ProjectExplorer::Target *target);
static QStringList availableTargetApplications(ProjectExplorer::Target *target);
static QString targetApplication(ProjectExplorer::Target *target);
static bool setTargetApplication(ProjectExplorer::Target *target, const QString &name);
static QString targetApplicationPath(ProjectExplorer::Target *target);
static bool setUseLocalLibs(ProjectExplorer::Target *target, bool useLocalLibs, int deviceAPILevel);
static QString targetSDK(ProjectExplorer::Target *target);
static bool setTargetSDK(ProjectExplorer::Target *target, const QString &sdk);
......
......@@ -32,6 +32,8 @@
#include "androidconfigurations.h"
#include "androidcreatekeystorecertificate.h"
#include "androidmanager.h"
#include "androiddeploystep.h"
#include "androidglobal.h"
#include "ui_androidpackagecreationwidget.h"
#include <projectexplorer/project.h>
......@@ -375,11 +377,25 @@ void AndroidPackageCreationWidget::setTarget(const QString &target)
void AndroidPackageCreationWidget::setQtLibs(QModelIndex, QModelIndex)
{
AndroidManager::setQtLibs(m_step->target(), m_qtLibsModel->checkedItems());
AndroidDeployStep * const deployStep = AndroidGlobal::buildStep<AndroidDeployStep>(m_step->target()->activeDeployConfiguration());
if (deployStep->useLocalQtLibs()) {
// ### Passes -1 for API level, which means it won't work with setups that require
// library selection based on API level. Use the old approach (command line argument)
// in these cases.
AndroidManager::setUseLocalLibs(m_step->target(), true, -1);
}
}
void AndroidPackageCreationWidget::setPrebundledLibs(QModelIndex, QModelIndex)
{
AndroidManager::setPrebundledLibs(m_step->target(), m_prebundledLibs->checkedItems());
AndroidDeployStep * const deployStep = AndroidGlobal::buildStep<AndroidDeployStep>(m_step->target()->activeDeployConfiguration());
if (deployStep->useLocalQtLibs()) {
// ### Passes -1 for API level, which means it won't work with setups that require
// library selection based on API level. Use the old approach (command line argument)
// in these cases.
AndroidManager::setUseLocalLibs(m_step->target(), true, -1);
}
}
void AndroidPackageCreationWidget::prebundledLibSelected(const QModelIndex &index)
......
......@@ -42,6 +42,7 @@
#include <qtsupport/qtsupportconstants.h>
#include <qtsupport/qtversionmanager.h>
#include <projectexplorer/target.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/projectexplorer.h>
......@@ -115,8 +116,18 @@ void AndroidQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::En
if (!qt4pro || !qt4pro->activeTarget()
|| QtSupport::QtKitInformation::qtVersion(k)->type() != QLatin1String(Constants::ANDROIDQT))
return;
Target *target = qt4pro->activeTarget();
if (DeviceTypeKitInformation::deviceTypeId(target->kit()) != Constants::ANDROID_DEVICE_TYPE)
return;
if (AndroidConfigurations::instance().config().ndkLocation.isEmpty()
|| AndroidConfigurations::instance().config().sdkLocation.isEmpty())
return;
if (AndroidConfigurations::instance().sdkTargets().isEmpty())
return;
env.set(QLatin1String("ANDROID_NDK_PLATFORM"),
AndroidConfigurations::instance().bestMatch(AndroidManager::targetSDK(qt4pro->activeTarget())));
AndroidConfigurations::instance().bestMatch(AndroidManager::targetSDK(target)));
}
......
......@@ -241,7 +241,7 @@ bool AndroidSettingsWidget::checkNDK(const Utils::FileName &location)
QSet<ProjectExplorer::Abi::Architecture> qtVersionsForArch;
foreach (QtSupport::BaseQtVersion *qtVersion, QtSupport::QtVersionManager::instance()->versions()) {
if (qtVersion->type() != QLatin1String(Constants::ANDROIDQT))
if (qtVersion->type() != QLatin1String(Constants::ANDROIDQT) || qtVersion->qtAbis().isEmpty())
continue;
qtVersionsForArch.insert(qtVersion->qtAbis().first().architecture());
}
......
......@@ -607,13 +607,15 @@ ClearCaseSubmitEditor *ClearCasePlugin::openClearCaseSubmitEditor(const QString
void ClearCasePlugin::updateStatusActions()
{
FileStatus fileStatus = FileStatus::Unknown;
bool hasFile = currentState().hasFile();
QString fileName = currentState().relativeCurrentFile();
if (hasFile) {
QString fileName = currentState().relativeCurrentFile();
fileStatus = m_statusMap->value(fileName, FileStatus(FileStatus::Unknown));
FileStatus fileStatus = m_statusMap->value(fileName, FileStatus(FileStatus::Unknown));
if (ClearCase::Constants::debug)
qDebug() << Q_FUNC_INFO << fileName << ", status = " << fileStatus.status;
if (ClearCase::Constants::debug)
qDebug() << Q_FUNC_INFO << fileName << ", status = " << fileStatus.status;
}
m_checkOutAction->setEnabled(hasFile && (fileStatus.status & (FileStatus::CheckedIn | FileStatus::Hijacked)));
m_undoCheckOutAction->setEnabled(hasFile && (fileStatus.status & FileStatus::CheckedOut));
......
......@@ -352,6 +352,7 @@ bool CMakeProject::parseCMakeLists()
QByteArray allDefines;
allDefines.append(tc->predefinedMacros(cxxflags));
allDefines.append(cbpparser.defines());
QStringList allFrameworkPaths;
QList<ProjectExplorer::HeaderPath> allHeaderPaths;
......@@ -1215,8 +1216,18 @@ void CMakeCbpParser::parseAdd()
QString compilerOption = addAttributes.value(QLatin1String("option")).toString();
// defining multiple times a macro to the same value makes no sense
if (!compilerOption.isEmpty() && !m_compilerOptions.contains(compilerOption))
if (!compilerOption.isEmpty() && !m_compilerOptions.contains(compilerOption)) {
m_compilerOptions.append(compilerOption);
int macroNameIndex = compilerOption.indexOf(QLatin1String("-D")) + 2;
if (macroNameIndex != 1) {
int assignIndex = compilerOption.indexOf(QLatin1Char('='), macroNameIndex);
if (assignIndex != -1)
compilerOption[assignIndex] = ' ';
m_defines.append("#define ");
m_defines.append(compilerOption.mid(macroNameIndex).toUtf8());
m_defines.append('\n');
}
}
while (!atEnd()) {
readNext();
......@@ -1314,6 +1325,11 @@ QStringList CMakeCbpParser::includeFiles()
return m_includeFiles;
}
QByteArray CMakeCbpParser::defines() const
{
return m_defines;
}
QList<CMakeBuildTarget> CMakeCbpParser::buildTargets()
{
return m_buildTargets;
......
......@@ -162,6 +162,7 @@ public:
QList<ProjectExplorer::FileNode *> cmakeFileList();
QStringList includeFiles();
QList<CMakeBuildTarget> buildTargets();
QByteArray defines() const;
QString projectName() const;
QString compilerName() const;
bool hasCMakeFiles();
......@@ -188,6 +189,7 @@ private:
bool m_parsingCmakeUnit;
QStringList m_includeFiles;
QStringList m_compilerOptions;
QByteArray m_defines;
CMakeBuildTarget m_buildTarget;
QList<CMakeBuildTarget> m_buildTargets;
......
......@@ -81,7 +81,7 @@ MakeStep::MakeStep(BuildStepList *bsl, MakeStep *bs) :
AbstractProcessStep(bsl, bs),
m_clean(bs->m_clean),
m_buildTargets(bs->m_buildTargets),
m_additionalArguments(Utils::QtcProcess::joinArgs(bs->m_buildTargets))
m_additionalArguments(bs->m_additionalArguments)
{
ctor();
}
......
......@@ -31,6 +31,8 @@ QtcPlugin {
]
}
cpp.frameworks: qbs.targetOS === "mac" ? ["AppKit"] : undefined
files: [
"basefilewizard.cpp",
"basefilewizard.h",
......@@ -234,8 +236,10 @@ QtcPlugin {
}
Group {
condition: qbs.targetOS == "macx"
condition: qbs.targetOS == "mac"
files: [
"macfullscreen.h",
"macfullscreen.mm",
"progressmanager/progressmanager_mac.mm",
]
}
......
......@@ -226,15 +226,17 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Debugger"));