summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix rare double-free in QObject machineryMårten Nordheim2019-08-191-2/+13
| | | | | | | | | | | | | | | | | As exposed by tst_QObjectRace::destroyRace we would sometimes end up with a double-free when destroying a QSlotObject in multi-threaded scenarios. One free would be done in ~QObject as the receiver was being destroyed while the other free was done when deleting a QMetaCallEvent object after we realized it was not needed because the receiver was destroyed. Since we can be in a separate thread from the receiver we should lock before referencing the connection object. Amends b7d073e9905bf9812ba96cecdcf6871a95517d30. Change-Id: Icb53862dc880ae9a4e5581a1a9ee693573f7d9c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: Fix env vars parsingBogDan Vatra2019-08-191-3/+3
| | | | | | | env var values might contain '=' char, so we can't use split. Change-Id: Iedf3ea46a847acaaf02f51bc80586a519fe7a310 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix build without features.dlopenTasuku Suzuki2019-08-192-3/+7
| | | | | Change-Id: I4ad24c241d3c32a5658bf71fa6133181793020d3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build without features.poll_{ppoll,pollts,poll,select}Tasuku Suzuki2019-08-182-1/+14
| | | | | | Change-Id: Idc87521cdf713682ed07eb28b3d3f2f3ca0675ce Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* rhi: d3d11: Rework swapchain effect handlingLaszlo Agocs2019-08-172-43/+75
| | | | | | | | | | | | | | | | | | | | | | | Use FLIP_DISCARD swapchains only on Win10, stick with DISCARD otherwise. This may fix the swapchain creation problems on Windows 7. Add a QT_D3D_NO_FLIP env.var. to make it possible to disable using FLIP_DISCARD even on Win10. This is there for troubleshooting purposes. Finally, fix the backbuffer handling. What we originally ported from the D3D12 backend of Qt Quick is not quite how DXGI used to work with D3D11 and earlier. GetBuffer() can only be used to query index 0, and that's the backbuffer, the rest is managed internally. Follow this model. As an added bonus, disable Alt+Enter. Change-Id: Ie5c7a1e813864e7f873d55bc72cb22fc09213a05 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: metal: Avoid flicker due to writing an in-use Managed bufferLaszlo Agocs2019-08-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | Qt Quick apps feature an occasional flicker which seems to be caused by updating the contents of a Static (or Immutable) QRhiBuffer in a frame where the QRhiBuffer in question is read in the previous frame as well. On macOS these types map to a Managed MTLBuffer and only one native buffer object (MTLBuffer). It seems modifying such a buffer is not safe if the previous frame has not completed. (this may be as expected, but hard to tell due to Metal's underdocumented automatic hazard tracking which we rely on atm) So for now switch to having 2 native buffers, like we do for Dynamic (on iOS/tvOS this would be the case anyway since there all buffers are host visible and slotted regardless of the QRhiBuffer type). This seems to solve the issue. To be seen if we want to move to a more Vulkan-like setup where Immutable and Static map to device local (Private). Change-Id: I76013f58a2e183ad8eab0705b28a03b395c4530c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Add pkg-config library source to bcm_hostTasuku Suzuki2019-08-171-0/+1
| | | | | | | | Buildroot(buildroot.org) provides bcm_host.pc for Raspberry Pi Change-Id: Ia8b13ded4d48aac53693f5041e7ef5303513f5e9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QWidgetBackingStore: clean up around dirtyOnScreenWidgetsMarc Mutz2019-08-172-50/+13
| | | | | | | | | | | | | | | | | | | | | | The QVector dirtyOnScreenWidgets was aggregated by pointer, which makes no sense, as a QVector is just as large as a pointer (and even in Qt 6, when it will be larger, it's not going to be horrible). But this complicated the code quite a bit. Aggregate by value instead (it's just one of three such vectors now). Drive-by fixes: - use QVector::removeAll() instead of rolling your own - port two indexed loops to ranged ones. In the first case, it's safe, as the loop body clearly doesn't touch the iteratee (it's just a std::accumulate). In the second, the question no longer applies, as we're now using a consume loop. Change-Id: Icd4ac13bb4a6f9a783f0adf2fb6a5bdfacd1f91a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QBezier: inline fromPoints()Marc Mutz2019-08-172-19/+2
| | | | | | | | | | | There's really no reason for it to be out-of-line, and we're going to use it in QBezier::split(), which is inline, and we want the optimizer to have a field day with the source, without a compiler firewall in the way. Change-Id: I49ae3a87fcce1e2dc87a9081f567503e5a98ef6b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix build without features.proxymodelTasuku Suzuki2019-08-171-0/+4
| | | | | Change-Id: I9e51ed78d783da999187e7df58ddb83d76e3c7b7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make Qt aware of symlinks and shortcuts on WindowsRyan Chu2019-08-162-15/+125
| | | | | | | | | | | | | | | | | | | | | | | | | Qt has traditionally considered Windows shortcut files equivalent to symlinks on Unix file systems. Because of NTFS symlinks, the interpretation of shotcut files as symlinks is confusing. In this change, QFileInfo treats shortcut (.lnk) files as regular files but can follow the pointed object. In addition, QFileInfo introduces a more comprehensive file type. So that applications can make well-informed decisions about how to treat a file system entry. Based on the implementation of QFileInfo::type(), two inline helper functions are introduced to QFileInfo. 1. isSymbolicLink, returns true if it points to a symbolic link. 2. isShortcut, returns true if it points to a shortcut. [ChangeLog][QtCore][QFileInfo] Introduce QFileInfo::type() to replace the isSymLink method. Task-number: QTBUG-75869 Change-Id: Icc0dd52f9ad0ea50b0265d77ee0d0a3d25054e39 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QWidget: unbreak QT_NO_OPENGL buildsMarc Mutz2019-08-161-0/+2
| | | | | | | | | | | | | | | | | Amends 94d7603d5114eacaf648e0b0d2dcae5e161e0217. The port from QVector<QPlatformTextureList*> to a container of unique_ptr<QPlatformTextureList> uncovered that QPlatformTextureList isn't defined for QT_NO_OPENGL builds. Some unguarded forward-declarations made the old declaration compile by accident. The new code caught this, so add the #ifdef that had been missing all along. Change-Id: If3b14fc24007b1c917a41ab83343c2e5e65fc643 Reviewed-by: Martin Storsjö <martin@martin.st> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io>
* QWidget: replace manual memory management with unique_ptr [5/N]: extra->topextraMarc Mutz2019-08-162-6/+5
| | | | | | | | | | It is a bit frustrating that all the initialization and cleanup code are not in the QTLWExtra ctor and dtor. But that is for another patch. Change-Id: I0e45f89c1a53eb2f9a5699d3fbbef1a628b55432 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QWidget: replace manual memory management with unique_ptr [4/N]: extra->cursMarc Mutz2019-08-162-14/+4
| | | | | | | Change-Id: Id65ead5563321b8edbe0055ad1531c2442d4d597 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QWidget: replace manual memory management with unique_ptr [3/N]: ↵Marc Mutz2019-08-162-8/+7
| | | | | | | | | | | | | | | topextra->shareContext Despite the name, it's fully owned by an individual QWidget object. Also make the member mutable, so we can remove the const_cast hack in QWidgetPrivate::shareContext(), and protect QT_NO_OPENGL builds, since the naked pointer compiled by chance due to some unguarded forward declarations while a unique_ptr will somewhere want to call the dtor, which doesn't compile on an object of merely forward-declared type. Change-Id: If8027b55d303822236fcdc1a79e4f3010967b4d2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-169-24/+40
|\ | | | | | | Change-Id: Ia3645f92b9debf3e1fe2d972300c7d0dbd649268
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-159-24/+40
| |\ | | | | | | | | | Change-Id: Id7954ada1f8658d3b1da5e8241a09f2d201a7c56
| | * QSysInfo: Use the Apple IOKit API to get the machine's UUIDThiago Macieira2019-08-141-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out that kern.uuid is not as unique as we thought. Googling for mine finds other instances of the same being used. Fixes: QTBUG-75371 Change-Id: I95ecabe2f50e450c991afffd159850cc975ec0da Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Add the detection of MSVC 2019 for QLibraryInfoFriedemann Kleint2019-08-141-1/+3
| | | | | | | | | | | | | | | Change-Id: Ie3ea1cdae60bf0d7dd89a0ab84146c8370559a29 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| | * Avoid querying unknown RESET_NOTIFICATION_STRATEGY value on GL < 4.0Laszlo Agocs2019-08-142-9/+14
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-55759 Change-Id: Ie2758859a6862a214691a5011761bf549a31a93e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * Include buildAbi() in the shader cache directory nameLaszlo Agocs2019-08-141-1/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-64697 Change-Id: I8b81bce94c50464105a9a43086b06b841e4b8551 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * glx: Do not flood with warnings when reducing during config lookupLaszlo Agocs2019-08-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With things like sample count reducing a format (16 -> 8 -> 4 -> ...) and trying again is perfectly fine. There is no need to show warnings in this case. Even some of our own examples in qtdeclarative do a setSamples(16) which is rarely supported. These all show warnings since 8ec98fc2dc40237730f99af099dffe2920ef5bcc. Avoid this. Change-Id: Ice83d5720b02e92f77cfd63918c98ad222513b6a Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * Limit curve stroking threshold to reasonable rangeEirik Aavitsland2019-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid unreasonable threshold values for extremely wide pens, since that can lead to a very high processing cost. The rare usecases where this would make a noticeable difference will necessarily also be using scaling, and so is anyway depending on setting a suitable curve threshold manually. Fixes: QTBUG-77241 Change-Id: I27cea7d566d144389bb430739fde4f6033c4a28c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Make our connection-level window half of a possible maximumTimur Pocheptsov2019-08-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some servers seem to be unable to properly calculate our window size from a delta we send via WINDOW_UPDATE frame immediately after our client preface and the SETTINGS frame. The remote replies with a GOAWAY frame blaming flow control error. Guessing what's this magic number they use seems to be not feasible, we now use a half of what we had before. Fixes: QTBUG-77308 Change-Id: I41dacfd25a395a27003f330d01b6d8d60b8f407c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * Bound the scope of QTRY_LOOP_IMPL()'s local variableEdward Welbourne2019-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTRY_IMPL() exercises QTRY_LOOP_IMPL() twice, once directly, the second time via QTRY_TIMEOUT_DEBUG_IMPL(); and QTRY_LOOP_IMPL() deliberately doesn't bound its scope (e.g. with the canonical do{...}while(0) trick) so that the latter can access its local variable. Unfortunately, this means the local's declaration in the second use of QTRY_LOOP_IMPL() shadows the first. So enclose the first in braces to bound the scope. Fixes: QTBUG-77297 Change-Id: I849bfe0b8abfb517ed3e783abf86c602163db137 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Introduce a new feature called easingcurveTasuku Suzuki2019-08-1613-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | features.animation and features.scroller depend on the feature. In total, this saves around 180KB from QtCore and 75KB from QtWidgets. Change-Id: I65aac3ec4d50d62424ee33f44b99f3cfb91121d6 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Fix build without features.shortcutTasuku Suzuki2019-08-151-0/+2
| | | | | | | | | | | | | | | Change-Id: I56ccf104c57e24824e8d09951bb27415307d5abc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Qt Forward Merge Bot2019-08-155-5/+16
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-155-5/+16
| |\| | | | | | | | | | | | | | Change-Id: Icc80dacbca8613f2996be75553ff15d0ad242b7e
| | * | Fix crash in optimized solid fills on RGBA64PMAllan Sandfeld Jensen2019-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Was expecting destStore64 to be non-null. Change-Id: I4fc827256630a35e0669d405c04f9b5b7e71580e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * | QTree/TableView: allow to reset the sort order to natural sortingChristian Ehrlicher2019-08-132-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTreeView allowed to set the sort column to -1 which shows the data in it's natural order (when the model supports it). This functionality was removed during the porting away from the deprecated sortByColumn(int) functionality done in d0f909f8dbdd8594b0d950822f0e7ab8728da513 Readd the functionality and also allow it for QTableView. Fixes: QTBUG-77419 Change-Id: I96b0c09ab9da36ca0a9de58fe0f37e2c56b1d51b Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: David Faure <david.faure@kdab.com>
| | * | Unix: Disable complex page ranges widget when printing to pdfAlbert Astals Cid2019-08-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't work since it relies on cups to do the heavy lifting and cups is not used when printing to PDF Task-number: QTBUG-77351 Change-Id: I1bdda58b50112b9bb3d7991f3cfd860d6b4f4fc4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Add Q_ENUM for QCompleter enumsVolker Krause2019-08-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary in order to use the properties of QCompleter that use these enums. Change-Id: I9f7edfc1137f200810b6bc98d27709695f37de5d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | QWidget: replace manual memory management with unique_ptr [2/N]: topextra->iconMarc Mutz2019-08-142-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wonder whether a QIcon could be aggregated here by value, as it has a null state and its default ctor sets d = nullptr. Change-Id: I7a0f46e9fdd51a93afb5db768d46d93b08f307ec Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | QWidget: replace manual memory management with unique_ptr [1/N]: widgetTexturesMarc Mutz2019-08-143-14/+17
|/ / / | | | | | | | | | | | | | | | | | | | | | Use a vector<unique_ptr> (QVector cannot hold move-only classes), adapt to different API. Change-Id: Iece4b1bfcb35a02aac05935963e1e7f8c986b18d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Fix build without features.groupboxTasuku Suzuki2019-08-151-0/+2
| | | | | | | | | | | | | | | Change-Id: Ic040d0ba69620cf49700d83e45ccd9b8c363e587 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QFileSystemModel: Add optionsFriedemann Kleint2019-08-142-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Options flags similar to QFileDialog: - DontWatch: Do not use file system watchers for simple use cases like line edit completion. This brings it closer to QDirModel, which then can be deprecated. - DontResolveSymlinks: Similar to QFileDialog::DontResolveSymlinks. - DontUseCustomDirectoryIcons: matching QFileIconProvider::DontUseCustomDirectoryIcons for convenience. Task-number: QTBUG-76493 Change-Id: I09d3cb73ef902a700e6ebfba427e2d990fce4b4c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | rhi: gl: also enable point sprites on non-ESLaszlo Agocs2019-08-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | With GLES both point sprites and gl_PointSize in the vertex shader are implcitly enabled, but OpenGL has these as optional and must be enabled explicitly. Change-Id: I48cf6134f6bbd721cb938e2cad82d255cf4fb2cd Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | rhi: gl: Fix broken bgra textures on GLESLaszlo Agocs2019-08-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Switching TexImage2D to the sized internal format was a bad idea. Go with what we do without the RHI in QtGui and elsewhere, and just pass the unsized GL_RGBA or GL_BGRA. Change-Id: I8216c0e49813355fa5e2594b24f06c64bc8e3873 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | rhi: gl: remove useless npot checksLaszlo Agocs2019-08-143-49/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjusting the size is not very useful on its own. Leave it to Qt Quick or whoever provides the data to scale the source image data as they see fit. This is also more in line with other backends. While we are at it, update the feature flag documentation. It applies both to the repeat wrap mode and filtering modes other than nearest and linear (i.e. mipmapping). Change-Id: Ie28f1436b862335efeac042dc21e09189f46e626 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | rhi: Avoid generating gl errors in ES 2.0 contextsLaszlo Agocs2019-08-142-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | ...due to setting the unsupported texture compare mode. This keeps wasm happy (gl errors show up in the console there). Change-Id: I5de8bce8e793c709272f3df499d2320c7b07ff71 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | QTestLib: Introduce initMain() to run in main before qApp existsFriedemann Kleint2019-08-132-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running Qt autotests on a developer machine with a high resolution, failures occur due to either some widget becoming too small, some rounding fuzz appearing when Qt High DPI scaling is active, or some test taking screenshots failing to deal with device pixel ratios != 1 in the obtained pixmaps. It is not feasible to adapt all tests to pass on high resolution monitors in both modes (Qt High DPI scaling enabled/disabled). It should be possible to specify the High DPI setting per test. Previously, it was not possible to set the Qt High DPI scaling attributes since they must be applied before QApplication instantiation. Enable this by checking for the presence of a static void initMain() function on the test object and invoking it before QApplication instantiation. Prototypically use it in tst_qtimer and to turn off High DPI scaling for tst_QGL. [ChangeLog][QtTestLib] It is now possible to perform static initialization before QApplication instantiation by implementing a initMain() function in the test class. Change-Id: Idec0134b189710a14c41a451fa8445bc0c5b1cf3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | eglfs: Drop annoying warnings without drm atomicLaszlo Agocs2019-08-131-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | No point in warning on every application startup that framebuffer size setting is not available. Just ignore it then. Change-Id: Id36ff0ab9560b99cc3f2d56a4ee51455cfa43cb7 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Remove extra semicolon from QConcatenable<const char16_t *>::sizeMichael Brüning2019-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | Reduces the number of warnings when building a bit. Change-Id: I18e9a95a211736f18876405ba3d866f704e4dbe0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QFileInfoGatherer: Make it possible to turn off file watchingFriedemann Kleint2019-08-132-30/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean watch property and delay-create the file system watcher in watchPaths(). De-inline the watchedFiles(), watchedDirectories(), watchPaths(), unwatchPaths() helpers and a check for the watcher. Task-number: QTBUG-76493 Change-Id: Ie02ac496c8c0246be62bc67ff7e0fcdb990b5ca6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Introduce QSignalSpy constructor allows to spy on a meta methodVitaly Fanaskov2019-08-133-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | This functionality is especially convenient if meta-object system is heavily used in a test. For example, if you need to test a bunch of signals based on their names and/or argument types. Change-Id: I09a4ecbbd3d0859b5fd466d9dde7679804eb7614 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QTextCodec: port to QRecursiveMutexMarc Mutz2019-08-131-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write a local mutex locker for DRY. Use qt_unique_lock(Mutex*) because we do not intend to add a QRecursiveMutexLocker and by Qt 6, the current work-around where QMutexLocker works for QRecursiveMutex, too, will be gone. Could have used qt_scoped_lock, because no premature unlock() calls are present, but it turns out the code attempts to take the mutex after it's destroyed by Q_GLOBAL_STATIC, so we need QMutexLocker compat, thus qt_unique_lock(Mutex*) instead of qt_scoped_lock(Mutex&). Need to use decltype and using because auto doesn't work for NSDMs. Change-Id: I8b0f8a3067f0a412279d075cb959105e485789cd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QResource: port from QMutexLocker to qt_scoped_lockMarc Mutz2019-08-131-13/+13
| | | | | | | | | | | | | | | Change-Id: I483e4765ef83d13e81bb830c9f48421410c5718b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QSignalSpy: Extract object validation to a separate methodVitaly Fanaskov2019-08-131-6/+12
| | | | | | | | | | | | | | | Change-Id: I167a01257cfdb679cb81861bfae26d8fa40f8c27 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QSignalSpy: Extract meta signal validation to the separate methodVitaly Fanaskov2019-08-131-5/+12
| | | | | | | | | | | | | | | Change-Id: I37a74ea4487a437646815d3117ec8b0fd7073205 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>