In 50bf54c invoking windeployqt was only required in release mode as
MDILXapCompile was not invoked for debug builds with Visual Studio 2013.
However, Visual Studio 2015 invokes MDILXapCompile for debug and
release. Hence we have to use this workaround unconditionally.
Also we cannot limit this to msvc2015 host specs only, as older projects
still might be loaded with Visual Studio 2015 causing the build to
break.
Task-number: QTBUG-49815
Change-Id: Ia120a392967319b945a9746ad489f2db0eed7156
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Windows 10 requires apps to handle the PrelaunchActivated property. This
enables a faster startup by launching an app and immediately suspending
it. This happens by the system and at the time the user launches the app
no library loading or initialization is required.
By default we opt-out of this and return early. The reason is that we
cannot know the type of application written in Qt and whether it breaks
the guidelines by using prelaunch. For further details check here:
https://msdn.microsoft.com/en-us/library/windows/apps/mt593297.aspx
Task-number: QTBUG-50292
Change-Id: I4d0b0b95a03f93b99211d042895404a88ea7cb9d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Instead of using a "custom wait function" in cases,
where a timeout is needed (like in qhostinfo_winrt.cpp)
we should have the timeout as part of our await
function.
By having one common place to handle this, we can avoid
unnecessary warnings, that might be caused by custom
functions. The current implementation in qhostinfo
for example causes at least 1 "originate error"
exception per call.
Change-Id: I7b6cfdfd861af2b0d271465eecaefe4a93e3109b
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
By using await instead of using a custom wait function we
get rid of a lot of "function was called at an unexpected
time" warnings and use the default way of waiting for an
asynchronous function to complete.
Change-Id: I6c5bf73ccf68a219b8f3facd3531873d7e8d4c67
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
That API has been available for WinRT and Windows
Phone for some time now. By using it to get the
machine name and for hostname resolution we can get
rid of some winrt-only code and use qhostinfo_win.cpp
on WinRT and Windows phone as well.
Additionally the required capability was added to
tst_qhostinfo so that this auto test can be run without
any manual editing.
Change-Id: I63fa5521bf8cdb0c919bd5a0100ea977c865622a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Windows Phone 8.1 provides access to the camera button and press/release
events get passed as Key_CameraFocus and Key_Camera. Unfortunately a
release does not provide what has been pressed before, hence this
information needs to be cached when the press happens.
Done-with: Maurice Kalinowski<maurice.kalinowski@theqtcompany.com>
Task-number: QTBUG-39115
Change-Id: I6ce58a1f07a6bf7183b8d99a26e5cd7b0d32d6db
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This test seems to be quite broken on OS X: qWaitForWindowExposed returns
too early (while no window is on screen) so gestures can not be dispatched
QApplication::topLevelAt(pt) - returns null.
Use qWait + isExposed combo instead (similar to qWaitForWindowExposed, but
there is no isExposed test before the loop).
Change-Id: I85fbd773ccce0ca92b2dceb1749d67ef767aa0cf
Task-number: QTBUG-49849
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
_panTimer has a target - for example, widget. 'reset' should stop this timer.
The problem (quite subtle and difficult to reproduce) found in tst_QTouchEvent:
widgets created/destoryed by different tests but we still can have a timer
waiting for event dispatcher to 'processEvents', firing with now-invalid
dangling pointer - 'target'.
Change-Id: Iccaf3368a8ee6a0a2f60e9dcdf5d40fb7392ca21
Task-number: QTBUG-49844
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Trying to set data for a compressed cubemap texture face fails, because
the code incorrectly tries to bind to a cubemap face target.
This was already fixed for uncompressed textures. Instead of duplicating
the code, moved the texture binding/unbinding code to a RAII class.
Change-Id: I8f1cb7fc661b919200f85c3465d6e6e3c22d0871
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QApplication::wheelScrollLines() was always 1 due it being a bool.
Task-number: QTBUG-49561
Change-Id: I83e97da3507c31dfd024db7bf543c4e6a3b4a98b
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
The #if had a condition that was needlessly hard to understand;
and was widely separated from its #else clause.
Change-Id: I43f4282993f4f2e8c4b5ad07dc2c2e06a6b95aa9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Qt uses QHash as the container for faking environment variables on
Windows Runtime and CE. Environment variable manipulation functions are
protected by mutex. Accessing the QT_HASH_SEED environment variable
inside QHash can lead to situation where qputenv() call leads to
qgetenv() call and that leads to a deadlock. Change the container
from QHash to QVector to avoid deadlock.
Task-number: QTBUG-49529
Change-Id: I550ead4ab12e7abebc044f52339063a44fcf0170
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
The latter is much faster as it doesn't have to deal with
time zones.
This change is safe because QNetworkHeadersPrivate::fromHttpDate(),
used as the QDateTime source in other, nearby, code paths, also
returns only UTC date-times. So not only is this change faster at
the call site, it also avoids inconsistent-timespec comparisons
down the line.
Credits to Milian Wolff, from whose QtWS15 talk this advice is
taken.
Change-Id: I26d308a2763cc45d28bc96871e651f30b17a6b85
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This often happens in applications. Besides, we are expecting at least a
call to RequestName to happen.
Change-Id: Ifd2454ffba454fd591d0ffff1425a84563267d19
Reviewed-by: David Faure <david.faure@kdab.com>
To retain a bit compatibility with applications developed in the last 9
years that expect that QDBusConnections won't process their events until
the event loop runs, we now suspend the handling of incoming messages
in the two default buses (and only in them) and resume when the event
loop starts. This is required because the new threaded QtDBus would
otherwise process incoming messages that the application didn't expect
it to.
For example, if the application first acquires names on the bus and only
after that registers objects with QtDBus, there's a small window in
which the name is acquired and visible to other applications, but no
objects are registered yet. Calls to those objects may be received,
would then be processed in the QDBusConnectionManager thread and fail.
The work around is to disable the actual handling of method calls and
signals in QDBusConnectionPrivate::handleMessage. Instead, those
messages are queued until later.
Due to the way that libdbus-1 works, outgoing method calls that are
waiting for replies are not affected, since their processing does not
happen in handleMessage().
[ChangeLog][Important Behavior Changes] QtDBus now uses threads to
implement processing of incoming and outgoing messages. This solves a
number of thread safety issues and fixes an architectural problem that
would cause all processing to stop if a particular thread (usually the
main thread) were blocked in any operation. On the flip side, application
developers need to know that modifications to a QDBusConnection may be
visible immediately on the connection, so they should be done in an
order that won't allow for incomplete states to be observed (for
example, first register all objects, then acquire service names).
Change-Id: I39cc61d0d59846ab8c23ffff1423c6d555f6ee0a
Reviewed-by: David Faure <david.faure@kdab.com>
So we can do
connect(&watcher, SIGNAL(finished()), receiver, SLOT(foo()));
Change-Id: I39cc61d0d59846ab8c23ffff14241d33fecf2d53
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
They're never pending, since we add them immediately since commit
186d881440.
Change-Id: I39cc61d0d59846ab8c23ffff14241be6785ad5a0
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Otherwise, connectInternal becomes a no-op after an initial connection attempt
has been made (making the socket effectively useless if that connection attempt
fails).
A workaround is to close() the socket, which worked by virtue of
QAbstractSocket's close() disconnecting (which ultimately calls
resetSocketLayer, and destroys the socket engine instance) - meaning that the
next connection attempt would have a fresh socks instance to try out the
connection with.
Reported-by: Gabe Edwards <gabe.edwards@me.com>
Change-Id: Iab1e84af6d4248fd75a6dfe5e79a3c73129aae0b
Reviewed-by: Richard J. Moore <rich@kde.org>
Screens connected to separate graphics cards are detected as
separate screens which don't have offset. This patch fixes obtaining
the screen number by QWidget: it uses the screen assigned to the root
widget. The patch also assigns a proper QScreen to each QDesktopWidget
screen().
It also fixes closing a popup menu by clicking on another screen.
Task-number: QTBUG-48545
Change-Id: I3d76261c0c067293d39949c4428b2d8dfd085dc7
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Since 7a42c8c15c QTestTablePrivate no
longer cleans up the memory it holds in dataList. This will make tools
such as valgrind/address-sanitizer generate a lot of noise about
directly or indirectly leaked memory.
Change-Id: Ic0900ecdd7b76cda9f5366f3950bccde2f1b244c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
QList of pointers is optimum, but QVector should provide the same
performance (we aren't using the beginning-of-list feature that QList
has and QVector doesn't).
But since we're using QVector elsewhere, this should be better.
Change-Id: I39cc61d0d59846ab8c23ffff14241c6715e2eb00
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This was documented, but not what the code did.
Task-number: QTBUG-48529
Change-Id: I4849778c61dcae13be27c62b24717693c0c07d78
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Before this patch, Qt5Core_EXECUTABLE_COMPILE_FLAGS was populated with
-fPIC unconditionally. This causes warnings on MSVC, since the compiler
does not understand this flag.
In fact, -fPIC is only required in case an older release of CMake is
being used and the compiler is GCC 5.x (according to documentation), so
let's really add it just in this case.
Task-number: QTBUG-47942
Change-Id: I9d09b8b257a0647235d6d781ee5c023af34f8f88
Reviewed-by: Stephen Kelly <steveire@gmail.com>
CMP0054 changes CMake behavior wrt. interpreting quoted arguments in
if() statements. This change ensures that CMP0054 dev warnings are
never emitted no matter how polluted the environment, e.g. even
if the variable ${5.5.1} is defined and no matter whether CMP0054
is set to OLD, NEW or undefined.
Change-Id: Iee008497b333e2db23fb1adbf8b02252314ffa8a
Reviewed-by: Kevin Funk <kfunk@kde.org>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Fixes the xcb_glx plugin to follow the -opengl configure option for
default surface types. This makes it match closer to xcb_egl behavior
and makes the default match QOpenGLContext::openGLModuleType.
Change-Id: Iea3f8069fffefa46a32945eeeea1312566df129f
Task-number: QTBUG-50015
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Probably correct.
The question is just why this code has survived for so many years.
Change-Id: Iaf01850476f9b066243abebb9ee6c5928d7ada19
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This patch makes possible to use Xinerama screens in XCB platform
plugin.
Task-number: QTBUG-48615
Change-Id: Ib4dbfcdfadc46d2875a2fc09e8b852181edfbed2
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
/home has been observed to be writable on some CI machines.
Add checks verifying existence and correct permissions.
Change-Id: Ie0f952e20d0d8eb0b57234eea2e2ecb78f5a7b58
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
If the variant contains a known json type (value, array, object or
document), simply unwrap those. In the case of the json document
wrap the contained object/array into a QJsonValue.
This should be the expected behavior, and makes more sense than
returning a null QJsonValue.
Task-number: QTBUG-41234
Change-Id: Id084fc11220d51aaf78b7694fd0ebef1411f5c51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Path normalization should happen only when NormalizePathSegments is set.
Use a less intrusive fix for the setPath("//path") issue that
commit aba336c2b4 was about.
This allows fromLocalFile("/tmp/.") to keep the "/." at the end,
which is useful for appending to the path later on (e.g. to get "/tmp/.hidden")
Change-Id: Ibc3d4d3276c1d3aaee1774e21e24d01af38fa880
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If the environment variable is set, but points to a non-existing directory,
the user would get a warning about chmod failing. Better be clear and
warn about the fact that the directory itself doesn't exist.
Also warn if $XDG_RUNTIME_DIR points to a file rather than a directory.
Task-number: QTBUG-48771
Change-Id: If84e72d768528ea4b80260afbbc18709b7b738a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
In Qt3 this would indeed be equivalent to QHostAddress("0.0.0.0").
But since Qt4, it creates an address of type Null, and
QHostAddress()==QHostAddress("0.0.0.0") is no longer true.
Change-Id: I28025421e77c861783c612c2225be345dad5615a
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
It should the the actual class name, without any suffix.
This also allows us to use the painter font when rendering
CE_HeaderLabel and, as a consequence, change QHeaderView's
font through the usual methods.
Change-Id: I0b13ee349f5fa505be66a9c884c26885f5fc468f
Task-number: QTBUG-33855
Task-number: QTBUG-37153
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
while we evaluate the features themselves in precise mode (which is the
reason why they can error out), we do not want them to terminate
cumulative project evaluation.
Change-Id: I70f3e1bcb2ca04a70c74ff484749ca92c1cf6372
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/90ee4094161b427c32581bca2f5286edb4fffdb1)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
After 90e7cc172a, QStringList no longer
includes QDataStream.
This also reverts commit c1be0fbe7d, which
did the same in a worse way.
Change-Id: Ib10622b0da3b3450d29fc65dc5356fde75444a8f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
(cherry picked from qttools/376501ae5a86859821c0e89b2e8fbc9906d11e07)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Recent versions of Qt have apparently added sufficient numbers of
headers that the command lines used to spawn a custom header-
parsing tool, started overflowing Windows' maximum command-line
length.
This change restructures the mechanism to use a GCC-style command-
line arguments file rather than passing filenames all directly
in the argv[] vector.
Although QNX is the usual ELF target whose cross-build is supported
on Windows, the mechanics introduced in this patch happen to affect
all other ELF Unix systems' builds too.
Change-Id: I5a7383cf9f2ebf9dffde8dbfdcdeca888265e085
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>