Commit Graph

37473 Commits

Author SHA1 Message Date
Tor Arne Vestbø
7af0ea5b0f Disable warnings about deprecated QRegularExpression::PatternOptions
We still want to have these in the debug output for completeness,
so disable the warning instead of removing the lines.

Change-Id: I4291adddff486e4ea963be36ac0ebda089a66045
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-24 16:58:49 +00:00
Tor Arne Vestbø
0de4b76b9c macOS: Take application appearance into account when drawing glyphs
macOS 10.14 uses a new font smoothing algorithm that takes the fill color into
account. This means our default approach of drawing white on black to produce
the alpha map will result in non-native looking text when then drawn as black
on white during the final blit. As a workaround we use the application's current
appearance to decide whether to draw with white or black fill, and then invert
the glyph image in the latter case, producing an alpha map. This covers the
most common use-cases, but longer term we should propagate the fill color all
the way from the paint engine, and include it in the key for the glyph cache.

At the moment we do not react to changes in the application appearance,
as that seems to be buggy in general in Qt (palette/style, e.g.), and those
bugs need to be weeded before we can react to the theme change with confidence.

Task-number: QTBUG-68824
Change-Id: Ibbfd49fcf3a091e454009c08159f46b3499e2bd0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-24 13:42:59 +00:00
Mikhail Svetkin
48f0996449 macOS: minor refactoring QSendSuperHelper
Replace local implementation of index_sequence with QtPrivate::IndexesList

Change-Id: I193b9183ec6832294687e979576a2e3ec56d550b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-24 13:36:36 +00:00
Oswald Buddenhagen
f12fd482f5 qmake: fix file id mapping lifetime management
turns out that flushing the ids together with the ProFile cache was an
abysmal idea, as the latter expires after a few seconds after loading
the project, while references to the ProFiles (and thus the underlying
file ids) are kept for as long as the project stays loaded. the early
flush would cause re-use of the file ids, which would wreak all kinds of
havoc when re-loading projects.

but just ref-counting the vfs class is insufficient as well, as then the
ProFile cache (which expires after a timeout) could outlive all VFS
instances and thus refer to ids which were discarded and later re-used.

so we ref-count, and additionally let the cache instance hold a
reference to the vfs class.

this is sync-up with qt creator; no actual effect on qmake itself.

amends 190aa94be.

Change-Id: Idd4478ffc1c2405b3b83df32fba45b1f687f6a18
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
(cherry picked from qtcreator/d03fb350672d311dccc06f0bcb4da744a3c99745)
(cherry picked from qtcreator/1ddfb443b686ef04cc0e28363308ce70d01f0d73)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-24 12:16:37 +00:00
Friedemann Kleint
39cb9ac873 Fix qtbase build for clang-cl with MSVC 2017 15.8
Move the definition of _ENABLE_EXTENDED_ALIGNED_STORAGE
to msvc-desktop.conf so that it becomes effective
for all compilers using MSVC (icc, clang-cl).

Task-number: QTBUG-50804
Change-Id: I5ff612cc0f5a712b855925f9bcf645e578e80504
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-24 12:00:43 +00:00
Friedemann Kleint
96c202e981 Refactor tst_QFiledialog::clearLineEdit()
The test had some shortcomings:
- Flakyness due to not waiting for the file dialog list
  to be populated.
- It assumed that the hardcoded directory name
  ____aaaa... always would show first in the list. This may
  not be true on Windows, where names like .designer show above.
- On failure, the test directory would leak.

This manifested in failures like:

FAIL!  : tst_QFiledialog::clearLineEdit() '(fd.directory().absolutePath() != QDir::home().absolutePath())' returned FALSE. ()

To fix this, use QTemporaryDir and introduce predicates that
can be used to check whether the dialog has been populated
and the right file/directory is selected by pressing cursor down.
Use the temporary directory as not to pollute the home directory.

Change-Id: Ic504b91325993dcd6099c99e125e7ed8ff1d7672
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-24 12:00:31 +00:00
Friedemann Kleint
9dd9c6cae4 qthreadstorage.h: Fix syncqt warning about include path for qscopedpointer.h
Add QtCore, fixing:
qthreadstorage.h includes qscopedpointer.h when it should include QtCore/qscopedpointer.h

Amends 815153d4a4.

Change-Id: I8424bc4d0b0d666dbd04d63530af4fbd27987628
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-24 12:00:23 +00:00
Tor Arne Vestbø
286c2a0e09 iOS/tvOS/watchOS: Bump deployment targets
As planned, we only support the latest and previous release for these
platforms, and by the time 5.12 is out these platforms will all have
had new releases, so we should bump the deployment target now.

Change-Id: Ibbb7d07bb5d9a1007ab37b88d75781be2c1f7075
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-24 11:38:16 +00:00
Tor Arne Vestbø
10e468b32a macOS: Bump deployment target (minimum supported version) to 10.12
As discussed earlier, we don't want to keep backwards compatibility
for more than two versions in addition to the current macOS version.

Change-Id: I24df6fb4a08e14a9f842d209b8e0a6079c533b65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-24 11:37:44 +00:00
Edward Welbourne
8a270dee2b Revert "Fix time-zone tests on macOS >= 10.13, which now knows what CET is"
This reverts commit fd38c97a6c.
Apparently our actual VMs for 10.13 don't get this right, although the
ones used in testing did (prompting the fix this reverts).  We
probably have mis-configured VMs, but this is the quick-fix to get
development moving again.

Task-number: QTBUG-70149
Change-Id: Ib96755d8e21d9b226e22fc985f13f34fa04117b1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-24 11:05:38 +00:00
Eskil Abrahamsen Blomfeldt
f71048a531 Fix crash when combining QOpenGLWidget, QStaticText and Qt Quick
Under certain circumstances, if you had a widget with a QOpenGLPaintEngine,
and drew QStaticText into this, and then later had Qt Quick access the same
cache and try to resize it, we would get a crash because the resize function
would have a pointer to the paint engine and try to access its shader manager
(which would now be null, since this is outside the begin()/end() phase of the
paint engine.

The solution is to reset the paint engine pointer to null on the cache once it
has been populated and it is no longer needed.

[ChangeLog][QtGui][Text] Fixed a possible crash when combining QStaticText,
QOpenGLWidget and Qt Quick in the same application.

Task-number: QTBUG-70096
Change-Id: I7383ad7456d1a72499cfcd2da09a5a808d4b3eff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-24 08:30:28 +00:00
Allan Sandfeld Jensen
ed557c0378 Handle uploading of faked sub-images
One trick that is possible to do with QImage is to make it be sub image
of its imagedata by manipulating the data start and bytes-per-line,
we can not upload that directly and need to detect the case and create
a clean copy to upload.

Task-number: QTBUG-70105
Change-Id: I7ce184a0892fb4071b6dcc1a1fd3881a4e0703cd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-23 17:32:20 +00:00
Friedemann Kleint
2ab804c452 clangcl: Fix QtGui link error (missing fetchPixelsBPP24_ssse3)
Do not try using SSSE3 if the compiler do not support it.
(see 648ee7aa02).

Task-number: QTBUG-50804
Change-Id: I489b0bbacfde0c647c9d5b71ca3de992d7dc8878
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-23 14:04:55 +00:00
Mårten Nordheim
4f6fa5b2ae configure: add sources matching names from vcpkg
It's possible to use vcpkg using the -I and -L arguments, but
some of their libraries have different names than what we look for
during configure, so add in those variations.

Change-Id: Iee37197228cc0f15442ecd7ec4fc761f4d526e1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-23 14:03:28 +00:00
Tor Arne Vestbø
a88645c6f4 macOS: Share deployment target and device arch config between makespecs
Change-Id: Ie06705590b4962d8b09b97e30625ef11af321763
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-23 13:09:46 +00:00
Shawn Rutledge
e498a1d09d Tablet example: add a menu item to clear the canvas
It's annoying to have to kill the app and start over when it gets too
cluttered.

Change-Id: Ic72e372e5742de4e7c6bb818a3150283498a517b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-23 12:57:01 +00:00
Edward Welbourne
dc7e775c9c Test for fractional part of Costa Rican currency
CLDR up to somewhere between v29 (used by 5.9) and v31.0.1 (used by
5.10 and later) claimed Costa Ricans don't include fractions in their
currency; now it claims they expec two digits.  Apparently one of them
does expect those digits, so this is the regression test I'll be
cherry-picking back to LTS, to accompany the CLDR updates they need.

Task-number: QTBUG-70093
Change-Id: I138772cc6013fa74de4f7c54b836cac83421eab2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-23 12:54:53 +00:00
Tamas Zakor
5ded4e35db cups: Add a QT_CONFIG(dialogbuttonbox) guard
This fixes build with -no-feature-action configuration.
The corresponding dialog is added by:
6c5c1a562c cups: Show a dialog when asked for password

Change-Id: Ic88bdd62c756749959e66252427b5edc2c3ce7cc
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-23 09:48:03 +00:00
Mitch Curtis
972dd1c544 Doc: fix typo in QNativeGestureEvent docs
Change-Id: I83ac3463752488d7dbb758ea767ba186ddd3fa2a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-23 09:36:21 +00:00
Andre de la Rocha
38cb72b6fd Windows QPA: Force windows to the main screen in certain AMD GPU setups
A multi-screen setup with an AMD adapter set as the 'main display' leads
to using the AMD drivers for OpenGL. This then causes a crash when calling
SetPixelFormat and similar for windows located on another adapter's
screen. This workaround detects the conditions leading to the crash and moves
the window to the main display.

Task-number: QTBUG-50371
Change-Id: I4007c490bdcdc13d6e8bce82983b150aa4930338
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-23 09:32:32 +00:00
Tony Sarajärvi
c9c770d775 Extend blacklisting of tst_QWidget::maskedUpdate to cover all openSUSEs
Fails on previous 42.3 and also 15.0. Just covering "opensuse" saves
us from new commits every time we upgrade our openSUSE. We have a bug
open of it after all.

Task-number: QTBUG-51399
Change-Id: I5c0869daea41b1886faba3d0caaa0804a3705d54
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-22 14:32:55 +00:00
Allan Sandfeld Jensen
991b251e39 Fix big-endian build of qopengltextureuploader
Badly placed endif and lacking a break statement.

Change-Id: Id6a3fb13b40e8ae8029e74f7668bafb6e0b9dd06
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-22 14:32:45 +00:00
Liang Qi
ee51a2c4dc tests: blacklist tst_QDialog::showFullScreen() on macOS 10.13 in CI
Task-number: QTBUG-70109
Change-Id: I70b998c1853462f8ea2037cff59e9598923743e5
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2018-08-22 14:32:38 +00:00
David Faure
5a1861399b QFileDialog: make QFileDialog::selectFile resolve remote dirs correctly
The code was assuming local files, and broke with remote dirs.
Testcase: `kwrite sftp://localhost/tmp/file.txt` and then Ctrl+O,
the initial directory was $PWD instead of the remote dir.

Change-Id: Ie24d4c1b2b3278dce44274af0066105bd1bf9b34
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-22 11:26:12 +00:00
Liang Qi
9be1256e0c Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12 2018-08-22 10:31:09 +00:00
Allan Sandfeld Jensen
dc82a0f4f3 Smooth image scaling for 64bit images
Adds support for smooth scaling 64bit images.

Task-number: QTBUG-45858
Change-Id: If46030fb8e7d684159f852a3b8266a74e5e6700c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-08-22 10:03:15 +00:00
Luca Beldi
02b3d43fd4 _q_interpolate<T> is unsafe with unsigned template arguments
_q_interpolate<T> subtracts 2 arguments of type T,
for unsigned types this can cause wrapping around

Task-number: QTBUG-57925
Change-Id: Iffa59f413579a3d5de8cb728fe71443d8e8a04aa
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-08-22 08:38:44 +00:00
Liang Qi
7533156b68 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/gui/text/qtextengine.cpp
	tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp
	tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h

Change-Id: Ib9f968edbb0f3387c89bc25e914321d0738bfadc
2018-08-22 10:35:12 +02:00
Mitch Curtis
76c328b2b3 Fix spacing in << operator for QEvent
Turns

     QNativeGestureEvent(ZoomNativeGesturelocalPos=686.855,312.836,
         value=0.0259857)

into

     QNativeGestureEvent(ZoomNativeGesture, localPos=686.855,312.836,
         value=0.0259857)

Change-Id: Id30860a3c7a1b6da583369126a31934ddb32d4b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-21 14:45:58 +00:00
Allan Sandfeld Jensen
07eda676e4 Fix big-endian build
Declare rbSwap<QImage::Format_RGBA8888>, so we don't end up in a
fallback definition not used by little-endian.

Task-number: QTBUG-69951
Change-Id: I8512bba76da7d59a27593d37c70283d881c3e8fc
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-21 13:31:44 +00:00
Friedemann Kleint
cf0ea18ac4 QWidgetWindow: Ensure Qt::WA_Mapped is set on obscured parent widgets
Frameless obscured windows do not receive WM_PAINT/expose events on
Windows. Qt::WA_Mapped needs to be set on them to ensure updating works.

Task-number: QTBUG-39220
Task-number: QTBUG-52039
Task-number: QTBUG-58575
Task-number: QTBUG-63927
Change-Id: Ic6c11f2be96378b6a6b61296f1f3e13cd49b50a6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-08-21 13:18:07 +00:00
Christian Kandeler
5be5b798b2 androiddeployqt: Add auxiliary mode
In this mode, library and other dependencies are copied into the build
directory, and the XML templates in the build directory are updated
accordingly, but the project is not built or installed.
Needed by qbs.
No existing code has been touched.

Change-Id: Ib8015f7c2315b39dfb21750fecc8618bce03cb8c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-08-21 08:24:53 +00:00
Friedemann Kleint
65b95b61d6 MinGW: Exclude failing value of tst_QEasingCurve::setCustomType()
After updating MinGW toolchain from 5.3.0 to 7.30 test starts to fail.

Task-number: QTBUG-69947
Change-Id: I850d854b27e1cb4e1dd2cb600e8e79bd18bff4a0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-08-21 07:12:19 +00:00
Friedemann Kleint
81d6cf71cc Windows QPA: Add option to detect AltGr key presses
According to MSDN, AltGr key presses are sent as a
sequence of SYS left Ctrl + right Alt.

Add an option to detect AltGr as modifier key.

Task-number: QTBUG-69317
Change-Id: I30ce169d2e6dbbae194ff714abfbc732b53652ce
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-08-21 06:30:53 +00:00
Heikki Halmet
d3dc3e7743 Extend blacklisting of qeventdispatcher to cover WinRT
They have been blacklisted on windows and macOS previously. Now failing
on WinRT as well.

Task-number: QTBUG-69962
Change-Id: I30ca23005b082e820ee896fa36a8984a1536ad6b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-08-21 05:39:39 +00:00
Oswald Buddenhagen
5a03b75c50 Merge dev into 5.12
Change-Id: I63f632b595f66d2fc93e9aa713500e3799e3df2a
2018-08-21 02:32:50 +02:00
Albert Astals Cid
0e7724079f Allow setting the QIcon fallback theme
This allows apps that know their icons are
in a given icon theme to set that theme as
fallback, so in case the user theme does
not include them, the icons can still be found.

This solves the problem of missing icons
that often happens when running KDE applications
on a GNOME desktop.

Change-Id: I4e5543d598012352a29ff79dab0357506d986b6d
Reviewed-by: Dominik Haumann <dhaumann@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-20 21:42:58 +00:00
Friedemann Kleint
67cc8fea10 XCB: Do not create instance of QPlatformIntegration for invalid displays
Extract a static factory for QXcbConnection objects and pass
potential connection errors to qxcbmain.cpp, which will then return 0.

Task-number: QTBUG-68859
Change-Id: I9c0faf82462a78a576360c19bef251ad1d034d84
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-08-20 16:52:29 +00:00
Rolf Eike Beer
6553921dd5 QWindowsStyle: respect rectangle when drawing PE_IndicatorViewItemCheck
The hardcoded value is based on the values set in qcommonstyle.cpp, but
in case this is changed using a proxy style the actual values are not
respected. They would even be wrong if nothing is changed but
QStyleHelper::dpiScaled(13.) does not return 13.

Change-Id: Ib451d07800b3b4e8cafd1f4fef84cd9bf02f9bba
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-20 13:02:41 +00:00
Alexander Shevchenko
2d3098f77c Fix qtbase build for Windows ICC with MSVC 2017 15.8
After 0ef66e98cc was merged, the same should be done to
Windows ICC toolchain.

Task-number: QTBUG-69997
Change-Id: I1d76d8b59f87151a9064d9f7dcc3136dc1215633
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-20 11:42:59 +00:00
Kai Koehne
2a9223830c Doc: Remove duplicate thread-safe documentation from logging macros
qdoc now handles \threadsafe also for macros, so we can remove the
explicit \note.

Change-Id: Iabeb7f69d237e7024a4f584adc516951b06d752b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-08-20 10:43:45 +00:00
Johan Klokkhammer Helsing
b9923b30f0 tst_QWidget: Explain why some tests fail on Wayland
Task-number: QTBUG-66849
Change-Id: Ie6295bd402f6bc960c16f1e4b3b5a786017453e1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-20 10:04:22 +00:00
Edward Welbourne
1acafb1207 Use std::partition_point for faster searches among transitions
QTzTimeZonePrivate's methods were iterating transitions from first to
last, or last to first, to find where .atMSecsSinceEpoch crossed some
threshold; but the transitions are sorted in order of increasing
.atMSecsSinceEpoch, so binary chop would be more efficient than such
linear searches.  So use std::partition_point() instead.

Change-Id: I65c43cb20fca6685a22ea52a4ca2f1089c128ebf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-20 09:27:27 +00:00
Edward Welbourne
98b030fc95 Scale a correction by a factor of a thousand that it was missing
The difference between two transitions' offsets is measured in
seconds, but we add it to a time in milliseconds; so it needs to be
scaled to fit.  Fortunately rarely enough applied that it hadn't
caused any reported problems.

Change-Id: I11f9f9e46d43d748220e072ad7504d4c8c5bf192
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-20 09:26:33 +00:00
Edward Welbourne
e4cee4bd57 Add some local const variables to save some repeated computation
QTimeZonePrivate::dataForLocalTime() makes repeated use of the times
sixteen hours before and after the target local time, so compute those
up front once instead of each time they're needed, giving them
expressive names and making code terser.

Change-Id: I4b682cc6de2adb98c3ee5489eec4b63ac1090961
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-20 09:26:10 +00:00
Edward Welbourne
4932cef5b8 Cast away -Wclass-memaccess warnings in QVarLengthArray methods
With g++ 8.2.0, I get warnings when a QVarLengthArray<QString> calls
remove() or prepend(), as some tests in tst_QVarLengthArray do, as
they call memmove() "writing to an object of type ‘class QString’ with
no trivial copy-assignment; use copy-assignment or copy-initialization
instead"; which may indeed be a good argument for not using
QVarLengthArray<QString>, but its own tests do.

Change-Id: I4f8a64948b32a54e67a285df4ec7788f60739ffb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-20 09:08:50 +00:00
Kai Koehne
54d062160d Document version of copied valgrind, kernel headers
Task-number: QTBUG-69276
Change-Id: If2d5d796fd9d414a41036187a178d88c2e93b5ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-20 07:50:04 +00:00
Eike Ziller
67984b265a QMimeDatabase: Fix MIME detection issues with magics in MIME hierarchies
Assume two MIME types A and B are registered, both with the same glob
pattern, A being parent of B, A with some magic rule, and B with another
magic rule. Given a file that matches the glob pattern and the magic rule
of A, the resulting MIME type depended on the order of registration of A
and B, because it would just check if some glob matching MIME type was
also a subclass of the magic matching MIME type.

The patch prefers the the MIME type that matches by magic if that
matches by glob pattern as well (i.e. A in our example).

The "recommended checking order" of the spec does handle that case.

Task-number: QTBUG-44846
Change-Id: I2af43f6199faf9a42cd9c35d3a045441afbd6217
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-20 07:32:58 +00:00
Edward Welbourne
fe9a37ac48 QTimeZonePrivate::dataForLocalTime(): cope with negative DST offsets
The tz database's latest update now records the cases where summer
time is deemed standard and winter-time is deemed DST.  (This doesn't
change what the offsets are, just how they're described.)  The
resulting negative DST offsets mess up the algorithm for converting
local time to UTC, causing tst_QTimeZone::transitionEachZone() to fail
for Europe/Dublin in the hour before its transition; so refine the
algorithm to cope with the new case.

Task-number: QTBUG-69980
Change-Id: I24003872fffb03b2903161859158d0ce998b3073
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-20 06:04:25 +00:00
Samuel Gaist
346c15102b Add support for QRegularExpression to QSortFilterProxyModel
This patch implements the support for QRegularExpression in
QSortFilterProxyModel.

[ChangeLog][QtCore][QSFPM] QSortFilterProxyModel now supports
QRegularExpression.

Task-number: QTBUG-46810
Change-Id: If932d55f98f9b8bcf3a72c03ffd51da52cb50ad1
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-19 11:38:42 +00:00