summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Move QApplication::autoSipEnabled() to public scopeTasuku Suzuki2023-01-161-1/+1
| | | | | | | | | | | | | | | | The method is not meant be a slot. warning: getter QApplication::autoSipEnabled possibly mismarked as a slot [clazy-const-signal-or-slot] [ChangeLog][QtWidgets][Potentially Source-Incompatible Changes] bool QApplication::autoSipEnabled() is no longer a slot. Code such as using QObject::connect() to connect to it as a slot or accessing it through meta object system will have to be rewritten. Pick-to: 6.5 Change-Id: I892a51120478f3c90e5834c8e3e00bc836b84c52 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build with -no-feature-shortcutTasuku Suzuki2023-01-174-0/+9
| | | | | | | | qplatformtheme.h complains about Q_GADGET without <QtCore/QKeySequence> Pick-to: 6.5 Change-Id: I7561bd3e2484c44842cd25ab12aacb9c00ebedfd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build with -no-feature-toolbarTasuku Suzuki2023-01-171-0/+2
| | | | | | Pick-to: 6.5 Change-Id: I9a76ff0896545dff0e945daaec0aeae2236c1e42 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Pass flags with dash to rc.exe when auto-generating win32 rc filesPeter Varga2023-01-161-1/+1
| | | | | | | | | | Fixes clang-cl build: clang-cl: error: no such file or directory: '/c65001' Pick-to: 6.5 6.4 Change-Id: I9f134f866f17d1eeb12a28b72580151c409a98f6 Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix build with -no-feature-cssparserTasuku Suzuki2023-01-175-2/+9
| | | | | | Pick-to: 6.5 Change-Id: I146ac61f92acdcd22c46ca27a1fca48c47817e3c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Move documentation for QAI::selectionInterface to source fileKai Köhne2023-01-162-3/+5
| | | | | | | | | qdoc doesn't allow documentation in headers. Pick-to: 6.5 Change-Id: I25686572aa15395bb3eb94dd637e4674e7310afe Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Make const functions in QDir re-entrant by protecting mutable variablesØystein Heskestad2023-01-162-61/+86
| | | | | | | | | | | | | | | | | | QDir caches data in mutable variables. Because of no protection, two threads calling for instance QDir::count on two independent but shared copies of a QDir object caused a data race. Running the tst_QDir_tree and tst_QDir_10000 three times with and without this change show no change beyond the difference between each result. For instance tst_QDir_tree::thousandFiles:"src" took 36/35/37 ms before the change and 35/35/35 ms after. This makes sense because the time to handle mutexes is very little compared the time to make file operations. Fixes: QTBUG-105753 Change-Id: I6886f84521410f88cce2b25f0cce8cfc3fea1a0b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDir: Refactor separate cache clearing functions into a single functionØystein Heskestad2023-01-162-25/+13
| | | | | | Task-number: QTBUG-105753 Change-Id: I7f3473ce21e71ccd04ff9f2575244167b5c3e3a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Fix exposing sources with absolute path to IDEJoerg Bornemann2023-01-161-11/+15
| | | | | | | | | | | | | | | | _qt_internal_expose_deferred_files_to_ide must add the source files to the target exactly as they were passed to _qt_internal_expose_source_file_to_ide. Otherwise, CMake might be fooled into thinking that we're adding a new file here, and source file properties would not be readable. Instead of back-calculating the relative paths from the absolute paths, we use the already existing list of relative paths. Pick-to: 6.5 Fixes: QTBUG-109678 Change-Id: I81510f37eacb409eb5c03e3ff032926c3ca25a1f Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Doc: Mark qRegisterTestCase as new in Qt 6.5Kai Köhne2023-01-161-1/+3
| | | | | | | | | Also remove reference to QTestCaseEvent loop class, which is not documented. Pick-to: 6.5 Change-Id: Ic09b3b102db535dfb090b9a4072ad29515a911ae Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
* QStyleHints: Fix Q_PROPERTY declaration for keyboardAutoRepeatRateFTor Arne Vestbø2023-01-141-1/+1
| | | | | | Pick-to: 6.5 Change-Id: I21d3280176d6c52daab0b3abfdafb404d42db9d0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtWidgets: Disambiguate static functions/variables and definesFriedemann Kleint2023-01-149-52/+27
| | | | | | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Properly prefixing the childWidgets() function also prevents it from cluttering static builds. Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: Idd2b1ec748f33cfae8f3213847c43b3fb0550377 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QPermission: replace T data<T>() with std::optional<T> value<T>()Marc Mutz2023-01-135-21/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in API review, the default-constructed T() returned from a mismatched data<T>() call is indistinguishable from a real T with default state. To make them distinguishable, return optional<T>. Call the new function value<T>(), mimicking QVariant::value<T>(), and suggested in API review, because data() is usually used to return raw pointers, not values. Remove the qWarning() on requestedType and actualType mismatch, as the new function can be used in std::get_if/dynamic_cast-like if-then-else chains, in which failure is part of the normal operation, and a warning message misplaced: if (auto loc = perm.value<QLocationPermission>()) ~~~ use *loc ~~~ else if (auto con = perm.value<QContactsPermission>()) ~~~ use *con ~~~ ~~~ etc ~~~ Pick-to: 6.5 Change-Id: I799a58e930307323ebce8f9ac50a42455e9c017f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move QMetaMethod ctor back into a private sectionMårten Nordheim2023-01-131-0/+2
| | | | | | | | | | | Its symbol changed once it was changed to protected, so even if it's unlikely to have been imported in any application let's just change it back to private. Pick-to: 6.5 Change-Id: I21b4a471caedb8edc8e1a04f706eae541b3c12fd Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QString<->emscripten::val conversion functionsMikolaj Boc2023-01-1312-77/+73
| | | | | | | | Following the QRect, add functions converting the QString to native emscripten::val and back: fromJsString, toJsString Change-Id: I2d0625ede3bbf7249e2e91b8de298b5b91df8ba2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QUnicodeTools: Use thread-safe libthai APIIevgenii Meshcheriakov2023-01-131-5/+21
| | | | | | | | | | | | | | | Use th_brk_new()/th_brk_find_breaks() instead of non-thread-safe th_brk(). The new API is available in libthai since version 0.1.25 released on 2016-06-28. [ChangeLog][QtCore] Correct line wrapping of Thai text now requires libthai version 0.1.25 or above. Fixes: QTBUG-105544 Pick-to: 6.5 Change-Id: I723050bef9f4e6445c946125c74c99e50addadef Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* [doc] QCalendarPermission: fix cut'n'paste errorMarc Mutz2023-01-131-1/+1
| | | | | | | | These docs are for Q_Calendar_Permission, not for QContactsPermission. Pick-to: 6.5 Change-Id: Ifbffa568b510ef035270082d1926e35d8d5cf241 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QLocationPermission: make enums have explicit underlying typeMarc Mutz2023-01-131-2/+8
| | | | | | | | | | | They can be smaller than an int, so use quint8. In a world of BC guarantees, pinning the underlying type of enums is best practice. Found during API review. Pick-to: 6.5 Change-Id: I0c31fe4565329982c81173e3a265f73758aad257 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QSqlRecord: add missing C++11 move SMFsMarc Mutz2023-01-132-2/+38
| | | | | | | | | | [ChangeLog][QtSql][QSqlRecord] Added move constructor, -assignment operator, and swap(). Task-number: QTBUG-109938 Change-Id: I54f2666defbf56f5ba2faea6358722ebd7cac157 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QWidgetTextControl: deal with empty formats list properlyTimur Pocheptsov2023-01-131-1/+2
| | | | | | | | | | Do not call first on it. A regression was introduced by 56f0ebfe860e440dcbba8997f44836debc901119. Fixes: QTBUG-110070 Pick-to: 6.5 6.4 Change-Id: I7c969da889b6c7ad3a67149fe99ca47830683073 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Clear out some unused code in QStorageIterator::next() on UnixEdward Welbourne2023-01-131-2/+1
| | | | | | | | | | | | | | The code to save parent_id, actually a member variable that's commented out, presumably because we have no use for it, was declaring a variable to save it in and then Q_UNUSED()ing it. It is simpler to just not do any of that. Since this "code" did at least document where to get the parent_id, if we ever do want it, and what the number just parsed actually means, keep the assignment as a comment but make clear why it's commented out. Change-Id: Iec59fa4d1af6c7e3b16570a612178a54004ebb70 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QPermission: don't hide SFINAE constraintsMarc Mutz2023-01-132-20/+22
| | | | | | | | | | | | | | | | | Like done elsewhere (e.g. in QStringView), formulate the constaint in if_x<T> = true from, and let qdoc see it. Then document the constraint in prose, too. As a drive-by, use C++17 variable templates instead of std::bool_value, and document that data() returns a default-constructed T on failure (which is indistinguishable from a successful call that happens to return a default-constructed T, so we should probably return an optional<T> here, but that's orthogonal to the change at hand). Pick-to: 6.5 Change-Id: I0584ce3f4febd619d3966afeb6244b11b167cd42 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QPermission: fight template bloat in data()Marc Mutz2023-01-132-6/+21
| | | | | | | | | | | | | | | Extract the type-independent code into an out-of-line data_impl() private method, leaving data() containing only the QMetaType::fromType<T>() call as well as T copy- and default-constructor calls. As a drive-by, use categorized logging (consistency with the rest of the permissions code) and printf-style qWarning() (expands to less code). Pick-to: 6.5 Change-Id: Ie23b83cb3fc537c9cff15f853ceee2888bf63124 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QFormLayout: don't access out-of-bounds layout dataVolker Hilsheimer2023-01-131-2/+16
| | | | | | | | | | | | | | | | When rows are hidden (implicitly or explicitly), then their layout data does not get fully updated. If rows get hidden after the layout data has been calculated once, then we must make sure that their indices are reset. Otherwise we might access array indices that are out of bounds when the layout data structure gets resized to fit only visible rows. For good measure, skip entirely over hidden rows when accessing the layout data when arranging the widget. Fixes: QTBUG-109237 Pick-to: 6.5 6.4 Change-Id: I4d6943b6a110edb61f60ce78d31f0fc64b5cc03d Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Add the 'QT_INTERNAL_AVOID_OVERRIDING_SYNCQT_CONFIG' flagAlexey Edelev2023-01-131-1/+6
| | | | | | | | | | | | | | The flag avoids overriding of the default CMake build config when building syncqt. Add extra checks to the make sure that configure-time tools use the correct build type. Fixes: QTBUG-109792 Pick-to: 6.5 Change-Id: I572fed60c58e59297fa559aea6eb86af94b979b7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QCalendarWidget: Add reset functions for minimum/maximumDateVolker Hilsheimer2023-01-132-2/+14
| | | | | | | | | | QDateTimeEdit has such reset functions for the minimum/maximum range properties, this makes QCalendarWidget consistent with the simpler editors. Fixes: QTBUG-62448 Change-Id: Iabb89f599e4996f00488a885a5b8a009471838b3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add CTF tracing backendAntti Määttä2023-01-1320-10/+1285
| | | | | | | | | | | | | | | | | | | | Implement platform independent tracing backend in Common trace format. This allows tracing in platforms without own/existing backend and analysing all platforms with the same tooling. The backend is the basis for further work in application level profiling area. The backend is implemented as a plugin that is loaded immediately when the application starts in order to process all trace events. The backend avoids using Qt classes so that it doesn't generate trace events itself. Adds plumbing to configure the new backend. Modifies the tracegen and tracepointgen tools to support the new backend. Task-number: QTBUG-106399 Pick-to: 6.5 Change-Id: I80711be52d4d48e1acbc72edffbdf3f379fce52a Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add tracing metadata to QEvent and QImageFormatAntti Määttä2023-01-134-14/+412
| | | | | | | | | | | Modify qtcore and qtwidgets to use the new tracing metadata features. This allows showing the event types and image formats used in traces as text instead of just numbers. Task-number: QTBUG-106399 Pick-to: 6.5 Change-Id: I267d03a696dc95e8b1d36657d7339dd09d92de3b Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add metadata support to tracegen and tracepointgen toolsAntti Määttä2023-01-139-94/+499
| | | | | | | | | | | Adds ability to add textual metadata for enumerations and flags to the traces so that they provide more information to the user instead of just numbers. Implement these for both existing backends. Task-number: QTBUG-106399 Pick-to: 6.5 Change-Id: Ibab00dd370d019891cf9ad6e65e6f9d868e32dce Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add find package for lttng library so that it gets added to targetAntti Määttä2023-01-131-2/+0
| | | | | | | | | | Add it globally so that each module using tracepoints don't have to add it themselves to each modules configure.cmake. Pick-to: 6.5 Change-Id: Id58cfaff5cd715b2667da2470001d646117f9f28 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add tracepointgen tool and convert qtgui to use itAntti Määttä2023-01-1313-18/+581
| | | | | | | | | | | | | | | | | | | | | Allows automatically generating tracepoint files by scanning source files for instrumentation macros. This makes it easier to add tracepoint support to modules and also ensures that the tracepoint files do not get out of sync with the functions they are tracing. Q_TRACE_INSTRUMENT generates entry/exit tracespoints for a function it is set. Q_TRACE_PARAM_REPLACE is used to change a function parameter for these functions to convert it to supported parameter type. Q_TRACE_POINT can be used to create a standalone tracepoint. Q_TRACE_PREFIX can be used to add prefix for generated tracing backend for example to add includes for types used in the trace points.. Task-number: QTBUG-107238 Pick-to: 6.5 Change-Id: Ib395b80838434ceb72683dac0545ca20c4d09455 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix array handling in tracegen toolAntti Määttä2023-01-134-5/+16
| | | | | | | | | | | Remove the array field type. We need to know the basic datatype as well for future backends. Use the arrayLen instead. Add the missing array handling for etw backend. Task-number: QTBUG-106399 Pick-to: 6.5 Change-Id: I97c38240bd1c79c0e61d268a7d780016b341f110 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* QtOpenGL: Disambiguate class name QTextureBinderFriedemann Kleint2023-01-131-5/+5
| | | | | | | | | It occurs twice, causing a clash in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: I39341af72cfa406d80c598a56db9e02f80c61a9b Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Gui: Always declare qt_memfill{32|64} as function pointers on x86Ulf Hermann2023-01-122-8/+10
| | | | | | | | | | | | | | Having the declaration of a function depend on compiler flags is a fundamentally bad idea since you can compile different compilation units that all include the header with different flags. This leads to undefined symbols. Pick-to: 6.5 Fixes: QTBUG-109159 Change-Id: I0aede280988e4f10c42d5b1824ad9c96a1e10854 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QCryptographicHash: no need to store return values just to ignore themJan Grulich2023-01-121-4/+2
| | | | | | | | | | There is no benefit from storing return value from some OpenSSL calls as the only thing we do is to ignore them. There is also no difference when we would be returning earlier. Pick-to: 6.5 Change-Id: I76c742016a2532c65ffdcd913aafc74a2d1a9623 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move q20::remove_cvref to q20type_traits.hMarc Mutz2023-01-125-15/+46
| | | | | | | | The original is defined in <type_traits>, not <functional>. Pick-to: 6.5 Change-Id: I596e56f64d2eed609ad2f7e6f03ae006afaa2fa9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtPrintSupport: Disambiguate static functionsFriedemann Kleint2023-01-122-4/+4
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: If3029d5b99499fd0e216fc080ade9842c2d11ea4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QNetworkDiskCache: optimize expire()Ahmad Samir2023-01-121-30/+39
| | | | | | | | | | - Use a std::vector<struct> that has the needed info already cached (e.g. now size() isn't computed twice) - Only sort the cache items if the size exceeds the cache limit and there are files to remove Change-Id: I69a7a5d1afb26d156c4babddf6b357ec68d569d1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QVarLengthArray: Extract Method growBy()Marc Mutz2023-01-121-3/+5
| | | | | | | | | | Separates the actual reallocation use-cases from the resizing ones when calling reallocate_impl, in preparation for fixing QTBUG-109745. Task-number: QTBUG-109745 Pick-to: 6.5 6.4 Change-Id: Iee0c3e56569ec7877beda8db3a645e2bbb6b4d4a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVarLengthArray::resize_impl: don't default argument, overloadMarc Mutz2023-01-121-3/+9
| | | | | | | | | | Separates the resize(n) and resize(n, v) code paths in preparation for fixing QTBUG-109745. Task-number: QTBUG-109745 Pick-to: 6.5 6.4 Change-Id: I49808ce4dc2f1de0de6af120990b2e00edb47728 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtSql: Disambiguate typedefsFriedemann Kleint2023-01-122-26/+26
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Pick-to: 6.5 6.4 6.2 Change-Id: I3f94044671cdbd0a1bb0964bf291e36508223b50 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Use the CLDR endonym in the documentationEdward Welbourne2023-01-121-1/+1
| | | | | | | | | Not sure where the docs got "Schwiizertüütsch" but it's not what CLDR gives for Swiss-German's endonym. Change-Id: I25d0aabea061ea34021311a2ec11d14ce61502d5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Don't std::move a trivially-copyable QTimeZone::ShortDataEdward Welbourne2023-01-121-2/+2
| | | | | | | | | CodeChecker (clang-tidy) grumbles about it and it's pointless for a trivially copyable type. So make the relevant constructors simply take ShortData by value. Change-Id: I49ea180df26c6fd56591f3f21a285b1f697352dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Include tzInfo.StandardBias in getCurrentStandardUtcOffset()Edward Welbourne2023-01-121-3/+10
| | | | | | | | | | | | It's usually zero, but in principle we should include it (when it's not flagged to be ignored), see https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/ns-timezoneapi-time_zone_information#members https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation for details. Task-number: QTBUG-109974 Change-Id: I8b6e0ea31a1cbd0e88f23ab01854e69258b0056b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QEGLContext::invalidateContextThomas Senyk2023-01-125-5/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | QEGLContext::invalidateContext will mark that egl context is invalide and trigger SceneGraph to destroy it, create a new one and re-create and re-upload all resources (e.g. textures) associated with the current state of the SceneGraph In addition this change also improves QEglFSWindow::invalidateSurface() and QEglFSContext::eglSurfaceForPlatformSurface(..) Where QEglFSWindow::invalidateSurface() will now destroy the corresponding EGLSurface via eglDestroySurface, including "unbinding" it from the current thread via eglMakeCurrent and un-setting the screen's EGLSurface in case it's the same resource. QEglFSContext::eglSurfaceForPlatformSurface(..) will now call QEglFSWindow::resetSurface() in case of getting a EGL_NO_SURFACE from the QEglFSWindow (which happens if above invalidateSurface() was called before) - therefor re-creating the resource if it was destoyed via QEglFSWindow::invalidateSurface() Pick-to: 6.5 Change-Id: I37badd1fc11e993c395fb1502e9bd27ebe18b821 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add missing header guardsFriedemann Kleint2023-01-122-0/+10
| | | | | | | Task-number: QTBUG-109394 Pick-to: 6.5 6.4 6.2 Change-Id: Idc5b0057d41186c8dfd7e752fe819ebebc6f8859 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Q{Contact,Calendar}Permission: rename isReadOnly → isReadWriteMarc Mutz2023-01-123-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | The typed permission classes' properties, insofar as they have any, should default to the least-intrusive capabilities. QLocationPermission implements it that way, but these two typed permissions defaulted to read-write access instead of read-only. This was fixed in an earlier commit. However, default values of properties are most natural when they're equal to the default-constructed value of the property's type, and this was no longer the case for isReadOnly. By renaming the property to isReadWrite, defaulting to false, this relationship is restored, and code using the classes looks more natural: - p.setReadOnly(false); + p.setReadWrite(true); Found in API review. Pick-to: 6.5 Change-Id: I4efa4c0326b5a54181c96f477709b0686c963e90 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Q<Concrete>Permission: unexport classesMarc Mutz2023-01-121-18/+18
| | | | | | | | | | | | | Non-polymorphic classes should not be exported wholesale, because MSVC exports inline API in such classes, too, which has caused numerous problems over the years. Only export individual functions. Pick-to: 6.5 Change-Id: I8be55c1fcdb21d143a02bb62498caeea6ebca068 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QPermission: add missing \since 6.5Marc Mutz2023-01-121-0/+1
| | | | | | | | | | | | | The Q<Typed>Permission classes get their \since via \include permissions.qdocinc permission-metadata, but using that for QPermission will break the \annotatedlist permissions trick used all over the permission docs, because QPermission would then be included in the list. The use of this mechanism needs more thought; QPermission shouldn't really be excluded from being \ingroup permissions. Pick-to: 6.5 Change-Id: I33207ffb39c04c23fb479c173e97dc0adb60691f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QCryptographicHash[OpenSSL]: allow to get intermediary resultJan Grulich2023-01-121-2/+4
| | | | | | | | | | | OpenSSL doesn't allow to add additional data when the hash has been finalized. To fix that, we just make a copy of the current context and call EVP_DigestFinal_ex() on the copy so we can still later add additional data. Pick-to: 6.5 Change-Id: If76d4ec56f8846d6ef55ed7ec7cbab440d43edd0 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>