Commit Graph

38208 Commits

Author SHA1 Message Date
Timur Pocheptsov
8961493b40 QMacStyle - take into account that native controls are transparent now
We use NSButton to emulate tabs in QTabWidget. Starting from 10.14
in dark theme those button objects tend to be somewhat transparent,
thus widget's frame is visible through tab buttons. This is true for
native controls also - NSButton, NSSegmentedControl, NSTabView - they
all show the similar behavior. The only difference is NSTabView, which
is the closest control to our QTabWidget - tab buttons are transparent,
but they (AppKit) it would appear just do not draw the frame under
this area. Let's do the same, but using clipping.

Task-number: QTBUG-71741
Change-Id: I9f19014d0db5f36bacf76ee0068fae6eee793c0f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-16 06:20:02 +00:00
Michael Brasser
a7fa2618e4 Update QOpenGLTexture::generateMipMaps for ES 3
Per the Khronos documentation, this operation is not permitted on ES 3.

Change-Id: Iff70ef83d48228277b883df588011432ba80f4bd
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-01-15 19:39:41 +00:00
Oliver Wolff
eabef55b8b testlib: Add missing header files to .pro file
With all the headers missing, Creator's clang code model just gives up and
it's impossible to work on testlib in Creator.

Change-Id: I8814264db10992eeec6f45625580f6788d23b56b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-15 14:41:08 +00:00
Tor Arne Vestbø
1b47e7154a Fix default rpath dirs on Apple platforms
The @executable_path relative framework directory is one step below
the executable, as in:

   Foo.app/Contents/Frameworks

not:

  Foo.app/Contents/MacOS/Frameworks

The former is what Xcode defaults to for new projects.

Change-Id: Id08f3f1d80f1c84d76fb71676c5df4a3a6b3da36
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-15 14:26:29 +00:00
Joerg Bornemann
c6bd9082f4 Resolve macOS framework headers for extra compiler depend_command
On macOS, if an extra compiler returns a framework include via its
depend_command, we must resolve it properly.

For example, the uic extra compiler might return an include
"QtQuickWidget/QQuickWidget", but the actual header file is located in
"QtQuickWidget.framework/Headers/QQuickWidget".

Fixes: QTBUG-72641
Change-Id: I42f11c74d01c88db8a32025b7f04d9ad50b2d08b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-01-15 12:43:12 +00:00
Joerg Bornemann
b95a4bbe84 MakefileGenerator: deduplicate code
Factor out a resolveDependency method.
We will enhance it in a subsequent commit.

Change-Id: I4eead8bd03066c2ccbc9d9276acbc9f6c3bc6b97
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-15 12:43:06 +00:00
Edward Welbourne
2ab139596d Fix alignment-warnings about Q_DECLARE_PRIVATE's casts
Q_DECLARE_PRIVATE gets used in the declaration of the public class,
where the private class is typically visible only as a forward-decl,
with no knowledge of what it's based on; consequently, the macro is
obliged to use reinterpret_cast<>, which is subject to warnings when
the compiler *can* see both types and their alignments differ.  The
same applies to Q_DECLARE_PRIVATE_D.

So suppress gcc's -Wcast-align around the d_func() return statements.
(If we get similar problems with other compilers we can add their
suppressions likewise; but, for now, we've only seen this on MIPS64,
where we use gcc.)  This tripped over one use of Q_DECLARE_PRIVATE in
a private Q_SLOTS: section; for some reason, gcc didn't like the
semicolon on the friend declaration.  Changing the context to plain
private fixed that.

Fixes: QTBUG-72885
Change-Id: I5edc11d46bd4eb820713adede79d53191a7e2736
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Boxiang Sun <daetalusun@gmail.com>
2019-01-15 08:31:51 +00:00
Oswald Buddenhagen
c365fa49d8 fix out-of-bounds access on trailing percent sign in tr() argument
tr() recognizes %n and %Ln. it offers no way to escape lone percent
signs, which implies that they must be interpreted verbatim, which is
what the code actually does. except that it would run off the end if the
% appeared at the end of the string.

Fixes: QTBUG-57171
Done-with: Mateusz Starzycki <mstarzycki@gmail.com>
Change-Id: Icf81925c482be1ea66ec8daafb3e92ad17ea7fab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-14 08:52:15 +00:00
Kari Oikarinen
6178913a23 Bump version
Change-Id: I80954f7a3f33dbc8f04b61ebe5b5ed8b6ecb7b6a
2019-01-14 09:12:55 +02:00
Andre de la Rocha
af99497bdb Windows QPA: Support "press and hold for right-clicking"
Windows sends a fake WM_RBUTTONUP/WM_RBUTTONDOWN when the user presses
and holds the pen/finger on a tablet/touchscreen, e.g., in order to
show a context menu. Windows only sends already synthesized legacy
mouse messages for this condition, instead of anything detectable in
the pointer messages. So we need to handle these legacy messages in the
Windows QPA.

Task-number: QTBUG-36162
Change-Id: Ia93c423601e2e8a8baac3f9b7791bf8a3113885a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-01-14 05:22:38 +00:00
David Faure
6e21c9ac4a QLocale: fix crash when using qDebug() in a global destructor
`kdevelop -s doesnotexist` led to
ASSERT failure in Q_GLOBAL_STATIC: "The global static was used after being destroyed
because of a qDebug() statement in some "unregister" method called by a
global object's destructor. This is normally fine, but with
%{time} in QT_MESSAGE_PATTERN, qDebug() ends up using QLocale after its
global objects (systemLocalePrivate and defaultLocalePrivate) were
destroyed.

Change-Id: I8d8b34e0197ad1eda8283fcf36d2c250385bb1a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-13 20:08:48 +00:00
Andreas
5dadc3d807 xcb: fix initialization of XRandr and XRender
Fixes: QTBUG-72957
Change-Id: Ia698eef5dae4e2d35ca2e565fbdc23da40c83d8a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-01-13 18:18:34 +00:00
Edward Welbourne
dd5e7f1a52 Use a more robust test for absolute paths in QDir
Its filePath() and absoluteFilePath() don't trust its own
isAbsolute(), due to some infelicities on MS-Win; and kludged round a
consequent problem with resource paths; but other virtual file systems
weren't catered for.  Replace the convoluted test there with a static
bool function (so that future kludges in this area shall only need to
edit one place; and can document why they're needed) and use a more
robust test that handles all virtual file systems (by asking
QFileInfo) but falls back to QFileSystemEntry to work round the known
infelicities on MS-Win.  Add regression test for asset library paths
issue on iOS.  Ammends 27f1f84c1c.

Moved a couple of local variables to after the early return, since it
doesn't need them, in the process.

Task-number: QTBUG-70237
Change-Id: Ib3954826df40ccf816beebe5c3751497e3bf6433
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-01-13 18:18:10 +00:00
Joerg Bornemann
69bd238ad8 Fix resolving of libraries on Apple platforms
Qt couldn't be configured with -system-zlib on macOS, because qmake
failed to find "/usr/lib/libz.dylib".
  The library path is something along the lines of
"/Applications/Xcode.app/.../MacOSX10.14.sdk/usr/lib" which doesn't
contain "libz.dylib". But it contains "libz.tbd", which is a YAML-file
pointing to "/usr/lib/libz.dylib". One can pass the absolute path to
this tbd file to the linker, which will then pick up
"/usr/lib/libz.dylib".

Introduce a new variable QMAKE_EXTENSIONS_AUX_SHLIB, which is a list
of auxiliary extensions for shared libs, and add the "tbd" extension
to it on macOS.

Change-Id: I083b79a69d00232e35f9d6164ffa86cb473f1742
Fixes: QTBUG-72745
Fixes: QTBUG-72964
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-13 18:17:43 +00:00
Tor Arne Vestbø
7044409c87 macOS: Use tool environment to ensure tests load matching Qt libraries
Linking with a framework suffix to pick up the debug version of
libraries doesn't work as long as the dependencies picked up from prl
files are not rewritten to also include the suffix. The result is that
we end up loading both release and debug versions of the Qt libraries.

Use the target environment (target_wrapper.sh) to set the image suffix
instead, which means 'make check' will automatically work.

Change-Id: I60b0840760f68e579c270245d394e1dd609a0ebb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-12 12:18:36 +00:00
Oliver Wolff
911da982df qmltestcase: Fix generation of Visual Studio project files
Mimicking the approach from testlib_defines.prf, DEFINES containing a path
surrounded by quotation marks have to be handled differently for Visual
Studio projects.

Change-Id: I26f6a45d4df154f599e8be15b3aa3905cf703a1f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-11 12:56:14 +00:00
Kai Koehne
eef4d16639 QtOpenGLExtensions: Unify license headers
Change-Id: If410c0dc739657a65732d29d45a86a35bee359de
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-01-11 11:06:25 +00:00
Joerg Bornemann
f1aa4c076f Fix build with -no-libpng on Windows
Check for availability of libpng in our bundled libfreetype.

Fixes: QTBUG-71395
Change-Id: I99664b8583011f517b18e1038e327c6cb6799af7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-01-11 07:58:29 +00:00
Friedemann Kleint
3eac688ec0 Documentation: Add \nullptr macro and use where applicable
Qt for Python users reading the documentation assume that int(0) can
be passed for pointer parameters. Use the newly introduced \nullptr to
disambiguate this.

In a follow-up step, the \nullptr macro can be defined as None
when generating the Qt for Python documentation.

Task-number: PYSIDE-903
Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-10 22:16:07 +00:00
Mitch Curtis
574b56913f Doc: mention that some filtered events need to be explicitly accepted
QKeyEvent's detailed description already documents this:

"A key event contains a special accept flag that indicates whether the
receiver will handle the key event. This flag is set by default for
QEvent::KeyPress and QEvent::KeyRelease, so there is no need to call
accept() when acting on a key event. For QEvent::ShortcutOverride the
receiver needs to explicitly accept the event to trigger the override.
Calling ignore() on a key event will propagate it to the parent widget.
The event is propagated up the parent widget chain until a widget
accepts it or an event filter consumes it."

However, someone looking at eventFilter() won't see this, resulting in
the shortcut not being consumed and propagating elsewhere, so mention
it in the docs for eventFilter() too.

Change-Id: I14fece52133be641ccdabd81f75706cd10b64669
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-10 10:45:53 +00:00
Tor Arne Vestbø
68511d41d5 qWaitFor: Prevent being stuck in QCoreApplication::processEvents
When using the overload of QCoreApplication::processEvents that takes a
maxtime argument, the function will keep processing events until there
are no more events, or until it times out.

The problem is that the function doesn't distinguish between events that
were on the event queue when the function was called, and events generated
by processing events as part of its own execution. If for example a widget
calls update() in its paintEvent, the function will spin for the entire
duration of maxtime.

That doesn't work for qWaitFor, where we need to check the predicate
between each pass, so we use the overload of processEvents that doesn't
take a maxtime. That's fine, as we have our own timeout logic.

Change-Id: I9738d7d0187c36d4a5ddfcd3fd075b0bd84583c4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-09 18:10:54 +00:00
Roland Rossgotterer
0330db86fd Increase sysctl argument buffer size to include null character
An UUID is 36 characters long, but sysctl and sysctlbyname return a
null terminated string with 37 characters. That was too long for the
provided buffer. Surprisingly the return code was still 0 instead of -1.
The returned buffer was empty though.

Change-Id: Ic4d20ecc1b2b3a3e98468d31ac304957d56deee9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-09 08:42:25 +00:00
Roland Rossgotterer
166162d830 Always access the 64-bit registry key to read MachineGuid
When running a 32bit application on a 64bit Windows, the call to open
the key
"HKLM/Software/Microsoft/Cryptography/MachineGuid"
will by default be redirect to
"HKLM/Software/WOW6432Node/Microsoft/Cryptography/MachineGuid"
which does not exist.
Instead access the 64bit key from either a 32bit or 64bit application.
KEY_WOW64_64KEY has no effect on 32bit Windows.

Change-Id: Ic5e13f99d08aef2658d58a52cffe66dbab0510b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-09 08:42:10 +00:00
Lorn Potter
2780f80fae wasm: fix blob download handling
Change-Id: I34a8ec05c18b15ed71787986b5b0316693235b4d
Fixes: QTBUG-72105
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-01-09 05:05:12 +00:00
Eirik Aavitsland
74c8aa7608 bmp image handler: Reject invalid 0-dimension files early
Avoid spending time on decoding attempt of invalid bmp files
specifying height or width as 0.

Change-Id: Ia6666088515eee54777f7154868fb7d07c6b4438
Done-with: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-01-08 16:35:15 +00:00
Andre de la Rocha
81c3c66bb4 Fix PDF generation for locales using comma as decimal separator
A previous change that extended the maximum PDF size has caused the
generation of invalid PDF output when the current locale was set to
something using commas instead of points when outputting floating
point numbers through printf(). This change uses QByteArray::number()
instead, which uses points, irrespective of the current locale.

Fixes: QTBUG-72868
Fixes: QTBUG-72848
Change-Id: I292eba2d6c89b3e01957bb8c04c04bdca8ada316
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
2019-01-08 16:35:03 +00:00
Kai Koehne
5feac1e10c Fix attribution file for "FreeBSD strtoll and strtoull"
The JSON file format does not support an "Upstream" entry, see also
https://quips-qt-io.herokuapp.com/quip-0007.html

Finally, the link didn't work for me.

This amends ceeecbae51

Change-Id: I707f1113c399d85c2fbf982726033ac74f691915
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-08 16:34:49 +00:00
Lars Knoll
a8db9b8663 Fix a crash in QTextEngine when a paragraph only contains a tab
This fixes a regression introduced by change
c3d2d83fcb.

Change-Id: Idf840804c68cd6b1751e122b45e9dd2775af56f5
Fixes: QTBUG-72900
Fixes: QTBUG-72754
Reviewed-by: David Faure <david.faure@kdab.com>
2019-01-08 16:34:36 +00:00
Andy Shaw
afb08ac5da Use jint instead of jboolean where applicable and initialize variables
This amends change c6af7cf666 which had
incorrectly used jboolean to store the result of getCursorCapsMode()
and thus lost the information it was passing. The variables are also
initialized in case there is a lock problem when calling runOnQtThread.

Fixes: QTBUG-72783
Change-Id: Ibdc21e348c25ee4fdff242d14b3722c6551b042c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-08 16:34:15 +00:00
Nico Vertriest
4d9ac14bf8 Doc: Complete doc on QHostAddress::clear()
Task-number: QTBUG-31280
Change-Id: Ia9904433b0b67bead8831f2ef678b9598977df6b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-08 15:00:30 +00:00
Kai Koehne
2e2832a499 Fix typo in fontconfig autotest
Change-Id: Ie6ef3aa654083cd23320eda99660ff85050d999c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-01-08 13:12:57 +00:00
Tony Sarajärvi
8b1a23ed32 Blacklist a flaky qtableview function in WinRT
Task-number: QTBUG-72853
Change-Id: Iaf2b25712b571a3ce73387cb3d2e70d427808364
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-01-08 11:58:41 +00:00
Heikki Halmet
a3f3c1d599 Make Android arch x86_64 to use platform-21
Change-Id: I0dc1f87af2270aa5a8ac9fcc256b5b923e1c8c21
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-01-08 11:47:02 +00:00
Timur Pocheptsov
98552a84ce Emit paletteChanged and send ApplicationPaletteChange on theme change
Fixes: QTBUG-72575
Change-Id: I407e081295a456a7bdd36de91ca5bbf74bba6078
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-08 11:43:16 +00:00
Timur Pocheptsov
78b422c341 QNetworkReplyHttpImpl::_q_startOperation - remove a useless warning
Since it explains nothing and now, after some other bug was fixed
(see, for example, c89d0f9d53), we trigger this message on the
first request, which happens because:
- 'createSession()' indeed, creates a session, compares a previous
  kwnon state (which happens to be 'Invalid') with a current state,
  which is 'Connected' and then invokes '_q_networkSessionStateChanged'.
- '_q_networkSessionStateChanged()' on 'Connected' emits
  'networkSessionConnected()' to which a newly-created QNetworkReplyHttpImpl
  will respond with it's _q_startOperation().
- QHttpNetworkReplyImpl will also try to 'open' a session, its 'opened()'
  signal will trigger, again, 'networkSessionConnected()' and ... the
  next _q_startOperation().
Now, not to add even more twisted spaghetti if/conditions with some
unpredictable regressions, let's suppress a useless warning and
silently return. We, indeed, in 'Working' state, let's keep working.

Task-number: QTBUG-72463
Change-Id: I5282979920915ffded889c20b8ae740a46efef04
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-01-08 11:18:18 +00:00
Friedemann Kleint
56e92dfdf2 QSplashScreen: Fix positioning in multimonitor setups
Previously, QSplashScreen::setPixmap() used
QDesktopWidgetPrivate::screenGeometry().center() to determine
the screen position, which would always result in the primary screen
being used. That is counter to the documentation of QSplashScreen(QWidget *,
QPixmap), which states that a desktop screen widget can be passed
as parent to set the screen.

To fix that and make it easier to work with QScreen (which is the likely
outcome of QTBUG-62094), extract the setPixmap() to QSplashScreenPrivate
with an additional QScreen * parameter and add a helper to determine it. Do
not set a position in case no parent was passed so that
QPlatformWindow::initialGeometry() triggers, centering it over the cursor.

Fixes: QTBUG-72819
Task-number: QTBUG-62094
Change-Id: Ic38cfecd24c3ff6b82dff37702b627c5a50a3e1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-08 11:12:38 +00:00
Samuli Piippo
2327944d24 qmake: use default libdirs to search for prl libs
Default libdirs are never added to the modules' LIBS and if
Qt was configured to use one of the default libdirs, module
might end up without any path to search for its prl files.

Add default libdirs to the search path similar as it's done
in unix/makefile generator.

Fixes: QTBUG-72855
Change-Id: I43c5bae0d54ba9427ab0ad3eab61ba0c4e2cbde8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-08 09:46:42 +00:00
Liang Qi
0e96b5fe48 Merge remote-tracking branch 'origin/5.12' into 5.12.1
Conflicts:
	src/widgets/kernel/qtooltip.cpp

Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
2019-01-08 09:34:24 +01:00
Oswald Buddenhagen
5733dfbd90 qmake: make CONFIG+=egl work again
while it's legacy and should not be used (use QMAKE_USE+=egl instead),
it shouldn't be broken nonetheless.

amends 310bf3f57c.

Fixes: QTBUG-72564
Change-Id: Id6a070a4653dc1182a6b4d75af027a6ee6cbacae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
2019-01-07 19:07:02 +00:00
Max Mazurov
2cd633e7ee XCB: Use application name for X11 selection owner name
This makes it possible for clipboard managers (or other scripts) to
distinguish different Qt applications and act differently.

Change-Id: I5bc5a1914b51127b24a81142ca9dbdb196ffd0d8
Fixes: QTBUG-72806
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-01-07 17:12:54 +00:00
Liang Qi
772f56c3cf Fix warnings about uninitialized variables - qrgba64_p.h
In function 'QRgba64 rgbBlend(QRgba64, QRgba64, uint)':
error: 'blend.QRgba64::rgba' is used uninitialized in this function [-Werror=uninitialized]
qrgba64_p.h:246:13: note: 'blend' was declared here
     QRgba64 blend;

Change-Id: I7b263f863281c51c7d8099704f2cffcc7e1a07df
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-07 14:57:03 +00:00
BogDan Vatra
da43362921 Fix libs dir location on arm64
On Android arm64 the native libs are not in /data/app/../libs/... anymore but they are moved
to some random location, so, trying to load the libs from old location will fail.

Fixes: QTBUG-72616
Fixes: QTBUG-71027
Change-Id: I70263c8ae2d014999fbc78f40bd9b7d04d31d1dd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-01-07 12:00:49 +00:00
Christian Ehrlicher
52e0d9e23c Drag'n'Drop: fix dnd when dragMoveEvent() is not implemented
The refactoring of dnd with f8944a7f07
added a regression which results in a need to reimplement
dragMoveEvent() on the drop side. Before this change it was possible to
accept the dnd in dragEnterEvent() without again accepting it in
dragMoveEvent().
Fix it in a similar way it's done in
QGuiApplicationPrivate::processDrag() by prefilling the first simulated
QDragMoveEvent with the values from the previous QDragEnterEvent before
it is sent to the drop receiver.

Fixes: QTBUG-72844
Change-Id: I1300dd02b7f1d9dcd44ecefa8335f92ad6c6cafa
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-01-07 10:50:18 +00:00
Kari Oikarinen
07685355b5 Bump version
Change-Id: I2bf8da98a140bdd9848139a96bea736708357a1a
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-01-07 07:56:16 +00:00
Gatis Paeglis
abcf7a103e configure: improve warning when all qpa plugins disabled with features.gui
The mentioned README file has never been very trustworthy and
after 863c688749 it has become
very minimal - it doesn't contain anything that is not already
present in "configure --help" and enforced by the configure
process. Furthermore, the warning was XCB specific, but Qt
supports also other QPA plugins on linux.

Change-Id: I3211dda3f294cbcd5f3d15fe8c21a1af7627f048
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-07 07:27:35 +00:00
Jędrzej Nowacki
ecdccce8e4 Fix warnings about uninitialized variables
qtbase/src/corelib/kernel/qmetatype.cpp: In static member function ‘static void QMetaType::destroy(int, void*)’:
qtbase/src/corelib/kernel/qmetatype.cpp:2599:27: error: ‘info.QMetaType::m_destructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     if (m_typedDestructor && !m_destructor)
         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_destructor’ was declared here
     QMetaType info(type);
               ^~~~
qtbase/src/corelib/kernel/qmetatype.cpp:2600:26: error: ‘info.QMetaType::m_typedDestructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         m_typedDestructor(m_typeId, data);
         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_typedDestructor’ was declared here
     QMetaType info(type);
               ^~~~

The extended (not inlined) function may be called on a half
initialized invalid instance.

Change-Id: I26d677a8ad2bd0c5846233f06393e774d377936d
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-06 10:14:36 +00:00
Oswald Buddenhagen
45e4dfb449 qmake: rewrite msvc/nmake cross-build environment setup
rather than reproducing vcvarsall.bat's functionality as hard-wired code
in the nmake generator, just invoke the actual script from
toolchain.prf. this is much easier, more future proof, and - critically
- makes the detected variables available to configure's new library &
header search facilities.

[ChangeLog][Important Behavior Changes][qmake][WinRT] Cross-builds will
now ignore pre-set values of %INCLUDE% and %LIB% when building target
executables. If necessary, use configure's -I and -L switches when
building Qt, and pass QMAKE_INCDIR and QMAKE_LIBDIR on qmake's command
line when building own projects.

Change-Id: I36f53e8880d6523f3f6f7a44d40d87d04bd06854
Reviewed-by: Thomas Miller <thomaslmiller91@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-01-05 20:33:24 +00:00
Oswald Buddenhagen
ef14c3dc1a qmake: reshuffle toolchain.prf
swap the order of compiler version detection and default path detection.
this keeps a subsequent commit smaller, which introduces a dependency
between the two.

Change-Id: I2d4cbee1fd3555411c18833bbee0201c994a9942
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-05 20:33:14 +00:00
Oswald Buddenhagen
f89ac0101a qmake: add $$read_registry() function
Change-Id: I7f9f17e0f44c273e4754d1decc92a8594cad8658
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-05 20:33:07 +00:00
Oswald Buddenhagen
fff59911a3 qmake: add QMAKE_EXPORTED_VARIABLES
because QMAKE_EXTRA_VARIABLES sometimes just ain't enough.

Change-Id: I739e5b6510e4701ca0a86834e4f9a978d7ef1cf4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-05 20:32:56 +00:00