- three more tests cases on expected .qrc generation
- a new test comparing data read via resource with
the same data directly read from the original file
Change-Id: Ic34e68c9fc3fa110110161b57d4129ae44419020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
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>
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>
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>
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>
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>
Implemented the virtual method moveRows to allow row movement
[ChangeLog][QtCore][QStringListModel] Implemented moveRows
Task-number: QTBUG-69807
Change-Id: I518f48a321bd755ab56f2fe84883d27324cc42ec
Reviewed-by: David Faure <david.faure@kdab.com>
We iterate theoretically many sources (albeit there's only really ever
one) for this data, so accumulate instead of only keeping the last
(and initialize it as the list it always ended up being, not a
dictionary, so that this can work).
The form of each token is a locale name, so it may be lang_Script just
as readily as lang_LAND; so parse (and validate) the tags more
faithfully to catch both cases. Abstract that parsing into a function
and use it in both places that need it.
Change-Id: Ibdbc4eafefab6a5ef70646d9fea150f2cb408d05
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
PEP 8 wisely advises against the use of naked except: (unless
re-raising the error).
Change-Id: Ia0dfdb48b330d33ad370bdb9f6b205046aa919da
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
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>
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>
On MSVC2015 Q_DECL_CONSTEXPR is defined as empty.
Change-Id: I8beb919f75cf2066ffc7ac10d5abfaa1712fc1bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We want to store the metadata size and get it from the plugin in Qt 6.
Change-Id: Ieb48f7c0dd0e4e0fb35efffd153bebc2914d9a3c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
QRegularExpression doesn't offer a direct equivalent of QRegExp's exact
match.
There are several places in the Qt sources that use this feature. This
patch implements a small helper function that builds the expression as
recommended in the documentation and updates the related code.
[ChangeLog][Core][Tools] QRegularExpression now provides
anchoredPattern() which is a helper function to build regular
expressions used for exact matching.
Change-Id: Idbbf142c4c5cb9b62abf8229f4ce85fd4409e5d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Avoids polluting the global namespace
Change-Id: Ie01831ddac5446fdbdeefffd15468b5ca22d5e7b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
[ChangeLog][Widgets][Dialogs] QFileSystemModel now uses
QRegularExpression internally for wildcard matching. Note
that QRegularExpression might not give the exact same
result as QRegExp as its implementation follows strictly
the glob patterns definition for wildcard expressions.
Change-Id: I6ca893833ff7b5b7f678221bb9bc623fd17c1cfa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The match method still uses QRegExp. This patch updates the code to use
QRegularExpression and translates the wildcard patterns to a suitable
form for QRegularExpression.
[ChangeLog][Core][QDir] QDir now uses QRegularExpression internally for
wildcard matching. Note that QRegularExpression might not give the
exact same result as QRegExp as its implementation follows strictly the
glob patterns definition for wildcard expressions. Nevertheless, the
tests for QDir return the same results as before.
Change-Id: I095959443ac7362f7534e35454eff038061fca82
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This patch refactors the wildcardToRegularExpression method to generate
a simpler regular expression. It also fixes some shortcomings of the
previous implementation.
Tests have been updated to ensure all cases are properly supported.
Change-Id: I454e3fe8fe0bb663b2f319d6fa2fa8aec626c50d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>