platform/upstream/qtdeclarative.git
8 years agoDoc: Fix QtQuick::EnterKey QML type documentation
Topi Reinio [Tue, 4 Aug 2015 11:41:12 +0000 (13:41 +0200)]
Doc: Fix QtQuick::EnterKey QML type documentation

Fix QDoc warnings and edit language/formatting.

Change-Id: I38f4683c582e444079bff488d0d2e0d9682a7085
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
8 years agoMove QQmlConfigurableDebugService into qmltooling/shared
Ulf Hermann [Tue, 21 Jul 2015 14:39:57 +0000 (16:39 +0200)]
Move QQmlConfigurableDebugService into qmltooling/shared

It's only used by plugins now.

Change-Id: Ia73a2a22ba6bccbd85bbca6eda2fb9f5a8d6dd3b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoMove debugger-specific services into a common plugin
Ulf Hermann [Tue, 21 Jul 2015 14:11:16 +0000 (16:11 +0200)]
Move debugger-specific services into a common plugin

Change-Id: Icd4e6a6c57bc3ac65cb43d2329d236012b988678
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoMove profiler and engine control services into a plugin
Ulf Hermann [Mon, 20 Jul 2015 16:09:42 +0000 (18:09 +0200)]
Move profiler and engine control services into a plugin

Change-Id: I12627a07ceedea4aceafa6f0e630c0cab69d156d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoClean up QQmlDebugConnector's addService() and removeService()
Ulf Hermann [Thu, 16 Jul 2015 14:17:17 +0000 (16:17 +0200)]
Clean up QQmlDebugConnector's addService() and removeService()

As we look up services by name we should also add and remove them by
name. As the thread doesn't run during adding and removing of services
we don't have to check the client plugins for the initial state.
It's also a good idea to eventually disconnect any signals that we
connect on addService().

Change-Id: I9acd17d2caafe15831f32b7b959dc2dea9cab08c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoDon't ask QQmlDebugService for name() when we already know it
Ulf Hermann [Thu, 16 Jul 2015 09:04:39 +0000 (11:04 +0200)]
Don't ask QQmlDebugService for name() when we already know it

Change-Id: Ibae6602bd1725d98ddaa751bfc00391a20a1460e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoHide QQmlInspectorServiceImpl in .cpp file
Ulf Hermann [Wed, 15 Jul 2015 16:09:54 +0000 (18:09 +0200)]
Hide QQmlInspectorServiceImpl in .cpp file

Nobody needs to access it anymore.

Change-Id: Ib782037ac0a8721997f6d36995d03f42c060602b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove extra layer of indirection from inspector service
Ulf Hermann [Wed, 15 Jul 2015 16:01:53 +0000 (18:01 +0200)]
Remove extra layer of indirection from inspector service

We are not loading any secondary inspector plugins anymore, so the
logic to select them is unnecessary now.

Change-Id: Ic44c49e41c6bff4b19ce527df4657c6d73c0c82b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoPass QQmlDebugService to AbstractViewInspector
Ulf Hermann [Wed, 15 Jul 2015 15:36:28 +0000 (17:36 +0200)]
Pass QQmlDebugService to AbstractViewInspector

This way we don't have to look up the implementation in order to send
messages.

Change-Id: I70cb122785875cf8b4ba6f7f2afd62cca77c8abb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoMove inspector service and QtQuick2 inspector into a common plugin
Ulf Hermann [Wed, 15 Jul 2015 15:00:22 +0000 (17:00 +0200)]
Move inspector service and QtQuick2 inspector into a common plugin

The inspector service doesn't do anything useful without the QtQuick2
plugin and vice versa. This way we can also use the
QQmlDebugPluginManager.

Change-Id: I78f154dcc9103ec9ec3d2eda216bfb293231583e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoAdd a factory for QQmlDebugService and use it to load plugins
Ulf Hermann [Wed, 15 Jul 2015 14:17:26 +0000 (16:17 +0200)]
Add a factory for QQmlDebugService and use it to load plugins

Debug services can now be added as plugins in qmltooling/ .
QQmlDebugConnector will load any service plugins matching the factory's
iid before open()'ing the connector.

Change-Id: I2e4cabd714018f62cf4d60b0ebd2827a85431964
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove pimpl from debug server connections
Ulf Hermann [Wed, 15 Jul 2015 13:42:10 +0000 (15:42 +0200)]
Remove pimpl from debug server connections

Now that they are self-contained plugins there is no reason for the
indirection anymore.

Change-Id: Ic2e2fe2075796c758057235e12981c8d40ce97c2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoUse QQmlDebugPluginManager for loading connection plugins
Ulf Hermann [Wed, 15 Jul 2015 13:19:50 +0000 (15:19 +0200)]
Use QQmlDebugPluginManager for loading connection plugins

Also remove all the hacks that deal with static builds, QT_NO_LIBRARY
and friends. QQmlDebugPluginManager handles those cases.

Change-Id: I62f13b787292108fa25d09fabc775332394989be
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoDeduplicate debug server connection code.
Ulf Hermann [Tue, 16 Jun 2015 11:40:08 +0000 (13:40 +0200)]
Deduplicate debug server connection code.

The packet protocol can be part of the server, now that the server is
not part of QtQml anymore. This enables us to remove some duplicated
code from the connections.

As an added benefit, with more control over the sending process,
QQmlDebugServer can now efficiently send single packets, without
creating a QList<QByteArray> first.

Change-Id: I13cc831e254c02b737e64816d6d3ab051d760995
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove QT_NO_QML_DEBUGGER ifdefs from QQmlDebugServer
Ulf Hermann [Tue, 14 Jul 2015 16:37:44 +0000 (18:37 +0200)]
Remove QT_NO_QML_DEBUGGER ifdefs from QQmlDebugServer

Plugins in qmltooling won't get built if that is set.

Change-Id: Ideced675064e74ccb78b9ac8c8fff2536150810c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoMove QQmlDebugServer into a plugin
Ulf Hermann [Tue, 14 Jul 2015 16:35:02 +0000 (18:35 +0200)]
Move QQmlDebugServer into a plugin

Change-Id: I8dc95f64c6df7303e8f580f191ee35da2284718b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoSimplify QQmlDebugServer::enableFromArguments
Ulf Hermann [Wed, 15 Jul 2015 10:01:05 +0000 (12:01 +0200)]
Simplify QQmlDebugServer::enableFromArguments

We can use the command line arguments already retrieved by
QQmlDebugConnector and we can return early in error conditions.

Also, make sure we don't pass QStringLiterals to QRegExp.

Change-Id: I06ce6eec9ea3adeabb9f4d35de8024eab8729d35
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoEliminate QQmlDebugServerInstanceWrapper
Ulf Hermann [Wed, 15 Jul 2015 09:43:37 +0000 (11:43 +0200)]
Eliminate QQmlDebugServerInstanceWrapper

As QQmlDebugServer is not accessible from outside we can just make the
constructor public now.

Change-Id: I06633330db861fcc78f9c1c0362755987c4ffed2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRetrieve services from debug connector, not via static instance()
Ulf Hermann [Tue, 14 Jul 2015 13:32:33 +0000 (15:32 +0200)]
Retrieve services from debug connector, not via static instance()

This will allow us to remove the instance() methods and create the
services from factories in plugins. Also, it allows us to remove the
isDebugging member from QQmlEnginePrivate.

Change-Id: Id9d9820a910902ecfdb1e8175e215093ce3d0965
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoExtract minimal abstract interfaces from debug services.
Ulf Hermann [Tue, 14 Jul 2015 12:45:50 +0000 (14:45 +0200)]
Extract minimal abstract interfaces from debug services.

We will access the services' functionality through those interfaces
once they live in their own plugins.

Change-Id: I0a0d7e73c07cb874b3b507cc4a9d304588c87bca
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoPeriodically flush profiling data to client.
Ulf Hermann [Tue, 28 Jul 2015 11:22:33 +0000 (13:22 +0200)]
Periodically flush profiling data to client.

This reduces memory usage as the data can be deleted once it is sent.
It also reduces the time it takes to transmit the data when profiling
is stopped. It does incur a runtime cost as the sending now takes place
while the application is running. The decision to periodically flush or
not is left to the client, who can specify a flush interval when
starting profiling.

Usage of the flushing feature also relaxes the guarantees regarding the
sorting of events before they are sent. Events with higher timestamps
are now allowed to arrive before events with lower timestamps. Any
clients implementing the flushing need to take this into account. This
will eventually allow us to do away with the server-side ordering
altogether.

Task-number: QTBUG-39756
Change-Id: Idaf4931dc17f224c2bd492078b99e88b1405234e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoProfile eval() and global script execution
Ulf Hermann [Mon, 27 Jul 2015 13:33:43 +0000 (15:33 +0200)]
Profile eval() and global script execution

Change-Id: If2d71a74e836a5f689567a0230a8d4d9fc339f91
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoAvoid QVector::pop_front()
Ulf Hermann [Tue, 4 Aug 2015 09:26:52 +0000 (11:26 +0200)]
Avoid QVector::pop_front()

Change-Id: Id2de4ab8c17f7e0412b44a1d30c6238861464989
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoAvoid multisampled contexts in QQuickWidget
Laszlo Agocs [Wed, 29 Jul 2015 11:16:14 +0000 (13:16 +0200)]
Avoid multisampled contexts in QQuickWidget

Like with QOpenGLWidget, not requesting a multisampled context
unnecessarily avoids crashing with Mesa/Intel/EGL (f.ex. in the
qquickviewcomparison example when enabling multisampling).

Task-number: QTBUG-47509
Change-Id: Ia22110332f639a238cfb3b2c36916f65c00a7bbc
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
8 years agoFix namespaces in inspector plugin
Ulf Hermann [Wed, 15 Jul 2015 15:54:11 +0000 (17:54 +0200)]
Fix namespaces in inspector plugin

Defining things outside the Qt namespace and then accessing Qt
internals is just asking for trouble. The redundant QtQuick2
namespace can be dropped, though.

Change-Id: Ifa83733a3f98704b7b51697dbca9486d0f504f65
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoAdd EnterKey attached property
Kai Uwe Broulik [Thu, 28 May 2015 13:26:27 +0000 (15:26 +0200)]
Add EnterKey attached property

This adds an attached property EnterKey allowing to manipulate the
Enter key appearance.

[ChangeLog][QtQuick][Item] Added EnterKey attached property that allows
to change the appearance of the Enter key on an on-screen keyboard

Change-Id: Ic9a01b0217c317e4ed3a9eef1fa01f2f113f0294
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
8 years agoSend the mouse events to the correct window
Albert Astals Cid [Tue, 21 Jul 2015 09:36:22 +0000 (11:36 +0200)]
Send the mouse events to the correct window

That is the window with the item, not the window that contains the TestUtil Item

Change-Id: I13f5bfd0556e594843d499d014e92bcc41850f45
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
8 years agoFix shared example header.
Friedemann Kleint [Tue, 28 Jul 2015 11:07:29 +0000 (13:07 +0200)]
Fix shared example header.

Use new connection syntax and return -1 on load failures, which
avoids hanging processes and empty windows in case some module is not
installed.

Change-Id: I4966c9657b752eee8612fa893a0489bc8a64ccfc
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
8 years agoRemove unused code
Frank Meerkoetter [Sat, 1 Aug 2015 19:11:00 +0000 (21:11 +0200)]
Remove unused code

There are no users of this visitor interface left.

Change-Id: I8d912c3441bd8a67293eee443451dcea392308ee
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoMake QQmlConfigurableDebugService a template
Ulf Hermann [Thu, 16 Jul 2015 12:18:54 +0000 (14:18 +0200)]
Make QQmlConfigurableDebugService a template

We will need to derive from service-specific interfaces once we move
the services into plugins and QQmlConfigurableDebugService doesn't need
to live in QtQml.

Change-Id: I151f32ea0f8be9719b245fc19164269c6e62a84a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove pimpl from all classes derived from QQmlDebugService
Ulf Hermann [Thu, 16 Jul 2015 12:12:04 +0000 (14:12 +0200)]
Remove pimpl from all classes derived from QQmlDebugService

There is no point in using pimpl for purely internal classes,
especially when we move them to their own plugins.

Change-Id: I2ee8bf2ded2242d91bab89f589a131dc3bcc9a55
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove superfluous check
Frank Meerkoetter [Thu, 30 Jul 2015 10:48:52 +0000 (12:48 +0200)]
Remove superfluous check

The same check is done ~3 lines above.

Change-Id: I8e6aeff89a7b0f3805afdf453b133dc98da59066
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove unused QQmlPool
Frank Meerkoetter [Mon, 27 Jul 2015 19:54:45 +0000 (21:54 +0200)]
Remove unused QQmlPool

This code is no longer in use.

Change-Id: If0cb009ac6622ed36cba5886d6685d3f242c3c87
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoUse signal/slot for passing messages through QQmlDebugServer
Ulf Hermann [Mon, 13 Jul 2015 13:56:25 +0000 (15:56 +0200)]
Use signal/slot for passing messages through QQmlDebugServer

This results in much cleaner code than the previous implementation
using QMetaObject::invokeMethod().

We have to use read locks now for adding and removing engines, as we
should have done already before. If a condition is waiting on a write
lock you cannot acquire a read lock from another thread. So, if we kept
the write locks we wouldn't be able to receive messages while the engines
are waiting.

Change-Id: Icfe641601dec2f8d7181ae579146ed603d57a4c2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoSimplify thread synchronization in QQmlDebugServer
Ulf Hermann [Thu, 16 Jul 2015 14:02:35 +0000 (16:02 +0200)]
Simplify thread synchronization in QQmlDebugServer

m_clientPlugins will only be accessed from the server thread, so it
doesn't need to be protected by a mutex. m_plugins will only be
modified before the server thread starts and after it ends. During the
runtime of the thread it is constant and thus doesn't need to be
protected, either.

Engines are supposed to be added and removed after any waiting for
connections and hello messages is done, so we can reuse the hello mutex
for synchronization there.

Change-Id: I09037430804c264a5f784c4b5a85668d87851b12
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove QQmlDebugServer::advertisePlugins()
Ulf Hermann [Wed, 15 Jul 2015 12:08:48 +0000 (14:08 +0200)]
Remove QQmlDebugServer::advertisePlugins()

As all services have to register before the server starts and cannot
unregister until after the thread is stopped, we don't need any
additional service advertisement anymore.

Change-Id: I20977560b4f7a3acb08a6cc703916bebf61d0220
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoAdd some diagnostics to pixmap cache test
Ulf Hermann [Thu, 30 Jul 2015 15:59:02 +0000 (17:59 +0200)]
Add some diagnostics to pixmap cache test

This test is failing frequently and it's unclear why.

Change-Id: Ib06582d9d515b3cd571f643077b7e8382f6a98a4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoMake QQmlDebugService::registerService() private and part of ctor
Ulf Hermann [Mon, 13 Jul 2015 14:38:25 +0000 (16:38 +0200)]
Make QQmlDebugService::registerService() private and part of ctor

By forcing all debug services to register before the thread starts we
can get rid of the complicated thread synchronization and have a more
natural API for the services.

We can also better enforce the thread situation when registering
services in QQmlDebugServer now. QQmlProfilerService should not
moveToThread() in its constructor as the thread has not been started,
yet. The thread affinity of QQmlProfilerService doesn't make any
difference anyway, as all relevant methods are protected by mutexes
and it doesn't have any slots.

Change-Id: I57db9e2bf94ec6884ede694715dadf5bfd687334
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoMake sure QQmlDebugServer does not deadlock in blocking mode
Ulf Hermann [Wed, 29 Jul 2015 10:51:23 +0000 (12:51 +0200)]
Make sure QQmlDebugServer does not deadlock in blocking mode

Previously, the server could wake the helloCondition before the main
thread was waiting on it. This would lead to the main thread then
waiting forever once it hit the wait() statement.

Change-Id: I694d65f72cf6be6e4c5a0c65ea4aea8a5878bf5b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoMove debugger initialization out of QQmlDebugServer and QQmlEngine
Ulf Hermann [Wed, 29 Jul 2015 10:28:10 +0000 (12:28 +0200)]
Move debugger initialization out of QQmlDebugServer and QQmlEngine

QQmlDebugConnector has to check the parameters before deciding if (and
what kind of) instance to create. It also has to add the services
itself as we don't want to tie a specific implementation of
QQmlDebugConnector to a specific set of services. Logic to load the
services from plugins will be added in a separate change. Integrating
the service initialization with the connector initialization enables us
to load the services before the server thread startsi, which will
simplify the thread synchronization.

QQmlConfigurableDebugService has to recheck for blockingMode once it
gets enabled as it cannot rely on being enabled right away anymore. It
should have done that already before as it's possible to disable and
re-enable services.

Change-Id: I9d161d78836bae10d688a90b4c2a32efed320412
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoExtract minimal interface from QQmlDebugServer and use it.
Ulf Hermann [Tue, 14 Jul 2015 14:36:32 +0000 (16:36 +0200)]
Extract minimal interface from QQmlDebugServer and use it.

This will allow us to move QQmlDebugServer into a plugin. The new QQmlDebugServer
is the interface exposed to connection plugins. The interface exposed to services
is renamed to QQmlDebugConnector, as technically it doesn't have to be a
"server".

Change-Id: Id508b8c0a6960228e889f45a437b73060392db39
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoFix trailing comma at end of enumerator list
Eskil Abrahamsen Blomfeldt [Mon, 6 Jul 2015 13:45:41 +0000 (15:45 +0200)]
Fix trailing comma at end of enumerator list

Breaks compilation with gcc.

Change-Id: I0e48e37b4e67ae522338b17dfe996f455e0e5027
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
8 years agoFix warnings
Thomas Hartmann [Tue, 28 Jul 2015 11:53:43 +0000 (13:53 +0200)]
Fix warnings

Change-Id: I4acbf9bdc09ef2d906c1ae1894e5f5995b93ae72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
8 years agoAdd namespace declarations to qv4debugging.cpp
Ulf Hermann [Tue, 28 Jul 2015 17:18:24 +0000 (19:18 +0200)]
Add namespace declarations to qv4debugging.cpp

Change-Id: Ia7c4e6e29726276bbfe8888b2b2902abc971cad3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoImprove QV4DebugService debug output
Ulf Hermann [Wed, 22 Jul 2015 09:51:25 +0000 (11:51 +0200)]
Improve QV4DebugService debug output

JSON Payloads look better without the quotes.

Change-Id: I5a7954ab58449cccabc29b0d3b499838dafe9338
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoUse QVector rather than QList for storing QQmlProfilerData
Ulf Hermann [Mon, 20 Jul 2015 16:15:05 +0000 (18:15 +0200)]
Use QVector rather than QList for storing QQmlProfilerData

Change-Id: I94519181e915c5e2df9614ad4e1180fb159252e3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove qqmlinspectorconstants.h
Ulf Hermann [Tue, 21 Jul 2015 09:43:19 +0000 (11:43 +0200)]
Remove qqmlinspectorconstants.h

Only two of the constants were used and both only once in the same
file. We can as well declare them there.

Change-Id: Idda68707a209af2c84fc06e22516e64fceb5f4bc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoClean up project files for debug connections
Ulf Hermann [Wed, 15 Jul 2015 11:30:47 +0000 (13:30 +0200)]
Clean up project files for debug connections

Don't specify files that don't exist and remove the pri/pro
distinction. The .pri files aren't included from anywhere else.

Change-Id: I7d77e3db495d8256adbface20657d7632e0e5a10
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoFix includes for QQmlDebugServerConnection
Ulf Hermann [Wed, 15 Jul 2015 11:27:59 +0000 (13:27 +0200)]
Fix includes for QQmlDebugServerConnection

We don't want to require core-private for no reason.

Change-Id: Iff92e52d1894dde9b2155b4e42c21eec2b852f97
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove QQmlDebugService::objectToString()
Ulf Hermann [Mon, 13 Jul 2015 14:00:26 +0000 (16:00 +0200)]
Remove QQmlDebugService::objectToString()

It isn't used anywhere.

Change-Id: I73e2f448be30c04dca4d7122d173782e302478bd
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoDon't exposes QQmlDebugServer's list of services.
Ulf Hermann [Tue, 14 Jul 2015 10:38:06 +0000 (12:38 +0200)]
Don't exposes QQmlDebugServer's list of services.

The only thing we ever want to do is look up a service by name.

Change-Id: I45007d3c742201ccc0871379a91b37381f6d1760
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoMake QQmlDebugService's state and engine callbacks public
Ulf Hermann [Mon, 13 Jul 2015 14:20:12 +0000 (16:20 +0200)]
Make QQmlDebugService's state and engine callbacks public

It's clear that the public API of QQmlDebugService is meant to be used
by QQmlDebugServer or future replacements. Restricting access with
"friend" requires listing all those possible replacements.

Change-Id: I197f1fa53cf985f52cfe5e077a95eda1ed5214b4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove some methods from QQmlDebugServer
Ulf Hermann [Tue, 14 Jul 2015 10:27:40 +0000 (12:27 +0200)]
Remove some methods from QQmlDebugServer

They were only used internally or for redundant checks in the tests.

Change-Id: Iaa7d52be030adaa52a07b28fba53bdef9fada879
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoRemove static proxy methods from QQmlDebugService
Ulf Hermann [Mon, 13 Jul 2015 14:13:00 +0000 (16:13 +0200)]
Remove static proxy methods from QQmlDebugService

They all internally map to one-liners and just add to binary size and
complexity. Especially, the most used one, isDebuggingEnabled(), simply
checks if there is a QQmlDebugServer::instance().

Change-Id: Ib269928e08506894d933f6696e34ff0d3acb048b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoDon't wait for debug services if none are active
Ulf Hermann [Mon, 27 Jul 2015 11:54:12 +0000 (13:54 +0200)]
Don't wait for debug services if none are active

Change-Id: I30f0ea1d34c9cb8d66f9dfd1e381ecc6ae8ccc61
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoConditionally define Q_ALWAYS_INLINE.
Erik Verbruggen [Mon, 27 Jul 2015 08:43:25 +0000 (10:43 +0200)]
Conditionally define Q_ALWAYS_INLINE.

Step one in moving it next to Q_NEVER_INLINE in qglobal_p.h.

Change-Id: Iedecf8de2531334cf3cf8cd5ae4c7b19f2d7736b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
8 years agotests/qml: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
Friedemann Kleint [Fri, 24 Jul 2015 13:27:58 +0000 (15:27 +0200)]
tests/qml: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).

- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0)  by
          Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by  Q[TRY]_COMPARE(a, b) and
  add casts where necessary. The values will then be logged
  should a test fail.

Change-Id: I8cc97fd9b48fc789a849e9527c292c4e05accd97
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
9 years agoAvoid QVector::pop_front()
Ulf Hermann [Tue, 28 Jul 2015 08:45:47 +0000 (10:45 +0200)]
Avoid QVector::pop_front()

It's very inefficient.

Change-Id: Icde138c015379679c4d5a8c2c8e30cb39a1bb245
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agotests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
Friedemann Kleint [Fri, 24 Jul 2015 13:32:22 +0000 (15:32 +0200)]
tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).

- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0)  by
          Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by  Q[TRY]_COMPARE(a, b) and
  add casts where necessary. The values will then be logged
  should a test fail.

Change-Id: Ib9f4c2486af23c47990be4b9e004b965de226dcc
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
9 years agoTests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).
Friedemann Kleint [Fri, 24 Jul 2015 11:39:05 +0000 (13:39 +0200)]
Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).

Preparing the replacement of Q[TRY]_VERIFY(a == b) by
Q[TRY]_COMPARE(a, b) for non-boolean types.

Change-Id: I8a4e44a2b4e20a9c8b811799e3932c8ce1a2cbbb
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
9 years agoRemove unused code
Frank Meerkoetter [Wed, 8 Jul 2015 18:42:09 +0000 (20:42 +0200)]
Remove unused code

The support for QJsValue wasn't used.

Change-Id: I5394f449bb82275844b873a74cce3c9c6c91b121
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove type punning from QV4::Value.
Erik Verbruggen [Wed, 8 Jul 2015 08:52:59 +0000 (10:52 +0200)]
Remove type punning from QV4::Value.

The union in QV4::Value is used to do type punning. In C++, this is
compiler-defined behavior. For example, Clang and GCC will try to detect
it and try to do the proper thing. However, it can play havoc with Alias
Analysis, and it is not guaranteed that some Undefined Behavior (or
Compiler depenedent behavior) might occur.

The really problematic part is the struct inside the union: depending on
the calling convention and the register size, it results in some
exciting code. For example, the AMD64 ABI specifies that a struct of two
values of INTEGER class can be passed in separate registers when doing a
function call. Now, if the AA in the compiler looses track of the fact
that the tag overlaps with the double, you might get:

    ecx := someTag
    ... conditional jumps
double_case:
    rdx := xorredDoubleValue
    callq someWhere

If the someWhere function checks for the tag first, mayhem ensues: the
double value in rdx does not overwrite the tag that is passed in ecx.

Changing the code to do reinterpret_cast<>s might also give problems
on 32bit architectures, because there is a double, whose size is not the
same as the size of the tag, which could confuse AA.

So, to fix this, the following is changed:
- only have a quint64 field in the QV4::Value, which has the added
  benefit that it's very clear for the compiler that it's a POD
- as memcpy is the only approved way to ensure bit-by-bit "conversion"
  between types (esp. FP<->non-FP types), change all conversions to use
  memcpy. Use bitops (shift/and/or) for anything else.
- only use accessor functions for non-quint64 values

As any modern compiler has memcpy as an intrinsic, the call will be
replaced with one or a few move instructions. The accessor functions
also get inlined, the bitops get optimized, so in all cases the compiler
can generate the most compact code possible.

This patch obsoletes f558bc48585c69de36151248c969a484a969ebb4 (which had
the exact aliassing problem of the double and the tag as described
above).

Change-Id: I60a39d8564be5ce6106403a56a8de90943217006
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
9 years agoDon't remove inspector service if no plugins are available
Ulf Hermann [Wed, 15 Jul 2015 08:11:02 +0000 (10:11 +0200)]
Don't remove inspector service if no plugins are available

The client most likely won't be able to deal with a previously
announced service suddenly disappearing anyway. All other services only
deregister themselves once the server shuts down and this behavior will
become mandatory in order to reduce thread synchronization problems.

Change-Id: I76e812f3dbcb2cd48eccf9b5a8829751ef7463f0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove some unused friend declarations
Ulf Hermann [Tue, 14 Jul 2015 10:39:23 +0000 (12:39 +0200)]
Remove some unused friend declarations

Change-Id: If45e084cc080c03b486fdfea33fadb4bb16e8cef
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix broken Q_UNUSED declarations in QQmlDebugServer
Ulf Hermann [Tue, 14 Jul 2015 17:20:28 +0000 (19:20 +0200)]
Fix broken Q_UNUSED declarations in QQmlDebugServer

Change-Id: I0f2cf0a09dfbfb1c2db79b3b5e0c35da546e5c31
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoqmlprofiler: Use QQmlProfilerDefinitions for accessing definitions
Ulf Hermann [Wed, 8 Jul 2015 14:03:51 +0000 (16:03 +0200)]
qmlprofiler: Use QQmlProfilerDefinitions for accessing definitions

Change-Id: I6def7dd8a0ce0db22ad4829029d8510f5869c813
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPort examples to new connection syntax.
Friedemann Kleint [Tue, 21 Jul 2015 14:20:38 +0000 (16:20 +0200)]
Port examples to new connection syntax.

Change-Id: I121c59ac0ad56acb4cd54b99ecd37567368385ce
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoProperty names can be utf8
Thomas Hartmann [Wed, 22 Jul 2015 12:39:15 +0000 (14:39 +0200)]
Property names can be utf8

Change-Id: Ib337fa9a366725b8f0491a4816597fa5baeef7a9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
9 years agoFix QString-related warnings in quick designer support.
Friedemann Kleint [Wed, 22 Jul 2015 07:00:30 +0000 (09:00 +0200)]
Fix QString-related warnings in quick designer support.

designer/qquickdesignersupportmetainfo.cpp: In static member function 'static bool QQuickDesignerSupportMetaInfo::isSubclassOf(QObject*, const QByteArray&)':
designer/qquickdesignersupportmetainfo.cpp:50:51: warning: 'bool QString::operator==(const QByteArray&) const' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1229) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In function 'void stopAnimation(QObject*)':
designer/qquickdesignersupportitems.cpp:62:35: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp:63:33: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In function 'void allSubObjects(QObject*, QObjectList&)':
designer/qquickdesignersupportitems.cpp:93:62: warning: 'bool operator!=(const char*, QLatin1String)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1192) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In function 'QQmlType* getQmlType(const QString&, int, int)':
designer/qquickdesignersupportitems.cpp:166:78: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In static member function 'static QObject* QQuickDesignerSupportItems::createPrimitive(const QString&, int, int, QQmlContext*)':
designer/qquickdesignersupportitems.cpp:223:41: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp: In static member function 'static void QQuickDesignerSupportItems::disableTransition(QObject*)':
designer/qquickdesignersupportitems.cpp:295:42: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportitems.cpp:296:44: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportproperties.cpp: In static member function 'static QQuickDesignerSupport::PropertyNameList QQuickDesignerSupportProperties::propertyNameListForWritableProperties(QObject*, const PropertyName&, QObjectList*)':
designer/qquickdesignersupportproperties.cpp:145:47: warning: 'bool QString::operator!=(const char*) const' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1166) [-Wdeprecated-declarations]
designer/qquickdesignersupportstates.cpp: In static member function 'static bool QQuickDesignerSupportStates::isStateActive(QObject*, QQmlContext*)':
designer/qquickdesignersupportstates.cpp:50:50: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportstates.cpp: In static member function 'static void QQuickDesignerSupportStates::activateState(QObject*, QQmlContext*)':
designer/qquickdesignersupportstates.cpp:64:50: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp: In member function 'void QQuickDesignerCustomObjectData::populateResetHashes()':
designer/qquickdesignercustomobjectdata.cpp:146:93: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp: In member function 'void QQuickDesignerCustomObjectData::doResetProperty(QQmlContext*, const PropertyName&)':
designer/qquickdesignercustomobjectdata.cpp:170:58: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp: In member function 'bool QQuickDesignerCustomObjectData::hasBindingForProperty(QQmlContext*, const PropertyName&, bool*) const':
designer/qquickdesignercustomobjectdata.cpp:227:58: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp: In member function 'void QQuickDesignerCustomObjectData::setPropertyBinding(QQmlContext*, const PropertyName&, const QString&)':
designer/qquickdesignercustomobjectdata.cpp:244:58: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignercustomobjectdata.cpp:259:55: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations]
designer/qquickdesignersupportpropertychanges.cpp: In static member function 'static void QQuickDesignerSupportPropertyChanges::changeValue(QObject*, const PropertyName&, const QVariant&)':
designer/qquickdesignersupportpropertychanges.cpp:91:52: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]
designer/qquickdesignersupportpropertychanges.cpp: In static member function 'static void QQuickDesignerSupportPropertyChanges::changeExpression(QObject*, const PropertyName&, const QString&)':
designer/qquickdesignersupportpropertychanges.cpp:103:62: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations]

Change-Id: Icdaec28b5bea23244303b082217660c38aefa40f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
9 years agoImplmementing missing function of QQuickDesignerSupportProperties
Thomas Hartmann [Wed, 22 Jul 2015 14:25:17 +0000 (16:25 +0200)]
Implmementing missing function of QQuickDesignerSupportProperties

Change-Id: Iafeda8755df80fdc2329ef778aa563eb0636ef40
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
9 years agoEmit movement signals for flick().
Michael Brasser [Tue, 21 Jul 2015 19:31:19 +0000 (14:31 -0500)]
Emit movement signals for flick().

Make flick() more like a real flick and ensure the movement signals
and properties are updated. This allows them to be handled from QML.

This also fixes issues with flick() and dynamic delegates. Flickable
has several checks of the form:

    !d->pressed && !d->hData.moving && !d->vData.moving

That were processed incorrectly for flick(), as the moving variables
were not being updated.

[ChangeLog][QtQuick][Flickable] The movement related signals and
properties are now updated for flicks started via the flick function.

Change-Id: I7e96e2e12a4d0a0ee73ddd6f29d95f19c44667b0
Task-number: QTBUG-34507
Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
9 years agoMake tst_QQmlInspector::reloadQmlWindow() fail more quickly
Ulf Hermann [Thu, 16 Jul 2015 09:27:14 +0000 (11:27 +0200)]
Make tst_QQmlInspector::reloadQmlWindow() fail more quickly

It's annoying that we have to wait for 5s, just for the confirmation
that QTBUG-33376 isn't fixed.

Change-Id: I6296cc05d6dc7240ec3182ff10b19e40d5d4e599
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdd debug plugin manager
Ulf Hermann [Mon, 13 Jul 2015 10:13:48 +0000 (12:13 +0200)]
Add debug plugin manager

When splitting the QML tooling into several plugins we need a unified
way to load them.

Change-Id: I3e17dc5e9427cc45db962f7fa0a695514544d64c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove data stream version into QQmlDebugStream
Ulf Hermann [Mon, 13 Jul 2015 10:45:35 +0000 (12:45 +0200)]
Move data stream version into QQmlDebugStream

When moving the server into a plugin we won't be able to directly
access it anymore.

Change-Id: Iea0bac187cfa5cda69a0852b36d61f535e12d6c6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPolished documentation for the Binding type.
Kavindra Palaraja [Tue, 21 Jul 2015 17:46:45 +0000 (19:46 +0200)]
Polished documentation for the Binding type.

The current documentation was a bit wordy and not concise. Made some
changes to simplify the sentences and also changed the code samples to
use \qml instead of \code for improved syntax highlighting.

Change-Id: Iefa14ca34a749ebd039f47e26e51086e00684c6f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoSimplify object/id lookup in QQmlDebugService
Ulf Hermann [Mon, 13 Jul 2015 13:09:42 +0000 (15:09 +0200)]
Simplify object/id lookup in QQmlDebugService

By tracking object destruction we can avoid looping over all cached
objects to find out which ones are still OK and we don't have to
manually clear the cache anymore. Looking up objects by source location
is specific to the engine debug service and should be done there.

Change-Id: I7dab73a7bf9c17087784f1bd9c5aef513b31e2c1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoDon't change the currentItem after a viewport resize
Alberto Mardegan [Sat, 11 Jul 2015 12:24:53 +0000 (15:24 +0300)]
Don't change the currentItem after a viewport resize

When highlightRangeMode is set to StrictlyEnforceRange and the view gets
resized, we don't want the currentIndex to change.

The code touched by this patch was introduced by commit
I08b7e61496a79f71c3b40fafaca985ae90f88503 back in Qt 4.7 times, and
never changed since then.

Task-number: QTBUG-43555
Change-Id: Ie67faa6898f13a1f7b0f1c4ae6c29721cb7dfa41
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoUse QVector instead of QList in V4 profiler
Ulf Hermann [Mon, 13 Jul 2015 10:57:15 +0000 (12:57 +0200)]
Use QVector instead of QList in V4 profiler

For complex types QVector results in better performance.

Change-Id: I8ac3dccfa4272a755d36964b0373dc115f520223
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoMake name and version of QQmlDebugService const
Ulf Hermann [Mon, 13 Jul 2015 13:25:15 +0000 (15:25 +0200)]
Make name and version of QQmlDebugService const

They aren't supposed to change after construction.

Change-Id: I4aee0c04f5bb77b0e75c016ecbc72ea34639d587
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoqml: Remove unneeded copy-ctor and copy-assignment operator
Sérgio Martins [Sun, 19 Jul 2015 18:04:41 +0000 (19:04 +0100)]
qml: Remove unneeded copy-ctor and copy-assignment operator

It's passed by value all over the place, so make it trivially-copyable

Change-Id: I6710529b3d9a70c94f02c9c3e505658817de0898
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
9 years agoqml: Pass non-trivially-copyable types by const-ref
Sérgio Martins [Sun, 19 Jul 2015 18:25:25 +0000 (19:25 +0100)]
qml: Pass non-trivially-copyable types by const-ref

Change-Id: Id3d960ee8236a4c6f4bb4e0add1f88dfa32d3592
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
9 years agoUnify #include syntax
Ulf Hermann [Mon, 13 Jul 2015 12:25:00 +0000 (14:25 +0200)]
Unify #include syntax

Change-Id: I4e0e79ebae3d42664bcf617193ca347890cf922e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMake QQmlDebugService::name() a const reference
Ulf Hermann [Mon, 13 Jul 2015 12:19:38 +0000 (14:19 +0200)]
Make QQmlDebugService::name() a const reference

Change-Id: I7e75be206a1821018efc435337963f131b2996a8
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoWith -no-qml-debug, don't compile debug plugins and tests
Ulf Hermann [Thu, 2 Jul 2015 15:38:20 +0000 (17:38 +0200)]
With -no-qml-debug, don't compile debug plugins and tests

This eliminates many #ifdefs and prevents the compilartion of broken
plugins.

Change-Id: Ib2763ed9e6580307482b885d71c1ad1010959ef2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoUse by-ref in foreach when T is large or non-trivial
Sérgio Martins [Sat, 4 Jul 2015 09:15:15 +0000 (10:15 +0100)]
Use by-ref in foreach when T is large or non-trivial

Change-Id: I79271fdc3fa064e362dfaa64ff11d8a4c6b7e8c3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoQML Engine: Support for "PROPFIND" method for XMLHTTPRequest
Valery Kotov [Sun, 31 May 2015 19:47:50 +0000 (22:47 +0300)]
QML Engine: Support for "PROPFIND" method for XMLHTTPRequest

Support for WevDAV PROPFIND method was added to QQmlXMLHttpRequest. Tests for
PROPFIND method in XMLHttpRequest were added.

[ChangeLog][QtQml][QQmlXMLHttpRequest] QQmlXMLHttpRequest now
supports the PROPFIND method in HTTP requests.

Task-number: QTBUG-36456
Change-Id: Ie36fcc901e7c1583840f04166c1774a1defe9308
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdding tests for DesignerSupport
Thomas Hartmann [Fri, 10 Jul 2015 10:22:39 +0000 (12:22 +0200)]
Adding tests for DesignerSupport

Change-Id: I577d0e34ce91a1fa11e3e6757bffc7adaec0f1fb
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
9 years agoAdding more DesignerSupport functions
Thomas Hartmann [Mon, 13 Jul 2015 13:24:15 +0000 (15:24 +0200)]
Adding more DesignerSupport functions

The new functions/enablers are split into new classes.

* DesignerSupportItems
  Helper functions to tweak and create items.

* DesignerSupportProperties
  Helper functions to deal with properties and bindings.

* DesignerSupportPropertyChanges
  Helper functions to deal with PropertyChanges.

* DesignerSupportStates
  Helper functions to deal with States.

* DesignerSupportMetaInfo
  Two helper functions to deal with meta info and notication.

DesignerMetaObject is a specialized QQmlVMEMetaObject that implments
notification of property changes and allows to create dynamic properties.

DesignerCustomObjectData provides additional data for each Object. The
main functionality atm is to keep the default values and bindings for
properties, so they can be restored.

Change-Id: I6b6f501c8c5848d62bfcb7e704bc45662e731d54
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
9 years agoUse the to/from Hex functions from QtCore
Thiago Macieira [Sun, 23 Nov 2014 07:34:35 +0000 (23:34 -0800)]
Use the to/from Hex functions from QtCore

Change-Id: I51361cf78765d958a5eb48c6e05df6873979e6db
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agotst_qquickmultipointtoucharea: Do not rely on qCompare(bool, int,...).
Friedemann Kleint [Thu, 16 Jul 2015 14:20:14 +0000 (16:20 +0200)]
tst_qquickmultipointtoucharea: Do not rely on qCompare(bool, int,...).

The overload was added for NokiaX86 and RVCT and is bound for
removal.

Task-number: QTBUG-47260
Change-Id: I4ead3b03c979a3116278d364ef85fe7d83c5f971
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove DesignerSupport from bic/data
Thomas Hartmann [Wed, 15 Jul 2015 08:52:56 +0000 (10:52 +0200)]
Remove DesignerSupport from bic/data

DesignerSupport was never public API.

Change-Id: Ieec6f839173502472496ef827e60a742a0ccbe1a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdapt to deprecation of QProcess::error(...) signal
Ulf Hermann [Tue, 14 Jul 2015 10:26:56 +0000 (12:26 +0200)]
Adapt to deprecation of QProcess::error(...) signal

Change-Id: Icf708af4ab968c6592f78f90c3758e30dbe9195d
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
9 years agoDo not leak the texture factory for cancelled jobs
Albert Astals Cid [Fri, 3 Jul 2015 09:38:50 +0000 (11:38 +0200)]
Do not leak the texture factory for cancelled jobs

Change-Id: Ie18e019402857acd17203681d45adaf32be54fcc
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix potential use of incorrect bounds in delegate tracking.
Michael Brasser [Tue, 7 Jul 2015 21:51:55 +0000 (16:51 -0500)]
Fix potential use of incorrect bounds in delegate tracking.

Using GridView.SnapToRow and GridView.ApplyRange with a top margin
could lead to the view jumping (rather than smoothly transitioning)
when changing the currentIndex.

Change-Id: I6936b378220f59e8d416f7531cf8b6906c723cb2
Task-number: QTBUG-45640
Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
9 years agoRemove unused code
Frank Meerkoetter [Sat, 4 Jul 2015 19:56:15 +0000 (21:56 +0200)]
Remove unused code

These methods weren't used anywhere.

Change-Id: I002bcead01fc5818846e5d3ccf06bd0adbed5f51
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix tst_qqmldebuglocal on QNX.
Rafael Roquetto [Thu, 2 Jul 2015 12:18:10 +0000 (09:18 -0300)]
Fix tst_qqmldebuglocal on QNX.

QNX does not place library functions on the default namespace. Either use
namespace std or explicitly state the namespace prefix.

Change-Id: I1037c16316b9545ea6214289a3af9a549e83613c
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix QQuickListViewPrivate::releaseItem()
J-P Nurmi [Mon, 6 Jul 2015 12:51:45 +0000 (14:51 +0200)]
Fix QQuickListViewPrivate::releaseItem()

Fixes a regression introduced by 1e3924d. The FxViewItem gets deleted
by QQuickItemViewPrivate::releaseItem(), so the QQuickItem pointer must
be stored before calling the base class implementation.

Change-Id: I0bcffc7bee8a4cdbebdce0fe2d2b990bfa52dc6c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoUse QQmlDebuggingEnabler::StartMode in connectToLocalDebugger
Ulf Hermann [Thu, 2 Jul 2015 07:51:04 +0000 (09:51 +0200)]
Use QQmlDebuggingEnabler::StartMode in connectToLocalDebugger

This unifies the API and gets rid of an ambiguous bool parameter.

Change-Id: If9d8906f9cd366cf37bd1bdded7fbd6c62146e32
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPrevent errors when removing items from Repeater that reference parent.
Michael Brasser [Tue, 23 Jun 2015 18:13:01 +0000 (13:13 -0500)]
Prevent errors when removing items from Repeater that reference parent.

Use the same ordering as item views and release before unparenting.

Change-Id: I0346342cfcaf9385d8385769795dd5ba35fc43aa
Task-number: QTBUG-46828
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoFix segfault if QQuickImageResponse actually returns an error string
Albert Astals Cid [Tue, 30 Jun 2015 08:35:23 +0000 (10:35 +0200)]
Fix segfault if QQuickImageResponse actually returns an error string

Change-Id: Ieda5250157dea96bcd5a86d0617f1d64156242e7
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>