Commit Graph

36083 Commits

Author SHA1 Message Date
Edward Welbourne
0b688e2955 Check against copying the husk left by a move
The copy-assign operator tests against other.d being NULL but the
copy-constructor didn't.  This can only matter if the value being
copied has been moved from, so we could probably replace with an
assertion in practice, but we should at least be consistent.

Amended test to check this case too; and verified new test crashes
without this fix.

Change-Id: I46872a677775944bbdf6a9112e719873e574ae60
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-26 16:35:59 +00:00
Oliver Wolff
a5d8f00b3b tst_qplugin: Re-enable loadReleasePlugin test case
Change-Id: I678a8748ac757ae2918dd80e4a6d802d7de7b0b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-26 14:26:42 +00:00
Oliver Wolff
b6597c8b7b Skip qplugin auto test for static configurations
All test cases use QPluginLoader which will not work for static builds of
Qt.

Change-Id: I7dcddcd5213681bd3ae4cd85e49ee0bb5748f687
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-26 14:26:36 +00:00
Paul Wicking
0538b714de Doc: Remove typo and add line breaks after \internal
In an unrelated change, it seems \internal \obsolete
can cause unexpected behavior when generating the
documentation. Adding this line break should fix that.

Change-Id: I95eceb109faaf89be8f258fba8c31008fdc4ca57
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-07-26 11:11:37 +00:00
Thiago Macieira
9a04453b50 Fix the fix for mmap() overflow check
The code I introduced in 4ee7425794 only
dealt with systems that reasonably used a 64-bit off_t parameter. Turns
out that we don't turn on largefile support on 32-bit Android, which
meant that the fix caused a regression.

[ChangeLog][QtCore][QFile] Fixed a regression that caused QFile::map()
to succeed or produce incorrect results when trying to map a file at an
offset beyond 4 GB on 32-bit Android systems and on some special Linux
configurations.

Task-number: QTBUG-69148
Change-Id: I2c133120577fa12a32d444488bac3e341966f8d7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-25 12:40:04 +00:00
Paul Wicking
fdb780b897 Doc: Make reference to platform styles version agnostic
Remove platform/version specific reference to avoid outdated docs.

Task-number: QTBUG-64304
Change-Id: Ief9d5db95fa1f865fd826a6426b1621e81bdb6ce
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-07-25 10:46:00 +00:00
Timur Pocheptsov
c575977645 Fix MSVC builds with /Zc:wchar_t-
208c71768 introduced a problem for our users, who build on Windows with
/Zc:wchar_t-, which makes wchar_t a typedef for the type 'unsigned short',
preventing them from switching to more recent versions of Qt. While MSDN
recommends against this option, we can add more #if-ery to avoid compiler's
bailing out on a constructor's redefinition.

Task-number: QTBUG-65101
Change-Id: I62a1d9b2572f3d4b1f70bcbc3e52e795b1944558
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-25 09:44:36 +00:00
Friedemann Kleint
ad8a7f0c50 xcb: Fix build when xinput2 is not available
Fix the #ifdefs.

Amends 3bc0f1724a.

Task-number: QTBUG-68501
Task-number: QTBUG-51385
Task-number: QTBUG-32476
Change-Id: Icc6421fe2e91a3b29bcec8cb1a8a91cb71ae3172
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-25 09:14:55 +00:00
Romain Pokrzywka
708fa860bc Windows QPA: Fix tablet event coords delay for tablets in pen mode
Now that the mouse mode check is only done once for the first event
after the TabletEnterProximityEvent, the m_oldGlobalPosF member has
lost its purpose and should be removed.

Worse, its value was used instead of currentGlobalPosF when in pen mode,
resulting in an unnecessary 1-frame delay in the reported positions
in the tablet events.

Task-number: QTBUG-36937
Change-Id: I6bd2db57898850a65088d9bb41fbfbd96eac54f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-24 20:46:59 +00:00
Andre de la Rocha
947df4e63e Windows: Fix invisible element being included in the UI Automation tree
When an element is not visible then it should not be shown in the element
tree at all when using tools like Inspect. Also, the IsOffscreen property
was hardcoded to false instead of reflecting the actual object offscreen
state.

Task-number: QTBUG-69537
Change-Id: If6e8a4685c0505ee2b99dfbb8bf2b5d0f4112b1e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-24 13:10:52 +00:00
Mikhail Svetkin
8d4617d5a9 Fix QUrl::setPath documentation, remove default TolerantMode
Change-Id: I97f6ce5fdaba3364aab3203974a3a3d4f92c8899
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-07-24 10:06:27 +00:00
Gatis Paeglis
3bc0f1724a xcb: fix various bugs with _NET_WM_MOVERESIZE
1) After a37785ec76 it become
apparent that we don't get mouse release event from X server
when system move/resize ends (because WM is grabbing the pointer).
The old code (before a37785ec) would wrongly deduce mouse move
as mouse release, which is why the issue was not seen before.
The solution is to subscribe to slave device events.

2) This patch also amends 2488f34ecf as
that patch was solving the issue only for 1/3 of the supported DEs.
It worked with KWin, but not with Unity and Gnome. Its worth
noting that it also worked with two other WMs that I tested -
openbox and awesomewm. The way forward is to detect when system
move/resize was started as a result of touch event and let the
QSizeGrip do the move/resize instead of WMs that are known to
have bugs.

With this patch we also need to adjust the event compression algorithm
to not treat all XI_TouchUpdate events equally. For XI_Motion we don't
care if the event that we process comes from a master or a slave device,
so we can process them as equal.

Task-number: QTBUG-68501
Task-number: QTBUG-51385
Task-number: QTBUG-32476
Change-Id: Iab4e79a289d7bc0fe26f7ae2cff7c562f51a3334
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-07-23 21:43:19 +00:00
Edward Welbourne
27f1f84c1c Let QDir::absoluteFilePath() use isAbsolutePath() for resource paths
Using QFileSystemEntry::isAbsolute() broke handling of resource paths.
Extended QDir::absoluteFilePath() tests to cover absolute resource path
and some UNC variants also resolved in the same fix.
Amend existing filePath tests to use drives where needed.

Task-number: QTBUG-68337
Change-Id: I4f02cf67828ad93e562857118f8442037f18bab7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-23 14:28:38 +00:00
Paul Wicking
b616a8a8cd Doc: Add since version for QJsonDocument::toJson()
Task-number: QTBUG-69527
Change-Id: I10df9cc2d6fa2080e07d68b78c6220500f459380
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
2018-07-23 09:31:23 +00:00
Giuseppe D'Angelo
a7bcd16c75 PCRE2: upgrade to upstream version 10.31
[ChangeLog][Third-Party Code] PCRE2 was updated to version 10.31.

Task-number: QTBUG-69271
Change-Id: I0be7c280029f781aa20add8f87868d59e3fa53da
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-23 07:57:20 +00:00
Paul Wicking
fc17a02c04 Doc: Correct typo from decoded to encoded
Task-number: QTBUG-62081
Change-Id: Ia07b43445661d66ef0e8fe51d8d022bd5d803327
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-21 16:10:57 +00:00
Oswald Buddenhagen
6bc6e6d388 qmake: skip license check while building qt
configure already does it for qt itself, so it's pointless to ever invoke
in default_pre.prf.

to make the exclusion work during the makespec reload during early setup,
we pull ahead the restoration of CONFIG, hoping it won't cause too many
side effects.
another change in qt5 will ensure that top-level builds are also covered.
finally, configure tests also need an explicit exclusion.

that way, attempts to re-configure build trees of commercial builds
after the day of the first configuration do not fail anymore.

Task-number: QTBUG-63452
Change-Id: I42264f64d7621784d4d67bde885a8e501f5ca413
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-20 18:07:48 +00:00
Alistair Buxton
cdf456f05e configure: Fix QMAKE_* variable assignments containing numbers
9fde78269 fixed overrides for library definitions, but failed to fix
direct overrides of variables from mkspecs, like QMAKE_LIBS_OPENGL_ES2.

Task-number: QTBUG-69176
Change-Id: I818acf25f581903c323847382ec6baab38b64330
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-20 18:05:35 +00:00
Timur Pocheptsov
801a0cc7ac QNetworkRequest - fix the documentation
The wording was quite confusing and misleading - if not set exlicitly,
QNetworkRequest::sslConfiguration() will initialize configuration to
be equivalent of QSslConfiguration::defaultConfiguration(), not what
the documentation stated.

Task-number: QTBUG-13418
Change-Id: Id578db47ec75031376f73db42108053655fbf5c3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-20 13:27:42 +00:00
Paul Wicking
f861109ef3 Doc: Remove erroneous comma in snippet
Task-number: QTBUG-51719
Change-Id: I0621b872642aa8ad14f6af4bf1b9588450dfbb64
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-07-20 12:15:04 +00:00
Leena Miettinen
2ce62ed87b Doc: Update external links to Qt Creator Manual
Reflects version 4.7.

Change-Id: Ia41b5c1a7eb829ab3c6ec0d3bd9fe60dcbfed54d
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-07-20 11:26:01 +00:00
Edward Welbourne
01eab308a3 qmake: break out testFunc_cache() from evaluateBuiltinConditional()
It's 160ish lines and adequately isolated.  Still, it *might* be
contributing to compilers being slow (unlikely though that seems) so
seemed worth tidying up anyway.

Task-number: QTQAINFRA-2117
Change-Id: I9e55e677552c273fdf3480ccefc229fd6fd2b66a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-20 09:14:31 +00:00
Paul Wicking
f17d33bebb Doc: Update Tetrix example
Use new connect syntax throughout the example.

Task-number: QTBUG-69503
Change-Id: I5ab1453318e60586a9655ecb58263778c02aba4f
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-07-19 18:22:12 +00:00
Albert Astals Cid
8d77bcc562 Replace 0 with nullptr
So if people are using the -Wzero-as-null-pointer-constant don't get a warning when using these private QPA includes

Change-Id: I6deb089b17a844680db24998d60c94de7a1227b1
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-07-19 15:47:09 +00:00
Paul Wicking
603fbd06fb Doc: Add since version for QJson method and enum
QJsonValue::toInt() introduced in 5.2, 7372c6cf9d4
QJsonDocument::JsonFormat introduced in 5.1, 4bb5566632

Task-number: QTBUG-69527
Change-Id: Idb9df959f82fe7061e0afe2109f1ca34a4451a5f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-07-19 13:05:14 +00:00
Paul Wicking
8e40e390c6 Doc: Extend description of ShortcutOverride event
Better late than never.

Task-number: QTBUG-533
Change-Id: Ieb68d510f75553a6aa0a6e9046c11e3a34b8815f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-19 13:05:01 +00:00
Thiago Macieira
8a5267e4d9 Plugins: fix crash if the binary JSON data contains invalid size
Eight bytes into the Binary JSON header there's a 32-bit little-endian
size, which qJsonFromRawLibraryMetaData uses to determine the size of
the stored metadata. That value is passed as a size to QByteArray, which
means certain values could cause crashes due to being too big or via
sign-extension in 64-bit.

[ChangeLog][QtCore][QPluginLoader] Fixed an issue that could cause a
crash when certain damaged or corrupt plugin files were scanned.

Change-Id: I117816bf0f5e469b8d34fffd153dc5425cec39a7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-19 07:27:02 +00:00
Andy Shaw
3c2ffd7457 macOS: Use QMAKE_BUNDLE for the app part of the bundle identifier value
If QMAKE_BUNDLE is set then this should be used for the bundle
identifier value instead of the product name. This ensures that when an
application provisioning profile is used that it will correctly match
against it. This also brings it in line with the documented behavior.

Change-Id: I627d212f59d862e7a881941748db5ef98ab4f463
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-18 16:58:47 +00:00
Andy Shaw
bebae37376 Windows: Don't output a warning when sHGetKnownFolderPath fails
In the rare case where the known locations for the standard paths are
not known (such as when an application is used without a user logged
in), it will output a warning to indicate this. In the case of the
GenericConfigLocation, this can mean that it will hang due to the fact
that QLoggingCategory is looking for that location too before it can
output anything.

Therefore, the warning output is removed so that if this part fails it
doesn't cause it to hang as a result.

Change-Id: I4f189361899bd1f868292f30c09fbe50982d2288
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-18 07:15:53 +00:00
Thiago Macieira
1d33493989 Linux: Bypass glibc's broken open() implementation
Glibc 2.21 and earlier have a bug that leaves the mode parameter unset
when O_TMPFILE is used. So we bypass the glibc implementation and go
directly for the syscall. We do this only for 32-bit x86, since of the
current, modern platforms, it's the only one that passes parameters on
the stack. Technically speaking, the glibc bug applies to all platforms,
but it turns out that on all others, it appears to work.

By doing this, we have two minor differences:
 1) open() is a cancellation point, but syscall() isn't
 2) if anyone tries to intercept open() calls via LD_PRELOAD, they're
    not going to catch Qt's.

[ChangeLog][QtCore][QTemporaryFile] Worked around a bug in the GNU C
Library versions 2.21 and earlier (used on Linux) that caused temporary
files to be created with permissions 000.

Task-number: QTBUG-69436
Change-Id: I20fd00e600264ff98c6afffd1540dceea89fa91f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-17 22:23:06 +00:00
Gabriel de Dietrich
e20307dcfb QMacStyle: Configure checkbox NSButton as tri-state
Qt allows this as a property of QCheckBox, so it should
be enabled in its Cocoa counterpart.

Change-Id: I88eb6dddabb173050c4fe7229f15c768181ef527
Task-number: QTBUG-69453
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-07-17 20:31:58 +00:00
Sergio Martins
856284d525 Reset geometry constraints when removing stylesheet
CSS geometry constraints such as "min-height" or "min-width"
will set size constraints on the widget.

Removing the stylesheet should remove these constraints.

Task-Id: QTBUG-69418
Change-Id: I1008e4390281c90112303d72dd7d59a8acddfcd9
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-07-17 11:24:29 +00:00
Takumi ASAKI
37bd2400fa Fix incorrect warning message in QOpenGLBuffer
Change-Id: I932aa10814049e78da35ea12b7552bf676545c89
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-07-17 01:51:43 +00:00
Jesus Fernandez
435d1d53bd Use nullptr instead of 0
Change-Id: I37e776b84193d705b48d5d75ad620fd41b271d9e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-07-16 13:58:23 +00:00
Eirik Aavitsland
9a3359b57b Fix: png handler returning Mono QImage with color table < 2 items
A bit depth 1 png image may contain a single color table item. The png
handler would in such cases reduce the size of the QImage color table
to 1, which could easily lead to crashes later on.

Task-number: QTBUG-69256
Change-Id: I01d78977c121bacc44b823231d8f32ca63d8a98c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-07-16 13:49:56 +00:00
Eirik Aavitsland
b0797cfed6 QCalendarWidget: update the year label correctly on locale change
The year label in the header would show an unlocalized year
number. Fix by setting it equal to the year editor's correctly
localized string.

Task-number: QTBUG-69038
Change-Id: I87148c607b8fb498c57bcf59bc175154c9e445d1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-07-16 13:49:20 +00:00
Alexander Volkov
6f81dbe674 QLineEdit: Fix behavior of DeleteStartOfWord key
DeleteStartOfWord key behaves like Delete key when the cursor
is at the beginning of the line. Do nothing instead.

Task-number: QTBUG-65855
Change-Id: I56402961b44ec6fe3a382df68a76db36891c4522
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-07-16 10:11:49 +00:00
Thiago Macieira
b773a02318 ELF parser: fix off-by-one error
I don't know why Arvid subtracted 1 when he wrote this code. But it was
wrong. Fortunately, the section size was not used afterwards, but the next
commit will.

Change-Id: I117816bf0f5e469b8d34fffd153dc8383b00b94a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-14 04:37:48 +00:00
Thiago Macieira
1f27c1161b QPluginLoader: limit the amount of memory used when scanning plugins
When using actual memory allocation, limit to 64 MB, not the full file
size. On most systems, the memory map technique will work, so this won't
even be tried. In any case, we don't need the fix for the OOM situation
that was applied in commit e211ab76d7.

As for the memory mapping technique, this commit limits the allocation
to reasonable values given the virtual memory addressing space. Half a
gigabyte is probably acceptable on 32-bit systems, where there should be
a contiguous space for the OS to allocate the file in. This commit also
fixes an overflow when converting from qint64 of the file size to ulong
(32-bit on 32-bit platforms and on Windows).

For 64-bit systems, we currently limit to 1 TB.

Change-Id: I117816bf0f5e469b8d34fffd153dc1705a8eedc4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-14 04:37:46 +00:00
Paul Wicking
2d20342c99 Doc: Remove redundant \code
The preceding snippet contains the same line of code. It is unclear
why this line is repeated, and it does not seem to serve a purpose.
This patch removes the line of code and the QDoc command used to set
it apart from the preceding snippet.

Task-number: QTBUG-56772
Change-Id: I400b22aa75ee4542bfb67f7e47e3c31c577a39e5
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-07-13 17:44:22 +00:00
Kai Koehne
46c2241a57 Update bundled sqlite to 3.24.0
[ChangeLog][Third-Party Code] Sqlite was updated to version 3.24.0

Task-number: QTBUG-69274
Change-Id: Icf3d7b2c1af0fb67033fd39240bee0cacccaf96f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-07-13 14:36:08 +00:00
Kai Koehne
e37fe8110d Doc: Remove reference to Unicode 4.0
It's unclear when the reference to Unicode 4.0 standard
got added - it certainly predates the qt 4 git repository.
Anyhow, nowadays we're using later versions, and it doesn't
make much sense to highlight one specific version here.

Instead, use the correct technical term - UTF-16 code unit.
Also I added a 'correspond _to_', which sounds more common
to me.

Task-number: QTBUG-56699
Change-Id: I4bdcd9060cb2b11521638019c15ef7ab67aa768b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-07-13 14:28:41 +00:00
Edward Welbourne
41f737a12c Correct Unix QStorageInfo's QStorageIterator::next()'s loop logic
The loop was accepting any line with at least three entries, but the
code that then used this line needed four entries.  At the same time,
the loop's check had to be repeated, in rearranged form, after the
loop, to handle some failing cases.  Restructuring the loop, and
demanding at least four entries, fixes all of this, although care must
be taken about the virtual file-system lying about .atEnd().

[ChangeLog][QtCore][QStorageInfo] Fixed a bug on Android that could
cause QStorageInfo to skip some filesystems (if the mount table is a
virtual file and contains any short lines) or crash (if the mount
table contains any 3-field lines).

Change-Id: I1c2674372d0d0b7d16937de4345a910bc7d6e0ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Johannes Rosenqvist <xeroc81@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-13 12:47:53 +00:00
Oswald Buddenhagen
3303715099 configure: pull ahead gcc-sysroot processing
the sysroot flags need to be established even before setting up the
spec, because as soon as that happens, toolchain.prf will try to
determine the default paths and cache them.

this also fixes sysroot use in toolchain flag support tests, which run
(somewhat) independently from the toolchain setup.

Task-number: QTBUG-63483
Change-Id: I7be1540e766dac58fb16f63176aa8d2879b51ae0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-13 11:09:07 +00:00
Nicolas Ettlin
7d05144dde Fix the copyright attribution for the HarfBuzz dependency
Task-number: QTBUG-69260
Change-Id: I03079bee5eb17f87f48690e800517831f6215975
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-13 10:20:55 +00:00
Thiago Macieira
04c57b6886 QFile::copy(): don't trust the old file metadata cache
Instead, let's just use sendfile(2) in a loop until it returns 0, which
indicates EOF.

[ChangeLog][QtCore][QFile] Fixed a regression in QFile::copy() that
caused the original file not to be copied entirely if it was modified
outside of this QFile object between the last time we checked its size
and the copy() call. Note this is not a prevention against race
conditions.

Task-number: QTBUG-69417
Change-Id: Id59bdd8f1a804b809e22fffd15406c8aa31f4a1e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-12 20:15:20 +00:00
Edward Welbourne
9c0d34da52 Add missing init()-if-dirty in two of ICU's QCollator::compare()s
Both delegate to the one that did do the if dirty: init() check, but
only after they've tested whether d->collator is set, which it might
not be when dirty.

Change-Id: I77533d6d32c4a8c9b42797c77003e50f5820775a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-12 13:41:05 +00:00
Johannes Rosenqvist
23870b3cad Fix QStorageIterator where the last line in /proc/mounts is skipped
On Android systems QStorageIterator uses /proc/mounts to parse mounted
volumes. For every call to QStorageIterator::next() a check was done
to see if we had reached EOF with atEnd(), but didn't take account of
the last call to file.readLine(), which might contain a valid entry.

[ChangeLog][QtCore][QStorageInfo] Fixed a bug that caused the last
entry in the mtab file to be ignored on Android.

Task-number: QTBUG-60215
Change-Id: I064452002922c72ffa1c8954fec5f28738c42bae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-12 13:28:42 +00:00
Thiago Macieira
89f7e090ef XCB/Xlib: make sure we don't get problems for sys headers using register
Found while compiling on FreeBSD 11.2 (clang 6 update has the warning):

/usr/local/include/X11/Xlibint.h:675:7: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

Change-Id: I117816bf0f5e469b8d34fffd153e6482ccaed69f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-11 19:18:38 +00:00
Paul Colby
abbd28f551 Correct the documented visibility of some Widget methods
Specifically, commit e80a3b49c0 introduced
the use of some QT_VERSION_CHECK macros to distinguish some methods'
visibility  between Qt 5 and Qt 6, however the QDoc falsehoods variable
(added sometime prior) was sensitive to whitespace, and did not
correctly recognize those version checks. This resulted in some methods
being incorrectly documented as public instead of protected, or vice
versa.

This change simply makes the QT_VERSION_CHECK in QDoc falsehoods allow
for optional whitespace.

Methods affected by this change (in documentation only):
* QListWidget::dropEvent()
* QTableWidget::items(), ::indexFromItem(), itemFromIndex()
* QTreeWidget::items(), ::indexFromItem(), and itemFromIndex()

Task-number: QTBUG-68005
Change-Id: Ibe3e780334a9a915989ed43b5cdda6915c9161ec
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-07-11 15:21:56 +00:00