Commit 6e8ee747 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/4.3'

 Conflicts:
	src/plugins/debugger/cdb/cdbengine.cpp

Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
parents d571e8d4 3282f85f
doc/images/qml-script-console.png

5.23 KB | W: | H:

doc/images/qml-script-console.png

7.87 KB | W: | H:

doc/images/qml-script-console.png
doc/images/qml-script-console.png
doc/images/qml-script-console.png
doc/images/qml-script-console.png
  • 2-up
  • Swipe
  • Onion skin
doc/images/qmldesigner-states.png

3.02 KB | W: | H:

doc/images/qmldesigner-states.png

60.3 KB | W: | H:

doc/images/qmldesigner-states.png
doc/images/qmldesigner-states.png
doc/images/qmldesigner-states.png
doc/images/qmldesigner-states.png
  • 2-up
  • Swipe
  • Onion skin
doc/images/qtcreator-breakdown.png

24.6 KB | W: | H:

doc/images/qtcreator-breakdown.png

90.8 KB | W: | H:

doc/images/qtcreator-breakdown.png
doc/images/qtcreator-breakdown.png
doc/images/qtcreator-breakdown.png
doc/images/qtcreator-breakdown.png
  • 2-up
  • Swipe
  • Onion skin
doc/images/qtcreator-build-issues.png

5.44 KB | W: | H:

doc/images/qtcreator-build-issues.png

17.6 KB | W: | H:

doc/images/qtcreator-build-issues.png
doc/images/qtcreator-build-issues.png
doc/images/qtcreator-build-issues.png
doc/images/qtcreator-build-issues.png
  • 2-up
  • Swipe
  • Onion skin
doc/images/qtcreator-image-viewer.png

3.81 KB | W: | H:

doc/images/qtcreator-image-viewer.png

28.3 KB | W: | H:

doc/images/qtcreator-image-viewer.png
doc/images/qtcreator-image-viewer.png
doc/images/qtcreator-image-viewer.png
doc/images/qtcreator-image-viewer.png
  • 2-up
  • Swipe
  • Onion skin
doc/images/qtcreator-sidebar.png

15.5 KB | W: | H:

doc/images/qtcreator-sidebar.png

40.9 KB | W: | H:

doc/images/qtcreator-sidebar.png
doc/images/qtcreator-sidebar.png
doc/images/qtcreator-sidebar.png
doc/images/qtcreator-sidebar.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -1608,6 +1608,10 @@
\li \uicontrol {Open Documents} searches from all open files.
\li \uicontrol {Clang Query Project} explores the Clang abstract
syntax tree (AST) using AST matcher expressions. For more
information, see \l{Exploring Clang AST}.
\endlist
\li In the \uicontrol {File pattern} field, specify file patterns to
......@@ -1672,6 +1676,34 @@
\uicontrol {Search engine} field.
\endlist
\section1 Exploring Clang AST
You can use the experimental Clang Refactoring plugin to explore the Clang
AST using AST matcher expressions. For more information about constructing
matcher expressions, see
\l {http://clang.llvm.org/docs/LibASTMatchersReference.html}
{AST Matcher Reference}.
To explore the AST:
\list 1
\li Select \uicontrol Help > \uicontrol {About Plugins} > \uicontrol C++
> \uicontrol {ClangRefactoring} to enable the plugin.
\li Restart \QC to be able to use the plugin.
\li When searching, select \uicontrol {Clang Query Project} in the
\uicontrol {Scope} field.
\li Enter an AST matcher expression in the \uicontrol {Search for}
field.
\endlist
You can view the results of the query as links to code positions in the
\uicontrol {Search Results} output pane.
*/
......@@ -2473,8 +2505,14 @@
\row
\li Move Component into Separate File
\li Moves a QML type into a separate file
\li QML type name
\li Moves a QML type into a separate file. Give the new component a
name and select whether properties are set for the new component
or for the original one.
\image qtcreator-move-component-into-separate-file.png
\li QML type name. This action is also available in the
\uicontrol {Form Editor} in \QMLD.
\row
\li Split Initializer
\li Reformats a one-line type into a multi-line type. For example,
......
......@@ -123,12 +123,11 @@
\list 1
\li Select \uicontrol {Text Editor} to open Page1Form.ui.qml in the
text editor tab.
\li Right-click \uicontrol Image and select \uicontrol Refactoring >
\li Right-click the image and select
\uicontrol {Move Component into Separate File}.
\image qtcreator-move-component-into-separate-file.png
\li In the \uicontrol {Component name} field, enter \e Bubble.
\li Deselect the \uicontrol x, \uicontrol y, and
......
......@@ -78,28 +78,40 @@
\endlist
You can also use ready-made Qt Quick 1 Components (for Qt 4) to create
\section1 Using Qt Quick Controls
In Qt 4, ready-made Qt Quick 1 Components were provided for creating
screens with a native look and feel for a particular target platform.
Since Qt 5.1, Qt Quick Controls, Dialogs, and Layouts are available for
creating classic desktop-style user interfaces using Qt Quick 2.1. You can
use the Qt Quick Controls Styles to customize Qt Quick Controls.
In Qt 5.1, Qt Quick Controls, Dialogs, and Layouts were added for
creating classic desktop-style user interfaces using Qt Quick 2.1. The
Qt Quick Controls Styles could be used to customize Qt Quick Controls.
Since Qt 5.7, \l {Qt Quick Controls 2} replace Qt Quick Controls 1 and
Qt Labs Controls. These Controls provide lightweight QML types for creating
performant user interfaces for embedded and mobile devices. These controls
achieve improved efficiency by employing a simplified styling architecture
when compared to Qt Quick Controls, on which the module is based. These
types work in conjunction with Qt Quick and Qt Quick Layouts.
Qt Labs Controls. They provide lightweight QML types for creating performant
user interfaces for embedded and mobile devices.
Some ready-made controls, such as a gauge, dial, status indicator, and
tumbler, are provided by the \l {Qt Quick Extras} module.
Qt Quick Controls 2 achieve improved efficiency by employing a simplified
\l {Styling Qt Quick Controls 2}{styling architecture} when compared to
Qt Quick Controls, on which the module is based. \QMLD reads the
\c qtquickcontrols2.conf file that specifies the preferred style and some
style-specific arguments. To change the style, select another style from
the list on the toolbar. This enables you to check how your UI looks when
using the available styles.
For an example of defining your own style and using it in \QMLD, see
\l {Qt Quick Controls 2 - Flat Style}.
Qt Quick Controls 2 work in conjunction with Qt Quick and Qt Quick Layouts.
The \QC project wizards create Qt Quick applications that use Qt Quick
Components or Controls.
2 types or Qt Quick Controls 2 types.
Even if you use the Qt Quick Components, you can still write cross-platform
Even if you use Qt Quick Controls 2, you can still write cross-platform
applications, by using different sets of QML files for each platform.
Some ready-made controls, such as a gauge, dial, status indicator, and
tumbler, are provided by the \l {Qt Quick Extras} module.
\section1 Creating Components in Qt Quick Designer
\list 1
......
......@@ -135,5 +135,6 @@
application for example to mockup C++ items, then you can use \c{QML_DESIGNER_IMPORT_PATH}
in the \c{.pro} file.
Modules in the import paths defined in \c{QML_DESIGNER_IMPORT_PATH} will be used only in \QMLD.
For an example, see \l {Qt Quick Controls 2 - Contact List}.
*/
......@@ -45,19 +45,6 @@
The QML files in the project folder are displayed in \uicontrol {QML Components}
in the \uicontrol Library.
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, Qt Quick Controls, Dialogs, and Layouts are available for
creating classic desktop-style user interfaces using Qt Quick 2.1. You can
use the Qt Quick Controls Styles to customize Qt Quick Controls.
Since Qt 5.7, \l {Qt Quick Controls 2} replace Qt Quick Controls 1 and
Qt Labs Controls. These controls provide lightweight QML types for creating
performant user interfaces for embedded and mobile devices. These controls
achieve improved efficiency by employing a simplified styling architecture
when compared to Qt Quick Controls, on which the module is based. These
types work in conjunction with Qt Quick and Qt Quick Layouts.
\section1 Adding Components to Screens
\list 1
......@@ -72,6 +59,8 @@
\endlist
For more information about the ready-made components available, see
\l {Using Qt Quick Controls}.
\section1 Using Data Models
......@@ -338,7 +327,7 @@
example, you can use states to create two screens.
To add states, click the empty slot in the \uicontrol States pane. Then modify the
new state in the \uicontrol {Form Editor}.
new state in the \uicontrol {Form Editor} or the \uicontrol Properties pane.
\image qmldesigner-states.png "States pane"
......@@ -402,6 +391,18 @@
\endlist
\section2 Using SCXML State Machines
To use QML and \QMLD together with an SCXML state machine, add states and
bind them to the state machine in the \uicontrol Backends tab, as described
in \l {Managing C++ Backend Objects}.
In the \uicontrol States pane, you can edit the \c when condition of states
to map QML states to the states of the SCXML state machine. For an example,
see \l {Qt SCXML Traffic Light QML Example (Dynamic)}.
\image qmldesigner-states-when-condition.png
\section1 Animating Screens
To make movement between states smooth, you can specify transitions. You can
......
......@@ -1320,9 +1320,10 @@ class DumperBase:
derefValue.name = '*'
self.putItem(derefValue)
self.currentChildType = savedCurrentChildType
self.putOriginalAddress(value.pointer())
self.putAddress(value.address())
def putFormattedPointerX(self, value):
self.putOriginalAddress(value.address())
#warn("PUT FORMATTED: %s" % value)
pointer = value.pointer()
#warn('POINTER: 0x%x' % pointer)
......@@ -2671,7 +2672,6 @@ class DumperBase:
typeName = typeobj.name
self.addToCache(typeobj) # Fill type cache
self.putAddress(value.address())
if not value.lIsInScope:
self.putSpecialValue('optimizedout')
......@@ -2685,6 +2685,10 @@ class DumperBase:
# Try on possibly typedefed type first.
if self.tryPutPrettyItem(typeName, value):
if typeobj.code == TypeCodePointer:
self.putOriginalAddress(value.address())
else:
self.putAddress(value.address())
return
if typeobj.code == TypeCodeTypedef:
......@@ -2697,6 +2701,8 @@ class DumperBase:
self.putFormattedPointer(value)
return
self.putAddress(value.address())
if typeobj.code == TypeCodeFunction:
#warn('FUNCTION VALUE: %s' % value)
self.putType(typeobj)
......@@ -3142,7 +3148,7 @@ class DumperBase:
if self.dumper.isInt(other):
stripped = self.type.stripTypedefs()
if stripped.code == TypeCodePointer:
address = self.pointer() + stripped.dereference().size()
address = self.pointer() + stripped.dereference().size() * other
val = self.dumper.Value(self.dumper)
val.laddress = None
val.ldata = bytes(struct.pack(self.dumper.packCode + 'Q', address))
......
......@@ -349,3 +349,16 @@ def qdump__QtcDumperTest_PointerArray(d, value):
for i in d.childRange():
d.putSubItem(i, foos[i])
def qdump__QtcDumperTest_BufArray(d, value):
maxItems = 1000
buffer = value['buffer']
count = int(value['count'])
objsize = int(value['objSize'])
valueType = value.type.templateArgument(0)
d.putItemCount(count, maxItems)
d.putNumChild(count)
if d.isExpanded():
with Children(d, count, maxNumChild=maxItems, childType=valueType):
for i in d.childRange():
d.putSubItem(i, (buffer + (i * objsize)).dereference().cast(valueType))
......@@ -45,4 +45,9 @@ void DummyContextObject::setParentDummy(QObject *parentDummy)
}
}
bool DummyContextObject::runningInDesigner() const
{
return true;
}
} // namespace QmlDesigner
......@@ -35,12 +35,14 @@ class DummyContextObject : public QObject
{
Q_OBJECT
Q_PROPERTY(QObject * parent READ parentDummy WRITE setParentDummy NOTIFY parentDummyChanged DESIGNABLE false FINAL)
Q_PROPERTY(bool runningInDesigner READ runningInDesigner FINAL)
public:
explicit DummyContextObject(QObject *parent = 0);
QObject *parentDummy() const;
void setParentDummy(QObject *parentDummy);
bool runningInDesigner() const;
signals:
void parentDummyChanged();
......
......@@ -259,7 +259,7 @@ static inline void splitCommand(PCSTR args, Inserter it)
template<class StringContainer>
static inline StringContainer commandTokens(PCSTR args, int *token = 0)
{
typedef StringContainer::iterator ContainerIterator;
typedef typename StringContainer::iterator ContainerIterator;
if (token)
*token = -1; // Handled as 'display' in engine, so that user can type commands
......
......@@ -75,7 +75,7 @@ void AbstractSshChannel::requestSessionStart()
m_sendFacility.sendSessionPacket(m_localChannel, initialWindowSize(), maxPacketSize());
setChannelState(SessionRequested);
m_timeoutTimer.start(ReplyTimeout);
} catch (const Botan::Exception &e) {
} catch (const std::exception &e) {
qCWarning(sshLog, "Botan error: %s", e.what());
closeChannel();
}
......@@ -86,7 +86,7 @@ void AbstractSshChannel::sendData(const QByteArray &data)
try {
m_sendBuffer += data;
flushSendBuffer();
} catch (const Botan::Exception &e) {
} catch (const std::exception &e) {
qCWarning(sshLog, "Botan error: %s", e.what());
closeChannel();
}
......
......@@ -91,7 +91,7 @@ void SshChannelManager::handleChannelOpen(const SshIncomingPacket &packet)
try {
m_sendFacility.sendChannelOpenFailurePacket(channelOpen.remoteChannel, reason,
QByteArray());
} catch (const Botan::Exception &e) {
} catch (const std::exception &e) {
qCWarning(sshLog, "Botan error: %s", e.what());
}
return;
......
......@@ -200,7 +200,7 @@ int SshConnection::closeAllChannels()
{
try {
return d->m_channelManager->closeAllChannels(Internal::SshChannelManager::CloseAllRegular);
} catch (const Botan::Exception &e) {
} catch (const std::exception &e) {
qCWarning(Internal::sshLog, "%s: %s", Q_FUNC_INFO, e.what());
return -1;
}
......@@ -346,7 +346,7 @@ void SshConnectionPrivate::handleIncomingData()
} catch (const SshClientException &e) {
closeConnection(SSH_DISCONNECT_BY_APPLICATION, e.error, "",
e.errorString);
} catch (const Botan::Exception &e) {
} catch (const std::exception &e) {
closeConnection(SSH_DISCONNECT_BY_APPLICATION, SshInternalError, "",
tr("Botan library exception: %1").arg(QString::fromLatin1(e.what())));
}
......
......@@ -272,10 +272,7 @@ bool SshEncryptionFacility::createAuthenticationKeyFromPKCS8(const QByteArray &p
Q_FUNC_INFO);
return false;
}
} catch (const Exception &ex) {
error = QLatin1String(ex.what());
return false;
} catch (const Decoding_Error &ex) {
} catch (const std::exception &ex) {
error = QLatin1String(ex.what());
return false;
}
......@@ -360,10 +357,7 @@ bool SshEncryptionFacility::createAuthenticationKeyFromOpenSSL(const QByteArray
sequence.discard_remaining();
sequence.verify_end();
} catch (const Exception &ex) {
error = QLatin1String(ex.what());
return false;
} catch (const Decoding_Error &ex) {
} catch (const std::exception &ex) {
error = QLatin1String(ex.what());
return false;
}
......
......@@ -103,7 +103,7 @@ void SshDirectTcpIpTunnel::initialize()
d->m_originatingHost.toUtf8(), d->m_originatingPort);
d->setChannelState(AbstractSshChannel::SessionRequested);
d->m_timeoutTimer.start(d->ReplyTimeout);
} catch (const Botan::Exception &e) { // Won't happen, but let's play it safe.
} catch (const std::exception &e) { // Won't happen, but let's play it safe.
qCWarning(sshLog, "Botan error: %s", e.what());
d->closeChannel();
}
......
......@@ -45,7 +45,7 @@ void SshForwardedTcpIpTunnelPrivate::handleOpenSuccessInternal()
try {
m_sendFacility.sendChannelOpenConfirmationPacket(remoteChannel(), localChannelId(),
initialWindowSize(), maxPacketSize());
} catch (const Botan::Exception &e) { // Won't happen, but let's play it safe.
} catch (const std::exception &e) { // Won't happen, but let's play it safe.
qCWarning(sshLog, "Botan error: %s", e.what());
closeChannel();
}
......
......@@ -77,6 +77,8 @@ void SshKeyCreationDialog::keyTypeChanged()
keySizes << QLatin1String("1024") << QLatin1String("2048") << QLatin1String("4096");
else if (m_ui->ecdsa->isChecked())
keySizes << QLatin1String("256") << QLatin1String("384") << QLatin1String("521");
else if (m_ui->dsa->isChecked())
keySizes << QLatin1String("1024");
m_ui->comboBox->addItems(keySizes);
if (!keySizes.isEmpty())
m_ui->comboBox->setCurrentIndex(0);
......
......@@ -83,7 +83,7 @@ bool SshKeyGenerator::generateKeys(KeyType type, PrivateKeyFormat format, int ke
generateOpenSslPublicKeyString(key);
}
return true;
} catch (const Exception &e) {
} catch (const std::exception &e) {
m_error = tr("Error generating key: %1").arg(QString::fromLatin1(e.what()));
return false;
}
......
......@@ -209,7 +209,7 @@ void SshRemoteProcess::sendSignal(Signal signal)
QSSH_ASSERT_AND_RETURN(signalString);
d->m_sendFacility.sendChannelSignalPacket(d->remoteChannel(), signalString);
}
} catch (const Botan::Exception &e) {
} catch (const std::exception &e) {
setErrorString(QString::fromLatin1(e.what()));
d->closeChannel();
}
......
......@@ -86,7 +86,7 @@ void SshTcpIpForwardServer::initialize()
emit stateChanged(Initializing);
d->m_sendFacility.sendTcpIpForwardPacket(d->m_bindAddress.toUtf8(), d->m_bindPort);
d->m_timeoutTimer.start(d->ReplyTimeout);
} catch (const Botan::Exception &e) {
} catch (const std::exception &e) {
qCWarning(sshLog, "Botan error: %s", e.what());
d->m_timeoutTimer.stop();
setClosed();
......@@ -105,7 +105,7 @@ void SshTcpIpForwardServer::close()
d->m_sendFacility.sendCancelTcpIpForwardPacket(d->m_bindAddress.toUtf8(),
d->m_bindPort);
d->m_timeoutTimer.start(d->ReplyTimeout);
} catch (const Botan::Exception &e) {
} catch (const std::exception &e) {
qCWarning(sshLog, "Botan error: %s", e.what());
d->m_timeoutTimer.stop();
setClosed();
......
......@@ -61,7 +61,9 @@
#include <QDirIterator>
#include <QFileInfo>
#include <QHostAddress>
#include <QLoggingCategory>
#include <QProcess>
#include <QRegularExpression>
#include <QSettings>
#include <QStringList>
#include <QTcpSocket>
......@@ -72,6 +74,10 @@
using namespace ProjectExplorer;
using namespace Utils;
namespace {
Q_LOGGING_CATEGORY(avdConfigLog, "qtc.android.androidconfig")
}
namespace Android {
using namespace Internal;
......@@ -114,6 +120,7 @@ namespace {
const QLatin1String changeTimeStamp("ChangeTimeStamp");
const QLatin1String sdkToolsVersionKey("Pkg.Revision");
const QLatin1String ndkRevisionKey("Pkg.Revision");
static QString sdkSettingsFileName()
{
......@@ -758,6 +765,53 @@ FileName AndroidConfig::ndkLocation() const
return m_ndkLocation;
}
QVersionNumber AndroidConfig::ndkVersion() const
{
QVersionNumber version;
if (!m_ndkLocation.exists()) {
qCDebug(avdConfigLog) << "Can not find ndk version. Check NDK path."
<< m_ndkLocation.toString();
return version;
}
Utils::FileName ndkPropertiesPath(m_ndkLocation);
ndkPropertiesPath.appendPath("source.properties");
if (ndkPropertiesPath.exists()) {
// source.properties files exists in NDK version > 11
QSettings settings(ndkPropertiesPath.toString(), QSettings::IniFormat);
auto versionStr = settings.value(ndkRevisionKey).toString();
version = QVersionNumber::fromString(versionStr);
} else {
// No source.properties. There should be a file named RELEASE.TXT
Utils::FileName ndkReleaseTxtPath(m_ndkLocation);
ndkReleaseTxtPath.appendPath("RELEASE.TXT");
Utils::FileReader reader;
QString errorString;
if (reader.fetch(ndkReleaseTxtPath.toString(), &errorString)) {
// RELEASE.TXT contains the ndk version in either of the following formats:
// r6a
// r10e (64 bit)
QString content = QString::fromUtf8(reader.data());
QRegularExpression re("(r)(?<major>[0-9]{1,2})(?<minor>[a-z]{1,1})");
QRegularExpressionMatch match = re.match(content);
if (match.hasMatch()) {
QString major = match.captured("major");
QString minor = match.captured("minor");
// Minor version: a = 0, b = 1, c = 2 and so on.
// Int equivalent = minorVersionChar - 'a'. i.e. minorVersionChar - 97.
version = QVersionNumber::fromString(QString("%1.%2.0").arg(major)
.arg((int)minor[0].toLatin1() - 97));
} else {
qCDebug(avdConfigLog) << "Can not find ndk version. Can not parse RELEASE.TXT."
<< content;
}
} else {
qCDebug(avdConfigLog) << "Can not find ndk version." << errorString;
}
}
return version;
}
void AndroidConfig::setNdkLocation(const FileName &ndkLocation)
{
m_ndkLocation = ndkLocation;
......
......@@ -115,6 +115,7 @@ public:
QVersionNumber sdkToolsVersion() const;
Utils::FileName ndkLocation() const;
QVersionNumber ndkVersion() const;
void setNdkLocation(const Utils::FileName &ndkLocation);
Utils::FileName antLocation() const;
......
......@@ -104,8 +104,10 @@ RunControl *AndroidDebugSupport::createDebugRunControl(RunConfiguration *runConf
params.displayName = AndroidManager::packageName(target);
params.remoteSetupNeeded = true;
params.useContinueInsteadOfRun = true;