Commit 6fb94a7b authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

Merge branch '2.7'

Conflicts:
	doc/src/qtquick/qtquick-components.qdoc
	doc/src/qtquick/qtquick-designer.qdoc
	qtcreator.pri
	qtcreator.qbs
	src/plugins/cppeditor/cppinsertdecldef.cpp
	src/plugins/qnx/qnxruncontrolfactory.cpp

Change-Id: I0a37a07c42719bc0d9ef5b3ac4641d01a63c0d88
parents c6bee7e2 8ca5b55a
doc/images/qtcreator-deploy-android.png

44.6 KB | W: | H:

doc/images/qtcreator-deploy-android.png

29.9 KB | W: | H:

doc/images/qtcreator-deploy-android.png
doc/images/qtcreator-deploy-android.png
doc/images/qtcreator-deploy-android.png
doc/images/qtcreator-deploy-android.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -70,16 +70,17 @@
several options, such as the
\l{http://developer.android.com/sdk/index.html}{Android SDK} and
\l{http://developer.android.com/tools/sdk/ndk/index.html}
{Android NDK} from Google or the
{Android NDK} from Google (supported for development with Qt 5) or the
\l{http://necessitas.kde.org/necessitas/necessitas_sdk_installer.php}
{Necessitas SDK}.
{Necessitas SDK} (supported for development with Qt 4).
\endlist
\section1 Configuring Connections
\section1 Developing with Qt 4
The Qt for Android SDK automatically sets the paths to the required software
in \QC.
The Necessitas SDK automatically sets the paths to the required software
in \QC, but you need to add the Qt version. \QC can then create the
necessary kits for you.
To configure connections between \QC and Android devices:
......@@ -89,8 +90,8 @@
\gui {Qt Versions} > \gui Add to add the path to \c qmake path in
the Qt for Android SDK.
\li Select \gui Tools > \gui Options > \gui Android to view and edit
paths to the required software.
\li Select \gui Tools > \gui Options > \gui Android to check the paths
to the required software.
\image qtcreator-options-android.png "Android options"
......@@ -98,9 +99,12 @@
check box to allow \QC to create the kits for you. \QC displays a
warning if it cannot find a suitable Qt version.
\li Select \gui {Start Android AVD Manager} to create Android virtual
devices (AVD) that enable you to emulate device hardware and software
on the Android Emulator.
\li To create an application, select \gui File >
\gui {New File or Project} > \gui Applications >
\gui {Qt Quick Application 1 (Built-in Elements)} or
\gui {Qt Quick Application 2 (Built-in Elements)} > \gui Choose, and
follow the instructions of the wizard. For more information, see
\l{Creating Qt Quick Projects}.
\li To specify information for the Android manifest file, select
\gui Projects > \gui Run for the \gui Android kit.
......@@ -108,7 +112,7 @@
\li Select \gui Details to view the
\gui {Package configurations}. For more information about the
options you have, see
\l{Specifying Run Settings for Android Devices}.
\l{Specifying Settings for Application Packages}.
\li To specify settings for deploying applications to Android, select
\gui Details to view the \gui {Deploy configurations}. For more
......@@ -117,6 +121,69 @@
\endlist
\section1 Developing with Qt 5
You must download and install the latest Android NDK and SDK, and update the
SDK to get the API and tools packages needed for development. In addition,
you must install Qt for Android from the Qt 5.1 packages.
For more information, see
\l{http://qt-project.org/doc/qt-5.0/qtdoc/android-support.html}{Android}.
To configure connections between \QC and Android devices:
\list 1
\li Select \gui Tools > \gui Options > \gui Android to add paths to the
Android NDK and SDK.
\image qtcreator-options-android1.png "Android options"
\li Select the \gui {Automatically create kits for Android tool chains}
check box to allow \QC to create the kits for you. \QC displays a
warning if it cannot find a suitable Qt version.
\li Select \gui File > \gui {New File or Project} > \gui Applications >
\gui {Qt Quick Application 2 (Built-in Elements)} > \gui Choose, and
follow the instructions of the wizard. For more information, see
\l{Creating Qt Quick Projects}.
\li To specify information for the Android manifest file, select
\gui Projects > \gui Run for the \gui Android kit.
\li Select \gui Details to view the
\gui {Package configurations}. For more information about the
options you have, see
\l{Specifying Settings for Application Packages}.
\li To specify settings for deploying applications to Android, select
\gui Details to view the \gui {Deploy configurations}. For more
information about the options you have, see
\l{Deploying Applications to Android Devices}.
\li Enable debugging on your Android device and connect it to the PC.
Debugging is enabled in different ways on different Android devices.
Look for \gui {USB Debugging} under \gui {Developer Options}. On
some devices \gui {Developer Options} is hidden and becomes visible
when you tap the \gui {Build number} field in \gui Settings >
\gui About several times.
\endlist
\section1 Using the Android Emulator
To run your application on the Android Emulator, you must create Android
virtual devices (AVD). Select \gui Tools > \gui Options > \gui Android >
\gui Add. If you run an application without a device connected to the
development PC and without an AVD specified, \QC asks you to add an AVD.
To manage AVDs, select \gui {Start Android AVD Manager}.
\note The Android Emulator has a bug that prevents it from starting on some
systems. If the Android Emulator does not start, you can try starting it
manually by running the \c {emulator-arm} command from the command line.
\section1 Debugging on Android Devices
\QC is integrated with the GDB and GDB server that are delivered with the
......
\section2 Specifying Run Settings for Android Devices
To specify information for the Android manifest file, select \gui Projects >
\gui Run > \gui {Package configurations}. The Android system uses the
information from the file to start application components.
In \gui {Package configurations}, you can specify information for the
Android manifest file. The Android system uses the information from the file
to start application components.
\section3 Specifying Package Data
\section2 Specifying Package Data
In the \gui Manifest tab, you can select the API level to use for the
Android target SDK and the name and version number for the application
......@@ -30,14 +28,14 @@
\l{http://developer.android.com/guide/components/fundamentals.html}
{Android Application Fundamentals}.
\section3 Specifying Application Data
\section2 Specifying Application Data
In the \gui Application tab, you can select an icon for the application and
give the application a name.
\image qtcreator-android-application.png "Application tab"
\section3 Setting Permissions
\section2 Setting Permissions
In the \gui Permissions tab, you can specify the permissions that your
application needs. Users are asked to grant the permissions when they
......@@ -49,7 +47,7 @@
Select from existing Android permissions or add new ones to deploy the
application to a particular Android OS.
\section3 Selecting Qt Libraries
\section2 Selecting Qt Libraries
In the \gui Libraries tab, specify which Qt libraries the application uses.
To automatically determine this, select \gui {Read Infomation from
......@@ -66,7 +64,7 @@
In addition, the Java Loader uses this list to determine which Qt Libraries
and other prebundled libraries to load with your application.
\section3 Signing Android Packages
\section2 Signing Android Packages
In the \gui {Sign Package} tab, you can sign the Android package by using
a private key from the keystore. To create new keys, select \gui Create.
......
......@@ -25,31 +25,132 @@
\title Deploying Applications to Android Devices
When you select a \gui {Qt for Android Kit} for a project, \QC creates and
maintains a set of files that are required to make your application run on
Android devices.
\QC adds the following files to your project:
\list
\li Java files, which serve as the entry point into your application and
that automatically load Qt and execute the native code in your
application.
\li AndroidManifest.xml, which provides meta-information about your
application.
\li Other XML files, which specify the dependencies of your application.
\li Resource files.
\li Libraries and QML files, which can be included in the project
depending on the deployment method that you select.
\endlist
\QC adds the files to the project to a subdirectory called \c android. The
contents of the \c android folder are used to create a distributable
application package.
\QC supports the following methods of deployment for Android applications:
\list
\li As a stand-alone, distributable application package (APK).
\li As a minimal APK that contains a dependency to the Ministro tool.
The Ministro tool downloads the necessary Qt libraries from a
repository of your choice.
\li As an incomplete APK that is suitable for testing and debugging
applications on a device connected to the development host. The APK
relies on the device containing the Qt libraries in the correct
location. \QC copies the libraries to that location the first time
you deploy the application.
\endlist
The default option depends on whether you are developing with Qt 4 or Qt 5.
The Necessitas SDK does not support bundling Qt libraries with applications,
so you must use Ministro when developing with Qt 4.
\section1 Specifying Settings for Application Packages
On Android, applications are distributed in packages called APK. \QC creates
the APK for you. If you want to do this manually, you must first make sure
that the appropriate packaging and build files are in place. \QC places the
files in the \c android subfolder of the project.
\include android/creator-projects-settings-run-android.qdocinc
\section1 Deploying Application Packages
To specify settings for deploying applications to Android devices, select
\gui Projects > \gui Run.
\gui Projects > \gui Run > \gui {Deploy configurations} > \gui Details.
\image qtcreator-deploy-android.png "Deploy configurations"
Select the \gui {Use Qt libraries from device} option to use Qt libraries installed
on the device. If you also select the \gui {Use local Qt libraries} check box, \QC passes
special parameters to the application, forcing it to use Qt libraries from the
\c{/data/local/tmp/qt} folder on the device. If you do not select it, the application needs
the Ministro package to run.
To copy Qt libraries and files to the project directory and to bundle them
as part of the APK, select the \gui {Use Qt libraries from device} option
and the \gui {Use local Qt libraries} check box. This is the default option
when developing with Qt 5.
\section1 Using Ministro to Install Qt Libraries
To minimize the size of your APK, you can package the application with an
external dependency called Ministro. If a user downloads your application,
and it is the first application on their device to depend on Ministro, they
are asked to install Ministro before they can run your application.
Ministro serves as a central repository for Qt libraries. This enables
several applications to share the libraries, which only need to be installed
once. To use this deployment method, you must set up a repository for the
libraries that you want to distribute. To specify the
repository URL, edit the file \c {android/res/values/libs.xml}, which is
created by \QC.
To use Ministro to install the Qt libraries, select the
\gui {Use Qt libraries from device} option (without any other options).
Select the \gui {Deploy local Qt libraries} option to deploy Qt libraries from
the specified Qt for Android SDK (for example, android-lighthouse-4.8.0).
This option enables you to develop on the Qt framework to test it. This
option automatically selects the \gui {Use local Qt libraries} check box, but you
can use it also independently.
This is the default option when developing with Qt 4.
\section1 Deploying Qt Libraries for Debugging
To test your application on a device that is physically connected to the
development host (or on an emulator), you can copy the Qt libraries into a
temporary directory on your device and run the application against them.
An APK built in this way is not distributable, since it relies on the device
containing the Qt libraries in the correct location. However, as the Qt
libraries are only copied into the device once, this method provides a fast
turn-around time, and is therefore convenient for testing the application
during development.
Select \gui Projects > \gui Run > \gui {Deploy configurations} >
\gui Details, and then select the \gui {Deploy local Qt libraries} option
and the \gui {Use local Qt libraries} check box to deploy Qt libraries to
the \c{/data/local/tmp/qt} folder on the device and to run the application
against them.
\section1 Installing Ministro
To install Ministro, select the \gui {Install Ministro, system-wide Qt shared
libraries installer} option. You
can use this option also to install any Android package (.apk). You can use this
option to install applications on an Android Virtual Device (AVD). Download
the Ministro .apk from the Google Market or from the
The easiest way to install Ministro is to do it on the device via Google
Play. When you run the application for the first time, a dialog pops up and
guides you through the installation.
To use \QC to install Ministro, you must first download the Ministro .apk
from the Google Market or from the
\l{http://necessitas.kde.org/necessitas/ministro.php}{Ministro} home page.
Then select the \gui {Install Ministro, system-wide Qt shared
libraries installer} option in \gui Projects > \gui Run >
\gui {Deploy configurations} > \gui Details.
You can use this option also to install any Android package (.apk).
You can use this option to install applications on an Android Virtual
Device (AVD).
*/
......@@ -147,6 +147,14 @@
installed on your computer to create and run this type of
projects
\li Qt Quick 2 UI with Controls
Uses a single QML file that contains the main view and that
imports the Qt Quick Controls. You can view the UI in the QML
Scene and you need not build it. This project requires that
you have installed the Qt Quick Controls for your Qt version
(5.1 or later)
\endlist
\li Libraries
......
......@@ -51,7 +51,6 @@
\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 android/creator-projects-settings-run-android.qdocinc
\endif
\section1 Specifying a Custom Executable to Run
......
......@@ -74,12 +74,16 @@
\endlist
QML types allow you to write cross-platform applications with custom look
and feel. You can also use ready-made Qt Quick Components that enable you to
create applications with a native look and feel for a particular target
platform. You can install the components as part of the Qt 4 SDK.
and feel. You can also use ready-made Qt Quick Components (for Qt 4) to
create screens with a native look and feel for a particular target platform.
Since Qt 5.1, a set of Qt Quick Controls is available for creating classic
desktop-style user interfaces using Qt Quick 2.1.
When you use the \QC project wizard to create Qt Quick applications, you
can select which component set to use in your application.
You can install Qt Quick 1 Components as part of the Qt 4 SDK and the Qt
Quick Controls as part of Qt 5.1, or later.
The \QC project wizards create Qt Quick applications that use Qt Quick
Components or Controls.
Even if you use the Qt Quick Components, you can still write cross-platform
applications, by using different sets of QML files for each platform.
......
......@@ -64,6 +64,10 @@
need to have the development environment installed on your
computer to create and run this type of project.
\gui {Qt Quick 2 UI with Controls} imports the Qt Quick Controls.
This project requires that you have installed the Qt Quick Controls
for your Qt version (5.1 or later).
\li \gui {Qt Quick Application (from Existing QML File)} converts
existing Qt Quick applications to Qt Quick application projects.
This enables you to run them from \QC and to deploy them to mobile
......@@ -80,8 +84,10 @@
\section1 Creating Qt Quick UI Projects
Select \gui File > \gui {New File or Project} > \gui Applications > \gui {Qt Quick 1 UI}
or \gui {Qt Quick 2 UI} > \gui Choose and follow the instructions of the wizard.
Select \gui File > \gui {New File or Project} > \gui Applications >
\gui {Qt Quick 1 UI}, \gui {Qt Quick 2 UI}, or
\gui {Qt Quick 2 UI with Controls} > \gui Choose and follow the instructions
of the wizard.
\QC creates the following files:
......
......@@ -56,7 +56,8 @@
\li \gui {Library} pane (2) displays the building blocks that you can use to
design applications: predefined QML types, your own QML
components, Qt Quick components that you import to the project, and
components, Qt Quick components or Qt Quick Controls that you import
to the project, and
other resources.
\li \gui Canvas (3) is the working area where you create QML components and
......@@ -150,18 +151,23 @@
components, basic types, positioner types, and views.
Sets of UI components with the look and feel of a particular mobile device
platform have been defined for Qt Quick. They are based on standard QML
types. To view the UI components in the \gui {Library} pane, add import
platform have been defined for Qt Quick 1. Since Qt 5.1, a set of Qt Quick
Controls is available for creating classic desktop-style user interfaces
using Qt Quick 2.1. The Qt Quick Components and Controls are based on
standard QML types. To view the components and controls in the
\gui {Library} pane, add import
statements to the .pro file of your project. For example:
\list
\li \c {import com.nokia.meego 1.0} for MeeGo
\li \c {import QtQuick.Controls 1.0} for Qt Quick Controls
\endlist
The Qt Quick Application wizard adds the import statements automatically
when you select the component set to use for your project.
The \gui {Qt Quick Application} wizards for a particular platform, such as
MeeGo Harmattan, and the \gui {Qt Quick 2 UI with Controls} wizard add the
import statements automatically.
\image qmldesigner-qml-components.png "QML Components pane"
......
......@@ -40,9 +40,12 @@
in the \gui Library pane.
\endif
You can also use ready-made Qt Quick Components that allow you to create
screens with a native look and feel for a particular target platform. You
can install the components as part of the Qt 4 SDK.
You can also use ready-made Qt Quick 1 Components (for Qt 4) to create
screens with a native look and feel for a particular target platform.
Since Qt 5.1, a set of Qt Quick Controls is available for creating classic
desktop-style user interfaces using Qt Quick 2.1. You
can install Qt Quick 1 Components as part of the Qt 4 SDK and the Qt Quick
Controls as part of Qt 5.1, or later.
\if defined(qcmanual)
\section1 Adding Components to Screens
......
......@@ -2,7 +2,7 @@ include(../../../qtcreator.pri)
TEMPLATE = app
TARGET = phony_target3
CONFIG -= qt separate_debug_info gdb_dwarf_index
CONFIG -= qt sdk separate_debug_info gdb_dwarf_index
QT =
LIBS =
macx:CONFIG -= app_bundle
......
......@@ -38,6 +38,8 @@ exists(src/shared/qbs/qbs.pro) {
system("echo CONFIG += qbs_no_dev_install >> $$qmake_cache")
}
_QMAKE_CACHE_ = $$qmake_cache # Qt 4 support prevents us from using cache(), so tell Qt 5 about the cache
contains(QT_ARCH, i386): ARCHITECTURE = x86
else: ARCHITECTURE = $$QT_ARCH
......
......@@ -139,7 +139,7 @@ def copy_ignore_patterns_helper(dir, filenames):
filenames = wrong_dlls + filter(windows_debug_files_filter, filenames)
return filenames
def copy_qt_libs(install_dir, qt_libs_dir, qt_plugin_dir, qt_import_dir, plugins, imports):
def copy_qt_libs(install_dir, qt_libs_dir, qt_plugin_dir, qt_import_dir, qt_qml_dir, plugins, imports):
print "copying Qt libraries..."
if sys.platform.startswith('win'):
......@@ -175,7 +175,7 @@ def copy_qt_libs(install_dir, qt_libs_dir, qt_plugin_dir, qt_import_dir, plugins
print "Copying plugins:", plugins
for plugin in plugins:
target = os.path.join(install_dir, 'bin', plugin)
target = os.path.join(install_dir, 'bin', 'plugins', plugin)
if (os.path.exists(target)):
shutil.rmtree(target)
pluginPath = os.path.join(qt_plugin_dir, plugin)
......@@ -184,16 +184,26 @@ def copy_qt_libs(install_dir, qt_libs_dir, qt_plugin_dir, qt_import_dir, plugins
print "Copying imports:", imports
for qtimport in imports:
target = os.path.join(install_dir, 'bin', qtimport)
target = os.path.join(install_dir, 'bin', 'imports', qtimport)
if (os.path.exists(target)):
shutil.rmtree(target)
shutil.copytree(os.path.join(qt_import_dir, qtimport), target, ignore=copy_ignore_func, symlinks=True)
if (os.path.exists(qt_qml_dir)):
print "Copying qt quick 2 imports"
target = os.path.join(install_dir, 'bin', 'qml')
if (os.path.exists(target)):
shutil.rmtree(target)
shutil.copytree(qt_qml_dir, target, ignore=copy_ignore_func, symlinks=True)
def add_qt_conf(install_dir):
print "Creating qt.conf:"
f = open(install_dir + '/bin/qt.conf', 'w')
f.write('[Paths]\n')
f.write('Libraries=../lib/qtcreator\n')
f.write('Plugins=plugins\n')
f.write('Imports=imports\n')
f.write('Qml2Imports=qml\n')
f.close()
def copy_translations(install_dir, qt_tr_dir):
......@@ -249,6 +259,7 @@ def main():
QT_INSTALL_BINS = readQmakeVar(qmake_bin, 'QT_INSTALL_BINS')
QT_INSTALL_PLUGINS = readQmakeVar(qmake_bin, 'QT_INSTALL_PLUGINS')
QT_INSTALL_IMPORTS = readQmakeVar(qmake_bin, 'QT_INSTALL_IMPORTS')
QT_INSTALL_QML = readQmakeVar(qmake_bin, 'QT_INSTALL_QML')
QT_INSTALL_TRANSLATIONS = readQmakeVar(qmake_bin, 'QT_INSTALL_TRANSLATIONS')
plugins = ['accessible', 'codecs', 'designer', 'iconengines', 'imageformats', 'platforms', 'printsupport', 'sqldrivers']
......@@ -259,9 +270,9 @@ def main():
debug_build = is_debug_build(install_dir)
if sys.platform.startswith('win'):
copy_qt_libs(install_dir, QT_INSTALL_BINS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, plugins, imports)
copy_qt_libs(install_dir, QT_INSTALL_BINS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, QT_INSTALL_QML, plugins, imports)
else:
copy_qt_libs(install_dir, QT_INSTALL_LIBS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, plugins, imports)
copy_qt_libs(install_dir, QT_INSTALL_LIBS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, QT_INSTALL_QML, plugins, imports)
copy_translations(install_dir, QT_INSTALL_TRANSLATIONS)
if not sys.platform.startswith('win'):
......
......@@ -97,12 +97,15 @@ bool Qt5InformationNodeInstanceServer::isDirtyRecursiveForNonInstanceItems(QQuic
return true;
foreach (QQuickItem *childItem, item->childItems()) {
if (!hasInstanceForObject(childItem) && DesignerSupport::isDirty(childItem, informationsDirty))
return true;
if (!hasInstanceForObject(childItem)) {
if (DesignerSupport::isDirty(childItem, informationsDirty))
return true;
else if (isDirtyRecursiveForNonInstanceItems(childItem))
return true;
}
}
return false;
}
void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
......
......@@ -34,6 +34,9 @@
#include <qt5nodeinstanceclientproxy.h>
#include <QQmlComponent>
#include <QQmlEngine>
#ifdef ENABLE_QT_BREAKPAD
#include <qtsystemexceptionhandler.h>
#endif
......@@ -51,6 +54,25 @@ int main(int argc, char *argv[])
QCoreApplication::setApplicationName("Qml2Puppet");
QCoreApplication::setApplicationVersion("1.0.0");
if (application.arguments().count() == 2 && application.arguments().at(1) == "--test") {
qDebug() << QCoreApplication::applicationVersion();
QQmlEngine engine;
QQmlComponent component(&engine);
component.setData("import QtQuick 2.0\nItem {\n}\n", QUrl::fromLocalFile("test.qml"));
QObject *object = component.create();
if (object) {
qDebug() << "Basic QtQuick 2.0 working...";
} else {
qDebug() << "Basic QtQuick 2.0 not working...";
qDebug() << component.errorString();
}
delete object;
return 0;
}
if (application.arguments().count() == 2 && application.arguments().at(1) == "--version") {
qDebug() << QCoreApplication::applicationVersion();
return 0;
......
......@@ -61,7 +61,7 @@ QWidget {
backendValues.source.value = fileName;
}
itemNode: anchorBackend.itemNode
filter: "*.png *.gif *.jpg *.bmp *.jpeg"
filter: "*.png *.gif *.jpg *.bmp *.jpeg *.svg"
showComboBox: true
}
}
......
......@@ -59,7 +59,7 @@ QWidget {
backendValues.source.value = fileName;
}