Commit Graph

31982 Commits

Author SHA1 Message Date
Tobias Koenig
781b5a6198 Fix generation of gradient shader function in PDF
Add the missing endobj tag for the shader function object.

Change-Id: Ieb3cfa5a5d0e27d04164a80b028d41371507fb94
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-28 07:01:30 +00:00
Sami Nurmenniemi
514fff1e39 Fix largefile tests on ARM and QEMU targets
- Test tst_LargeFile::mapFile fails on Qemu for files over 4Gb.
  Fixed by limiting maxSizeBits to 28 (must be n*4 and < 32).
- Bug QTBUG-21175 is also effective on ARM targets. Fixed by
  expecting failure also on ARM.

Change-Id: I9103727e618a17259b4785ec8c284f3bb60ebea7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-28 06:55:32 +00:00
Simon Hausmann
e6bf237669 Make build ABI available as qmake variable
This is needed to encode the correct ABI into the generated qml caches.
It is identical with the return value of QSysInfo::buildAbi().

Change-Id: I2d581b22326da4220f412ab4f517156f4ba31897
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-28 06:51:42 +00:00
Oliver Wolff
a6bbaa08bf ANGLE: remove dead MinGW code from common.pri
Change-Id: I09a9d0553f00a3b04d084300cb6e2b9f5211913e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-28 06:29:43 +00:00
Anton Kudryavtsev
ed96363d56 QMimeGlobPattern: init all members only once
... by initializer list.

Change-Id: I39d2f933dac171273f500963eb47ffa9165978de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-28 04:01:41 +00:00
Tor Arne Vestbø
e0e717d06a Fix crash when QUrl::from{NS/CF}URL() was passed a nullptr
Change-Id: Ib193447c4a91dd3d08746e97727f7d4764f33d80
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-27 17:39:58 +00:00
Tor Arne Vestbø
52767b8ee7 macOS: Disassociate NSView from contentView when switching NSWindows
When a NSView is the contentView of a NSWindow, it still has a superview,
in this case an NSThemeFrame, and the theme frame is the view that retains
the view, not the contentView property of the window.

Unfortunately, when a view is removed from the NSThemeFrame by means of
[NSView removeFromSuperview], or indirectly via [NSView addSubview:],
AppKit does not update the contentView property of the corresponding
NSWindow. The result is that the NSView might be deallocated while the
NSWindow still is around, with a stale contentView property.

To work around this we explicitly disassociate the view from the NSWindow
when we know that we are going to release the NSWindow. This will take
care of both resetting the property to nil, and remove the view from
the NSThemeFrame superview.

Task-number: QTBUG-59734
Change-Id: I1111d492f52fe5bdf86bbae071421f6a8a7a38b8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-27 17:39:48 +00:00
Allan Sandfeld Jensen
d3fd3171ce Annotate more implicit fallthroughs
Reduces our number of gcc 7 warnings

Change-Id: I792d658cbc11cad15cf45da3a36fc93fcdcc67ea
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-27 14:11:57 +00:00
BogDan Vatra
1ab60b0430 Make sure we quit qt when the service is destroyed
Task-number: QTBUG-58471
Change-Id: I37f162717f57323136811a8f80d53e3c3b7d6f22
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
2017-03-27 12:20:40 +00:00
Dmitry Shachnev
41750492db Make sure QDBusMenuBar is restored when the window is hidden and shown
Task-number: QTBUG-58723
Change-Id: Ib4c3dac8a8cce717f4d47ab619c05b9e1719f311
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-03-27 12:14:27 +00:00
Joerg Bornemann
0ec871dac8 Introduce QInputControl::isCommonTextEditShortcut
For handling ShortcutOverride events in text-edit-like controls one must
know if a key event matches a common text edit short cut. The code that
was formerly in QWidgetTextControl is now moved into
QInputControl::isCommonTextEditShortcut to remove duplicated code in
QtQuick and to avoid adding adding a third duplicate in QtWebEngine.

Task-number: QTBUG-59053
Change-Id: I18723bb0224acd33c8ea4a8d0a601bb5e274a7a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-03-27 11:32:30 +00:00
Paul Olav Tvete
9ccc3070dd Build fix for -no-feature-textedit
After change e54356151c, qwidgettextcontrol_p.h does not
always include qtextedit_p.h

Change-Id: If7b54384d644fda4985eb1966d6773ee393ba107
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-27 11:25:09 +00:00
Kimmo Ollila
15fe60cfda Workaround GHS compiler bug
This temporary workaround allows to compile with GHS toolchain and
should be removed when GHS provides patch to fix the compiler issue.

Change-Id: I0d0eac8054e6ba2f448fed3d3c80a518e0d2af97
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-27 09:00:15 +00:00
Friedemann Kleint
e8d03c5599 Bump copyright year
Task-number: QTBUG-59648
Change-Id: Ie2d08515f4ad177bab338210a0a3e52f5519dcc3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-27 07:38:36 +00:00
Liang Qi
d5df0e9949 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-03-27 09:21:47 +00:00
Liang Qi
7702fe8602 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
2017-03-27 10:42:08 +02:00
Shawn Rutledge
1e7795ef60 Add documentation for TabletTrackingChange enum value
Amends 6aaf853222

Change-Id: I2c264db235ea552ce6b4eb003d7daeeb2cecde6f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-03-27 08:32:56 +00:00
Andy Shaw
197b55c939 iOS: Hide the overlay when the keyboard is hidden
If the keyboard is hidden via the hide keyboard button then the edit
menu should also hide with it. This ensures it behaves in the same way
as native applications on iOS then.

Change-Id: I4c714dd5c5cb27d8eaf310e2911dc38feb1cb74e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-03-27 07:21:32 +00:00
Kimmo Ollila
1dd54b5647 Increase the maximum recursive template depth on INTEGRITY
Set the limit to 128 instead of the default 64 by adding
QMAKE_CXXFLAGS += --pending_instantiations=128. This is
needed by QMetaType::typeName array implementation.

Change-Id: I3fd13967f862f492210572cfe7ee9ffc5e7c9745
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-25 15:45:58 +00:00
Marius Kittler
38550c562d json encoder: Harmonize number serialization with ES6
Ensures that numbers representable as 64-bit integer
are not printed using exponent notation.

Some JSON implementations such as the one of the Go
standard library expect this in the default
conversion to int.

Change-Id: Ic3ac718b7fd36462b4fcabbfb100a528a87798c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-25 14:26:30 +00:00
Olivier Goffart
94e6e8dfc6 tst_moc: fix include guards
Change-Id: I465c035cc741f94cb6737e86e33fbd1589ddaa8e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-25 12:53:09 +00:00
Marc Mutz
d8e2db0173 QDir: replace QLVA<QChar> with QVLA<ushort>
... as used in qstring.cpp, too. QChar is only marked as movable, not
primitive, as it should have been and ushort is, and there's some hope
that the template instantiations can be shared across TUs.

Saves a rather disappointing 148B in text size on optimized GCC 7
Linux AMD64 builds.

Change-Id: Ic9558a4d83611a6461cd5540c9090cbd4c4f2f4e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-25 08:03:10 +00:00
Marc Mutz
5ca7d56aca QVarLengthArray: fix compilation with GCC 7
This fixes a warning-turned-Werror in qdistancefield.cpp:

  In member function ‘void QVarLengthArray<T, Prealloc>::realloc(int, int) [with T = bool; int Prealloc = 256]’,
      inlined from ‘void makeDistanceField(QDistanceFieldData*, const QPainterPath&, int, int)’ at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qvarlengtharray.h:275:10:
  ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qvarlengtharray.h:390:19: error: ‘void* memcpy(void*, const void*, size_t)’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
               memcpy(ptr, oldPtr, copySize * sizeof(T));
               ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Apparently GCC cannot rule out that copySize may be negative in the
call to memcpy. Put GCC on the right track by adding a Q_ASSUME.

Change-Id: I63e3801e52ebe2a7f77e3a97ef03ec3869319c8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-25 08:02:31 +00:00
Thiago Macieira
e19fda916a Fix some warnings found by QNX's compiler
-Werror is now disabled for that compiler, but it doesn't hurt to fix.

io/qstandardpaths_unix.cpp:149:32: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
qtestcase.cpp:2330:31: error: narrowing conversion of '(ms / 1000)' from 'int' to '_Timet {aka unsigned int}' inside { } [-Werror=narrowing]

Change-Id: Id92f4a61915b49ddaee6fffd14aea2c1e686e8f2
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2017-03-25 04:51:01 +00:00
Thiago Macieira
e26bcc4d5d Disable -Werror for QNX's compiler
The compiler is mostly GCC in disguise, but the libraries are not. Since
the toolchain is not open, it's difficult to fix issues in it.

Task-number: QTBUG-59671
Task-number: QTBUG-59672
Change-Id: Id92f4a61915b49ddaee6fffd14aea2639153f073
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-25 04:50:44 +00:00
Edward Welbourne
e5c0371d18 Fix propagation of locale from widget to its children
Fix the condition in QWidgetPrivate::resolveLocale() to decide whether
to propagate locale: make it match setLocale_helper()'s condition when
deciding whether to propagate to descendants.  This lead to a
QDateTimeEdit's calendar popup not getting told what locale to use
correctly, unless we setLocale() on it overtly, which then blocked
propagation of locale changes to it unless QDateTimeEdit manually
propagated the changes.

Fix the documentation of WA_WindowPropagation to mention locale as
also being propagated (which it was in several places, only neglecting
this one in resolveLocale).

[ChangeLog][QWidget][Qt::WA_WindowPropagation] Propagate locale
consistently, along with font and palette, within the widget
hierarchy.  Previously, locale was propagated on ancestral
setLocale(), but not on creation of the descendant.

Task-number: QTBUG-59106
Change-Id: I92270f7789c8eda66a458274a658c84c7b0df754
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-24 13:57:22 +00:00
Thiago Macieira
9021a748af QStorageInfo: Fix warning about unused variable
Happens on non-Linux, non-macOS Unix systems (got it on FreeBSD).

Change-Id: Ie67d35dff21147e99ad9fffd14acc7308b5ff17e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-23 22:15:27 +00:00
Olivier Goffart
d82d2f6716 QSslSocket: fix connection to a international domain name
RFC6125 section 6.4.2 specify we need to convert the IDN to ascii
before comparison. Note that we don't need to toLower anymore
because toAce takes care of it.

Section 7.2 recommands that we dod not attempt to check for wildcard
character embedded within the A-labels or U-labels of an
internationalized domain name. So we reject names that contiains a
'*' but starts with 'xn--'.

Change-Id: Ib0830520a1f82bbf9fd11818718277a479527ee3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-03-23 16:11:15 +00:00
BogDan Vatra
12a0e1b4f8 Add gradle wrapper to Qt & update default Andriod gradle plugin
We need to add gradle wrapper to Qt because it was removed from latest Android SDK.
Adding it to Qt, will give us more control and will save us from pain in the future.

Task-number: QTBUG-59237
Change-Id: I6419876f8be11c0feeac448b228a46f811065264
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-03-23 13:04:51 +00:00
BogDan Vatra
da4b91e2b2 Fix hang on sleep/wakeup
This patch fixes the followings:
- call "it.value()" only on valid iterators
- destroySurface() doesn't remove the surfaceId from m_surfaces
- the surfaceId is removed from m_surfaces when the QtSurface is really
destroyed

Task-number: QTBUG-59185
Change-Id: Iee37dde16fee16f19906812c55c1f0b0279b033c
Reviewed-by: Mathias Hasselmann <mathias.hasselmann@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-03-23 08:06:30 +00:00
Friedemann Kleint
7a902e86ce Windows: Register windows for touch when a device is plugged in
Call QWindowsWindow::registerTouchWindow() for all windows when a device
is plugged in while the application is running. Guard
registerTouchWindow() against repetitive invocation and wrong window
types. This amends the crash fix 7daae2c2c7
and touch should then work.

Task-number: QTBUG-48849
Change-Id: I8b257dda144f28d60bcc5c4e369a413a90263998
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-03-22 20:05:05 +00:00
Friedemann Kleint
e0becd6a8a tst_QMdiArea::tabBetweenSubWindows(): Improve warning message
The test has been observed to be flaky, printing warnings
"Rubber band has different geometry". Output the geometries.

Task-number: QTBUG-59641
Change-Id: I6c209f2a98a07655e8523c012c5562d602d217ad
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-22 20:04:13 +00:00
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
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
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
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