Commit Graph

34245 Commits

Author SHA1 Message Date
Thiago Macieira
dd61a1d98e tst_QUdpSocket: add some tests for link-local IPv6 multicasting
Unlike higher scopes (like scope 4, admin-local, which the last commit
used), scopes 1 and 2 require a scope in order to bind, even if some
operating systems are lenient. So test that we are able to bind to them
and do bind properly.

Change-Id: Ifb5969bf206e4cd7b14efffd14fba153eab965b9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-29 00:11:00 +00:00
Thiago Macieira
198c59dbce tst_QUdpSocket: always use an interface when binding to IPv6
Binding without an interface and expecting the OS to select something is
not supported in all OSes. On FreeBSD, I keep getting EADDRNOTAVAIL. So
modify our test to only join, leave and send to multicast groups with an
interface selection.

With this, all tests either pass or are skipped for me on Linux,
FreeBSD, and macOS. On Windows, this revealed an inconsistency in
behavior, which this commit adds a workaround for.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb6815456494d2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-29 00:10:54 +00:00
Thiago Macieira
656804b964 qrandom.h: actually #undef min and max instead of using parentheses
Putting parentheses around the call to (std::numeric_limits<T>::min)()
works, but the trick cannot apply to the min() function declaration on
the same line. So we really need to #undef.

I hope no one after the 1990s still needs these macros.

Task-number: QTBUG-65414
Change-Id: I39332e0a867442d58082fffd15024f8edb293311
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-28 21:30:28 +00:00
Nico Vertriest
0fd5fe28ab Doc: remove Config Dialog Example
Task-number: QTBUG-60635
Change-Id: I089f14a92f1b9c53b26200c93cac7ee3c9f26d65
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-27 14:41:18 +00:00
Shawn Rutledge
0c4d31d8c9 Improve the findfiles example: use QDirIterator, etc
It hasn't been necessary for a long time now to write the recursive
file-find function manually.  It has just been an obscurely documented
feature of QDirIterator for far too long.

Demonstrate the new QLocale::formattedDataSize() function.

Also sync up the qdoc description of this example with the recent changes.

Change-Id: I9c2bb15bb5ec353d38181b160f0be198774cbea2
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-12-27 08:40:22 +00:00
Thiago Macieira
c4f397ee11 tst_QUdpSocket: Don't use interface-local IPv6 multicast
The FreeBSD kernel treats them specially, just like link-local (that's
probably why it calls them "interface-local" instead of "node-local").

So instead let's use a random address, which will avoid multiple
tst_qudpsocket, when run on the same network at the same time,
receiving each other's datagrams. It could happen, considering this test
has an 800-second timeout limit.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb592a3166547e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-12-24 17:14:19 +00:00
Thiago Macieira
bbcd453388 tst_QUdpSocket: stop trying to bind to multicast addresses
This is not an official feature of the networking stacks and does not
work portably across operating systems. So just stop trying to do that.

This was failing reliably (not flaky!) with IPv6 on FreeBSD and
Windows. For IPv4, Windows apparently accepts 239.255.0.0/16 but not
other addresses, so remove IPv4 too.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb682c2839e95d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-12-24 02:04:44 +00:00
Thiago Macieira
b12db22fcf Replace a few hardcoded paths with defaults from paths.h
This removes at least one special-case we had to have, in Android's lack
of /etc/mnttab. Bionic's _PATH_MOUNTED is already /proc/mounts.

Change-Id: I9407dcf22de6407c83b5fffd14fedc638586d0f9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-12-24 02:04:12 +00:00
Thiago Macieira
f95d64d075 Doc: attempt to fix some qdoc errors for QRandomGenerator
This fixes only those that look fixable. There are a number of errors in
the online documentation that look like qdoc tool bugs, like missing
functions (operator==) and documentation text that does not exist in the
source code. This fixes:

 - QRandomGenerator(System) constructor showing up
 - Links for C++ reference documentation not showing up as links

Change-Id: I9e2892cb6c374e93bcb7fffd14fe21db5a6969d9
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-12-24 02:04:10 +00:00
Thiago Macieira
f9c07da7b6 Examples: Update multicast sender and receiver examples for IPv6
It's the right thing to do, as we're in 2017, not 1997. Also, this takes
care to indicate that QAbstractSocket::MulticastTtlOption makes sense
mostly for IPv4, even though it's implemented for both families. In
IPv4, it's used to indicatae the scope, whereas in IPv6 it's stored in
bits 12-15 of the address.

Task-number: QTBUG-46046
Change-Id: I9741f017961b410c910dfffd14ffaabe0a2024d8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-24 02:04:07 +00:00
Gabriel de Dietrich
c5a3022b04 QMacStyle: Minimize size of scrollbar transparency layer
Instead of allocating the full backing store size for
the transparency layer, we make sure we only allocate
exactly as much as needed by the scrollbar.

Change-Id: I55c3172fe3dd2a1f3fd46828463497f9f35cb1ae
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-21 20:53:23 +00:00
Gabriel de Dietrich
e3c79b4356 QMacStyle: Use light color on expanding scrollbar
Change-Id: I4e9c870c8acaaa690f530f847c9927d61a508a94
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-21 20:53:20 +00:00
Gabriel de Dietrich
117148c381 QMacStyle: Bring back submenu indicator
This one fell off the truck while we were removing
HITheme calls. We add it back by simply rendering a
BLACK RIGHT-POINTING TRIANGLE character.

We also fix smaller issues, such as not displaying
any shortcut related to a submenu action — this is
simply not a thing. The spacing between the menu
item's text and the submenu indicator has also been
slightly improved.

Change-Id: I6c768a5506a5eb9528b0dd76acd52b561266d67b
Task-number: QTBUG-64405
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-21 20:53:17 +00:00
Oswald Buddenhagen
ad2df19c2a Bump version
Change-Id: I89c3b608d3a68c2617d0545120abf681d69f1f3d
2017-12-20 12:05:48 +01:00
Allan Sandfeld Jensen
d6473eb186 Fix drawing color fonts with shear and perspective transforms
Fixes the fallback painting used with complex transforms to be able to
handle color bitmap fonts which can't be converted to a path.

Change-Id: Id2851607f673b8fc1aea63f92043d0cdebc0fb9d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-12-20 09:03:37 +00:00
Nico Vertriest
ca181d3740 Doc: complete Draggable Text example
Task-number: QTBUG-60635
Change-Id: Ib901c677ad78a663c3f3e0dd689b8d65be10be83
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-12-19 13:43:15 +00:00
Friedemann Kleint
d04187b6a1 Windows QPA: Check validity of device when handling tablet leave
Huion GT-191 has been observed to send spurious leave events.
Amends 127483b5e3.

Task-number: QTBUG-65120
Change-Id: I5dfa003a71be137a7b40cc9c27d7cf2cada6922d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-19 09:29:22 +00:00
Lorn Potter
23c55cd37c bearermanagment: fix build for --no-feature-bearermanagement
Change-Id: I9e3f44b924e09a8d1a5095dc55d585b3cab33c15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-19 05:58:22 +00:00
Lorn Potter
bcef582b6f Fix scan reply dbus signature in connman bearer backend
Task-number: QTBUG-57844
Change-Id: I1f3035f32d213ec6da95650a946c17c64becf549
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2017-12-19 05:58:07 +00:00
Alexandru Croitor
e557a3c1d3 Export sanitizer as a global config
This is necessary for WebEngine at configure time, to be able to query
which of the sanitizers was enabled in order to report unsupported
combinations.

Task-number: QTBUG-64726
Change-Id: I72f8efe4bed3e14114f885bdae16650f1f23b24b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-18 16:20:58 +00:00
Nico Vertriest
7f5a314011 Doc: complete Easing Curve Example
- updated logo
- updated screenshot
- add link to easing.qdoc

Task-number: QTBUG-60635
Change-Id: I9389dfbbe66cfa5f4e8641bee2f8fd63f5c95f99
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-12-18 14:07:51 +00:00
Nico Vertriest
51a956366f Doc: move notepad example to qtbase and improve it
- Edited gettingstartedqt.qdoc
- update .pro files
- replaced snippet statements by \quotefromfile
- removed second version of notepad.h and notepad.cpp
  that were made only for quoting snippets
  (\quotefromfile reads from the program code)
- show current filename in header of window
- added checking routine on filename in Save method

Task-number: QTBUG-63984
Change-Id: I5298d761763a4dfeb705a1d9b77354be853ada88
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-12-18 13:39:28 +00:00
Allan Sandfeld Jensen
3dd0308634 Mask potentially undefined alpha in blend_transformed_argb
Makes sure the ARGB32PM that is painted on always have a defined alpha.

Task-number: QTBUG-55645
Change-Id: Ifcf5fcc2127d255518eca4763845a197da6c7914
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-12-16 09:23:58 +00:00
Morten Johan Sørvig
e739e984c3 macOS: Make retina OpenGL work on VMware
Qt requests full resolution OpenGL surfaces by default.
However, when running as a VMware guest it looks like
the OS silently creates low-resolution surfaces.

This is not possible to detect using the standard NSWindow
APIs for converting to backing coordinates or for
reading the backing scale factor. The result of this
is that Qt will incorrectly display one quarter of
the window content only.

Fall back to detecting if the OpenGL renderer is the
Apple software renderer, which it will be on VMware.
Cancel the high-resolution surface request if this
is the case. This needs to be done while we have a
valid OpenGL context.

Task-number: QTBUG-62357
Change-Id: I33bf12b3bb0408249e6d66e0a8ca86b044bea781
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-12-15 08:45:45 +00:00
Allan Sandfeld Jensen
ae55e75b1b Paint text decoration where the text is
For multi text-item texts we should render the text decoration at the
same position as the text-item part is, and not always from the
beginning of the line.

Task-number: QTBUG-60422
Change-Id: I9aa58fc164122ad1fae9716b8b18bdfbbbd778a9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-12-13 08:43:39 +00:00
Friedemann Kleint
9b597a09f1 QtGui/Windows: Fix wait cursors remaining active
In QWindowPrivate::applyCursor(), do not apply override cursors
when the platform supports QPlatformCursor::OverrideCursor.

Complements b05d1c2ebf.

Task-number: QTBUG-65001
Change-Id: Ie84cc30ad99b22e037aae829a2ce847ec4bf900f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-12 20:20:17 +00:00
Friedemann Kleint
141bca90e1 Windows QPA: Fix handling of override cursors
Override cursors were not restored when nested or in a dual
monitor setups.

The default cursor stored in QWindowsCursor::m_overriddenCursor
was clobbered by subsequent calls to QWindowsCursor::setOverrideCursor().
This caused for example the wait cursor to remain active when
switching to Help Mode in Qt Creator. Add a check preventing that.

Make the variable static so that it is shared between the cursors
of multiple screens.

Amends b05d1c2ebf.

Task-number: QTBUG-65001
Change-Id: Iead5804d317f73dedd78d22c1c85c62b5349ab83
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-12 20:20:13 +00:00
Heikki Haveri
e55c7974db Fix Android Service thread getting stuck in service startup
This change allows services using QAndroidService to function properly.
A service using a plain QCoreApplication is still affected.

The original code uses postfix decrement, causing an off-by-one error in
reference counting, which, in turn, fails to properly release a semaphore.

Fix by using deref() instead, which is also more readable, and consistent
with the use of ref() elsewhere in the code.

Task-number: QTBUG-64728
Change-Id: I99b59307638d619506c594f86de6d7d202d755f2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-12-12 20:12:49 +00:00
Thiago Macieira
48d677365a QStandardPaths: fall back to a default if PATH isn't set
Change 28666d167a simplified
QProcess::start{Process,Detached} by using findExecutable() instead of
using execvp, but this introduced an unintended side effect when the
PATH environment variable isn't set. It turns out that most libc have a
default fallback in that situation, which we didn't apply.

This commit applies the default directly to findExecutable(), which
seems sensible.

[ChangeLog][QtCore][QProcess] Fixed a regression that made QProcess be
unable to find executables when the PATH environment variable on some
Unix systems wasn't set. This behavior should not be relied upon since
many systems do not have sensible fallback values for PATH.

[ChangeLog][QtCore][QStandardPaths] findExecutable() will now apply the
default value for the PATH environment variable (as returned by the
POSIX confstr(3) function or found in <paths.h>) if the variable
isn't set in the environment.

Task-number: QTBUG-65076
Change-Id: I9407dcf22de6407c83b5fffd14feda6c1f509210
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-12-12 19:06:57 +00:00
Friedemann Kleint
fefd9de52a Windows QPA: Emulate aboutToHide(), aboutToShow() signals of QPlatformMenu
Wrap the call to TrackPopupMenu accordingly.

Complements 7849aa6e96.

Task-number: QTBUG-64628
Change-Id: Ia370e566266e96ab690ce5ed41d06dea7cafd4e4
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-11 19:06:30 +00:00
Liang Qi
812bb236dd Merge remote-tracking branch 'origin/5.10.0' into 5.10
Change-Id: I6dcf85067ec226136c207ea69ca9d66736c84db5
2017-12-08 13:56:17 +01:00
Gatis Paeglis
79d78d814a xcb: verify if xrandr present before using xcb_randr* APIs
Not doing so might break the connection. We have had similar
issues before, e.g. QTBUG-45312.

Change-Id: I95f15d24773fc92b052578bd72d1ba264d0a5f63
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2017-12-07 17:56:10 +00:00
Alex Trotsenko
d02a6b938e QAbstractSocket: clear error code to match the error description
Since 5.10, QIODevice resets the error string on opening. So, we should
set the error code to UnknownSocketError accordingly.

Change-Id: I0dd314788ffc182d6837f9d06b51e41d6de59d7e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-06 11:09:01 +00:00
Eric Lemanissier
b08c195264 fixup oversight in QStringView::lengthHelperPointer
amends 3b61cd6ad7

Change-Id: I3afa008299b8fcccae8943e545b536a68b17bd1a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-06 07:04:31 +00:00
Thiago Macieira
1853aeb50a tst_QUdpSocket: remove Bearer portions of the test
Test fails to start on FreeBSD:

FAIL!  : tst_QUdpSocket::initTestCase() 'networkSession->waitForOpened(30000)' returned FALSE. ()
   Loc: [/usr/home/tjmaciei/src/qt/qt5/qtbase/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp(234)]

This commit is basically a revert of the Qt 4.8 commit
a951fb79139498774d021759d0466b4b2ff50e68. FORCE_SESSION was only used by
manual testing, as the commit message said

> 8. For manual testing, added the FORCE_SESSION macro to test behaviour
>   of UDP sockets when they have an explicit network session associated

So I doubt it has been tested recently.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb569ebf53497b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-05 21:59:35 +00:00
Liang Qi
3d175cd541 Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10 2017-12-05 21:59:30 +00:00
Thiago Macieira
138d34b9c8 QFileSystemEngine: Work around Android bug in rejecting hardlinks
Android Marshmellow intentionally forbids use of hard links. See
 https://code.google.com/archive/p/android-developer-preview/issues/3150

However, instead of using EPERM or another error code that indicates the
hard linking operation itself has a problem but there are no other
problems, Android developers stupidly chose to use EACCES, an errno code
that only indicates permission problems.

In any case, since the call will never succeed, we shouldn't even try.

Task-number: QTBUG-64103
Change-Id: I9e2892cb6c374e93bcb7fffd14fc5d1082bd60a3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-12-05 15:36:23 +00:00
Liang Qi
53b141dceb Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/plugins/platforms/ios/quiview.mm

Change-Id: I88384c70047391c75d9ff166c8d9881ff6751dbf
2017-12-05 13:37:21 +01:00
Friedemann Kleint
2c6c044500 Fix qdoc warnings for 5.10
src/corelib/global/qrandom.cpp:915: warning: Cannot find 'bounded(...)' in '\fn' qreal QRandomGenerator::bounded(qreal highest)
src/corelib/tools/qstring.cpp:774: warning: Command '\snippet (//! [qCompareStrings-QSV-QSV])' failed at end of file 'qstring/main.cpp'
src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QStringView qTrimmed(QStringView s)
src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QLatin1String qTrimmed(QLatin1String s)
src/corelib/global/qrandom.h:171: warning: No documentation for 'QRandomGenerator::System'
src/corelib/global/qrandom.h:105: warning: No documentation for 'QRandomGenerator::bounded(double highest)'
src/corelib/global/qrandom.h:84: warning: No documentation for 'QRandomGenerator::generate64()'
src/corelib/global/qrandom.h:77: warning: No documentation for 'QRandomGenerator::generate()'
src/corelib/global/qrandom.cpp:799: warning: No such parameter 'sseq' in QRandomGenerator::seed()
src/corelib/global/qrandom.cpp:1096: warning: Can't link to 'operator()()'
src/corelib/tools/qstring.cpp:8982: warning: Can't link to 'qStartsWith()'
src/corelib/tools/qstring.cpp:9203: warning: Can't link to 'qTrimmed()'
src/corelib/tools/qstring.cpp:4798: warning: Can't link to 'qConvertToLatin1()'
src/corelib/tools/qstring.cpp:4825: warning: Can't link to 'qConvertToLocal8Bit()'
src/corelib/tools/qstring.cpp:4928: warning: Can't link to 'qConvertToUcs4()'
src/corelib/tools/qstring.cpp:4884: warning: Can't link to 'qConvertToUtf8()'

Change-Id: I5c7c89b230d3d1de8a679c10833319a470a44e80
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-04 18:04:04 +00:00
Gatis Paeglis
bcd0e43eb9 xcb: fix regression with missing XI_PropertyEvent
Wacom stylus proximity detection had stopped working: it was not
detecting which type of tool is in use, so all stylus types
acted as a generic drawing stylus.

Selecting XI_PropertyEvent on a root window fixes the problem.
There is nothing in the XI2 specification that says that this
property would not be supported on non-root windows. Possibly
it is bug in the X server. Anyways, selecting XI_PropertyEvent
on a root window in this case actually is better. Property event
contains a global state information, there is nothing window
specific in it, so there is no need to select it for every native
sub-window.

It is worth noting that XI_HierarchyChanged also seems to work
only when selected on the root window (according to my testing
results). And on XI2 author's blog post about XI_HierarchyChanged
it says [1]:

"These events are sent to all windows, so it doesn't really
matter where you register. The traditional approach is to
register on the root window."

This kind of further confirms that it might be bug in X Server's
implementation.

[1] http://who-t.blogspot.no/2009/06/xi2-recipies-part-2.html

Task-number: QTBUG-64911
Change-Id: I8582675bf835239932e23f4596966dc167495e30
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-12-04 16:20:33 +00:00
Friedemann Kleint
22ec92a201 QSettings/QConfFile: Fix reading on NTFS symbolic links
The code checked on QFileInfo::size() whether the file had any content.
The check failed for NTFS symbolic links since QFileInfo::size() returns 0
for them. Workaround by using QFile::size() instead.

Task-number: QTBUG-64121
Change-Id: I303414b5a560d1ed8fbc53d969e53f9e2899ae5c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-02 11:01:34 +00:00
Andy Shaw
11a2e0aa2d Cocoa: Ensure menus for a dialog's menubar are validated correctly
Although the items were enabled for a dialog's menubar they were not
appearing as such because Cocoa will query the menu item's target to see
if it has a worksWhenModal selector. Therefore to ensure that the menu
item will be enabled, we need to add this selector to our delegate and
return YES from it when the window for the menubar is the dialog.

Task-number: QTBUG-44584
Change-Id: Ic62dc027d563069d2f5c2b7bf9810184bd76de39
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-12-01 10:11:18 +00:00
Friedemann Kleint
673762b02e qwindowsmime.cpp: Fix clazy -Wclazy-container-anti-pattern
qwindowsmime.cpp(1267,10):  warning: allocating an unneeded temporary container [-Wclazy-container-anti-pattern]
qwindowsmime.cpp(1274,14):  warning: allocating an unneeded temporary container [-Wclazy-container-anti-pattern]
qwindowsmime.cpp(1383,10):  warning: allocating an unneeded temporary container [-Wclazy-container-anti-pattern]
qwindowsmime.cpp(1429,16):  warning: allocating an unneeded temporary container [-Wclazy-container-anti-pattern]
qwindowsmime.cpp(1450,20):  warning: allocating an unneeded temporary container [-Wclazy-container-anti-pattern]

Change-Id: I9188a0478b4be0c5c8f064578bbe027e33b67b89
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-01 07:27:15 +00:00
Friedemann Kleint
1f1f3a2b88 Fix -Wclazy-qstring-arg in Windows code
plugin\qlibrary_win.cpp(119,55):  warning: Use multi-arg instead [-Wclazy-qstring-arg]
plugin\qlibrary_win.cpp(155,55):  warning: Use multi-arg instead [-Wclazy-qstring-arg]
plugin\qlibrary_win.cpp(168,55):  warning: Use multi-arg instead [-Wclazy-qstring-arg]
socket\qlocalserver_win.cpp(228,61):  warning: Use multi-arg instead [-Wclazy-qstring-arg]

Change-Id: I0feadd3a5cce5ac2ba09630a38b867981d48a391
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-01 07:27:13 +00:00
Friedemann Kleint
155f954d99 Fix -Wclazy-connect-not-normalized in Windows code
qwindowsxpstyle.cpp(289,35):  warning: Signature is not normalized. Use void* instead of void * [-Wclazy-connect-not-normalized]
qwindowsxpstyle.cpp(292,35):  warning: Signature is not normalized. Use void* instead of void * [-Wclazy-connect-not-normalized]

Change-Id: I773530452c0837c5066f9174c25ae37e57086e76
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-11-30 20:50:46 +00:00
Laurent Montel
0fe3ff5c51 PrintSupport: modernize connection signal/slot
Change-Id: I6e482cd9503e96cc43ead21122d3690cdb18151c
Reviewed-by: David Faure <david.faure@kdab.com>
2017-11-30 20:40:21 +00:00
Laurent Montel
6a3f41aa46 Printsupport: not necessary to check pointer before to delete it
Change-Id: Ib2a7823224c45b6e9110016b2f5756e1b2fd8f3c
Reviewed-by: David Faure <david.faure@kdab.com>
2017-11-30 20:40:18 +00:00
Laurent Montel
40192995a5 PrintSupport: convert 0 with nullptr (c++11)
Change-Id: I35a8022c78427c9b4d4a9d9941770d22c36c3be8
Reviewed-by: David Faure <david.faure@kdab.com>
2017-11-30 20:40:13 +00:00
Nico Vertriest
8d75c6765d Doc: Complete Simple Anchor Layout Example
Task-number: QTBUG-60635
Change-Id: I1351df7c514c57ed04ff6e640d7338d62c8f91ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-11-30 14:15:08 +00:00
J-P Nurmi
50117d738a Android: use a canonical data dir for Qt environment variables
ApplicationInfo.dataDir holds "/data/user/0" (Blackberry PRIV running
Android 6.0.1), which is in fact a soft link to "/data/data". This
directory is used as a prefix for various Qt environment variables,
including QML2_IMPORT_PATH, which in turn is used for resolving QML
type URIs, looking up Qt Quick Controls 2 styles, and so on. The QML
engine is not happy with "/data/data" and "/data/user/0" being wildly
mixed for QML types in the same module. Use the canonical path instead
to avoid such conflicts.

Change-Id: I1fd45736728ee662942d7ef48c3fbc553981c59b
Task-number: QTBUG-64868
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-30 13:49:46 +00:00