summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Respect maximum window size when computing zoomed state geometryTor Arne Vestbø2018-05-291-7/+17
| | | | | | | | | | | | | | | | | | | | | AppKit will normally compute this automatically based on the contentMaxSize property of the NSWindow, which we set correctly based on the window's maximum size, but since we ignore the frame proposed by AppKit (due to not working for borderless windows), we need to take the maximum size into account ourselves. We follow the lead of QCocoaWindow::propagateSizeHints(), and interpret the window's maximum size as referring to the client area size, not including the frame geometry, but AppKit expects the NSWindow's frame, so we need to manually add the frame. In addition, AppKit expects the frame in the native coordinate system, so we need to map to it. This was an existing bug, that never manifested before taking the maximum size into account. Task-number: QTBUG-67376 Change-Id: Id4cf6ff5640610f809472e5b1d591b4ec17df602 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* iOS: Send window-system event also when embedded in native iOS appTor Arne Vestbø2018-05-293-32/+50
| | | | | | | | | | | The iOS event dispatcher has been split into two; one dealing with the QPA event processing, which we should always do, and one dealing with the longjumping that we do when running the user's main on a separate stack. Change-Id: I1f819db33c608aad130ff23cbbadcf84363a32d2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 5414d372d42278b146ce1cdf1096c4e91e7039ad)
* iOS: Don't assume our UIWindow is a QUIWindowTor Arne Vestbø2018-05-291-1/+2
| | | | | | Change-Id: I6494e4a476273b131aedcf409abdb1ffffa5b62e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit ab9b026d2734321f1d5a06b79f97107a867687c3)
* macOS: Fix QFileSystemWatcher to watch paths with the same prefixMikhail Svetkin2018-05-291-1/+1
| | | | | | | | | It happens because our filesystemwatcher thinks it is subdirectory and not two different paths Task-number: QTBUG-60676 Change-Id: Ic753e9481cb26303a030044e0a5ab4d703bc529f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* QSortFilterProxyModel: don't assert when old model gets destroyedChristian Ehrlicher2018-05-261-1/+4
| | | | | | | | | | | | | | When a new model was set with setSourceModel() and the mapping was built up, the destruction of the old model caused a reset in the QSortFilterProxyModel which lead to an empty view or an assertion. Now we properly disconnect the old model again and also clean up the old mapping/persistent indexes when a new source model is set. Task-number: QTBUG-44962 Task-number: QTBUG-67948 Task-number: QTBUG-68427 Change-Id: I2e0612899c210bde3ac0cfa59aefd78269deee5b Reviewed-by: David Faure <david.faure@kdab.com>
* Fix build for Android with android-clangLiang Qi2018-05-251-1/+1
| | | | | | | | | | | | | kernel/qnetworkinterface_linux.cpp:204:17: error: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'qsizetype' (aka 'int') [-Werror,-Wsign-compare] if (NLMSG_OK(hdr, len)) ^~~~~~~~~~~~~~~~~~ This amends 09cb23f342fd2eae7ca85a99fa0a10b7ab103443. Change-Id: Ib966a60b7a7117d63ed758cba7b556abd90eca0c Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add translation for unsupported_android_version for fr and deSamuel Gaist2018-05-252-0/+2
| | | | | | | | | | | | More recent versions of Android lint triggers an error when a translation is missing. The solution is to either provide translations for all languages supported or add translatable="false" as property to the strings that are not yet fully translated. Task-number: QTBUG-63952 Change-Id: I5afa8a23d3e2285b5c93ee493d9b02397c328f2d Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix build if openssl is configured with no-des or no-rc2André Klitzing2018-05-243-16/+37
| | | | | | | | | A custom build of openssl can disable DES or RC2. This allows to build Qt against those builds. Change-Id: I9b91c943fab4d217a791381e81a7d87a9ff5031a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Http/2 - remove unused 'compressedData'Timur Pocheptsov2018-05-241-1/+0
| | | | | | | | and thus reduce memory consumption, allocations etc. Task-number: QTBUG-68394 Change-Id: Ibad9b01a1e709e6abafcd9531fbcfc1eafa9cff3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix potential 16-bit integer overflowAllan Sandfeld Jensen2018-05-231-4/+4
| | | | | | | | | | | When multiplying a float in [0;1[ with (1<<16), with rounding, it might end up being rounded to 65536 even if the input was under 1. This patch uses a floor operation to make sure the value can be in a ushort, and cleans up the surrounding code so it is clearer what it does. Task-number: QTBUG-68360 Change-Id: I2d566586765db3d68e8e7e5fb2fd1df20dabd922 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QLocale: only use LANGUAGE if it contradicts LC_ALL/LC_MESSAGES/LANGEdward Welbourne2018-05-231-3/+31
| | | | | | | | | | | | | | | | | | | | | If LANGUAGE specified only the language, without any script or country, and matched the value we'd got from other environment variables, we were throwing away their knowledge of script and country, leading to falling back on the default script and country for that language, which might be at odds with what other environment variables had told us. Changed to only use LANGUAGE if it contradicts (or extends) what we would otherwise have used. Clarified some comments in the process. [ChangeLog][QLocale][Unix] When using LANGUAGE would lose information about script or country, without changing language, use the locale implied by LC_ALL, LC_MESSAGES or LANG. Prompted-by: Safa AlFulaij <safa1996alfulaij@gmail.com> Change-Id: Ie433e57ae6b995abafd05c931136cc9796494895 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWin32PrintEngine: Fix crash in drawPixmap(), drawImage()Friedemann Kleint2018-05-231-8/+2
| | | | | | | | | | | Use the printer's HDC instead of the screen HDC for StretchBlt(). Patch as contributed via bug report. Task-number: QTBUG-59689 Task-number: QTBUG-66325 Change-Id: I9b5d6ddd3f0e9e68f2a003ca9ed20ece20dccef8 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* doc: Explicitly mention that QSqlRecord fields are generated by defaultAndy Shaw2018-05-231-6/+6
| | | | | | Task-number: QTBUG-38460 Change-Id: I5982d018ebf239eb95dba59e2c5559bf5b5ce6ca Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Document the WA_ContentsMarginsRespectsSafeArea widget attributeVenugopal Shivashankar2018-05-231-1/+8
| | | | | | Task-number: QTBUG-68153 Change-Id: Ie4fa1a4e06ff5ee506e1d7788c245b7add776bd6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QTemporaryFile: Disable O_TMPFILE on AndroidThiago Macieira2018-05-221-1/+2
| | | | | | | | | | | We require linkat(2) to materialize the file and that is (stupidly) filtered. See 138d34b9c8aa368dd252d0c46393816c7e372837 and QTBUG-64103. Task-number: QTBUG-68344 Change-Id: I052407b777ec43f78378fffd152fd8822761b452 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* egl: Add ES3.2 direct function pointersJanne Koskinen2018-05-221-0/+47
| | | | | | | Task-number: QT3DS-1738 Change-Id: Ib582d37717618104e10535bae8dea87e2e98b2ce Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix documentation of Q_NAMESPACEOlivier Goffart2018-05-221-0/+1
| | | | | | | We need to add the \relates command otherwise it won't appear in the documentation Change-Id: I134776c1528445761a7539cf687e4855d39eb7a7 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* qt_is_ascii: improve isAscii a little further (QUrl, QLatin1String)Thiago Macieira2018-05-201-5/+12
| | | | | | | | | Turns out that the non-AVX2 code was beating the performance of the AVX2 because the simdTestMask function did a little too much. So just use the same VPMOVMSKB technique for it. Change-Id: I0825ff5b5f6f4c85939ffffd152f3b636ab998db Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* ibase: Don't use deprecated QSqlError constructorAndy Shaw2018-05-181-1/+2
| | | | | | Task-number: QTBUG-68330 Change-Id: Ie6ece8574462699fca401139ea00f1925b0a440b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.11.0' into 5.11" into ↵Qt Forward Merge Bot2018-05-181-0/+2
|\ | | | | | | refs/staging/5.11
| * Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-181-0/+2
| |\ | | | | | | | | | Change-Id: Idfb5542f76cfd5ccda7521e529505e5a4a54c797
| | * QFileSystemEngine: don't try to use statx(2) if SYS_statx isn't definedv5.11.0-rc2v5.11.0Thiago Macieira2018-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | If glibc's <unistd.h> does not define SYS_statx but <linux/stat.h> did define struct statx and related constants, we failed to compile. Task-number: QTBUG-68205 Change-Id: I04a43ee94975482f9e32fffd151e66bbe6988554 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Documentation: Fix URLs to GL(ES) functionsFriedemann Kleint2018-05-181-358/+358
|/ / | | | | | | | | | | | | | | Replace the XML pages which are typically displayed as broken by the XTHML pages. Strip some suffixes. Change-Id: Idf2b9706f169484c659582a1a2d38904d5dd81aa Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Add support for QSharedPointer<cv qualified>::create()Thiago Macieira2018-05-171-4/+7
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QSharedPointer] Fixed a problem that made create() on a type with const qualification fail to compile. Task-number: QTBUG-68300 Change-Id: I0825ff5b5f6f4c85939ffffd152f3e55e5b9caae Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | sqlite: Allow for duplicated placeholders with just one placeholderAndy Shaw2018-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | This accounts for a case of a placeholder being duplicated in the prepare query, but where only one placeholder was used. This amends e4e87a2ece1e0c9901514fea094f31863b64b570 Task-number: QTBUG-68299 Change-Id: Ia92ee912facd51a13e7222886debb219b24442b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Windows Platform: Redirect wheel event to a window under mouse cursorAlexandra Cherdantseva2018-05-161-3/+17
| | | | | | | | | | | | | | | | | | | | | | Revert a part of af5c8d04fb0c9ddda58925e4862e857c78a5e563 which affected mouse wheel event redirection. Task-number: QTBUG-63979 Change-Id: Ice88675aadbb8a7477b3758a607db5979d62562c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandra Cherdantseva <neluhus.vagus@gmail.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Windows QPA: Fix wrong initial size when launched on secondary screenFriedemann Kleint2018-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | Send changed events from QPlatformWindow::initialize() synchronously so a protentially changed screen takes effect in QWindow::resize() called by QWidget::show_sys(). Task-number: QTBUG-67777 Change-Id: I889500d458caf0e782bdbc237ce790f0b0bc2d95 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Fix build for Android with android-clangLiang Qi2018-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | kernel/qnetworkinterface_linux.cpp:172:18: error: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'qsizetype' (aka 'int') [-Werror,-Wsign-compare] if (!NLMSG_OK(hdr, len)) ^~~~~~~~~~~~~~~~~~ kernel/qnetworkinterface_linux.cpp:197:26: error: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'qsizetype' (aka 'int') [-Werror,-Wsign-compare] } while (NLMSG_OK(hdr, len)); ^~~~~~~~~~~~~~~~~~ Change-Id: I3d0a4efc9fc42dd9b0726f2b62ff494220b8026e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Fix build for Android with android-clangLiang Qi2018-05-161-0/+4
| | | | | | | | | | | | | | | | | | | | dialogs/qprintdialog_unix.cpp:149:15: error: private field 'm_printer' is not used [-Werror,-Wunused-private-field] QPrinter *m_printer; ^ Change-Id: Idce515a3e66019756b6ad2d305072e0a89bb823b Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | ucstrncmp: refactor with 32- and 8-byte loadsThiago Macieira2018-05-151-16/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First of all, this removes the UB that used to try and calculate the distance between the two strings. That's a valid technique in assembly, but dangerous in C++ and totally unnecessary. The compiler is perfectly able to generate loops with a single induction variable all on its own. Second, this commit makes the main loop use 32-byte comparisons (16 characters at a time), which is a reasonable size for strings. We use AVX2 if that's available, or an unrolled pair of 16-byte loads otherwise. After the existing 16-byte comparison, this commit inserts an 8-byte (4-character) comparison and then reduces the final, unrolled comparison to just 3 characters. Change-Id: Ib48364abee9f464c96c6fffd152e474b39e1f293 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | qlalr: fix build in C++17Thiago Macieira2018-05-152-4/+5
| | | | | | | | | | | | | | | | std::unary_function and std::binary_function are gone. Remove their uses. Change-Id: I5d0ee9389a794d80983efffd152c96f0f2149b40 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QtTest: compile in C++17 mode: no more std::unary_functionThiago Macieira2018-05-151-1/+1
| | | | | | | | | | Change-Id: I5d0ee9389a794d80983efffd152cbce4da448ddf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QMacStyle: remove unused qlibrary.h includeJ-P Nurmi2018-05-151-1/+0
| | | | | | | | | | | | | | | | Fixes build with -no-feature-library, because the qlibrary.h header contains QT_REQUIRE_CONFIG(library). Change-Id: If64ece8bd77e8824b86dc91f95dd9062cb2a1644 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Fix filter parsing in flatpak FileChooser portalJan Grulich2018-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | Filters are usually in format (Name (*.foo *.bar)), but valid filter is also (Name ( *.bar *.foo )), containing additional spaces. When we split content in the brackets divided by spaces, there will be then empty strings which we need to filter out, otherwise the result we send over DBus is not valid. Change-Id: Iaa265189408f47324bc9b269d534bf4c8d7d2cae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFusionStyle: Fix width of editable combo boxFriedemann Kleint2018-05-151-1/+1
| | | | | | | | | | | | | | | | Add a scaling overlooked in 63d08003cf06b84b871618ba800a7079ae6bf702. Task-number: QTBUG-68194 Change-Id: I97c771435e4316ec55aacc527335b62cb4dfd9ec Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Fix build without features.cursorTasuku Suzuki2018-05-152-11/+17
| | | | | | | | | | Change-Id: I450bd9f160c64f718c49e87d274c1ccc4a657aca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Fix Android loaderThiago Marcos P. Santos2018-05-141-5/+10
| | | | | | | | | | | | | | | | | | Invalid syntax due to missing closing brackets and exception not being handled when calling .close() on a stream. Change-Id: If8f191fbc44fe1b031fd86abff5163bca434156a Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Treat the Content-Disposition header as a known headerAndy Shaw2018-05-141-0/+3
| | | | | | | | | | Change-Id: I307f67b10759d17f603a340b14266ab47d195497 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QJsonDocument: Avoid overflow of string lengthsJüri Valdmann2018-05-141-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The added test case contains the binary JSON equivalent of ["ž"] with the modification that the string's length has been set to INT_MAX. In Value::usedStorage this length is used through the pointer d like so s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d); Because 2 * INT_MAX is UINT_MAX-1, the expression as a whole evaluates to 2, which is considered a valid storage size. However, when converting this binary JSON into ordinary JSON we will attempt to construct a QString of length INT_MAX. Fixed by using String::isValid instead of Value::usedStorage. This method already takes care to avoid the overflow problem. Additionally, I've tried in this patch to clarify the behavior of Value::isValid a bit by writing it in a style that is hopefully more amenable to structural induction. Finally, the test case added in my previous patch had the wrong file extension and is renamed in this one. Task-number: QTBUG-61969 Change-Id: I45d891f2467a71d8d105822ef7eb1a73c3efa67a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QByteArray::setNum: use the existing latin1 lowercasing tableThiago Macieira2018-05-131-15/+3
| | | | | | | | | | | | | | Not sure this makes the code faster, but it removes two functions. Change-Id: I5d0ee9389a794d80983efffd152d830da44b1bfe Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QString: fix off-by-one errorThiago Macieira2018-05-101-4/+4
| | | | | | | | | | | | | | | | | | The check for having N valid characters is ptr + N <= end, because ptr + N == end indicates that we have exactly N characters in the string. Change-Id: I5d0ee9389a794d80983efffd152d28d5aa485ce4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-097-23/+210
|\| | | | | | | Change-Id: Id6e2acd5e31c1ac858ddf1d8873a6f10694141de
| * QSysInfo: Correct the \since for {machine,boot}UniqueId()Thiago Macieira2018-04-251-2/+2
| | | | | | | | | | | | | | | | The code was written before 5.10 was released, but took long to be merged. Change-Id: If90a92b041d3442fa0a4fffd15286fe079b058e1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Fix documentation of setBackendConfigurationOptionAndré Klitzing2018-04-252-5/+5
| | | | | | | | | | | | | | | | Introduced by mistake in f55c73ede28d4455f555a28e401407326ac9b954 Change-Id: Ieac8fc0a6bb536e5ef3770a22785fe41d4033ee9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Merge 5.11 into 5.11.0Oswald Buddenhagen2018-04-2018-236/+213
| |\ | | | | | | | | | Change-Id: I11c61dc1259ed66d871ecab2666085ccf37a9342
| * | Document libdbus-1 code in Qt D-BusKai Koehne2018-04-203-1/+178
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Third-Party Code] Libdbus-1 code in Qt D-Bus is now properly documented. The code is licensed under AFL-2.1 OR GPL-2.0-or-later. Change-Id: I38bd6f38175562fff03ae84fc7a5c435de4cb972 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Also support reset notification on non-nvidiaAllan Sandfeld Jensen2018-04-191-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | In 5.11 robustness was added for nvidia drivers, this patch extends that to other opengl drivers, and fixes the reported format. Change-Id: Ia81934c3bcf13e7300fb4e75674ea63317039870 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Fix build with GCC 8: memset/memcpy/memmove of non-trivialsThiago Macieira2018-05-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | qarraydataops.h:73:17: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct TCBPoint’; use assignment or value-initialization instead [-Werror=class-memaccess] Change-Id: I5d0ee9389a794d80983efffd152ce10eb557341f Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | | Fix build without features.completerTasuku Suzuki2018-05-091-0/+2
| | | | | | | | | | | | | | | Change-Id: Idc79921f85a920bc8c1280513ce78ee0cb00d415 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | qlalr: Fix startup crash in static buildsFriedemann Kleint2018-05-086-51/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the global variables qout, qerr by a functions to delay the initialization. Task-number: QTBUG-68166 Change-Id: Ib023da1bccc7eabc6e633ccb8945e5f209c5765e Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>