Commit Graph

31917 Commits

Author SHA1 Message Date
Joerg Bornemann
02d9225db5 Fix uninitialized VCLinkerTool::DebugInfoOption
Due to that uninitialized variable /DEBUG:FASTLINK ended up in vcxproj
files for VS < 2015. However, that option is supported by VS >= 2015
only.

Task-number: QTBUG-59630
Change-Id: I34d9eef1a3bf2262bac48962938afe84eb7de934
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-22 16:15:15 +00:00
Olivier Goffart
bebd368d72 QDockAreaLayout: Simplify QDockAreaLayout::gapRect
Merge with QDockAreaLayoutInfo::itemRect, so it can be re-used
fromp the QDockWidgetGroupWindow layout.

Change-Id: Ic072eceb786be394f96e378a3ade4462cd1043fd
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-03-22 16:00:00 +00:00
Ulf Hermann
329385a5d5 Build examples and tests only if their requirements are met
If the respective modules aren't available we cannot build the tests
and examples. We drop the qtConfig(opengl) requirement for the opengl
examples as
a, we would need to make the QtGui configuration available for that to
   work, and
b, we should not add too much detail to the tests and examples build
   configurations. Checking each test and example for every feature it
   uses would be too much.

Task-number: QTBUG-57255
Change-Id: Ifb043c81ec9e5c487765297bd65704812cd281fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-22 15:55:55 +00:00
Oswald Buddenhagen
28e9867a3c don't try to timestamp injected qvulkanfunctions.h
the target of the injected forwarding header doesn't exist at qmake
time, as it is generated by an extra compiler, so the touch() calls in
qt_module_headers.prf would fail.

the error scenario described in ce942a226 is not applicable to
gui/vulkan, as no bootstrapped modules are involved. therefore, we can
just suppress the timestamping.

Change-Id: I1c9b6fcdf3717069fdbb654e3cb5d73b199192f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-03-22 15:49:19 +00:00
Laszlo Agocs
1d647a22f3 xcb: Fix embedded Vulkan windows
Widget windows choose a visual via the GLX or EGL path. Vulkan windows
use the default, simple visual chooser. When having a parent, the
different visuals can cause a BadMatch. Avoid this by taking the parent's
visual.

This way the hellovulkanwidget example is now functional on xcb as well
(tested on Jetson TX1 with L4T 24.2).

While we are at it, stop forcing RGB888 in the format, unless nothing
was set.

Change-Id: I39ab87e3219c04d4f547325d13d4873d70564411
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-22 15:41:10 +00:00
Laszlo Agocs
a653669b20 Add license attribution for vk.xml
Same license as the existing OpenGL stuff.

Change-Id: I6d0a77a7213f496971b5c3a8676dedb8e4377ceb
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-22 15:41:03 +00:00
Laszlo Agocs
8d72aba9e3 Introduce QVulkanWindow
A convenience subclass of QWindow that provides a Vulkan-capable
window with a double-buffered FIFO swapchain.

While advanced use cases are better served by a custom QWindow
subclass, many applications can benefit from having a convenient
helper that makes getting started easier.

Add also three examples of increasing complexity, and a variant that
shows embeddeding into widgets via QWindowContainer.

[ChangeLog][QtGui] Added QVulkanWindow, a convenience subclass of
QWindow.

Task-number: QTBUG-55981
Change-Id: I6cdc9ff1390ac6258e278377233fd369a0bfeddc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-22 15:40:57 +00:00
Robin Burchell
66e162e8f1 QImageReader: Pass up information about resource errors on open
If a system runs out of FDs, there is no sense in trying to autodetect
the format - as the real problem is the lack of FDs, not the
non-existent file.

Change-Id: I3302340859c3cc62995ac1b7b3c7b6e6326cb43e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-03-22 15:40:55 +00:00
Stephan Binner
b1a7a7b250 Add feature.dialog
Change-Id: I160d0f270d7f41671459358b9c180d71dd7786d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-22 14:35:46 +00:00
Edward Welbourne
c587036dc6 Mark some methods in test code as overrides
CustomTextWidgetIface marked its text() method as an override;
DropOnOddRows marked its canDropMimeData() as an override; each
neglected some other methods that are overrides.  Convert
Q_DECL_OVERRIDE to the keyword in affected classes, to match.

Change-Id: I78b38e20a81e3e6aab282a1cb3d70cdf8a5f4135
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-03-22 14:29:58 +00:00
Olivier Goffart
ee84af00d1 Fix floating dock widget having the wrong parent
When dragging out a tabbed group which contains placeholder
for floating QDockWidget, the floating QDockWidget would not
be reparented to the new QDockWidgetGroupWindow. That's because
QDockAreaLayoutInfo::reparentWidgets does not reparent floating
widget (because of the item.skip test)

However, we need to be careful when reparenting to pass the
flags so it does not get docked.
Also do not reparent QDockWidgetGroupWindow which may end up
temporarily in the layout during animation when dragging a
QDockWidgetGroupWindow onto another.

Step to reproduce a crash that if fixed by this patch (with
the mainwindow example):

1. Enable QMainWindow::GroupedDragging from the "Main window" menu
2. Add a new dock widget, "Foo", from the "Dock Widgets"
3. Tab "Foo" together with the black dock widget
4. Drag "Foo" out.  (Now, Foo is still a child of the QMainWindow,
and is still in the layout as tabbed, but is skipped)
5. Drag the black dockwidget out. (This, in fact, crates a
QDockWidgetGroupWindow which contains the black dockwidget and the
floating "Foo", but since "Foo" is floating, it is not reparented)
6. Destroy "Foo" using the "Dock Widgets" menu. (Since Foo's parent
is the QMainWindow, it is not removed from the QDockWidgetGroupWindow's
layout, which will cause crash on the next relayout)"

This commits amends commits d57bb19902
and 0feeb6f6d2

Change-Id: I600a56cdd889435b83d2b740598a24d81059bf44
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-03-22 14:28:51 +00:00
Oswald Buddenhagen
97be8253fb fix bootstrapped modules in framework builds, take 2
the borrowing of headers always happens from "proper" modules which are
actually built as frameworks if so requested. that means that even
though the borrowing module itself never is a framework, it needs a
framework path and include paths that point into frameworks.

amends 20c7ab44.

Change-Id: Ic582060dd179cc592e9be7792ff02cebdfabd772
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-03-22 14:27:45 +00:00
Eirik Aavitsland
901ed36f36 xbm image format: avoid uninitialized pixels for truncated data
xbm bitmaps are conventionally accepted as valid even if there is not
enough data to fill the declared bitmap size: both ImageMagick and
GIMP do this. Qt did too, but the uncovered areas would be
uninitialized, and thus contain random junk bits. This commit adds
clearing of the full QImage data.

Task-number: QTBUG-54169
Change-Id: I84150d54d07dbd546a4947e7ec332f83f2d7ca41
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-22 14:23:12 +00:00
Morten Johan Sørvig
1b75a04336 Fix spelling: neccessary -> necessary
Change-Id: I7c1b1d4ef12391e1caf00eae4b816cdc6d08ee04
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-03-22 14:13:12 +00:00
Oswald Buddenhagen
05a71c6c7f move freebsd device spec validation to configure
amends 72efb2e6 in line with e58eb3d6f.

Change-Id: I67e68e43662df6d2571579a1fed3c0f23e9416cd
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oleksandr Tymoshenko <gonzo@bluezbox.com>
2017-03-22 14:11:26 +00:00
Oswald Buddenhagen
87e14eb7cb don't try to use system zlib if it's not enabled
... as that would error out unhelpfully.
but hypothetically, there could be dynamic builds of system libpng and
sqlite3 against a static zlib, so allow it. however, it's a tad
unlikely, so default to -qt-libpng when using -qt-zlib (and -qt-sqlite3
is the default anyway).

amends dab013804.

Change-Id: I74c41e8d8a7ee1ba5add395842383d176e23f142
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-03-22 14:11:18 +00:00
Timur Pocheptsov
64475272a2 QMacPasteBoard - protect against dangling pointers
In QMacPasteboard we use converters from QMacInternalPasteboardMime, which
has essentially a global QList of available converters.
QMacInternalPasteboardMime and derived classes register/unregister their
instances in this list (in ctors/dtors) and then QMacPasteboard is using
converters from this list. Unfortunately, when we're un-registering converter
(and this means we delete those objects) we do not remove dangling pointers
from our pasteboard objects. Apparently, this problem can be seen only when
working with macextras (thus having an access to this private API in client's
code).

Task-number: QTBUG-54832
Change-Id: Ie3aef4aaca8ef6c80544dc58821cf43fc26f84a1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-03-22 10:47:03 +00:00
Friedemann Kleint
b07a06745e Windows QPA/Services: Do not invoke MailToProtocolHandler of url.dll
As of Windows 10, MailToProtocolHandler is set as handler for
mailto URLs if there is no mail client installed. As it silently fails
or brings up a broken dialog after a long time, exclude it and
fall back to ShellExecute() which brings up the URL assocation dialog.

Task-number: QTBUG-57816
Change-Id: Ia8c09676bc44848e0549c06c3a82c9b5cce79279
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-03-22 10:27:01 +00:00
Marc Mutz
8f7776df5e QGuiVariant: fix unintended fall-through
Found by GCC 7.

Change-Id: I8a9cca5236f077335031afc90b2683a2846d3b79
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-22 09:42:35 +00:00
Marc Mutz
1ebd23a670 tst_QArrayData: fix unused variable warning in reallocate()
Trailing QFETCHes can be dropped.

Change-Id: I4dbc5ff07a6bf418a09822424a8fb036d8349114
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-22 09:22:34 +00:00
Laszlo Agocs
108956b53e Fix up QVulkanInstance docs
Remove HTML tags.
Fix notes that predate the introduction of deviceFunctions().
Add a note about the function wrappers being auto-generated.

Change-Id: If99022ce74313c6bb33c3bb7bd6840b6cf26b3be
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-22 08:53:24 +00:00
Liang Qi
495f914fb5 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-03-22 07:10:41 +00:00
Thiago Macieira
cd58abb1db Autotest: make tst_QDir more reliable on tests being run out of order
mkdir(data2) depended on mkdir(data1) being run before, or it would
fail. In addition, the rmdir() test required the equivalent mkdir() test
being run before. So drop these annoying dependencies and make the tests
cleaner by having clear separation of the test data and merging the two
tests into one

The entryList() test still depends on the testdir being clean: it will
fail if mkdirRmdir() previously failed.

Change-Id: Iaddbecfbba5441c8b2e4fffd14a3e35972d2a3d8
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-22 06:40:59 +00:00
Thiago Macieira
524f39db89 gtk3: Fix use of dangling pointers
QString::toUtf8() returns QByteArray, which got implicitly converted to
C strings and promptly deleted. Instead, return the QByteArray to the
caller.

Found by ASAN:
==13935==ERROR: AddressSanitizer: heap-use-after-free on address 0x6060000dffb8 at pc 0x7f764f27320b bp 0x7ffd49b11bb0 sp 0x7ffd49b11358
READ of size 7 at 0x6060000dffb8 thread T0
    #1 0x7f7649d174e2 in g_strdup (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x684e2)
    #2 0x7f763f7abe5b  (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x39e5b)
    #3 0x7f763f78915a in g_object_new_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x1715a)
    #4 0x7f763f789520 in g_object_new (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x17520)
    #5 0x7f7640f6bcb0 in gtk_dialog_add_button (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x186cb0)
    #6 0x7f7640f8d2c9 in gtk_file_chooser_dialog_new (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1a82c9)
    #7 0x7f7641727281  (/opt/Qt5.8.0/5.8/gcc_64/plugins/platformthemes/libqgtk3.so+0x13281)

Task-number: QTBUG-59611
Change-Id: I37cc967e689f4523b504fffd14adbf944b53b754
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-22 06:40:47 +00:00
Marc Mutz
c9efdfd990 QWizard: use the 3-int QColor ctor instead of the string one
The value is hard-coded, there's no need to parse a string to extract the value.

Change-Id: I987280d7a92b7a1eb75233b2a1f811b5177f0a63
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-21 21:35:08 +00:00
Thiago Macieira
ceb859bf03 Implement a counted QT_FATAL_WARNINGS
[ChangeLog][QtCore][Logging] If you set QT_FATAL_WARNINGS to a number
greater than 1, Qt will stop the application at that nth warning,
instead of on the first one. For compatibility reasons with previous
versions, if the variable is set to any non-empty and non-numeric value
different from 0, Qt will understand as "stop on first warning".

Change-Id: I0031aa609e714ae983c3fffd14676f1826f34600
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-21 18:46:46 +00:00
Liang Qi
65faf45655 Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/plugins/platforms/eglfs/eglfs-plugin.pro

Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
2017-03-21 19:07:53 +01:00
Gabriel de Dietrich
6445aa4b06 QCursor: Add equality operators
[ChangeLog][QtGui][QCursor] Added equality operators.

Change-Id: Iedeab4673b2a77ad2e51a0d50297b12bba3b9505
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-21 17:22:41 +00:00
Tor Arne Vestbø
6d49311a5d Teach QTestLib to read QTEST_ENVIRONMENT to expand blacklist keywords
Can be used by CI system to set QTEST_ENVIRONMENT="ci", allowing test to
be blacklisted only for the CI.

Task-number: QTBUG-59564
Change-Id: I7088abb888c179bafc621f11191efbc45c37b179
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-21 16:07:53 +00:00
Marc Mutz
26bc4ac5cb QToolBox: fix potential UB (invalid cast) in Private::_q_widgetDestroyed()
Don't cast an expiring QObject down to QWidget. Cast the QWidgets stored
internally up to QObject to perform the comparison. The result is the
same, but no invalid casts are possible anymore.

Found by independent review.

Change-Id: Iffa8a66cf5cab0270961befe982637ac8e4f0f7b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-21 14:30:31 +00:00
David Faure
05924ddff9 tst_qurl: skip test with ':' in filename, on Windows
Task-number: QTBUG-59622
Change-Id: Ib4b458b5d0fc2dd9ea6758b8517a953f6d768a39
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-03-21 13:15:53 +00:00
Friedemann Kleint
a9383ef99a Diaglib: Output DPI and scale factors
Also pass options to formatWindow().

Change-Id: Ifa506331ea010087bfd7ab8bd3f7dda531f142a8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-03-21 07:16:57 +00:00
Olivier Goffart
464c0a5824 Windows QPA: Fix MinGW developer build
Fix warning:
qwindowswindow.cpp: In member function 'void QWindowsWindow::setWindowState_sys(Qt::WindowStates)':
qwindowswindow.cpp:1965:74: error: suggest parentheses around arithmetic in operand of '^' [-Werror=parentheses]
             if ((newState & Qt::WindowMinimized) && (oldState ^ newState & Qt::WindowMaximized))

This is actually a real bug. What was meant was to check if the Maximized flag
was changed.  This code path is for the case in which the windows becomes
minimized, and the maximized state changed.

Amends change a02959bb5b.

Task-number: QTBUG-57882
Change-Id: I1cd32a7080240e4462d3cd4f129c6c1a08409996
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-03-21 07:08:47 +00:00
hjk
5707528be0 Use fromUtf8() instead of fromLatin1() for QT_RESTRICTED_CAST_FROM_ASCII
The change does not change legally observable behavior as the result
of using QT_RESTRICTED_CAST_FROM_ASCII is only defined for (a part of)
the 7-bit range where Latin1 and UTF-8 are the same.

This change does not intend to lift the 7-bit restriction on string
literals for which the use of QT_RESTRICTED_CAST_FROM_ASCII is
well-defined even though in practice it works now for any UTF-8,
which is the presumed encoding outside that range nowadays.

Change-Id: If9a4199235396a43f8f26d7591907b21120823ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-21 06:37:12 +00:00
Marc Mutz
c33ee0fe15 QDataWidgetMapper: replace an inefficient QList with std::vector
WidgetMapper is larger than a void*, so holding it in QLists is
needlessly inefficient. Worse, the code could come to depend on the
fragile property of (inefficient) QLists that references to elements
therein never are invalidated.

Fix by holding it in a std::vector instead (tried QVector, too, but
that produced almost exactly 1KiB more text size). Adapt to std API.

There are a few changes in there which are not strictly necessary when
using std::vector, but were done as part of the port to QVector:

- dropping of WidgetMapper ctors (because QVector requires a default
  ctor, and I didn't want to provide one manually),
- marking the type as movable (no effect with std::vector, but doesn't
  hurt and keeps the next guy from wondering), and
- marking Private::flipEventFilters() const (to avoid a detach when
  using ranged for loops).

Changes required by the port to std::vector:

- at() -> op[] (not strictly necessary, but expands to less code even
  when compiling, as QtWidgets is, without exception support),
- append() -> push_back()

Saves 40B in text size on optimized GCC 6.1 Linux AMD64 builds (for
comparison: QVector had 1240B more than QList).

Change-Id: Iaae81d1a8bebe8000bf69e7fb8b2bcd6c38afafd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-20 22:25:03 +00:00
Alexander Volkov
8a3e8856e5 qmake: Add test functions for comparing version numbers
qmake really lacks version comparing functions:
users either use ugly constructions to compare versions
by components, such as
greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 4):
or even incorrectly compare versions as strings:
!lessThan(apple_clang_ver, "5.1")|!lessThan(reg_clang_ver, "3.4"):

Add test functions versionAtLeast and versionAtMost which use
QVersionNumber to compare version numbers by components.

Change-Id: I65e6b3c296d0301d544b7e38bf3d44f8d555c7fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-20 21:56:01 +00:00
Thiago Macieira
b71b8ff283 headersclean: Move it from MSVC 2013 to all MSVC versions
Our headers ought to be clean in all compiler versions.

Change-Id: I4a7dc1fe14154695b968fffd14aba9ff9995c618
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-20 21:54:14 +00:00
Thiago Macieira
99fc96fd37 QMetaType & QVariant: "load" and "save" std::nullptr_t
We don't load and save pointers usually because the pointer value cannot
be guaranteed to remain across program invocations. However, nullptr is
an exception: a null pointer is always a null pointer.

We don't actually have to read or write anything: there's only one value
possible for a std::nullptr_t and it is nullptr.

[ChangeLog][Important Behavior Changes] A QVariant containing a
std::nullptr_t is now streamable to/from QDataStream.

Task-number: QTBUG-59391
Change-Id: Iae839f6a131a4f0784bffffd14aa374f6475d283
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-20 21:53:32 +00:00
Stephan Binner
e54356151c Add features.widgettextcontrol
Change-Id: I6d525f70e1d54b4c8383dfa387cfd5c364fab354
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-20 20:54:06 +00:00
Thiago Macieira
202d6ad730 QHash: unexport the hash seed variable
The only allowed way to access the variable is now via the public
qGlobalQHashSeed and qSetGlobalQHashSeed functions. The variable was
private API, so we're allowed to remove it.

Task-number: QTBUG-47566
Change-Id: I4a7dc1fe14154695b968fffd14abd331e5810482
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-20 20:07:59 +00:00
Thiago Macieira
3548cdedb6 qmake: Add _CRT_SECURE_NO_WARNINGS to all MSVC-like compilers
The warning comes from the MS headers, not from the compiler.

Task-number: QTBUG-59576
Change-Id: Ie67d35dff21147e99ad9fffd14acd7fb628fa1d4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-20 19:31:40 +00:00
Tony Sarajärvi
bd6838d54d Blacklist tst_QPauseAnimation::multipleSequentialGroups on all macOS
Task-number: QTBUG-59218
Change-Id: Ic839a36af1ecab39da0c3394c34181b6717e24e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-20 16:53:16 +00:00
Friedemann Kleint
2c935ef565 Diaglib: Fix WinRT exclusion
Amends change 8deeb6777d.

Change-Id: If403871b1fb117a3f8042e0e2397e6d521d17beb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-03-20 15:04:25 +00:00
Paul Olav Tvete
da55b57c40 System library fix for wayland-scanner
Add the option to omit code generated by wayland-scanner, to
avoid the case where the Qt versions replace driver-specific
functionality.

Task-number: QTBUG-58299
Change-Id: I508b18b9392dbd9e2b8233399301c06410f9f5ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2017-03-20 14:19:59 +00:00
David Faure
035e0eafa6 QUrl::fromUserInput: fix handling of files with a ':' in the name
QUrl::isRelative(str) would be false for such files, so first check for
file existence before doing any URL parsing.

Change-Id: I51b6229251ad94877ac408b2f8018456d3e10a36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-20 12:55:36 +00:00
Liang Qi
dd613e65ea Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-03-20 10:56:29 +00:00
Friedemann Kleint
62c7ca2de3 Windows QPA: Fix compiler warning when Vulkan is not present
qwindowsnativeinterface.cpp: In member function 'virtual void* QWindowsNativeInterface::nativeResourceForWindow(const QByteArray&, QWindow*)':
qwindowsnativeinterface.cpp:104:12: error: enumeration value 'VulkanSurface' not handled in switch [-Werror=switch]

Amends  f1a23a5467.

Task-number: QTBUG-55981
Change-Id: Ie9bf396ab8ea1be505abfaffd5d603bb3856c089
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-03-20 10:54:40 +00:00
Eskil Abrahamsen Blomfeldt
391e3aeef4 Fix char format of preedit text in empty text block
When a text block is empty, and we are adding preedit text to it,
we need to merge the format of the preedit text with the current
format of the cursor, otherwise we will use a default format and
then suddenly switch to the proper one when the text is committed.

The reason this becomes a bit complex is that there are no rules
preventing someone from using several ime attributes to specify
formats for isolated parts of the text, and no rules defining the
order of such attributes. So even if the common case is one
text format attribute for the entire string, we need to make sure
we also handle the other cases gracefully, e.g. when we are setting
different formats for different substrings and then providing these
out of order. To make sure we have these corner cases covered, we
also add a set of autotests.

[ChangeLog][Qt Widgets][TextEdit] Fixed initial char format of
input method text as it is in pre-edit mode.

Task-number: QTBUG-59196
Change-Id: I1e37928e3bd1395fec1b5591908d4c69b84eb618
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-20 10:10:26 +00:00
Anton Kudryavtsev
bf9a1cf939 Use new QStringList::contains(QL1S)
... to reduce text size by replacing QStringLiteral with QL1S.

Change-Id: I8166282d915f081ba816989039451466ec29e208
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-20 08:33:50 +00:00
Liang Qi
ae2695535a Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qfilesystemengine_win.cpp
	src/gui/text/qdistancefield.cpp
	src/plugins/platforms/xcb/qxcbconnection.h

Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
2017-03-20 09:00:44 +01:00