By monitoring the objectCreated() signal of QQmlApplicationEngine we can
also catch errors if the components are instantiated asynchronously.
Task-number: QTBUG-39469
Change-Id: I796eb5561fc8d48ab5aa74d37b0964b118a1ba7e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This reverts commit dcb8681cb7.
The effort to handle asynchronous loading is not required for the
qmllivepreview (for which it had been introduced).
Task-number: QTCREATORBUG-19648
Change-Id: I20cbd318dedb3da43d4993c0c0a1910ffe6d5761
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Avoid setting Qt::AA_EnableHighDpiScaling when running in the simulator.
Simulator detection is done by testing whether environment variable
QTGLESSTREAM_DISPLAY is set.
This amends 8c3bd61594 where all platforms
except Windows were excluded from setting the flag.
Task-number: QTBUG-64815
Change-Id: I8ab7ba9f24217915dc1d01e1f2eb5c37923c5504
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Setting Qt::AA_EnableHighDpiScaling causes a few graphics backends to
malfunction. This patch reduced the setting of the flag to happen only
on Windows (it is automatically set on macOS with retina).
Task-number: QTBUG-64815
Change-Id: I08fa5d1bd2c93e7a39c23487b684bd3f7b358783
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
There are a number of reasons why the root component of a QtQuick
application may be loaded asynchronously. It might, for example, be
derived from a component loaded over the network.
In that case, checking that there is a root object right after calling
load() is misleading. The object is only created later. Therefore, we
need to listen for the objectCreated signal to decide if the root
component was correctly created.
As calling qApp->exit(-1) does nothing while the event loop isn't
running, we always connect the check with Qt::QueuedConnection.
Change-Id: Ie2814894b79bb3e467c5a838c7ec419291fcf591
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
It now really creates an empty project.
Also, adapt the QtQuickPrototype template accordingly.
Change-Id: I0749805211df080c88cad1b9c2d476d56836c18a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
When something goes wrong with deployment or there is a syntax
error in the QML files, the old code would enter the main
loop not showing any windows. Worse, the binary is then locked
on Windows and cannot be overwritten. Add a clause checking
whether there are any root objects and bail out on failure.
Task-number: QTBUG-60764
Change-Id: I3620a09ec4331dc04a5194dfd2ece2ff44bdc429
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>