Commit Graph

35475 Commits

Author SHA1 Message Date
Pasi Petäjäjärvi
14157a1a3e Add env variable to set QNX screen debugging information
Enables different QNX Screen graphics system information
as overlay.
Following are valid options for the env variable:
* fps, posts, blits, updates, cpu_time, gpu_time, statistics

More info:
http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.screen/topic/group__screen__debugging_1Screen_Debug_Graph_Types.html

Change-Id: I8cbee44de31bb2aaf3892a063769f4740027242b
Reviewed-by: Adam Treat <adam.treat@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2018-03-22 13:37:10 +00:00
Kari Oikarinen
141582505f Stabilize tst_QGraphicsView::acceptMouseDoubleClickEvent
This test has been flaky on openSUSE in CI. The problem was that the window is
sometimes resized or removed while processing events after adding the rectangle
item to the QGraphicsScene. When the same mouse event is reused again, it uses
wrong screen coordinates. QGraphicsScene handling of mouse events then looks for
items under cursor at the wrong coordinates, does not find any items and thus
doesn't accept the mouse event.

Fix by using QTest API for simulating mouse events. Also wait for changed signal
rather than blindly running one iteration of event loop.

Task-number: QTBUG-67212
Task-number: QTBUG-66216
Change-Id: I968f9470c6f8803d01cebeda6f12ad76b4fd5293
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-03-22 13:35:51 +00:00
Edward Welbourne
58b373c9e3 Make sure $$relative_path() uses an absolute path as its first arg
Thanks to QTBUG-61373, this qmake function was called with
/usr/local/5.10.1 as baseDir, which isn't absolute, leading to an
assertion failure.  We could raise the error within qmake but it
proved easier to simply resolve any non-absolute baseDir using PWD,
before trying to use it as an absolute path.

Did the same for $$absolute_path().  Documented both.  Adjusted the
assert that caught this to report any non-absolute path that upsets
it.  Added simple tests, fixed an existing test.

Task-number: QTBUG-66156
Change-Id: Icfef2e2f5b236e071177c9beffa38d71bf404292
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-22 08:40:45 +00:00
David Edmundson
ee54df0311 Support GLX_NV_robustness_video_memory_purge in XCB-GLX
Nvidia doesn't handle suspend very well in Linux and textures get
corrupted. To handle this Nvidia has a bespoke extension to query when
this has happened.

This patch checks if graphics have been reset and invalidates the
surface.

Task-number: QTBUG-56610
Change-Id: I0b97d539ce6cc2b9cfe41c71bf6efd4f68496cd6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-03-22 08:23:18 +00:00
Andy Shaw
f4435d2d5c offscreen: Check that native interface is valid before using it
If the offscreen platform plugin is used on Windows then it can end up
crashing since there is no native interface. This prevents a crash from
occurring when these functions are called.

Change-Id: I526fc0703771fa5f85b26d182ad3b15ef1a3ada5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-03-21 18:11:49 +00:00
Thiago Macieira
d3b6ef6ccf QFile::rename: fix the error message if renaming a file by copy fails
The QFile out variable cannot be open because if out.open() succeeded,
we could never reach this line. Instead, we want to capture *why* either
the source or the destination failed to open.

Task-number: QTBUG-66445
Change-Id: I940917d6763842499b18fffd15142f231bf34a47
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-03-21 14:23:53 +00:00
Thiago Macieira
79493a3ee1 Make QCOMPARE(-inf, -inf) and QCOMPARE(NaN, NaN) succeed
This will make two floating points containing NaN compare as equal,
instead of the regular nan != nan IEEE behavior (which isn't very useful
in a unit-test framework).

Note that this does not apply to indirect comparisons, for example via
QVariant.

Change-Id: I39332e0a867442d58082fffd150851acfdd18c23
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-03-21 14:23:13 +00:00
Ulf Hermann
6e8e9979d0 Make sure we can build with -no-feature-itemmodel
Various pieces of code have to be disabled in this case.

Change-Id: I83b133f17e9f024016a79c9103293627185449d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-21 14:00:29 +00:00
Allan Sandfeld Jensen
a47cb14680 Detect C standard and try using the most recent
Fixes the default C version used with gcc < 5

Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-21 13:52:10 +00:00
Marcel Krems
5f66486cc2 Fix crash when deleting a QSqlQueryModel after closing the database
Task-number: QTBUG-66553
Change-Id: Ib5c04ebe5ac2b7581613e0044804072eb0980b2e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-03-21 13:50:43 +00:00
Nathan Collins
992f673782 macOS: Handle NaN mouse event positions
When performing gestures such as Exposé or Mission Control with the
mouse button down, the position of the mouse release event is
returned with NaN values. This causes
QGuiApplicationPrivate::processMouseEvent to be called recursively
and ultimately crash.

Task-number: QTBUG-67194
Change-Id: If1536bc4dc2075c498cdd6c5afe57c86bdaac13b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-03-21 10:45:47 +00:00
Ulf Hermann
90ec3aba06 Clean up the moc "no-keywords" test
We can use the QT_LIB_FOO #defines instead of our own WITH_FOO ones to
determine if a library is available. Also, it doesn't currently make
sense to refer to libraries which are not part of qtbase here. We might
add that in the future, but QtScript (being deprecated) is probably not
the first one we should add.

Change-Id: I7f2397ca5499ba6003088478161182e960e815fb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-21 10:31:20 +00:00
Ulf Hermann
955cf40b18 Testlib: Add a feature for the item model tester
It depends on QAbstractItemModel, so we need to switch it off if
itemmodel is unavailable.

Change-Id: I97246767a5e387b7a2cee90c34125a8411ef1c4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-21 10:31:08 +00:00
Ulf Hermann
4db38197c2 Testlib: Rename qtest_global.h to qttestglobal.h
This follows the naming convention for global headers and causes
qttestglobal.h to be added to the top of the generated QtTest header. It
is necessary to have it there when other headers depend on features
defined in configure.json.

[ChangeLog][QtTest] The qtest_global.h header is now deprecated. Include
qttestglobal.h instead.

Change-Id: Iaed639d4e13dd99cee6387fce9d15d6e55b0b1e8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-21 10:31:01 +00:00
Mårten Nordheim
4a56d86ee4 Make QSsl::SecureProtocols also enable use of TLS1.{1,2}
Previously it was only enabling use of TLS1.0, unlike our openssl
backend, which understandably caused some confusion among some of our
users.

Seeing as this is also the default value in QSslConfiguration it is nice
to have it negotatiate more secure ciphers.

Task-number: QTBUG-67112
Change-Id: Ie216703da1ec4e6b973a881040e14816ad4c0a32
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-03-21 10:30:48 +00:00
Morten Johan Sørvig
45c62aae4b Cocoa: Restore resizable window mask setting to 5.9 behavior
This should be tied to the CustomizeWindowHint flag:
if that flag is set we start out without NSResizableWindowMask
and possibly add it later on if WindowMaximizeButtonHint
is set.

Change-Id: I7e826d4bd357a8a17c60cfef948af25d61b66ebf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-03-21 10:25:55 +00:00
Friedemann Kleint
f1bf7eb34a qtestlib/Unix: Output function time and total time in case of a crash
This helps to distinguish timeouts from real crashes in COIN.
This is already done for Windows.

Change-Id: I4daeafa36f50482d20cea4bd1106647081ff7abe
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-03-21 10:22:00 +00:00
Kai Pastor
4c0e27ae6f Add Qt::SvgMiterJoin option to pathstroke example
Qt::SvgMiterJoin is more important than the name suggests: It is used
not only by SVG but also by PDF. It differs from Qt::MiterJoin in the
miter limit behavior.

Task-number: QTBUG-52640
Change-Id: I8ad04b1231958628caab18a233d54d42ea6449e7
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2018-03-21 06:24:41 +00:00
Sergio Martins
fc8fd50816 Fix subpixel rendering on Windows/FreeType
FT_LCD_FILTER_H wasn't defined because we weren't including the header.
To fix it just remove the checks, as was done for Linux and assume
sub-pixel is there. If it's not then no harm done, it won't use any.

Change-Id: I76f50cb17e41621c45c03cb7d5c75c110557ea68
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-03-20 21:16:22 +00:00
Allan Sandfeld Jensen
7ebe69d23c Expose gdb-index as configure argument
We report it in the overview, but left no way of controlling it

Change-Id: I1d31f2e31bb32566f47069c3776e41033ffb1891
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-20 20:45:21 +00:00
Allan Sandfeld Jensen
a65e383cac Switch lancelot from QRegExp to QRegularExpressions
They are faster, and using them makes it paint commands be the most
CPU intensive part of lancelot instead of regular-expression matching.

Change-Id: Ifabf1081c48a83ce089660049051428fd3a43042
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-03-20 09:00:14 +00:00
Ulf Hermann
5a4787dca0 Modernize the "regularexpression" feature
Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED,
switch it off in the bootstrap build, remove the #ifdefs from
qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression)
to the header.

qregularexpression.{h|cpp} are already correctly excluded in tools.pri
if !qtConfig(regularexpression).

Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-20 08:19:25 +00:00
Ulf Hermann
dd74f5d347 Gui: Properly use the standarditemmodel feature
Require it in the headers and exclude the implementation from the build
if disabled.

Change-Id: Ida3303f8595f47b469e92d68e8bccc3957d943b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-20 08:19:03 +00:00
Lars Knoll
f4b6ea2ae2 Fix infinite recursion on stack trying load empty glyhs
Loading empty glyphs in some fonts would cause the application
to crash with an infinite recusion on the stack between qfontengine
and qfontengine_ft:

12 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877
13 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096
14 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078
15 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877
16 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096
17 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078
18 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877
...

Fix this by trusting the freetype fontengine that it could load the glyph,
as the base class anyway can't do better.

Task-number: QTBUG-62331
Task-number: QTBUG-66617
Change-Id: I6c7c24d24ec0f71a66fa519c04a336f276e418f6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-03-20 07:53:09 +00:00
Lars Knoll
83c01a5909 Fix display recognition for IBUS
The parsing of the DISPLAY environment variable was wrong,
and only worked by accident for DISPLAY=':[0-9]'.

Task-number: QTBUG-62068
Change-Id: I6860e3907c9b1ad6e538d1b5d08628cd306b4aa1
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-03-20 07:52:52 +00:00
Mikhail Svetkin
91a52fc6a0 widgets: Add a QT_CONFIG(style_stylesheet) guard
for isWindowsStyle in QDockWidget

Change-Id: Id471b91a415f1a677ced6022bdd05b7e1b72aad2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-03-20 07:51:36 +00:00
Simon Hausmann
0ffb7c419a Fix CONFIG+=qtquickcompiler and immediate resources with shadow builds
Generated files should be added to RESOURCES with an absolute path.

Task-number: QTBUG-67011
Change-Id: Ief82b576824df9abd0901970f076e30dfe57b7d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-20 07:34:50 +00:00
Friedemann Kleint
1cb439dc94 Windows QPA: Fix potential crash in leave event handling
Add a check for window != nullptr.
Amends af5c8d04fb.

Task-number: QTBUG-67101
Task-number: QTBUG-57864
Change-Id: I2bbbbe514fc494fd569d0932d508c53c0544f665
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-03-20 00:36:20 +00:00
Thiago Macieira
323b00e38c QSharedDataPointer: use swap-and-move in the move constructor
This makes the pointer that was in the moved-into object be destroyed
before the return of this function (if the reference count was 1),
instead of letting it live in the moved-from object.

Task-number: QTBUG-66322
Change-Id: I3debfc11127e4516b505fffd151209292bd3adaa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-03-19 20:36:59 +00:00
Thiago Macieira
dabc76de80 QSemaphore: add minor optimization for 64-bit Linux systems
Since we won't use the high bit of the low 32-bit word at all, we don't
need the AND with 0x7fffffff either. Just cast.

Change-Id: I72f5230ad59948f784eafffd151aa5a7dee995db
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-03-19 20:36:55 +00:00
Thiago Macieira
081c001deb QSemaphore: fix deadlock when the woken up thread wakes up another
When the thread that got woken up by release() is supposed to release()
to wake up another thread, we were deadlocking. This happened because we
cleared the bit indicating that there was contention when the first
release(). Instead of storing a single bit, we now store the number of
threads waiting.

Task-number: QTBUG-66875
Change-Id: I72f5230ad59948f784eafffd15193873502ecba4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-03-19 20:36:51 +00:00
Thiago Macieira
9fa2626ef8 Remove src/corelib/arch, merging with src/corelib/thread
There is no more architecture-specific code.

Change-Id: Ie9d9215342d449c48a11fffd151d11411cd73fc7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-03-19 20:36:45 +00:00
Thiago Macieira
90493e16b8 Atomics: remove qatomic_msvc.h
No longer needed. The comment about missing constexpr support is
incorrect: MSVC 2015 does have constexpr issues, but they don't affect
our use of std::atomic.

Change-Id: Ie9d9215342d449c48a11fffd151d11208137f00d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-03-19 20:36:41 +00:00
Thiago Macieira
38597dd080 Atomic: silence MSVC warning in the generic fetchAndSub
MSVC atomics still use the generic version, instead of qatomic_cxx11.h.
The implementation of fetchAndSub is implemented on top of fetchAndAdd,
but produced a warning with unsigned types.

Change-Id: I72f5230ad59948f784eafffd151aa53435b75298
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-03-19 20:36:36 +00:00
Johan Klokkhammer Helsing
2417cade46 tst_QOpenGLWindow: Move resizing to separate test
Resizing is broken on Wayland EGL on Intel Mesa. Move resizing into a separate
test and skip it on Wayland it until it's fixed in Mesa.

Task-number: QTBUG-66848
Change-Id: I9450a5a588b0f5d8f0bd0210aae2dc72aa48d622
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-03-19 08:24:33 +00:00
Johan Klokkhammer Helsing
efa6e98912 QPixmap don't assume QPlatformScreen::format is opaque
QRasterPlatformPixmap::systemOpaqueFormat returned QPlatformScreen::format
without checking that the format was actually opaque.

This caused several QPixmap tests to fail on Wayland because Wayland
compositors don't communicate the native format of the screen, just a list of
supported pixel formats, so we just return ARGB32_premultiplied in
QWaylandScreen::format().

Rename the method systemOpaqueFormat to systemNativeFormat since that's how
it's used most of the time. And do a conversion when we actually care whether
the format is opaque or not.

Task-number: QTBUG-51748
Change-Id: I47dc1c3f185fb802016ca361206d47d02e8d3cf1
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-03-19 08:23:54 +00:00
Albert Astals Cid
d3121e3888 Fix QPageLayout() not initializing units
by using the other QPageLayout constructor

Task-number: QTBUG-47551
Change-Id: I9c3635d4a460437febefdfb9d259d508b61c1f29
Reviewed-by: David Faure <david.faure@kdab.com>
2018-03-19 08:20:20 +00:00
Thiago Macieira
daa7f5375c q{,Utf8}Printable: avoid creating a copy of a QString
We have this QString() constructor call to permit things that convert to
QString but aren't QString to be used in qPrintable, like a
QStringBuilder-powered fast operator+ expression, like:

    qPrintable(string1 + ": " + string2)

Unfortunately, it meant that we unnecessarily created a QString copy if
the input was already QString.

Change-Id: Iecab8770aa5840aba8edfffd1516bc94cec791a9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-03-18 17:28:42 +00:00
Andy Shaw
9b68dc19bf MySQL: Fix tests
This fixes the following:
  - tst_QSqlDatabase::recordMySQL() to account for performance
    improvements done for small integral types
  - tst_QSqlQuery::nextResult() so that NUMERIC results are seen
    as doubles
  - tst_QSqlQuery::timeStampParsing() so that MySQL accepts the
    CREATE TABLE statement

Change-Id: I68fb1d06dac12d500bb4596463f5bdd65cc9c226
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-03-17 23:14:34 +00:00
Andy Shaw
44137dc65a XCode: Fix the output paths for extra compilers with fileFixify()
This ensures that the generated XCode project can correctly find any
files that are referenced via a path containing "..".

Task-number: QTBUG-35131
Change-Id: I049bc2279b4c515a82acd61142d25b8c240e8f6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-17 23:14:23 +00:00
Andy Shaw
e4e87a2ece sqlite: Prevent a crash when sqlite does not detect any parameters
When using a virtual table inside a SQLite database it is possible that
it does not report the right number of parameters. Therefore we need
to account for this case to prevent it from crashing when trying to
bind parameters it thinks does not exist.

Task-number: QTBUG-66816
Change-Id: I3ff70bb1fe73091f43c3df53616f75858e451cfd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-03-17 23:14:14 +00:00
Friedemann Kleint
f6f40014c4 regularexpression example: Add raw string literal display
Factor out the line edit displaying the code to a class and add
another instance for displaying raw string literals.

Task-number: QTBUG-60635
Change-Id: I4614e4a56e355bad5158523c58edf784868dbf4d
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-03-17 18:15:15 +00:00
Thiago Macieira
63c7a8e725 qglobal.h: compile Q_UINT64_C in C mode
This is used by qfloat_f16c.c → qsimd_p.h → qsimd_x86_p.h.

Change-Id: I359898686ce545f69847fffd151c785237a54b94
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-03-17 16:03:38 +00:00
Friedemann Kleint
8aeed99d77 Windows QPA: Improve tablet mode detection
Change the code to detect mouse mode only the first packet after
receiving the enter proximity event, using the current tablet
position. This should prevent mis-detecting mouse mode due to lags, etc.

There is a theoretical chance of failing to detect mouse mode should the
positions match resulting in differing speeds of mouse/tablet positions, but
this seems to be a negligible risk.

Task-number: QTBUG-36937
Task-number: QTBUG-64781
Change-Id: I27ca4a17786164dc8b25c4614a88672e150d5fe3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-03-17 12:10:23 +00:00
Friedemann Kleint
ff1630ab0e Stabilize tst_QSignalSpy::waitFunctionPointer_signalEmittedTooLate()
Replace qWait()/QCOMPARE() by QTRY_COMPARE().

Change-Id: Ic5233e2f26e6663a3fbcbb2edb09a517feef4564
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-03-17 12:10:05 +00:00
David Faure
8b6838347d QNetworkReply: fix isFinished() for disabled replies
When network access is disabled, every QNAM request returns a
QDisabledNetworkReply instance, which emits error and finished
immediately. However isFinished() was still false, which could confuse
application code.

Change-Id: Ifd43c86364b11a9583a38fde536e6c09c109b55f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-03-17 08:38:29 +00:00
J-P Nurmi
23fd4f7171 QGtk3Menu::showPopup(): fix target item selection
If a target item was passed, QGtk3Menu tried using gtk_menu_set_active()
to select the target item. However, the function does not do what you'd
imagine. Even the documentation states:

    This is used by the GtkComboBox and should not be used by anyone else.

The correct function, gtk_menu_shell_select_item(), is in the GtkMenuShell
"base class".

Change-Id: Ia2c03f87bb97f618c041c03011af8c676108aea5
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-03-16 09:14:55 +00:00
Andre Hartmann
f371b1cc8d QDomNode::replaceChild(): Fix documentation typo
Change-Id: Ib530ebc926aa2c6779b0e02878f92664022b6bcf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-03-16 06:34:13 +00:00
Gabriel de Dietrich
0c059db57d QMenu: Realign submenu first action with its parent menu action
There was an offset equivalent to all the margins we add to
the action rectangles. We need to subtract it in order for
both menu items, parent and sub-menu, to be aligned. This
amount is given by the sub-menu's first action position
relative to its popup.

Change-Id: I141bbe3cfb81825a25b12e4059b93e61c29df518
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-03-16 00:13:28 +00:00
Thiago Macieira
2fb706f9a8 QIpAddress: reject IPv6 addresses with more than 4 hex digits
Matches glibc commit 9a0cc8c1bd7645bf3c988890ffb59639c07a5812.

[ChangeLog][QtCore][QUrl] Fixed a bug in parsing IPv6 addresses with
more than 4 hex digits in a component.

[ChangeLog][QtNetwork][QHostAddress] Fixed a bug in parsing IPv6
addresses with more than 4 hex digits in a component.

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=9a0cc8c1bd7645bf3c988890ffb59639c07a5812

Change-Id: I2701038131d91eb108aebb3bec16278e4efe3de2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-03-16 00:01:53 +00:00