Commit Graph

36151 Commits

Author SHA1 Message Date
Kevin Funk
48eb08d255 tests: Fix top-level CMakeLists.txt
Problem:
 CMake Error in CMakeLists.txt:
  A logical block opening on the line

    .../qtbase/tests/auto/cmake/CMakeLists.txt:149 (if)

  is not closed.

Broken by change 02ed1b36da

Change-Id: I6c04721edbccaa9fcdb53af92d33dfa87eeaebb8
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-08-15 11:08:34 +00:00
Shawn Rutledge
8f18510133 Silence warning about comparing signed and unsigned
qxcbimage.cpp:72:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

Task-number: QTBUG-69923
Change-Id: Icdb4ce8cb7ce5b48d7ee3839166eb1c7c9520c78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-14 15:59:40 +00:00
Erik Verbruggen
8dd40e9b09 [macOS] Fix lower bound when searching for previous transitions
The lower bound shouldn't be the smallest (positive) value representable
by a double, but the *lowest* (finite) value.

Task-number: QTBUG-69862
Change-Id: Ia66610e3c0f8d9643c329714607f5af573206fd8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-14 15:02:08 +00:00
Shawn Rutledge
f2862b4d5d VNC plugin: explicitly cast int to uint16_t before calling htons
Otherwise there is a -Werror=narrowing error on big-endian
architectures (where htons does nothing).

Task-number: QTBUG-68390
Change-Id: Idb204a81aaedb9f4fde1d5fae406da36c7a1953e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry-picked from b206d1c808)
2018-08-14 14:59:58 +00:00
Alexander Volkov
43f5377fad Make QMessageBox window with the detailed text closable
QMessageBox window ignores QCloseEvent if it was created
with Ok button and the detailed text was set. But it can
be closed if it contains only one button.

Make it closable if there are two buttons and one of them
is the "Show Details..." button.

[ChangeLog][QtWidgets][QMessageBox] A message box with two
buttons, one of which is the "Show Details..." button,
can be closed by clicking the X button on the window's
title bar.

Task-number: QTBUG-69526
Change-Id: Iba09e38561eb3898dc2aecfd38d8519d512a71c1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-14 04:39:05 +00:00
Johan Klokkhammer Helsing
edbac71691 Skip all qfocusevent test on platforms that don't support window activation
Task-number: QTBUG-66846
Change-Id: Ia8b69ede9154822f78ca28e0a2470b8bfb2abef0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-14 04:38:35 +00:00
Gatis Paeglis
833b9997fd xcb: make sure we have a valid m_qimage in backing store
This patch amends a62f1d0356.

If the initial backing store resize request is called with QSize(0, 0),
we end up with QXcbBackingStoreImage holding a default contructed QImage / m_qimage.
This happens because of the logic in QXcbBackingStoreImage::create(), where
if we detect that the requested segmentSize == 0, we do not allocate
any memory, and thus don't create a valid image in m_qimage. On subsequent
call to QXcbBackingStore::resize() we would only check if QXcbBackingStoreImage
object has been created, but not if it is in a valid state. This obviously
would cause problems.

This patch re-factors the logic to handle better resize to QSize(0, 0). And
make the code cleaner by:

- merging ::create and ::resize as semantically it is always resize().
- dropping unnecessary argument passing.

Task-number: QTBUG-69581
Change-Id: Ied337beb449dea8259fcf6b7d29f0a5bd553019d
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-13 22:14:26 +00:00
Allan Sandfeld Jensen
6256729a6d Fix possible heap corruption in QXmlStream
The value of 'tos' at the check might already be on the last element,
so triggering stack expansion on the second last element is too late.

Change-Id: Ib3ab2662d4d27a71effe9e988b9e172923af2908
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 15:10:11 +00:00
Sune Vuorela
6854fa75f7 Glib dispatcher: use default priority for timers
For some reason, the GLib event dispatcher was lowering the priority for
timers compared to other events like for example socket events.

the IDLE priority is for "Do this later when you are not busy", and that
is wrong for generic timer events.

See also https://bugs.kde.org/show_bug.cgi?id=230184

Task-number: QTBUG-48344
Change-Id: Id337a8f0c7fad3ebd5e5fa49d7831a0001ea9010
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-08-13 13:51:15 +00:00
Takao Fujiwara
e9a8facc96 IBus: connect to ibus-daemon when it restarts in Flatpak
IBus clients cannot access the IBus socket path in Flatpak and
need to watch the D-Bus disconnection.

Change-Id: Ida1a5ce4fe112c1c4f8855ec886e74f2cbdcc8a0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-08-10 10:56:03 +00:00
Oswald Buddenhagen
9742ee681b configure: fix passing of -L and -F to configure tests
the global flags are deprecated in favor of per-library paths, but they
obviously should still work. but apparently no-one cares, because there
isn't even a bug report about it ...

amends 90eee08b3.

Change-Id: I85aee41ca11de1715d1c750ae8e663093e012fb7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-08-09 17:11:17 +00:00
Eskil Abrahamsen Blomfeldt
65a1d41a09 Fix potential crash when showing line/paragraph separators
When showing line and paragraph separators at an offset from the start
of the string, the end of string pointer would be incorrectly set, and
we would read past the end of the string. If any part of this memory
happened to match the line or paragraph separator, then we would
overwrite it and have a crash.

I couldn't find any reliable way to test this, since the crash depends on
the contents of the memory after the string allocated by the algorithm.
But with an overflow of 100 000 characters, I found that it crashed every
time I ran the test.

[ChangeLog][QtGui][Text] Fixed potential crash when using
QTextOption::ShowLineAndParagraphSeparators.

Task-number: QTBUG-69661
Change-Id: I17d1996b883560bacdc7ce114c8aeb2b0108faea
Reviewed-by: JiDe Zhang <zccrs@live.com>
Reviewed-by: Michal Lazo <xlazom00@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-08-09 12:46:22 +00:00
Gabriel de Dietrich
04671a80db macOS: Force light theme on macOS 10.14+
Until we can properly fix QPalette and QMacStyle,
we should disable dark appearance in Qt applications.

Disable by setting NSApp.appearance to Aqua, unless
dark mode support has been requested via Info.plist
or environment variable.

Read the NSRequiresAquaSystemAppearance Info.plist
key, don’t set NSApp.appearance if its value is false.

Also check the QT_MAC_REQUIRES_AQUA_SYSTEM_APPEARANCE
environment variable and apply similar logic. You then
enable dark mode support by setting:

    QT_MAC_REQUIRES_AQUA_SYSTEM_APPEARANCE=0

which is slightly awkward, but matches Info.plist
behavior.

Task-number: QTBUG-68891
Change-Id: I86dc6cf3dee951d46c953396c57d2c31f2e4afcc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-09 08:19:01 +00:00
BogDan Vatra
490d461ab0 Fix apkPath for gradle 4.0+
This change keeps the compatibility with old gradle.
It is needed for projects that must use the old gradle version.

src/tools/androiddeployqt/main.cpp was moved from qttools into
qtbase in 5.11. So re-apply c03f5673 in qttools here.

Task-number: QTBUG-69755
Change-Id: I2399d445f8208766e4185d717bb51f1317fdcc00
Reviewed-by: Volker Krause <volker.krause@kdab.com>
(cherry picked from commit e2f4193112)
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-09 07:21:19 +00:00
Joerg Bornemann
f2668c6b43 qmake vcxproj generator: Fix extra compilers for single configs
For single config mode (no debug_and_release) extra compilers wouldn't
get added to the vcxproj file.

Single config mode creates a temporary project, and that was incomplete.
Multi config mode, on the other hand, directly operates on the "real
data" and wasn't affected by this problem.

Task-number: QTBUG-69769
Change-Id: I9cd942e43d80adbeac9a3c8fbe1a5766bc9645a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-08-09 06:21:01 +00:00
Thiago Macieira
58b6b723de QSysInfo: fall back to /usr/lib/os-release if the /etc one is missing
Turns out that there are two files and while a lot of distros symlink
one to the other, some distros lack the one in /etc.

[ChangeLog][QtCore][QSysInfo] Fixed QSysInfo::productType() to properly
detect some Linux distributions that ship with a minimal /etc.

Change-Id: Ia741b559c24d46c78fb2fffd1548cab414037220
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-08 20:17:19 +00:00
Thiago Macieira
25feee4e06 Fix qmake build with glibc 2.28
We haven't yet run the configure checks to see if statx and renameat2
are present in glibc, so this fails when we redefine the structures and
functions.

linux/stat.h:56:8: error: redefinition of 'struct statx_timestamp'
bits/statx.h:25:8: note: previous definition of 'struct statx_timestamp'
qfilesystemengine_unix.cpp:110:12: error: 'int renameat2(int, const char*, int, const char*, unsigned int)' was declared 'extern' and later 'static' [-fpermissive]

Change-Id: Ia741b559c24d46c78fb2fffd1548a792d22e3368
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
2018-08-08 08:23:18 +00:00
Robin Lee
2adc06f940 IBus: Support the portal, needed for Flatpak environment
Following commit 35ce6247 in IBus, IBus input plugin now connects to
session bus and use IBus portal to create input context when running
in Flatpak environment or IBUS_USE_PORTAL is set.

[ChangeLog][plugins][ibus] Support IBus portal. Qt programs in Flatpak
environment can now trigger IBus input method.

Change-Id: I561f5f873d709b8abeae554d804daa058f9f6e16
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
2018-08-08 06:18:13 +00:00
Joerg Bornemann
7dc930d400 qmake vcxproj generator: Fix compilation of generated C++ sources
Generated C++ source files with extensions other than .cpp would not get
compiled, because the code ignored all other C++ source extensions like
.cc and .cxx.

Fix this by respecting the value of QMAKE_EXT_CPP and QMAKE_EXT_C.

Task-number: QTBUG-69770
Change-Id: I097dfef6920e353a351c97891cdbfdc9a859815f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-08 05:12:44 +00:00
Tor Arne Vestbø
bedf50a5bb macOS: Don't blend the backingstore unless the window has a background
If there's no background, we should copy the backingstore, so that the
backingstore is not blended with the result of the previous flush.

The unified toolbar case is covered by the window having a textured
background.

Task-number: QTBUG-69773
Change-Id: I2f4eed9f44a60ebe7495ce68cf5a54d3d2424b0c
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-07 12:20:52 +00:00
Tor Arne Vestbø
3068b185c5 macOS: Update window geometries after screen properties change
Task-number: QTBUG-69794
Task-number: QTBUG-68140
Change-Id: I4d33bc2136478d779cc4ae8170c3421d9a7557cc
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-08-07 09:19:26 +00:00
Tor Arne Vestbø
e7063e6cc6 Add QPlatformScreen::windows() helper to return all windows on screen
Change-Id: Ib55b37b64ed0890ca777dfea8c4d702e267c34bf
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-08-06 20:14:55 +00:00
Tor Arne Vestbø
be35539123 Use consistent naming of QPA screen change callbacks in QGuiApplication
Change-Id: I76be8a993e5d71e472faf9a5770b4c1128e8a4c6
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-06 20:14:55 +00:00
Andre de la Rocha
f271dd8f96 Windows QPA: Fix UIA-to-MSAA accessibility bridge
According to MS sample code, MSAA requests should be replied with
UI Automation providers to enable the use the UIA-to-MSAA bridge, in
order to support MSAA-only clients. Also changing the mapping of
QAccessible::Client from UIA_CustomControlTypeId to UIA_GroupControlTypeId,
as it seems more appropriate and avoids an incorrect mapping to a push button
type in the UIA-to-MSAA conversion.

Change-Id: I5149d250da2d1bd7b14b44ca46e856a81c9be045
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-06 19:34:23 +00:00
Oswald Buddenhagen
a09a28879e qmake: improve the fake project
qt creator's clang code model is a bit more picky than the old one, so
we need a project that approximately works.

while we're at it, inline qmake.pri, add some missing files, and
beautify the source lists.

Change-Id: I87ca1db2ee3e55ea08e4c23f7913e882ab44fd21
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-08-06 10:25:50 +00:00
Andre Hartmann
5d1809be83 QString: Fix documentation for toDouble() and toFloat()
The character 'g' is only a valid format when converting numbers
to strings, but not other way round.

Change-Id: Ie772886e7a45a5067c0a3e4eaa3a6ccef8e69426
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-08-06 08:24:05 +00:00
Eirik Aavitsland
2841e2b61e Check for QImage allocation failure in qgifhandler
Since image files easily can be (or corrupt files claim to be) huge,
it is worth checking for out of memory situations.

Change-Id: I635a3ec6852288079fdec4e14cf7e776fe59e9e0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-08-06 08:19:11 +00:00
Thiago Macieira
64a560d977 QObject: do allow setProperty() to change the type of the property
[ChangeLog][QtCore][QObject] Fixed a bug in setProperty() that caused a
property change not to take effect if the old value compared equal using
QVariant's equality operator, but the values were not strictly equal.

Task-number: QTBUG-69744
Change-Id: I00e04a465fcf4fc1a462fffd1547885861a07a64
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-08-04 15:46:02 +00:00
Thiago Macieira
4c22350278 Remove the src/sql/README.module file
It's stale. Thanks to Olivier B. for pointing out.

Change-Id: Ie01831ddac5446fdbdeefffd15463530818cff9e
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-04 06:08:50 +00:00
Oswald Buddenhagen
133fb029a6 make it possible to override the basename of module config files
using qt$$MODULE isn't enough if the module is composed of submodules
which need the final module's headers, because that would require two
modules having the same module .pri file.

the first thought to fix this was to just use $$lower($$TARGET), but
that breaks for testlib (QtTest). while the config file name isn't
public api, it's included by a public header, so changing it is risky.

so instead stay with the original pattern, but make it explicitly
overrideable.

the cherry-pick is needed to support QtWebEngine 5.12 with Qt 5.11,
a requirement that was raised too late.

Change-Id: I758c46ed403620620d577ae16866ce751271b63e
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 95b0e4c956)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-03 14:15:41 +00:00
Paul Wicking
c6cca0f492 Doc: Update out-of-date image in QColorDialog documentation
Task-number: QTBUG-58420
Change-Id: Ib5c7a3f681b082182cf6ec9aa62028b7040e81bf
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-08-03 12:53:57 +00:00
Paul Wicking
6953e513f9 Doc: Clean up Qt::ApplicationAttribute docs
* Remove () from links to QGuiApplication link names. The link targets
  QGuiApplication, and the syntax Q(Gui)Application to suggest both
  QGuiApplication and QApplication seems unnecessary, as QApplication
  derives from QGuiApplication anyway.

* Move added in version line to the bottom of each entry that contains
  said line for consistency.

* "was added in" > "has been added in"

Task-number: QTBUG-56077
Change-Id: Ife93acb7936ff9f0d3af2f2f456ad0db95419797
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2018-08-03 12:32:55 +00:00
Paul Wicking
8770461115 Doc: Update really old screenshot in Sliders Example
Task-number: QTBUG-63248
Change-Id: Id756d86539987562b9455881364928ccf7349fbf
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-08-03 12:32:32 +00:00
Paul Wicking
ae289884db Doc: Fix wrong link in QFont documentation
Task-number: QTBUG-62072
Change-Id: I587534fc5723b3d198fe2065fbcf1bee4871a768
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-08-03 12:15:29 +00:00
Allan Sandfeld Jensen
65cd6f2e82 Fix conversion from transparent indexed8 to RGB32
A typo meant the color-table was not fixed. For safety fallback colors
are also made opaque.

Change-Id: I3e609882177604910c4343c86f00221a89af9078
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-08-03 10:42:38 +00:00
Allan Sandfeld Jensen
cdf154e65a Optimize blits of any compatible formats
The fast image blending is only used for SourceOver composition, but
several of our embedded backends make heavy use of Source composition
which doesn't have a short-cut. This patch adds a blitting short cut
that works in those cases.

Task-number: QTBUG-69724
Change-Id: Icc61a67cc27bc83863153d69cae60dd986d26f69
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-08-03 09:36:57 +00:00
Paul Wicking
d2d59e77d5 Doc: Increase precision in description of convenience typedefs
Task-number: QTBUG-53856
Change-Id: I57917bb311d1d93e0903f2b3e021cc4db0f0d05e
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2018-08-03 10:28:02 +00:00
Allan Sandfeld Jensen
1c8f9eb79d Add missing optimization for loading RGB32 to RGBA64 using NEON
The rest of the RGB64 routines were optimized, but the loading of RGB32
was not as it was originally not used much, but with ARGB32 using the
RGB64 backend, it is essential for decent performance.

Task-number: QTBUG-69724
Change-Id: I1c02411ed29d3d993427afde44dfa83689d117e0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-08-03 09:37:02 +00:00
Friedemann Kleint
66be5445e6 Windows: Implement Qt::WindowStaysOnBottomHint
Set the Z-order to HWND_BOTTOM in that case.
Add a doc note stating that it only works for frameless or
full screen windows.

Task-number: QTBUG-53717
Change-Id: I7abf219a88aac715c51d27d925504da9e91b56f1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-08-03 09:36:25 +00:00
Joerg Bornemann
f0ff73f631 QProcess::startDetached: Fix behavior change on Windows
Do not overwrite stdout/stderr by default, but only if requested.
This restores the behavior of QProcess::startDetached of Qt 5.9.

Task-number: QTBUG-67905
Change-Id: Idccf7b0da7bd80f88a0624286ddf2851bc974fb1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-03 08:09:30 +00:00
Eirik Aavitsland
8c4207dddf Fix crash in qppmhandler for certain malformed image files
The ppm format specifies that the maximum color value field must be
less than 65536. The handler did not enforce this, leading to
potentional overflow when the value was used in 16 bits context.

Task-number: QTBUG-69449
Change-Id: Iea7a7e0f8953ec1ea8571e215687d12a9d77e11c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-08-03 08:01:47 +00:00
Oswald Buddenhagen
9d4d05ec53 qmake: don't escape colons in dependency paths on windows, after all
amends 7c34e0a7b4.

Change-Id: I2ecdf0a450337e667f55af09b3de79fb47e05428
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-02 15:15:30 +00:00
Oswald Buddenhagen
c07a738374 Bump version
Change-Id: Ib93fe88526ceb4097faee241e35d504042d73032
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-02 15:14:17 +00:00
Timur Pocheptsov
81910b5f3c SecureTransport - disable lock on sleep for the custom keychain
It appears that by default our keychain auto-locks when the
system sleeps. This makes the keychain totally useless, since
its password is a random 256 bytes our user never has a chance
to know. Thanks to Mårten for the hint about SecKeychainSetSettings,
the way to properly fix it.

Task-number: QTBUG-69677
Change-Id: I2603c26b8422a1bcace3336e9b4ebe0381c952d7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-02 14:31:39 +00:00
Ales Erjavec
db738cbaf1 QCommonStylePrivate::viewItemSize: Fix text width bounds calculation
The width of the icon was subtracted out of the available text area
width even when the value of the `decorationPosition` was Top/Bottom.

Task-number: QTBUG-69404
Task-number: QTBUG-30116
Change-Id: I501ffc0dab0cff25e525c26adf9bdb060408927b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-02 07:23:36 +00:00
Kai Koehne
780dc2291b Fix builds with some MinGW distributions
Some distributions do not define MINGW_HAS_SECURE_API globally,
resulting in methods like wgetenv_s not being declared in the
headers.

This is probably to keep compatibility with Windows XP. Anyhow,
we don't support Windows XP anymore, so we can safely add the
define.

Note that this is not necessary for the mingw-builds distro,
which is the only one we test and support. Anyhow,  I don't
see any risk in adding these for other distributions.

Diff was provided by Philippe Dunski in the bug report.

Task-number: QTBUG-67443
Change-Id: I3a64b11541fe95e527ed44bbf8ad94469d457d3d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-02 07:10:00 +00:00
Błażej Szczygieł
c5af04cf8a HiDPI: Fix calculating window mask from pixmap on drag and drop
Use platform window directly for setting a mask to prevent bitmap
scaling if pixmap and window DPR are the same.

Amends: 42f788ffe2

Task-number: QTBUG-61948
Change-Id: I5eec85c01f20bdefff7343e83ff10cbcb2c79508
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-02 07:09:44 +00:00
Andre Hartmann
2de297f1b7 QLabel: Use nullptr in documentation
Change-Id: Idc3a5a40e33ddb4257e46d7b6f3279ca14241911
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-08-01 17:16:35 +00:00
Gabriel de Dietrich
4126de8877 QCocoaMenuLoader - ensure that ensureAppMenuInMenu indeed, ensures
The logic seems to be incorrect (or the naming is misleading): it
only adds 'appMenu' if it was found in the previous 'mainMenu',
failing otherwise. Consider the following example:

while (true){
    QApplication app(a,b);
    MainWindow w;
    w.show();
    app.exec();
}

It's quite a contrived but apparently allowed API use (OP claims
they have to switch languages in their app). The main window and the
app are destroyed, so is the menu bar. Then a new main window is
created, with a new menu bar. Now the current [NSApp mainMenu]
(the one set after we deleted the previous) does not have 'appMenu'
anymore (we removed it when initializing the first menu bar).
So as a result we have app menu missing and add new menus/items
to a wrong menus/at wrong index.

Change-Id: I64fce766d6c12ebf7ae12bb94af41c8c1de3d78b
Task-number: QTBUG-69496
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-08-01 17:00:35 +00:00
Albert Astals Cid
843629dd1f Improve documentation of QString::indexOf that take QRegExp
They said "By default, this function is case sensitive"
but this makes no sense when you're using a regexp for searching,
the regexp is case sensitive or not by itself, QStringList does
not influence that.

Change-Id: I7446cb52a9f915c6551af6046ce89cbc8bab96ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-01 15:09:38 +00:00