Commit Graph

38021 Commits

Author SHA1 Message Date
Lars Knoll
b98c43ea60 Compile with QT_STRICT_ITERATORS defined
This will be the only options for Qt 6, so make sure the code compiles now.

Change-Id: I23f791d1efcbd0bd33805bb4563d40460954db43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-26 07:04:24 +00:00
Lars Knoll
c2bf0cac95 Warn when using deprecated methods
Change-Id: Id6e65d83e9279407b4b02967e4044f33d8c6ae01
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-26 07:04:19 +00:00
Joerg Bornemann
e04aaf188c Support 'CONFIG += precompile_header_c' in VS projects
The CONFIG value precompile_header_c was ignored in the VS project
generator. Add a member VcprojGenerator::pchIsCFile that is set to
true if precompile_header_c is active.
The code in modifyPCHstage had to be rearranged to separate the three
parts for stable.h, stable.cpp and other files.

Task-number: QTBUG-62821
Change-Id: I340eb165baa22cafcb64815cf223ce9a21aca558
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-11-24 20:12:16 +00:00
Joerg Bornemann
e5f94f0f05 Simplify VCFilter::modifyPCHstage a bit
Merge two nested if blocks.
This reduces the diff size for a subsequent commit.

Change-Id: If60938077169fc6686329cc5c30ebc97ada013a1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-11-24 20:12:10 +00:00
Joerg Bornemann
54fc1b5ae6 Remove variable autogenSourceFile from VCFilter::modifyPCHstage
There's no point in having it, and this will reduce the diff of a
subsequent commit.

Change-Id: I3d27d6808c585b87a44df2499f2fcea4331befbb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-11-24 20:12:05 +00:00
Joerg Bornemann
e824136a3b Rename VcProjGenerator::[autogen]precompCPP to [autogen]precompSource
Those names are a better fit as we want to support C precompiled
headers in a subsequent commit.

Change-Id: Ie3f852da945b9b2cf0e363c81f1a4b3063f27372
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-11-24 20:12:01 +00:00
Friedemann Kleint
b1a9a7794f Add setter for property QStyleHints::showShortcutsInContextMenus
Add a tri-state setter logic similar to the other properties.

Fixes: QTBUG-71471
Change-Id: Iddb5be18a037634a53ad8725bddb91c12fb33fed
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-24 11:39:05 +00:00
Friedemann Kleint
45a6397e3e QStyleHintsPrivate: Use member initialization
Task-number: QTBUG-71471
Change-Id: I368193bc363944825c01da5337738fd0a7ba2219
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-24 11:39:00 +00:00
Allan Sandfeld Jensen
bfe53c7da5 Optimize QRgba64::toArgb32() and premultiplied()
Using similar techniques as used for QRgb qPremultiply and friends

Change-Id: I4be68cb01dc3b634cf370323884e824674205998
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-24 11:31:19 +00:00
Friedemann Kleint
7264bf19db Windows: Add a default setting for hasBorderInFullScreen
The hasBorderInFullScreen only has an effect when set before
the window is shown or switched to fullscreen. This is currently
not possible in the QML case since the window is only accessible
after all properties (including visibility) have been set.
Add a function to set a default value.

[ChangeLog][QtPlatformHeaders][QWindowsWindowFunctions] Add a default
setting for hasBorderInFullScreen

Task-number: QTBUG-47247
Task-number: QTBUG-71855
Change-Id: I3952e3f34bc4eb134cf1c5265b4489fc74112688
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-11-24 09:11:21 +00:00
Friedemann Kleint
27f08ab494 Long live Q_DISABLE_COPY_MOVE!
When using Q_DISABLE_COPY, clang-tidy reports:

warning: class 'Foo' defines a non-default destructor, a copy constructor
and a copy assignment operator but does not define a move constructor or a
move assignment operator [cppcoreguidelines-special-member-functions]

Add convenience macros to suppress move constructor/assignment
as well.

[ChangeLog][QtCore] Added macros Q_DISABLE_MOVE and Q_DISABLE_COPY_MOVE
complementing Q_DISABLE_COPY.

Change-Id: I0b07495ef4ef06c714f7368c706168613c3fe7bc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-11-24 09:11:05 +00:00
Lars Schmertmann
079df681ec Amend 7f77dc84fb to simplify the parameters of createPlainTestRows
Change-Id: I61370a46722f729ea53cb365eab556a97ec5ee7b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-11-24 07:15:16 +00:00
Lars Schmertmann
de83447830 Add support for Diffie-Hellman keys to QSslKey
This is necessary to provide details for the key too,
when the server is using DHE-RSA-AESxxx-SHAxxx.
Amends 7f77dc84fb.

Change-Id: I8ab15b6987c17c857f54bc368df3c6c1818f428c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-11-23 22:58:05 +00:00
Christian Ehrlicher
1414407970 tst_QTreeView: set keyboardInputInterval to a smaller value
keyboardInputInterval() is 400ms by default which slows down the
testcase without a good reason.
Set it to 100ms which speeds up the testcase from 20s to 10s on my
system.

Change-Id: Ib883c5d3f09f8e896ae56a8fc8df2233be63de01
Reviewed-by: David Faure <david.faure@kdab.com>
2018-11-23 15:44:29 +00:00
Christian Ehrlicher
8b42614c6c Cleanup Spreadsheet example
Cleanup the Spreadsheet example:
 - use nullptr
 - use for instead foreach

Change-Id: I55deed157403a46d98a6d753ef46e4cbe5730b4f
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2018-11-23 15:44:20 +00:00
Boris Dušek
18b1dc35e9 macOS a11y: Implement AXInsertionPointLineNumber with AXLineForIndex
Follow DRY and do not repeat implementation of basically the same
thing, especially now that the implementation is no longer completely
trivial.

AXLineForIndex can be considered a primitive attribute, and
AXInsertionPointLineNumber a derived attribute, hence this opportunity
to not repeat oneself.

Change-Id: I64b596d8351e681f4438b91400a767407612c118
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-23 06:43:10 +00:00
Boris Dušek
6be4a67322 Align implementation of LineForIndex with InsertionPointLineNumber
On macOS, the accessibility implementation of InsertionPointLineNumber
currently reflects a fix for issue (QTBUG-49437). While it seems from
testing this issue no longer requires such a fix, it still is a nice
optimization for single-line edits. So we hereby bring the same
optimization to LineForIndex parameterized attribute as well, and
makes the code for both attributes consistent.

Change-Id: I18b8cc249b6c65a25150f4e503999b04437e0306
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-23 06:43:04 +00:00
Boris Dušek
9dc19d6716 qcocoaaccessibilityelement.mm: Document convertLineOffset function
Change-Id: I359768a7cbd4c3e1e11a453a32bb28add891cf20
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-23 06:42:54 +00:00
Boris Dušek
9f6f796a50 Fix VoiceOver interaction with multiline text components
`convertLineOffset` requires exactly one of `line` and `offset`
parameters to be -1.

[ChangeLog][macOS][Accessibility] VoiceOver now reads all lines in
multiline text components when navigating by lines.

Change-Id: I2872c4f5255a33dd2b493b46b22e672eb5779ee8
Fixes: QTBUG-71563
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-23 06:42:51 +00:00
Liang Qi
bf58c70546 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/corelib/io/qdir.cpp
	src/corelib/kernel/qtimer.cpp
	src/corelib/kernel/qtimer.h

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I683d897760ec06593136d77955f8bc87fdef3f9f
2018-11-22 01:53:29 +01:00
Liang Qi
41cba737a9 Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: I909c9cfa0ce80f512de4b4986e626eae66b63afa
2018-11-21 19:34:18 +01:00
Liang Qi
46076f7333 tst_QNetworkReply: Blacklist getFromHttp:success-external
Task-number: QTBUG-71953
Change-Id: I449ee3be8fa748046895386c9cbff90b30ed80c4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-11-21 16:02:52 +00:00
Thiago Macieira
2842088cb7 Unbreak the build with ICC on Windows
qlogging.obj : error LNK2019: unresolved external symbol __fastfail referenced in function
"void __cdecl qt_message_fatal(enum QtMsgType,class QMessageLogContext const &,class QString const &)"
(?qt_message_fatal@@YAXW4QtMsgType@@AEBVQMessageLogContext@@AEBVQString@@@Z)

Fixes: QTBUG-71868
Change-Id: I42a48bd64ccc41aebf84fffd156590a93fe9da53
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-21 05:37:17 +00:00
Oswald Buddenhagen
127005d360 qmake: fix return type of toLongLong()
Fixes: QTBUG-71886
Change-Id: I62880e7ad8a1707c9094b07cf89d5c0c7841d235
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-11-21 05:37:02 +00:00
Lars Knoll
ac4b2a2b8e Don't start a new page when printing very large images
Don't start a new page to print a very high line of text if
that line wouldn't fit on one page in any case. In that case
we have to break the image up onto several pages anyway, so
we might as well start it immediately.

Change-Id: I823aa4961df179054476755c8f5df2e03874661f
Fixes: QTBUG-59885
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-21 05:36:46 +00:00
André Klitzing
be92e67fbf Add log output if library does not exists
Any other method logs this here, too. This helped
to find the problem of QTBUG-71027.

Change-Id: I2d1f6199837d778ada62dac357764b0609e99692
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-11-21 05:36:31 +00:00
Timur Pocheptsov
d5b3ddffae QMacStyle: account for QStyleSheetStyle using QTabBar directly
in this case w->parentWidget() is not QTabBar, but QTabWidget and we
never draw PE_IndicatorTabClose control (before the recent major
re-write in qmacstyle we never tested the actual type).

Task-number: QTBUG-61092
Change-Id: I87c4813258cc2b483b2ef278c4a2f8796973af1c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-11-21 05:35:21 +00:00
Allan Sandfeld Jensen
37f617c405 Add qfloat16 support to QCOMPARE
Change-Id: Ide06f215a888328308a06e7e48edd666f790a5f0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-20 21:34:13 +00:00
Frederik Gladhorn
1135cf3df4 Add missing "We mean it" warning
Change-Id: I1e836f2c1f37813d7ab9343df9f6679aefe6a2ca
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
2018-11-20 21:01:16 +00:00
Tor Arne Vestbø
aa75697b63 Add makefile target to generate Xcode project
Removes need to manually build up qmake command line when there's
already a Makefile generated (from a recursive qmake_all run e.g.)

Instead, just run 'make xcodeproj'.

Change-Id: Ibe91b183230721a4bcaddfde53b623df00f7adb5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2018-11-20 19:51:25 +00:00
Tor Arne Vestbø
9c560eb8b5 macOS: Improve logging during QNSView/QNSWindow deallocation
Change-Id: Ie6945f2a1f35db6d1259b77ee63137abcaf68318
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-11-20 19:51:18 +00:00
Tor Arne Vestbø
666f3b4a78 Take device-pixel-ratio into account in openglwindow example
Also affects the windowcontainer example, which includes an OpenGL
window.

Change-Id: Ic9f0f2aa66410b657e08c0225b085dd8df44e2a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-11-20 19:51:12 +00:00
Tor Arne Vestbø
12045801f7 macOS: Use shared NSWindowDelegate instead of one per window
All the delegate callbacks give us the relevant NSWindow, so we don't
need one delegate per window just to be able to resolve the correct
platform window.

Change-Id: I8e44186da63bf01f029bb0b1fefcd8880f49dda6
Fixes: QTBUG-65693
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-11-20 19:51:05 +00:00
Tor Arne Vestbø
6c1656397a macOS: Ensure NSWindow delegate is released in sync with its NSWindow
Releasing it in [QNSWindow closeAndRelease] is wrong, as we only call
that method from a few call sites, and can easily end up with a normal
dealloc by means of e.g. the [m_nsWindow release] in ~QCocoaWindow.

This still leaves Xcode thinking we have a single leaking delegate
per active NSWindow, as it apparently doesn't realize we're calling
release manually. This needs to be investigated further.

Task-number: QTBUG-65693
Change-Id: I9105602274d8532465e5108aba2b05bf253268e9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-11-20 19:51:00 +00:00
Liang Qi
574bf5d9aa Correct QT_FEATURE_settings in qconfig-bootstrapped.h
This amends 4d180586cd.

Change-Id: Ia008e618f726f113f84cf4caa8d5f30442dbbb64
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-20 13:26:21 +00:00
Frederik Gladhorn
e00c73911a Reduce run time of tst_QRegularExpression::threadSafety
This test was taking so much time that it regularly timed out on WinRT
and when running in qemu. Reduce it from around 40 to 7 seconds on a
powerful desktop.
Now it either runs for two full seconds for each test function or until
it has done 50 iterations.

Fixes: QTBUG-71405
Change-Id: If752c1e65d3b19009b883f64edc96d020df479d1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-11-19 11:45:38 +00:00
Christian Ehrlicher
ca3ac2e1c7 Documentation: update Q_DISABLE_COPY documentation
Q_DISABLE_COPY annotates the functions as deleted but this was not
mentioned in the documentation.
As a drive-by adjust some indentations.

Change-Id: I808fe3f1ce9f949d2ba41436661569ab0f2a9f73
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-11-19 11:45:29 +00:00
Christian Ehrlicher
8ad9bdf957 QScrollBar: fix horizontal scrollbars in RTL mode
When a QScrollBar had a stylesheet the subControlRect() was not properly
mirrored which lead to a wrong scrolling behavior.
Fix it by adjusting the resulting rect with visualRect().
This reverts 00c9ec63a5 since it did not
completely fixed the issue for all use cases.

Fixes: QTBUG-27279
Fixes: QTBUG-38748
Fixes: QTBUG-40443
Change-Id: I19718287be7b4cfc9dbe6951fff99ae48264a855
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-11-19 11:45:24 +00:00
BogDan Vatra
6fdf398ab4 Android: Prepare for the worst, when the NDK will remove all GNU tools
In NDKr18 Google removed GCC, most probably the massacre will not end
there and they will remove all GNU tools, so we need to start using LLVM
ones.

This patch still keeps the compatibility with GNU tools if the Qt was
built with android-g++ mkspec.

Change-Id: Ibe1979577e08ce63604d55fc5bbd5f64b3737675
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-19 11:45:20 +00:00
Vitaly Fanaskov
5242540ee4 Fix message about licensing options in the About Qt box
Removed versions count.
Replaced "different" -> "multiple".

Fixes: QTBUG-57697
Change-Id: I924e4706a089fe244f0ea6c3a660a8a4529502a2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-19 11:45:14 +00:00
Lars Knoll
199f9c5448 Fix vertical alignment of inline images
Inline images can have 4 different alignments. Unfortunately,
AlignTop and AlignBottom can only be set once we have laid out
the whole line and know the total height of the line, as one
could otherwise end up with lines that are too high.

To fix this, position the images for these cases in a second loop
after we have calculated the length of the line and the maximal
image height in that line.

Task-number: QTBUG-59310
Change-Id: I1fd4cd39e43a13d1967b9f5c9ce8270a99269cd9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-19 11:45:09 +00:00
Liang Qi
4d180586cd Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm

Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
2018-11-19 12:42:10 +01:00
Luca Beldi
c0c4be672b Fix constness of QPaintDevice arguments
QFont, QFontMetrics, QFontMetricsF and QTextLayout constructors
use only const methods of QPaintDevice so there is no reason
for them to require a non-const pointer argument

Fixes: QTBUG-65967
Change-Id: Ibfcdef2a25f0cd4284dad76135fc4c9bf5667d7a
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-19 10:41:54 +00:00
Friedemann Kleint
85b4aaaa99 uic: Generate code for container page tooltips using the Qt configure system
Previously, the generation of this code was #ifdefed in uic itself.
However, the #ifdef should be in the generated code (anticipating
the cmake port where host and target builds might differ).

Task-number: PYSIDE-797
Change-Id: I46255f852f5f6a3d95d3a20456b6f00f2067a3fe
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-11-19 10:16:18 +00:00
Thiago Macieira
6b088b7a1d QResourceFileEngine: fix use of mapped files after close()
QFile::map() is documented to continue working after the QFile is
closed, so this should work for the resource file engine too.

Change-Id: I343f2beed55440a7ac0bfffd1563243a3966441f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-19 09:09:36 +00:00
Thiago Macieira
6a792d6f0b QResourceFileEngine: fix map() for compressed files
We were returning a pointer to the compressed data and comparing to the
compressed data size.

Change-Id: I343f2beed55440a7ac0bfffd1563232d557c9427
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-11-19 09:09:31 +00:00
Thiago Macieira
460866ee47 tst_QResourceEngine: use QTest::addRow instead of QString concatenation
Change-Id: I343f2beed55440a7ac0bfffd156322c95aebb847
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-11-19 09:09:26 +00:00
Thiago Macieira
6125fce799 tst_QResourceEngine: store the actual byte contents that we expect
Instead of using a QString with only the prefix, let's do a full
comparison to make sure there's no junk at the end of the file.

Take the opportunity to remove the nonsense of a space at the end of
most of these files (I didn't remove from all).

Change-Id: I343f2beed55440a7ac0bfffd15632228c1bfe78f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-19 09:09:20 +00:00
Ivan Komissarov
97d12b4541 qnativesocketengine_win.cpp: Improve memory handling
We use std::vector and thus RAII instead of manual memory management.
std::vector (re)allocates only if needed, growing exponentially,
initializing only new elements. std::vector<>::resize also makes
initialization loop redundant

Task-number: QTBUG-71156
Change-Id: I253bb428c0fb641872f0f7f2dcfe1f9e89db0296
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-11-18 17:56:53 +00:00
Lars Schmertmann
d3fe78f6c4 Replace Q_OS_MAC with Q_OS_DARWIN to match line 2731
Change-Id: Ieefa490d349169db801f3b6d8e3cf799c7621473
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-11-17 19:43:19 +00:00