Commit 3b1a966c authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/3.5'

Change-Id: Iebaabfc2f724cd493b7cab025406531cea5cd2dc
parents fb73a870 a80f4d17
......@@ -168,7 +168,7 @@ For detailed information on the supported compilers, see
able to find all dependent Qt-libraries and plugins when being launched by the
system. The easiest way to provide them for Qt 5 is to run the tool windeployqt:
windeployqt -qmldir share\qtcreator -qmldir src\plugins\qmlprofiler bin\qtcreator.exe lib\qtcreator lib\qtcreator\plugins
windeployqt -quick -qmldir share\qtcreator\welcomescreen -qmldir src\plugins\qmlprofiler bin\qtcreator.exe lib\qtcreator lib\qtcreator\plugins
Note that unlike on Unix, you cannot overwrite executables that are running.
Thus, if you want to work on Qt Creator using Qt Creator, you need a
......
......@@ -49,6 +49,8 @@ Editing
Project Management
* Fixed issues with restoring project tree state (QTCREATORBUG-14304)
* Fixed crash when application output contains incomplete control
sequence (QTCREATORBUG-14720)
CMake Projects
......@@ -66,6 +68,13 @@ QML-Only Projects (.qmlproject)
* Re-enabled the plugin by default
Autotools Projects
* Improved parsing of `CPPFLAGS`
* Added support for line continuations
* Added support for `top_srcdir`, `abs_top_srcdir`, `top_builddir` and
`abs_top_builddir`
Debugging
* Added dumper for `QJsonValue`, `QJsonObject`, `QJsonArray`, `QUuid`
......@@ -74,6 +83,8 @@ Debugging
* Fixed display of `QHash` keys with value 0 (QTCREATORBUG-14451)
* Fixed variable expansion state in QML debugger
* Fixed display of members of returned values
* Fixed that items in Locals and Expressions did not expand on first
click for QML (QTCREATORBUG-14210)
QML Profiler
......
\section2 Specifying Run Settings for Embedded Devices
To run and debug an application on an embedded device (commercial only), you
must create connections from the development host to the device and add the
device configurations to \l{glossary-buildandrun-kit}{kits}. Select
\uicontrol {Manage Kits} to add devices to kits. For more information, see
the \l{http://doc.qt.io/QtForDeviceCreation/qtee-installation-guide.html}
{Installation Guide} in the
\l{http://doc.qt.io/QtForDeviceCreation/index.html}{Qt for Device Creation}
documentation.
When you run the application, \QC copies the files to the connected device.
The run settings display the path to the executable file on the development
host and on the device.
To execute custom commands, select \uicontrol {Add Deploy Step} >
\uicontrol {Custom Remote Command (via adb shell)} and enter the command to
execute.
......@@ -48,7 +48,8 @@
\li \l{Supported Platforms}
You can install and run \QC on several operating systems to create
applications for multiple desktop and mobile device platforms.
applications for multiple desktop, embedded, and mobile device
platforms.
\li \l{Using Other Build Systems}
......
......@@ -55,5 +55,7 @@
\li \l{Using Qt Quick UI Forms}{Export button} for exporting
items as alias properties
\endlist
\li \l{http://doc.qt.io/QtForDeviceCreation/index.html}{Developing for
embedded devices}
\endlist
*/
......@@ -74,8 +74,8 @@
\target glossary-deploy-config
\li Handles the packaging and copying of the necessary files to a
location you want to run the executable at. The files can be
copied to a location in the file system of the development PC or
a mobile device.
copied to a location in the file system of the development PC,
an embedded device, or a mobile device.
\row
\li Kit
......@@ -100,8 +100,8 @@
\li Project
\target glossary-project
\li Groups together a set of source files, forms, and resource files
that you can build, deploy, and run for different desktop and
mobile device platforms, as
that you can build, deploy, and run for different desktop,
embedded, and mobile device platforms, as
specified by a \e {build configuration}, \e {deploy
configuration}, and \e {run configuration}.
......
......@@ -33,7 +33,7 @@
\QC is an integrated development environment (IDE) that provides you with
tools to design and develop applications with the Qt application framework.
Qt is designed for developing applications and user interfaces once and
deploying them to several desktop and mobile operating systems. \QC
deploying them to several desktop, embedded, and mobile operating systems. \QC
provides you with tools for accomplishing your tasks throughout the whole
application development life-cycle, from creating a project to deploying the
application to the target platforms.
......@@ -86,8 +86,8 @@
and commands used to build the project.
\QC provides support for building, running, and deploying Qt
applications for desktop environment and mobile devices.
\l{glossary-buildandrun-kit}{Kits}, build,
applications for desktop environment as well as embedded and
mobile devices. \l{glossary-buildandrun-kit}{Kits}, build,
run, and deployment settings allow you to quickly switch between
different setups and target platforms.
......
......@@ -32,7 +32,7 @@
\title Supported Platforms
You can install and run \QC on several operating systems to create
applications for multiple desktop and mobile device platforms.
applications for multiple desktop, embedded, and mobile device platforms.
\section1 Development Platforms
......@@ -113,6 +113,16 @@
\endlist
\section2 Developing for Embedded Devices
The development environment supported by Qt for Device Creation is
Ubuntu Linux 64-bit (12.04 LTS or later). For more information about
the requirements for the development host, see the
\l{http://doc.qt.io/QtForDeviceCreation/qtee-installation-guide.html}
{Installation Guide} in the
\l{http://doc.qt.io/QtForDeviceCreation/index.html}{Qt for Device Creation}
documentation.
\section1 Compiling from Source
To build \QC from the source, see the requirements and instructions in the
......
......@@ -8,6 +8,8 @@
\li Android
\li Embedded
\li Generic remote Linux
\li iOS
......@@ -18,6 +20,20 @@
\endlist
\section2 Embedded Devices
The Boot to Qt stack can be made to run on a variety of hardware. For
Qt for Device Creation license holders, tooling is provided to customize the
contents of the stack as well as to take it into desired production
hardware.
For more information about the supported device groups and reference devices,
see \l{http://doc.qt.io/QtForDeviceCreation/qtee-supported-platforms.html}
{Supported Platforms} in the {http://doc.qt.io/QtForDeviceCreation/index.html}
{Qt for Device Creation} documentation.
\section2 Mobile Devices
The following table summarizes operating system support for developing
applications for mobile device platforms.
......
......@@ -47,7 +47,8 @@
{List of Qt Quick Examples}
\row
\li Develop Qt applications for desktop and mobile devices
\li Develop Qt applications for desktop and embedded or mobile
devices
\li \l{https://www.qt.io/developers/}{Qt Developers}
\row
......
......@@ -40,8 +40,8 @@
is installed automatically and you should be ready to start
debugging after you create a new project. However, you can
change the setup to use debugging tools for Windows, for
example. You can connect mobile devices to your development PC
and debug processes running on the devices.
example. You can connect embedded or mobile devices to your
development host and debug processes running on the devices.
\li \l{Analyzing Code}
......
......@@ -37,6 +37,14 @@
the development environment for Android or iOS. For more information, see
\l{Connecting Android Devices} and \l{Connecting iOS Devices}.
To run an example application on an embedded device, you must set up
Qt for Device Creation on the development host and create connections
between the host and devices. For more information, see the
\l{http://doc.qt.io/QtForDeviceCreation/qtee-installation-guide.html}
{Installation Guide} in the
\l{http://doc.qt.io/QtForDeviceCreation/index.html}{Qt for Device Creation}
documentation.
\list 1
\li In the \uicontrol Welcome mode, select \uicontrol Examples (1).
......@@ -47,7 +55,9 @@
You can also search for examples. Enter the \uicontrol android or
\uicontrol iOS keyword in the search field (2) to list all the
examples tested for Android or iOS.
examples tested for Android or iOS. To list examples that you can
run on embedded devices, enter the \uicontrol Boot2Qt keyword in the
search field (commercial only).
\li To check that the application code can be compiled and linked for a
device, click the \uicontrol {Kit Selector} and select a
......
......@@ -107,8 +107,8 @@
Create a Qt Quick application that contains both QML and C++
code. The project includes a QQuickView.
You can build the application and deploy it to desktop and
mobile target platforms.
You can build the application and deploy it to desktop,
embedded, and mobile target platforms.
\li Qt Quick Controls Application
......
......@@ -32,7 +32,8 @@
By default, running an application also builds it and deploys it to a
location from where it can be run on the desktop, on a device emulator or
simulator, or on a mobile device that is connected to the development PC.
simulator, or on an embedded device or a mobile device that is connected to
the development PC.
To run executable files without deploying them first, select \uicontrol Build >
\uicontrol {Run Without Deployment}. To make this the default option, deselect the
......
......@@ -141,6 +141,12 @@
\image qtcreator-build-steps-custom.png "Custom Process Step"
\section2 Executing Custom Commands
To execute custom commands when building for embedded devices, select
\uicontrol {Add Build Step} > \uicontrol {Custom Remote Command
(via adb shell)} (commercial only) and enter the command to execute.
\section1 Clean Steps
You can use the cleaning process to remove intermediate files. This process
......
......@@ -59,6 +59,7 @@
\include projects/creator-projects-settings-run-debug.qdocinc
\include linux-mobile/creator-projects-settings-run-linux.qdocinc
\include qnx/creator-projects-settings-run-qnx.qdocinc
\include linux-mobile/creator-projects-settings-run-b2qt.qdocinc
\section1 Selecting the Run Environment
......
......@@ -31,7 +31,8 @@
\title Qt Creator Manual
\QC provides a cross-platform, complete integrated development environment
(IDE) for application developers to create applications for multiple desktop
(IDE) for application developers to create applications for multiple
desktop, \l {http://doc.qt.io/QtForDeviceCreation/index.html}{embedded},
and mobile device platforms, such as \l{Connecting Android Devices}{Android}
and \l{Connecting iOS Devices}{iOS}. It is available for Linux, OS X and
Windows
......
......@@ -40,8 +40,8 @@
\li \uicontrol {Qt Quick Application} creates a Qt Quick 2 application
project that can contain both QML and C++ code. The project includes
a QQuickView. You can build the application and deploy it to desktop
and mobile target platforms.
a QQuickView. You can build the application and deploy it to desktop,
embedded, and mobile target platforms.
\li \uicontrol {Qt Quick Controls Application} is like
\uicontrol {Qt Quick Application}, but using Qt Quick Controls.
......
......@@ -38,7 +38,7 @@ import shutil
import inspect
def usage():
print 'Usage: %s [-v|--version-string=versionstring] [-i|--installer-path=/path/to/installerfw] [-a|--archive=archive.7z] <outputname>' % os.path.basename(sys.argv[0])
print('Usage: %s [-v|--version-string=versionstring] [-i|--installer-path=/path/to/installerfw] [-a|--archive=archive.7z] <outputname>' % os.path.basename(sys.argv[0]))
def substitute_file(infile, outfile, substitutions):
with open(infile, 'r') as f:
......@@ -132,9 +132,9 @@ def main():
ifw_call = [os.path.join(ifw_location, 'bin', 'binarycreator'), '-c', os.path.join(out_config_dir, config_name), '-p', out_packages_dir, installer_name, '--offline-only' ]
subprocess.check_call(ifw_call, stderr=subprocess.STDOUT)
finally:
print 'Cleaning up...'
print('Cleaning up...')
shutil.rmtree(temp_dir)
print 'Done.'
print('Done.')
if __name__ == '__main__':
main()
......@@ -76,8 +76,10 @@ struct MetaPropertyData {
static bool constructedMetaData(const QQmlVMEMetaData* data)
{
return data->varPropertyCount == 0
&& data->propertyCount == 0
return data->propertyCount == 0
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
&& data->varPropertyCount == 0
#endif
&& data->aliasCount == 0
&& data->signalCount == 0
&& data->methodCount == 0;
......@@ -86,7 +88,9 @@ static bool constructedMetaData(const QQmlVMEMetaData* data)
static QQmlVMEMetaData* fakeMetaData()
{
QQmlVMEMetaData* data = new QQmlVMEMetaData;
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
data->varPropertyCount = 0;
#endif
data->propertyCount = 0;
data->aliasCount = 0;
data->signalCount = 0;
......
......@@ -40,7 +40,7 @@ public:
%{CN} &operator=(const %{CN} &);
~%{CN}();
@endif
@if '%{isQObject}'
@if %{isQObject}
signals:
......
......@@ -86,7 +86,7 @@ OutputPanes_DebugTextColor=text
OutputPanes_ErrorMessageTextColor=ffff6c6c
OutputPanes_MessageOutput=ff008787
OutputPanes_NormalMessageTextColor=text
OutputPanes_StdErrTextColor=error
OutputPanes_StdErrTextColor=ffff6666
OutputPanes_StdOutTextColor=text
OutputPanes_WarningMessageTextColor=fff3c300
OutputPaneButtonFlashColor=error
......
......@@ -218,8 +218,10 @@ static inline QStringList getPluginPaths()
// "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later
// "$XDG_DATA_HOME/data/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux
// "~/Library/Application Support/QtProject/Qt Creator" on Mac
pluginPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)
+ QLatin1String("/data");
pluginPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
pluginPath += QLatin1String("/data");
#endif
pluginPath += QLatin1Char('/')
+ QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR)
+ QLatin1Char('/');
......@@ -297,6 +299,8 @@ int main(int argc, char **argv)
&& !qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")) {
qputenv("QT_DEVICE_PIXEL_RATIO", "auto");
}
#else
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
#endif // < Qt 5.6
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
......
......@@ -46200,7 +46200,7 @@ bool caseless_cmp(char a, char b)
#elif defined(BOTAN_BUILD_COMPILER_IS_INTEL)
#include <ia32intrin.h>
#define CALL_CPUID(type, out) do { __cpuid(out, type); } while(0)
#define CALL_CPUID(type, out) do { __cpuid((int*)out, type); } while(0)
#elif defined(BOTAN_BUILD_COMPILER_IS_GCC) && (BOTAN_GCC_VERSION >= 430)
......@@ -46223,7 +46223,7 @@ namespace {
}
#elif defined(BOTAN_TARGET_ARCH_IS_X86_64) && \
(defined(BOTAN_BUILD_COMPILER_IS_CLANG) || defined(BOTAN_BUILD_COMPILER_IS_GCC) || defined(BOTAN_BUILD_COMPILER_IS_INTEL))
(defined(BOTAN_BUILD_COMPILER_IS_CLANG) || defined(BOTAN_BUILD_COMPILER_IS_GCC))
/*
* We can't safely use this on x86-32 as some 32-bit ABIs use ebx as
......@@ -1001,13 +1001,11 @@ LookupScope *LookupScopePrivate::lookupType_helper(
}
if (const QualifiedNameId *qName = name->asQualifiedNameId()) {
ProcessedSet innerProcessed;
if (! qName->base())
return globalNamespace()->d->lookupType_helper(qName->name(), &innerProcessed, true, origin);
return globalNamespace()->d->lookupType_helper(qName->name(), processed, true, origin);
if (LookupScope *binding = lookupType_helper(qName->base(), processed, true, origin))
return binding->d->lookupType_helper(qName->name(), &innerProcessed, false, origin);
return binding->d->lookupType_helper(qName->name(), processed, false, origin);
return 0;
......
......@@ -71,6 +71,7 @@ public:
{
m_pixmap = QPixmap();
m_label->setText(text);
layout()->setSizeConstraint(QLayout::SetFixedSize);
adjustSize();
if (QWidget *parent = parentWidget())
move(parent->rect().center() - rect().center());
......@@ -80,6 +81,7 @@ public:
{
m_label->hide();
m_pixmap.load(Utils::StyleHelper::dpiSpecificImageFile(uri));
layout()->setSizeConstraint(QLayout::SetNoConstraint);
resize(m_pixmap.size() / m_pixmap.devicePixelRatio());
if (QWidget *parent = parentWidget())
move(parent->rect().center() - rect().center());
......
......@@ -151,7 +151,7 @@ AndroidRunner::AndroidRunner(QObject *parent,
qDebug() << tr("No free ports available on host for QML debugging."));
m_qmlPort = server.serverPort();
} else {
m_qmlPort = -1;
m_qmlPort = 0;
}
ProjectExplorer::Target *target = runConfig->target();
m_useLocalQtLibs = AndroidManager::useLocalLibs(target);
......
......@@ -79,13 +79,21 @@ void BareMetalDevice::fromMap(const QVariantMap &map)
IDevice::fromMap(map);
QString gdbServerProvider = map.value(QLatin1String(gdbServerProviderIdKeyC)).toString();
if (gdbServerProvider.isEmpty()) {
const QString name = displayName();
if (GdbServerProvider *provider =
GdbServerProviderManager::instance()->findByDisplayName(name)) {
gdbServerProvider = provider->id();
} else {
const QSsh::SshConnectionParameters sshParams = sshParameters();
DefaultGdbServerProvider *newProvider = new DefaultGdbServerProvider;
newProvider->setDisplayName(displayName());
newProvider->setDisplayName(name);
newProvider->m_host = sshParams.host;
newProvider->m_port = sshParams.port;
GdbServerProviderManager::instance()->registerProvider(newProvider);
if (GdbServerProviderManager::instance()->registerProvider(newProvider))
gdbServerProvider = newProvider->id();
else
delete newProvider;
}
}
setGdbServerProviderId(gdbServerProvider);
}
......
......@@ -172,6 +172,14 @@ GdbServerProvider *GdbServerProviderManager::findProvider(const QString &id) con
return Utils::findOrDefault(m_providers, Utils::equal(&GdbServerProvider::id, id));
}
GdbServerProvider *GdbServerProviderManager::findByDisplayName(const QString &displayName) const
{
if (displayName.isEmpty())
return 0;
return Utils::findOrDefault(m_providers, Utils::equal(&GdbServerProvider::displayName, displayName));
}
void GdbServerProviderManager::notifyAboutUpdate(GdbServerProvider *provider)
{
if (!provider || !m_providers.contains(provider))
......
......@@ -56,6 +56,7 @@ public:
QList<GdbServerProvider *> providers() const;
QList<GdbServerProviderFactory *> factories() const;
GdbServerProvider *findProvider(const QString &id) const;
GdbServerProvider *findByDisplayName(const QString &displayName) const;
bool registerProvider(GdbServerProvider *);
void deregisterProvider(GdbServerProvider *);
......
......@@ -177,7 +177,7 @@ void CMakeProject::changeBuildDirectory(CMakeBuildConfiguration *bc, const QStri
parseCMakeLists();
}
QStringList CMakeProject::getCXXFlagsFor(const CMakeBuildTarget &buildTarget)
QStringList CMakeProject::getCXXFlagsFor(const CMakeBuildTarget &buildTarget, QByteArray *cachedBuildNinja)
{
QString makeCommand = QDir::fromNativeSeparators(buildTarget.makeCommand);
int startIndex = makeCommand.indexOf(QLatin1Char('\"'));
......@@ -206,12 +206,23 @@ QStringList CMakeProject::getCXXFlagsFor(const CMakeBuildTarget &buildTarget)
// found
// Get "all" target's working directory
if (!buildTargets().empty()) {
if (cachedBuildNinja->isNull()) {
QString buildNinjaFile = QDir::fromNativeSeparators(buildTargets().at(0).workingDirectory);
buildNinjaFile += QLatin1String("/build.ninja");
QFile buildNinja(buildNinjaFile);
if (buildNinja.exists()) {
buildNinja.open(QIODevice::ReadOnly | QIODevice::Text);
QTextStream stream(&buildNinja);
*cachedBuildNinja = buildNinja.readAll();
buildNinja.close();
} else {
*cachedBuildNinja = QByteArray();
}
}
if (cachedBuildNinja->isEmpty())
return QStringList();
QTextStream stream(cachedBuildNinja);
bool targetFound = false;
bool cxxFound = false;
QString targetSearchPattern = QString::fromLatin1("target %1").arg(buildTarget.title);
......@@ -231,7 +242,7 @@ QStringList CMakeProject::getCXXFlagsFor(const CMakeBuildTarget &buildTarget)
return line.mid(7).trimmed().split(QLatin1Char(' '), QString::SkipEmptyParts);
}
}
}
}
return QStringList();
}
......@@ -338,13 +349,15 @@ bool CMakeProject::parseCMakeLists()
ppBuilder.setQtVersion(activeQtVersion);
QByteArray cachedBuildNinja;
foreach (const CMakeBuildTarget &cbt, m_buildTargets) {
// This explicitly adds -I. to the include paths
QStringList includePaths = cbt.includeFiles;
includePaths += projectDirectory().toString();
ppBuilder.setIncludePaths(includePaths);
ppBuilder.setCFlags(getCXXFlagsFor(cbt));
ppBuilder.setCxxFlags(getCXXFlagsFor(cbt));
QStringList cxxflags = getCXXFlagsFor(cbt, &cachedBuildNinja);
ppBuilder.setCFlags(cxxflags);
ppBuilder.setCxxFlags(cxxflags);
ppBuilder.setDefines(cbt.defines);
ppBuilder.setDisplayName(cbt.title);
......
......@@ -139,7 +139,7 @@ private:
QString uiHeaderFile(const QString &uiFile);
void updateRunConfigurations(ProjectExplorer::Target *t);
void updateApplicationAndDeploymentTargets();
QStringList getCXXFlagsFor(const CMakeBuildTarget &buildTarget);
QStringList getCXXFlagsFor(const CMakeBuildTarget &buildTarget, QByteArray *cachedBuildNinja);
Internal::CMakeManager *m_manager;
ProjectExplorer::Target *m_activeTarget;
......
......@@ -39,9 +39,11 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projecttree.h>
#include <projectexplorer/session.h>
#include <utils/synchronousprocess.h>
......@@ -52,10 +54,6 @@ using namespace CMakeProjectManager::Internal;
CMakeManager::CMakeManager()
{
ProjectExplorer::ProjectTree *tree = ProjectExplorer::ProjectTree::instance();
connect(tree, &ProjectExplorer::ProjectTree::aboutToShowContextMenu,
this, &CMakeManager::updateContextMenu);
Core::ActionContainer *mbuild =
Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT);
Core::ActionContainer *mproject =
......@@ -64,14 +62,15 @@ CMakeManager::CMakeManager()