summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Compile GUI kernel snippetsPaul Wicking2020-08-288-6/+146
| | | | | | | | | Fix minor issues (e.g. whitespace, missing semi-colon) in passing. Change-Id: I103a81a1a5acbfa1ece083a467d23a8544cf647a Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: drop obsolete snippetPaul Wicking2020-08-281-10/+0
| | | | | | | | | QApplication::setColorSpec is obsolete. Drop the unused snippet to avoid clutter when compiling snippet file (multiple main entry points, etc.) Change-Id: I5e34cc69aa6f1ccae248f625caa1528e70cb836e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Compile standard item model snippetsPaul Wicking2020-08-282-1/+31
| | | | | | | | | Fix minor issues (e.g. whitespace, missing semi-colon) in passing. Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Change-Id: I46301d37112bddcd38dbff9940d0c22eaae74208 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Compile image snippetsPaul Wicking2020-08-289-15/+119
| | | | | | | | | | | Fix minor issues (e.g. whitespace, missing semi-colon) in passing. Update documentation to use same snippet to avoid duplication of snippets across snippet files. Remove offending snippet. Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Change-Id: Ia45549d50e8f4e22ce72667a19c38132306d38b3 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Compile coordinate system snippetsPaul Wicking2020-08-282-2/+38
| | | | | | | | | Fix minor issues (e.g. whitespace, missing semi-colon) in passing. Change-Id: I8b765c2d2889cae91543c865f3b9df845ef6205b Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Compile more GUI snippetsPaul Wicking2020-08-282-1/+11
| | | | | | | | | | Compile snippets from snippets/code. Fix minor issues (e.g. whitespace, missing semi-colon) in passing. Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Change-Id: Ifbdd5c3152e84c608a6562f4061075b61331a5d6 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Remove unused snippetPaul Wicking2020-08-281-8/+0
| | | | | | | | | The snippet isn't used anywhere. Remove it. Change-Id: I56fdadaeb115e4e865476cf2b40e355f753dddf7 Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Remove unused snippetPaul Wicking2020-08-281-10/+9
| | | | | Change-Id: Ie7a904fac93ea991820795852cd4dcf175bffe21 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Compile rich text code snippetsPaul Wicking2020-08-283-2/+25
| | | | | | | | | | Extend GUI snippet compilation by adding rich text snippets from /code sub-directory. Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Change-Id: I4f3c978cc1c9042767fda9e33719042e18fd4bee Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Compile textdocument-end snippetsPaul Wicking2020-08-284-10/+15
| | | | | | | | | | | | * Extend GUI snippet compilation with textdocument-end snippet. * Rename the snippet file and replace main() with wrapper(). * Dedent the snippet itself. * Update documentation that includes the snippet. Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Change-Id: Id5e5b284587da1e7fdfd00baa9c899626832a113 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Compile qfontdatabase snippetsPaul Wicking2020-08-284-30/+31
| | | | | | | | | | | | * Extend GUI snippets by adding the qfontdatabase project. * Rename the snippet file and replace main() with wrapper(). * Minor adjustments of the snippet itself. * Update documentation that includes the snippet. Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Change-Id: Id23aff01a4c919c5264f7059971cb63398c2298c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add skeleton project for GUI snippetsPaul Wicking2020-08-281-0/+6
| | | | | | | Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Change-Id: I4bd1f2f56561298573ae57adb149d77e374d8449 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* qmake: Do not pass -mthreads to ClangOrgad Shaneh2020-08-282-2/+3
| | | | | | | | | It is not supported. Warning: argument unused during compilation '-mthreads'. Change-Id: I6de147c15dbf3c7f416b233e739ce2de183701af Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix rpath for Qt internal applications (non-bootstrapped tools)Joerg Bornemann2020-08-281-0/+4
| | | | | | | | | We need to call qt_apply_rpaths for targets that are created with qt_internal_add_app too. This is in line with what qt_app.prf does. Task-number: QTBUG-85399 Change-Id: If5ffb05cca191c6cae9a330e1f4556d342a68ff8 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: enable androiddeployqt to get the host's rcc binary pathAssam Boudjelthia2020-08-282-3/+26
| | | | | | | | | | Since Qt 6 CMake installs the host and target into separate directories, androiddeployqt fails to get the correct path to rcc. This change includes the host's rcc binary path in deployment-settings.json. Task-number: QTBUG-85399 Change-Id: I610bb6fea1180a119e4c0ceb75bf78c175ae430e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Avoid inifinite recursion call in tst_Compiler::cxx11_noexceptTor Arne Vestbø2020-08-281-1/+2
| | | | | | | warning: all paths through this function will call itself [-Winfinite-recursion] Change-Id: I70008710a7448ffd532bb6c3acb488fe439cb807 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove tst_QGLTor Arne Vestbø2020-08-281-2525/+0
| | | | | | | | | It was left out of the build in f08038fca79b0828da11fbf35f4165d6efa4de2f but not removed. It doesn't make sense to keep it, as the classes it tests have been removed. Change-Id: Ic36a066eb092d8b9b40c645de649af9dcaab4ff2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: Fix documentation warnings for Qt GUITopi Reinio2020-08-2834-104/+106
| | | | | | | | | | | | * Drop deprecation warnings for now-dropped items * Use the 'qt6' define and a new \nothing doc macro to conditionally document items on Qt 6 * Add a custom module header for docs that pulls in also Vulkan headers * Add \internal command for internal classes/functions * Move QtGUI-related code snippets from widgets to gui docs Change-Id: Ieb386b96631a49568d09059906d307c45c01d93a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Android: add option to get app arguments with AndroidManifest.xmlAssam Boudjelthia2020-08-286-2/+254
| | | | | | | | | | | AndroidManifest.xml file and the Android plugin already has a way to provide commandline-arguments to app with the tag "android.app.arguments". This change allow to set it from qmake/cmake and allow Qt Creator to use that. Task-number: QTCREATORBUG-23712 Change-Id: I3e680f40fd36ba6aaac7f344fb9509d2c3360e74 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* qnetconmon: Downgrade Warning to DebugMårten Nordheim2020-08-281-1/+1
| | | | | | | | | It triggers when connecting to localhost (or when using socks proxy) and is nothing you can act on most of the time, so change it to qCDebug. Change-Id: I669fbde4fa0ed194703ea6a4dab13790aa771852 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove "internal" parameter in QTextLine::draw()Jonas Karlsson2020-08-282-6/+13
| | | | | | | | | | The method is split up into a private and public version, where the parameter is moved into the private method. Fixes: QTBUG-84210 Change-Id: I79e9e02c9b4cc25d31db066e5a9567fdb9bc9fd0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Use OpenType font weightsJonas Karlsson2020-08-2830-152/+263
| | | | | | | Task-number: QTBUG-42248 Change-Id: Icdb301b27d6699c2b842c4563fbef9df73c23cbc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Linux: Fix QLabel content truncated under high dpiChen Bin2020-08-281-1/+1
| | | | | | | | | | Fixed truncation of pixmap content under high device pixel ratio of QLabel. Pick-to: 5.15 Fixes: QTBUG-86170 Change-Id: I795815e0d8a9e57e0dfcca9cf104e86e45027b18 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Use qsizetype in QRegularExpressionMarcel Krems2020-08-283-119/+119
| | | | | | | PCRE2 already uses size_t which we can now make full use of. Change-Id: Icb5efd5c6ef27f2e31a9780bf62f5671ddc603cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve connect: Use existing metatypes if possibleFabian Kosmale2020-08-284-15/+65
| | | | | | | | | | | As there is now a chance that a QMetaMethod already contains the metatypes for its arguments, we can just query it directly (and use the fallback to name lookup logic that already exists there). This also allows us to avoid creating a QList of names, and only requires us to do a name lookup in case the connection actually fails. Change-Id: Idda30bc4b538a94476ae6c533776c22340f0030d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QIconEngine: move away from virtual_hook usageMorten Johan Sørvig2020-08-275-17/+15
| | | | | | | | | | | | | | | | | | | | | Upgrade existing functions to be virtual functions: - virtual QString iconName() - virtual bool isNull() - virtual QPixmap scaledPixmap(...) - virtual QList<QSize> availableSizes(...) Make all of them non-const and remove the const_casts in the implementation. Keep the default implementation which calls virtual_hook(), for compatibility. Note: availableSizes was already virtual, but now loses the “const”. Port two overrides in the platform themes. Keep virutal_hook() around for future expansion. Task-number: QTBUG-85885 Change-Id: I76d0c9f75bfd6ca870c669047d4ef18b82c692e5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QOffScreenSurface platform API abstractionAssam Boudjelthia2020-08-2715-111/+319
| | | | | | | | | | | | | | | | | | | | | This follows the work done in 6ff79478a44fce12ca18832a56db4a370a9ff417. The API is available by including qoffscreensurface.h, scoped in the QPlatformInterface namespace. The namespace exposes platform specific type-safe interfaces that provide: a) Factory functions for adopting native contexts, e.g. QAndroidPlatformOffscreenSurface::fromNative(ANativeWindow); b) Access to underlying native handles, e.g. surface->platformInterface<QAndroidPlatformOffscreenSurface>() ->nativeSurface() Fixes: QTBUG-85874 Change-Id: I29c459866e0355a52320d5d473e8b147e050acb3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove obsolete ### Qt 6 commentVolker Hilsheimer2020-08-271-2/+0
| | | | | Change-Id: Ia0c903a1bccbd9e495778834a56ed2caebdfbac7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Rename QStyleOptionMenuItem::tabWidth to reservedShortcutWidthVolker Hilsheimer2020-08-2711-17/+19
| | | | | | | As per ### Qt 6 comment, and the documentation for the variable. Change-Id: I58df784a72129dc97c5f13eb54e34cb7feb9748c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Make configure -force-asserts affect the Qt build onlyJoerg Bornemann2020-08-272-1/+2
| | | | | | | | | | | | Before this change, configure -force-asserts would affect qmake-based user projects too, potentially forcing the user to remove the QT_FORCE_ASSERTS define in their own projects. [ChangeLog][configure] The -force-asserts option now affects the Qt build only, not user projects. Change-Id: Iecca3c9f7e8261996c5d8bcba8adbc0db1dc1c99 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -force-assertsJoerg Bornemann2020-08-272-1/+5
| | | | | Change-Id: Ife15b8d008c5b3f5eed61ec3bc048fda4c4b4e46 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Install QtHeadersClean.cmakeFabian Kosmale2020-08-271-0/+1
| | | | | | | | | For prefix builds we need to install the file. Amends db21bad936a761f475145886f1e06dfcfa11eb80. Change-Id: Ia8e859dc048cc4bd74eb95ed0d2adce9c6b11902 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* macOS: fix standaloneMonthName implementation for system localeVolker Hilsheimer2020-08-271-5/+23
| | | | | | | | | | | | macOS has specific formatters for the standalone month names, so use them. Change-Id: Ic4ad547c7d1c29d71c85f60301acd5a5f0f263d2 Fixes: QTBUG-86191 Pick-to: 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Evgeniy Dushistov <dushistov@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Redo QNetworkAccessBackend and various cleanups around itMårten Nordheim2020-08-2717-464/+796
| | | | | | | | | | | | | | | | | | | | | | Makes the QNetworkAccessBackendFactory a real interface to be used in plugins. Requires exporting some classes but they're not made public yet. Removes unused features and functions. Some things are likely still unused due to being specific for HTTP but the HTTP network replies don't use this backend system. Changes QNetworkAccessBackend to use a more traditional read(char*, qint64) function for the "downloaded" data. And an optional readPointer if supported. So far no backends have it so it's somewhat useless, but it may be useful going forward. If not it shall be deleted Converts all current backends to the new setup Easy enough, also gets rid of some unused functions. Task-number: QTBUG-80340 Change-Id: I9339e6c6eb394c471c921f5cafd3af6175936399 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove QFtp sources etc. in favor of alternate distributionMårten Nordheim2020-08-2727-7592/+104
| | | | | | | | | | | | While we initially wanted to just disable the functionality the way it is currently built forces people to do a full build of Qt just to enable it. Instead of doing this half-measure let's just remove the code completely from QtBase and rather prepare QtNetwork to handle being a plugin that can be compiled at any time. Task-number: QTBUG-80340 Change-Id: I19155c8c167cf932088f01b2a9706d0e7ab792d1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Pass QByteArrayView by valueLars Knoll2020-08-272-5/+5
| | | | | | Change-Id: I65df03e7781bac63d98b8d3b59568841601d8f25 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Inline the equality operatorLars Knoll2020-08-272-13/+8
| | | | | | | There's no reason to have this out of line. Change-Id: I52aa2ba941f9c81c2194865b156dbc0a2104363b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QUUid constructors from string like types explicitLars Knoll2020-08-272-6/+6
| | | | | | | | I don't think we want to have implicit conversion from a const char * or a QByteArray to a QUuid. Change-Id: Idfe7450ce15b89e295aa7af7ccf1fc94f5acd4f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix build without features.animationTasuku Suzuki2020-08-281-1/+1
| | | | | | | This has been broken since 359616066e64eed947c6c91cb8902285ed79dd0d. Change-Id: I9428bf4e1bca3f10c59a7ea334e6bb7e43c4e020 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Change QByteArray to handle large arraysLars Knoll2020-08-2713-227/+222
| | | | | | | | | | Use qsizetype throughout. Change-Id: I787af7fcfa17e1be87decb64c41c609cc24be117 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update allocation interface of QArrayDataPointerAndrei Golubev2020-08-273-8/+11
| | | | | | | | | | | | | Added overload to allocGrow that figures the capacity to allocate from the newSize argument passed. This is useful in QList (and likely in other places) Fixed QArrayPodOps::reallocate as a drive by: don't call memmove when it is not needed Task-number: QTBUG-84320 Change-Id: I67efe55a60efaf3ab6057b0249d6a446e04a09e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make *ArrayOps::createInPlace protectedAndrei Golubev2020-08-271-5/+12
| | | | | | | | | | No user of QArrayDataPointer functionality must use createInPlace. This is a special function to be called by the internal logic. It's usage is unsafe with prepend optimization in place Task-number: QTBUG-84320 Change-Id: Idc0e82975a98e799272bdb61fe7828b3c8c67e8d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support GrowsBackwards prepend in QListAndrei Golubev2020-08-272-20/+33
| | | | | | | | | | | | | Restored previously deleted logic of setting GrowsBackwards flag for prepend-like cases. This should be sufficient to fully enable prepend optimization Fixed QList::emplace to not use implementation detail logic. Updated tests to cover changed behavior and its correctness Task-number: QTBUG-84320 Change-Id: I4aadab0647fe436140b7bb5cf71309f6887e36ab Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add prepend optimization to QCommonArrayOpsAndrei Golubev2020-08-274-72/+710
| | | | | | | | | Introduced prepend optimization logic to QCommonArrayOps. Trying to rely on original QList behavior Task-number: QTBUG-84320 Change-Id: I46e6797b4edad804a3e3edb58307c9e96990fe01 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Support GrowsBackwards flag in QArrayDataPointerAndrei Golubev2020-08-276-34/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduced allocation function in QArrayDataPointer with interface similar to QArrayData::allocate that supports growing strategies. This func is used instead of the original in cases when prepend-aware storage is needed. Tried to follow Qt5 QList policy in terms of space reservation Updated QPodArrayOps::reallocate to be aware of growing shenanigans. It doesn't look like a perfect solution but it is rather close and similar to what Qt6 QList is doing when not growing (e.g. reserve/squeeze) Added initial QCommonArrayOps with helper function that tells when reallocation is preferable over just using the insert-like operation. This comes up later on when GrowsBackwards policy is properly supported in operations Essentially, 2/3 main data management blocks for prepend optimization are introduced here. The last one being a generalized data move that is done instead of reallocation when existing free space is not enough Task-number: QTBUG-84320 Change-Id: I9a2bac62ad600613a6d7c5348325e0e54aadb73d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix subtle issue in tst_qtablewidgetAndrei Golubev2020-08-271-1/+1
| | | | | | | | | | Fixed UB when QList::begin() iterator is used after a call to QList::remove(). As QList is now effectively double-ended container, there is no guarantee on iterator validity upon erasure Task-number: QTBUG-84320 Change-Id: I27793f131e8e23a41ac6c2c1db0bdc61ee58891f Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Mark some Qt namespace enum members properly as deprecatedEdward Welbourne2020-08-275-14/+13
| | | | | | | | | | | | | | | | A comment is not good enough, Some of the enum members were even still in use, or mentioned in documentation. WA_ContentsPropagated, WA_WState_DND and WA_ForceAcceptDrops have been deprecated since 4.5.1; and at least the last has been an \omitvalue in the docs for even longer. (WA_ShowModal and WA_GroupLeader have been similarly marked, but are in use, see QTBUG-85816.) Push back to 5.15.1 in order to be able to remove these at Qt 6. Pick-to: 5.15.1 Change-Id: I6ea3839767e5f5158b0fed508f65798470191908 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QIcon: Add pixmap() overload which take devicePixelRatioMorten Johan Sørvig2020-08-273-20/+57
| | | | | | | | | | | | | Add new QIcon::pixmap() overload: QPixmap pixmap(const QSize &size, qreal devicePixelRatio, ...) This function replaces the existing pixmap() function which take a QWindow pointer, and should be more convenient in use. Task-number: QTBUG-85885 Change-Id: Ie4ca96a266d9278864678dc61bdfc2836cabdb93 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QLayout::indexOf: redo implementationGiuseppe D'Angelo2020-08-262-14/+14
| | | | | | | | | | | | Stop relying on the "magic" of itemAt returning nullptr for out of bounds. Just use count(). Unfortunately, QMainWindowLayout breaks the API contract by NOT implementing count() properly. So, make its count() crash if called; and move the itemAt implementation there. Change-Id: I120686a834bab15dd537598a56bd93d6a5924aa5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Make QPaintDevice::devicePixelRatio() return qrealMorten Johan Sørvig2020-08-262-4/+4
| | | | | | | | | | | | | | | For historical reasons Qt 5 has: int QPaintDevice::devicePixelRatio() qreal QPaintDevice::devicePixelRatioF() Change the int to qreal so that Qt 6 will have qreal QPaintDevice::devicePixelRatio() qreal QPaintDevice::devicePixelRatioF() [to-be-removed] Change-Id: Ie904e02ec490cbcd2acb5dcecb193e9af4cb90f0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>