summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QLayout docs: explain better what the QWidget ctor arg doesAhmad Samir2020-10-274-23/+53
| | | | | | | | | | Make it clear in the docs that an alternative to calling QWidget::setLayout() is to pass the parent widget to the Q*BoxLayout constructor. This basically just copies the relevant bits from the the docs of QWidget and Q*Layout. Change-Id: Id196dcdf9a876d9141aa145f23a83c45f8cda5f8 Pick-to: 5.15 5.12 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* CMake: Make qt_add_executable more minimalisticAlexandru Croitor2020-10-271-8/+1
| | | | | | | | | | | | | | | | | | | | As per the public API review, we want qt_add_executable to be a minimal shim around CMake's add_executable with as little Qt specific behavior as it makes sense. This means: - not setting the WIN32 and MACOSX_BUNDLE - not linking against Gui, only Core - not generating a windows RC file Users should handle those particularities themselves, ensuring that qt_add_executable can be used by a bigger audience. Fixes: QTBUG-87664 Task-number: QTBUG-86827 Change-Id: Ib424dd95266352eb035a344ca03b6b81e47bd9e8 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Use versionfull functions within our public APIAlexandru Croitor2020-10-271-2/+2
| | | | | | | | | This ensures that the public functions still work even if QT_NO_CREATE_VERSIONLESS_FUNCTIONS is true. Task-number: QTBUG-86827 Change-Id: I5654eb17ffe47a1b8e9d397e0477f5b82a762ae1 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Expunge WA_GroupLeaderShawn Rutledge2020-10-274-49/+6
| | | | | | | | | It's been deprecated since Qt 4.1. Task-number: QTBUG-85816 Change-Id: Iafc6340716556f54fc5472c60035bb57461b842f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QAbstractItemModelTester: don't rely on hasChildren()David Faure2020-10-272-6/+7
| | | | | | | | | | | | | | | | | | | Dynamic models which use fetchMore to asynchronously fill subdirs (like KDirModel) return true in hasChildren() for dirs that are expected to have children (so that the "+" shows in the treeview) but do not actually have children readily available. They will be inserted later on once the async listing job is done (as a result of fetchMore triggering that job). So QAbstractItemModelTester should use rowCount instead, to find out if there are children present. This detected a bug in QConcatenateTablesProxyModel: it returned a non-zero rowCount for its items, while it's flat. Change-Id: Idcdc86159f1fc79ed5297075dfcf30c09896287a Pick-to: 5.15 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QRect(F) and QMargins comparison operators hidden friendsVolker Hilsheimer2020-10-264-55/+34
| | | | | | | | | | | | Hide them from ADL to reduce noise. QRect operators were already implemented as hidden friends, but a left-over declaration un-hid them again. Use the opportunity to simplify QMargins::operator!= by just inverting operator==. No need to spell things out, the compiler can do that for us. Change-Id: I55722223a2267cbeba5726dc912b48d6e017e580 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* cmake: Ensure Mingw builds pick up and use the WinMain entry pointTor Arne Vestbø2020-10-261-21/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cmake code path didn't export QT_NEEDS_QMAIN as a public define to be inherited by consumers. As a result, the users's main() would be defined as normal (instead of being named qMain). This in turn would lead mingw to pick main() as the entrypoint during link time. We want to go through our WinMain entrypoint (for now), even if MingGW today has mechanisms for calling the user's main() directly, as our WinMain uses GetCommandLineW() and as a result prevents the arguments to main() from being wildcard expanded. and we want to keep parity between qmake and CMake in how this behaves, even if we end up changing it in the future. We follow what qmake does, and expose QT_NEEDS_QMAIN to clients. With the user's main being then named qMain, mingw will look for our WinMain. This in turn leads to the problem of static link ordering, where adding -lmingw32 as a dependency of the static library target results in it ending up _after_ the static library during link time, and the static linker ends up discarding the entry point library. To solve this, we split the entry point module into two targets, one for consumers, and one internal that is the actual static library. By adding the -lmingw32 dependency to the former target, we ensure it's added before the static library during linking. Change-Id: I342c979f56669d5a5a5c237f476556c4e2baf432 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make remaining String binary comparisons hidden friendsAllan Sandfeld Jensen2020-10-263-68/+85
| | | | | | | | | Also forced the introduction of explicit comparisons with char16_t* and std::nullptr_t. Change-Id: I8e32c14a1d3aeec234ee070b9fefc6af06db0fda Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update CLDR to v37, adding Nigerian Pidgin as a new languageEdward Welbourne2020-10-266-4075/+4374
| | | | | | | | | | | | | | | | Routine update by running scripts, ignoring clang-format's extensive grumbles. Added notes to util/locale_database/'s README, on the need for that, and enumdata.py, on when to add entries. As usual, several new locales are also added, for existing languages, territories and scripts. [ChangeLog][QtCore][QLocale] Updated to new version of CLDR (the Unicode Consortium's Common Locale Data Repository) v37. Fixes: QTBUG-84669 Pick-to: 5.15 Change-Id: Ib76848bf4bd1219180faf46820077e8d8049a4e3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Store std::exception_ptr in QUnhandledExceptionSona Kurazyan2020-10-265-9/+115
| | | | | | | | | | | | | | | | For historical reasons Qt Concurrent reports QUnhandledException in case if an exception that is not derived from QException is thrown from a worker thread. Changing this behavior may not be a good idea, since the existing user code may rely on it. Changed QUnhandledException to wrap the std::exception_ptr to the actual exception, so that the users can obtain the information about the thrown exception if needed. [ChangeLog][QtCore][QUnhandledException] Improved QUnhandledException to store the std::exception_ptr to the actual exception thrown from a QtCocnurrent worker thread. Change-Id: I30e7c1d3e01aff6e1ed9938c421da0a888f12066 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QList: also default count()'s template parameterGiuseppe D'Angelo2020-10-262-2/+2
| | | | | | | | Also fix the docs. Change-Id: If08116cb8657d00d610de9451be0ba73ce19dcd1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QString/QLatin1String comparisons hidden friendsAllan Sandfeld Jensen2020-10-262-223/+182
| | | | | | | Leaving most member comparisons untouched though. Change-Id: I8267f85927ec8315d511ac38757bc8d8aaaa5672 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtConcurrent: Reuse ArgResolver from qfuture_impl.hJarek Kobus2020-10-262-100/+50
| | | | | | Task-number: QTBUG-83331 Change-Id: I572f68f6d3be4a50970d8d77d070f175be3ec785 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Replace see-alsos in qfloat16 documentation with \overloadVolker Hilsheimer2020-10-262-23/+19
| | | | | | | | | | | Explicitly specify the float-overload, otherwise it's just ends up referring to itself, and won't generate a link. Also document qFpClassify(qfloat16) overload. The internal implementation was documented, but the public overload not. Change-Id: Ifdc364597a0e7b4d943f0ec6d149977a15c805ef Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Revert changes in strto(u)ll.c to avoid integer overflowsRobert Loehning2020-10-264-25/+36
| | | | | | | | Found in oss-fuzz issue 26045. Pick-to: 5.12 5.15 Change-Id: Id9eac1b4f67ad9bbe2d92dd69cd03338a6ced74e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use metaType instead of type in qlocale_macDavid Skoland2020-10-261-1/+1
| | | | | | | QVariant's type() has been deprecated in favor of metaType() Change-Id: Ibb060bde5e946849fc1c1a67a48ff63beb1d8ffe Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows QPA: Use a QSharedPointer for the touch deviceFriedemann Kleint2020-10-266-32/+27
| | | | | | | | | | For reasons of symmetry with the tablet devices. As a drive by, give it more distinct IDs. Task-number: QTBUG-46412 Change-Id: Ie667621246b26db6fdda84c5ff2455fe38633cb3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Show the year correctly after it has been editedAndy Shaw2020-10-261-1/+1
| | | | | | | | | | | | When converting the year as an integer via the locale then it can add in group separators which would not be desired here. Therefore it should be converted via the QDate approach to get the right output for the year. Fixes: QTBUG-86307 Fixes: QTBUG-85966 Pick-to: 5.15 Change-Id: I092bd1e5f69e544843fd5f28c96b94c9066490c5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QMacStyle - fix tab renderingTimur Pocheptsov2020-10-261-1/+17
| | | | | | | | | | | In BigSur NSPopupButton, it would appear, is slightly different. But different enough so that a fragment of a disclose 'arrow' button became visible within the clipping region, making it appear as some blue strange thing in between inactive (non-selected) tabs. Task-number: QTBUG-86513 Change-Id: Ib03af48069056b5ecbb8b4afebd851005583293a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove documentation for removed QFlags constructorVolker Hilsheimer2020-10-261-10/+0
| | | | | Change-Id: I407392d8d92da2ebcfc2cb8050155ab44ba1f0ff Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Document QVariant::data/constDataVolker Hilsheimer2020-10-261-2/+12
| | | | | | | | | QMetaSequence refers to those members, and QMetaType operates on void*s, and documents such low-level APIs as well, so can't think of a reason why we should not document the QVariant getters as well. Change-Id: Id18de839bb0e4f5559b28bfca80eaabab1eb6479 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Document versionless variants for CMake commands for DBusKai Koehne2020-10-252-15/+37
| | | | | | Pick-to: 5.15 Change-Id: I7168a2d2589ef72d6e6f4bc568c5a914faa777df Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix included license text for PCRE2 - Stack-less Just-In-Time CompilerKai Koehne2020-10-251-1/+1
| | | | | | | | | | [ChangeLog][Third-Party Code] Changed license text of "PCRE2 - Stack-less Just-In-Time Compiler" component. The documentation (incorrectly) included the generic PCRE2 license so far. Pick-to: 5.15 5.12 Change-Id: I7b36a640ba83fb6087fe28d77f9435af13f8c84d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix copyright information for src/3rdparty/xcbKai Koehne2020-10-251-1/+1
| | | | | | | | | | | The new copyright lines are taken from xcb-proto-1.13/COPYING, and xcb-proto-1.13/src/xinput.xml. [ChangeLog][Third-Party] Fixed copyright information for "XCB-XInput". Pick-to: 5.15 Change-Id: I8afa4dab39765b85a015524fe16b085dcfe5a864 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Make STL iterators the preferred styleOle-Morten Duesund2020-10-253-209/+233
| | | | | | | | | | | Emphasize STL iterators over Java style iterators. Details about Java style iterators moved to it's own page and only briefly mentioned on the containers page. Task-number: QTBUG-86584 Change-Id: Id54863f79f90214aaae87e60cee1a66f53a044ab Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* doc: fix description in doc_src_containers.cppHiweed Mandriva2020-10-251-1/+1
| | | | | | Change-Id: Iade0a8ea7fc51df1ee624c4059f93d470abb9b08 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: <hiweedmandriva@163.com>
* Whitespace cleanup in corelib/kernelAllan Sandfeld Jensen2020-10-2437-344/+359
| | | | | Change-Id: If061ef0af5ced4384e20a82afcea3712fa7e45d7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Refine QADP::pass_parameter_by_value evaluationAndrei Golubev2020-10-241-1/+4
| | | | | Change-Id: I8327ab3eb2503228448af59098146e062d4b90d3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update QList::append(const_reference) -> QList::append(parameter_type)Andrei Golubev2020-10-242-2/+2
| | | | | | | | | | Forgotten during previous round of replacing const lvalue references with parameter_type in QList methods Task-number: QTBUG-86553 Change-Id: I9abda4db3b504521b64fab1f220559c36bfeb9f5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix documentation warningsVolker Hilsheimer2020-10-248-66/+32
| | | | | | | | | Declare hidden friends like qdoc expects them, and other signature fixes Document function parameters Remove documentation for removed APIs. Change-Id: I44c1caeed0d40be04612129d074acc30b75f5259 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rename “pixelDensity” variablesMorten Johan Sørvig2020-10-232-16/+16
| | | | | | | | | | | | | QHighDpiScaling now computes scale factors based on QPlatformScreen::logicalDpi(), instead of by calling QPlatformScreen::pixelDensity() as done earlier. We forgot the rename the internal state variables, update them to indicate that platform screen DPI is used. Change-Id: Ib718a6176e0ac138395eea13b292f75f69dac3ad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make QSharedPointer comparisons hidden friendsAllan Sandfeld Jensen2020-10-232-122/+70
| | | | | | | | Doesn't touch qsharedpointer.h which already seems outdated and needs a general overhaul. Change-Id: I051cdeb1fe03a7ef16e333a483bb68e2fada3c25 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Display tooltips on the correct screenMorten Johan Sørvig2020-10-231-1/+3
| | | | | | | | | | | | | Display QTipLabel on the correct screen, also when the parent widget spans multiple screens. In this case, QWidget::screen() will return the main screen for the widget, which will not necessarily be the screen at the tool tip position. Fixes regression introduced by 7e2fded5. Change-Id: Iffb920b6658468c5032928eadbd749f58fe077a7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Remove alpha from default surface formatMorten Johan Sørvig2020-10-231-8/+1
| | | | | | | | | | | | | | | (This reverts commit 2ca1253b13e77643b3d2dd993a038ae2df882311). This allowed use to avoid backing store RGB -> RGBA conversions on the CPU back before macOS was layer backed. The conversion should be GPU accelerated now, and we can return to the cross-platform default. In addition, RGBA backingstores requires filling with transparent pixels on each paint event, which causes increased CPU usage - often for no reason if transparency effects are not used. Change-Id: Ic795128b7e474b63f44f9f4f3526d0b205652e62 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* testlib: Spit out crash backtraces to stderrTor Arne Vestbø2020-10-231-2/+2
| | | | | | | | Ensures that the backtrace is interleaved with the header and footer that we print ourselves. Change-Id: I728f4a05be31e345687cbb5fefe49f76dbe8ae36 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QList/QVLA: fixup the docsGiuseppe D'Angelo2020-10-232-8/+8
| | | | | | | | | I'm not 100% sure that qdoc needs this, but in case it does, here's the commit. Change-Id: Ia3e17a56fd5df766c250f4875ba5e19e12b98d11 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Make entry point module an internal moduleTor Arne Vestbø2020-10-232-1/+3
| | | | | Change-Id: I9eaadc7ce8ca03d64ff3a33c7b6641b073570a61 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QList/QVLA: default the parameter for indexOf/contains/remove/etc.Giuseppe D'Angelo2020-10-232-8/+8
| | | | | | | | This allows to use list-initialization when calling these functions, for instance list.removeAll({}). Change-Id: I2828d900a44bd0bc5aea5fba4777304b09190bc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList: make (last)IndexOf and contains function templatesGiuseppe D'Angelo2020-10-235-93/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason why they shouldn't be; one might want to do a lookup passing an object which is comparable with the list's value type (e.g. search with a QByteArrayView needle into a QByteArrayList haystack). Insofar we've had to add overloads to QListSpecialMethods for all these cases, which clearly doesn't scale and creates top-tier and low-tier lists. There is one downside, namely, calling QList<A>::indexOf(B) for a B for which there isn't an operator==(A, B) but only a conversion towards A. Before, B was converted only once (at call site), now it's converted at every call of operator==. In general: such types are broken and should be fixed on their own. However let's avoid a possible regression in client code, so I've left the QString overloads in QStringList in. To get there: centralize the implementation of those methods in a empty base class, which gets then inherited by QListSpecialMethods, which is inherited by QList. This is there are still special methods that may want to overload contains, e.g. QStringList which also passes a case sensitivity). The only breakages comes from code that was already broken, for instance mixing signed and unsigned types, and the beauty of this is that now we *detect* that instead of silently ignoring. QVLA and other QList methods will be tackled in future commits. [ChangeLog][QtCore][QList] The indexOf, lastIndexOf and contains methods now take an object of any datatype -- and not just the list's own value type. This allows for heterogenous lookup in QLists. Change-Id: Ib34812217eb2b0f926fad1fc195b33758196941c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QSaveFile always failing on content: URLsVolker Krause2020-10-232-2/+14
| | | | | | | | QSaveFile needs QFileInfo::isWritable() to work, which 7e5f38aec667 caused to always return false for content: URLs. Change-Id: If839331e4bd176765ed242791cb253c2064f5f6d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QSplitter: Respect managed widget's growth/expand size policyAles Erjavec2020-10-231-5/+5
| | | | | | | | | | | Use qSmartMaxSize to get the maximum size a widget can take. [ChangeLog][QtWidgets][QSplitter] Respect QSizePolicy::Maximum and QSizePolicy::Fixed layout policy of child widgets. Fixes: QTBUG-87133 Change-Id: I166ef3f6608303b8695f5c05a7bf0d1be4653f4a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove usage of deprecated QStandardPaths::DataLocationKarsten Heimrich2020-10-233-25/+12
| | | | | | | | | * Rearrange the documention to match the enumeration order. Fixes: QTBUG-87037 Change-Id: Iad001351e0f309e694b8bbd503813017e6586a21 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Add porting Guide for QRegExpKarsten Heimrich2020-10-231-0/+251
| | | | | | Fixes: QTBUG-87101 Change-Id: I370c79e295489f4eaf8418bbd53b326f0a8e5123 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Make Q(Multi)Map equality operators documentation-friendlyVolker Hilsheimer2020-10-232-3/+16
| | | | | Change-Id: I1a84c437bb19dd3c667596c59e1404bbbf39978e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix documentation for QVariantRef and QVariantPointerVolker Hilsheimer2020-10-231-10/+10
| | | | | Change-Id: I86b749ec14876df98d5d873cf2274facea49f0c5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings for QProperty and related classesTopi Reinio2020-10-231-128/+43
| | | | | | Task-number: QTBUG-86295 Change-Id: I547f4cf34d9721f56ba1cd665218f66597ffbb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-2335-499/+523
| | | | | | | | | It's been obsolete for a long time already. Make sure the compiler now warns about it and remove all remaining uses in qtbase. Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Do not store non relocatable types in QVariants internal storageLars Knoll2020-10-232-4/+7
| | | | | | | | | | | This mostly reverts change 76e8e8e9c8093f093cb9f37d61d273f43398fefb. The reason is that storing non relocatable types inline in QVariants storage would implicitly make QVariant non relocatable. Fixes: QTBUG-87686 Change-Id: I2a09b1dcdd907d60085dccf17f987086dcba878c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make some QMetaType members constexpr and inlineLars Knoll2020-10-232-35/+35
| | | | | | | | | Since QMetaType::fromType() is constexpr, it makes sense to also make some of it's members constexpr. Change-Id: Ia2d63a904abb680ed63c1f88cb68f1d0309d029c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Rename the QMetaType::MovableType flag to RelocatableTypeLars Knoll2020-10-233-4/+8
| | | | | | | Keep this in sync with the changes we have done in QTypeInfo. Change-Id: Iaacb0f3cc5c46d3486084a1f6eca480a233d5e1a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>