windeployqt: Fixed --debug and --release together with --qmldir

If --debug or --release is used, findDependentQtLibraries should not
change the isDebug value, so another variable was introduced.
"detectedDebug" gives information about the detected debug state of
the executable/library but this value might be ignored if --debug
or --release was used.

Change-Id: I2c6d4188179f30e17d054a6821e96071a6296207
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
androiddeployqt: Fix debug deployment on Windows

There is a bug in "adb push" which makes it fail when the input
directory ends with a slash on Windows. This made it impossible
to use the debug deployment method on Windows.

[ChangeLog][Android][androiddeployqt] Fixed debug deployment on
Windows.

Task-number: QTBUG-37028
Change-Id: I99bef5f2dc879cbd08dc0c7e6765395095b264cf
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Assistant: Fixed build for QT_NO_CURSOR

Change-Id: I5f1f3774ac81ea61406c6ef964fd189051ebe994
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Prefer to use normalised signal/slot signatures

Change-Id: I87fc653492fb5857d5ddcffad4cf762eacb5f364
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
qtd3dservice: Restructure handling for service mode

This moves qtd3dservice from a shared process to its own process. This
is required to fix problems with accessing the emulators from multiple
threads and to run qtd3dservice as the logged-on user.

- The service process which provides a thread for each worker, and can
  add and remove workers as needed.
- The same threading model is used in service and direct modes to
  reduce complexity and behavioral differences between modes.
- Device handlers can be quit from the main thread by setting their
  run lock event.

Change-Id: I8734348011a87f0f69549a11a45d70fe3a2df69d
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Improve error messaging

Fix a number of bad error messages and make the formatting more
consistent. Also correct the error ID structure that gets passed to the
event log.

Change-Id: Ia21b87b777e8b1bd456cb3ddde21054bb1051373
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Add output file option

This is useful for logging purposes, particularly in service mode where
it is not possible to redirect the output.

Change-Id: I965d58b1b375eb11844b486e50ccc645aa84baf5
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Add triggers for Windows Phone devices and emulators

This adds event triggers which allow for detecting when a device or
emulator is activated. When a device comes online, it is checked for
applications, and workers are created to monitor each application.

This changes the behavior for device connections. Instead of retrying the
connection repeatedly for 30 seconds, the worker returns after the first
failure. This is acceptable, because the worker will automatically be
reactivated when the device comes online.

Change-Id: Idab622d85de314edd18fad8bf721cbae1c17ca75
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Add self-elevation and credentials request

When installing the service, administrative privileges are required, and
the service user must be the logged-on user. This adds a self-elevation
routine to the install/remove options, and requests the user's credentials
using the native credentials UI.

Change-Id: Ib21769dc62682bf7055a3c80b9becf224612835b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Don't continue if XDE isn't running

For emulator operations, exit the current worker thread if the emulator
does not appear to be running.

Change-Id: Icd2dff2fff92c172dbad2cd894cd11966c3472a1
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
qtd3dservice: Add verbosity option

This adds control over the logging level, as done in related tools
winrtrunner and windeployqt.

Change-Id: If8de677c4435bac55cbecafaaf60e642a36325a5
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
CoreCon: Remove incorrect argument from SendFile()

This argument is apparently a typo in the MSDN docs. It is not
documented and not present in assembly of actual users of this API.
This change corrects all the users of the API in qttools.

Change-Id: I9cad60b3218a55271d805dad95cda4068aead21a
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>