summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Rename QWidgetBackingStore to QWidgetRepaintManagerTor Arne Vestbø2019-08-201-9/+9
| | | | | | | | | | | | | Quoting a blog from 2009, "this class is responsible for figuring out which parts of the window surface needs to be updated prior to showing it to screen, so it's really a repaint manager." https://blog.qt.io/blog/2009/12/16/qt-graphics-and-performance-an-overview/ What better time to do the rename than 10 years later! Change-Id: Ibf3c3bc8c7df64ac03d72e1f71d296b62d832fee Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Get rid of QWidgetBackingStoreTrackerTor Arne Vestbø2019-08-191-4/+5
| | | | | | | | | | | | | It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat dubious use-case. The Symbian code is since long gone (ae30d7141), so the remaining pieces are just adding complexity to the already intricate workings of the QtWidgets backingstore/painting logic. Task-number: QTBUG-8697 Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 2e0b0be2ce30394269559590b42c81de27301ee6) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make Qt aware of symlinks and shortcuts on WindowsRyan Chu2019-08-161-4/+162
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-163-0/+108
|\ | | | | | | Change-Id: Ia3645f92b9debf3e1fe2d972300c7d0dbd649268
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-153-0/+108
| |\ | | | | | | | | | Change-Id: Id7954ada1f8658d3b1da5e8241a09f2d201a7c56
| | * Add tst_qmake::qinstallJoerg Bornemann2019-08-143-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | ...with a failing test case for QTBUG-77299. Task-number: QTBUG-77299 Change-Id: I42c4fc4bb96f8660f8ff9bea97e6096ca6cec972 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-1514-21/+105386
|\| | | | | | | | | | | Change-Id: Icc80dacbca8613f2996be75553ff15d0ad242b7e
| * | Fix crash in optimized solid fills on RGBA64PMAllan Sandfeld Jensen2019-08-141-0/+13
| | | | | | | | | | | | | | | | | | | | | Was expecting destStore64 to be non-null. Change-Id: I4fc827256630a35e0669d405c04f9b5b7e71580e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | Add binary compatibility files for Qt5.13.0 for QtBaseMilla Pohjanheimo2019-08-1411-0/+105327
| | | | | | | | | | | | | | | | | | | | | Binary compatibility files added. Change-Id: If013647f17ade6a51e9f8678252b373d8f51d010 Reviewed-by: David Faure <david.faure@kdab.com>
| * | QTree/TableView: allow to reset the sort order to natural sortingChristian Ehrlicher2019-08-132-21/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | QTestLib: Introduce initMain() to run in main before qApp existsFriedemann Kleint2019-08-135-9/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Introduce QSignalSpy constructor allows to spy on a meta methodVitaly Fanaskov2019-08-131-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix tst_QImageReader::saveColorSpaceAllan Sandfeld Jensen2019-08-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | After comparing colorspaces was remove from QImage equality, the test was no longer testing what it was supposed to. Change-Id: Ie7ee8ac2f488ea4254086cbb91a2662dc729e80b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | tst_QFormLayout: use QAutoPointer to simplify test and avoid leakMarc Mutz2019-08-132-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | ... in case of a test failure. QAutoPointer is private API, but here we can use it. Change-Id: I45b734385cd13fdea95d0100f2d8152f969612f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Liang Qi2019-08-1310-15/+199
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-08-1310-15/+199
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/corelib/tools/qlist.h src/gui/painting/qcompositionfunctions.cpp src/gui/painting/qtriangulator_p.h src/gui/text/qfontengine_p.h src/network/kernel/qhostinfo_p.h src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-08-125-11/+97
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/arch/write_info.pri Repair architecture config test for the WASM_OBJECT_FILES=1 build mode configure.pri tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp Done-With: Jörg Bornemann <joerg.bornemann@qt.io> Change-Id: I9e12088356eb5bc65b53211cd7a8e330cccd1bb4
| | | * Make test less dependent on moving the cursorMorten Johan Sørvig2019-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sendMouseMove() function calls QTest::mouseMove(), which again calls QCursor::setPos() to move the cursor. It then creates and sends a MouseMove event, using the constructor which picks up the global position by calling QCursor::pos(). On macOS 10.14, QCursor::setPos() may silently fail if the user does not grant the application permission to move the cursor (via a dialog). As result of this the mouse move event gets an incorrect global position. Provide the global position directly when creating the event to make sure it gets the correct value. Task-number: QTBUG-75786 Change-Id: I3e8df450fea802783a3d1dbe471753f502b42de3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * QWizard: Account for missing background image on macOS 10.14+Morten Johan Sørvig2019-08-111-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were loading “Background.png” from the KeyboardSetupAssistant app bundle. As of macOS 10.14 that image is no longer there. Adjust auto tests and document the behavior. Change-Id: Icb4dd73b3fa88927e87bb86db2bc9f7b4a8094f7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * Add nullptr guard to QHighDScaling::scaleAndOrigin(QPlatformScreen *)Morten Johan Sørvig2019-08-111-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b6ded193 added an unconditional dereference of the platformScreen pointer, for calls where nativePostion is non-nullptr. Change-Id: I4a6fbbd0337f91d4fcb76c17b4dc60e1b9ad10ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * QBitArray: fix fromBits() and actually test itThiago Macieira2019-08-081-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I initially added it, it was ony for QCborValue, but I never added the tests. Turns out there were two bugs: [ChangeLog][QtCore][QBitArray] Fixed two bugs that caused QBitArrays created using fromBits() not to compare equal to the equivalent QBitArray created using other methods if the size was zero or not a multiple of 4. If the size modulus 8 was 5, 6, or 7, the data was actually incorrect. Fixes: QTBUG-77285 Change-Id: Ife213d861bb14c1787e1fffd15b70573d162042c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | * A GCC 4.8 build fixVille Voutilainen2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic128486711118e1124739e8dca30547ab8ba9816 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | * Fix crash in QTextDocument::clearUndoRedoStacks()Eskil Abrahamsen Blomfeldt2019-08-081-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling QTextDocument::clearUndoRedoStacks() with UndoStack, there were two bugs: The first was that we were retrieving the item at "undoState" and deleting this. This is actually the upper limit of the for loop. If the stack does not contain any redos, then it would be == undoStack.size() and we would assert. If there were redos, then we would delete the item at undoState multiple times (actually undoState times). In addition, when the loop exited, we first removed the dangling pointers using remove() and then there was a weird resize() to the new size minus the old undoState. This would either assert because we tried to resize to a negative number, or it would arbitrarily remove items from the stack. [ChangeLog][QtGui][Text] Fixed a crash bug in QTextDocument::clearUndoRedoStacks(QTextDocument::UndoStack). Task-number: QTBUG-69546 Change-Id: I8a93e828ec27970763a2756071fa0b01678d2dcd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * | BLACKLIST contains_QPointF for msvc-2019Heikki Halmet2019-08-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-77312 Change-Id: I5197d160d9b3c70b538c2e5a43c31120e1bed5f0 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-082-6/+0
| | |\| | | | | | | | | | | | | Change-Id: I4c0fd501db974fb8339944b8df845336776d80a9
| | | * tst_http2::connectToHost - fix flakinessTimur Pocheptsov2019-08-072-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some assumptions were incorrect: our test server immediately sends its SETTINGS frame, as a result we have to reply with client preface + SETTINGS(ACK). So QVERIFY(!prefaceOK) was wrong from the beginning and was only passing by pure luck. Change-Id: Ie43f0d4ac41deb0e5339badaae6149a9b2f9d9b3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | Fix GCC 4.8 buildVille Voutilainen2019-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I4994146b359e8e37f6c0fa1b27f03fb9e800fdd5 Fixes: QTBUG-77218 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-08-055-0/+102
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/unix/unixmake2.cpp src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: Iba7aa7324f35543e0297a3680956420058cd3630
| | | * tst_http2::connectToHost - add a fix for SecureTransport backendTimur Pocheptsov2019-08-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the tests above was unsetting a variable that enforces the use of a temporary keychain. We have to set it back, otherwise the test is failing. What surprises me though - why I had this problem only locally and not on CI? Apparently, SecureTransport is not covered by our configurations ... Change-Id: I0ff1e3e304632869391ed61213c245b949d8c778 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | * Blacklist tst_http2::connectToHostTimur Pocheptsov2019-08-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test if flakey. Change-Id: I1f956f47ab4cf0602f3631e4f7908df35f5ce83f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * QHighDPI: Fix broken scaling of QPoint(F)Friedemann Kleint2019-08-013-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason, the overload resolution of the High DPI scale() functions introduced by b6ded193ee64ffe67df6d22e7a23aa1ea9e02ec7 chose the wrong overloads for QPointF and/or QPoint; it fell back to the generic template intended for qreal, QSize, etc, ignoring the origin. Remove the template and spell out all overloads. Fixes: QTBUG-77255 Change-Id: I5661f16f7326f65156f646f430f5a0c71d5302d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Determine dependencies of Windows resource filesJoerg Bornemann2019-08-138-11/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows resource files support a subset of C preprocessor directives. Among others they can have #include directives. Use QMake's own scanner to retrieve the files that are included by a Windows resource file and add them to its dependencies. For the test case the TestCompiler class had to be extended: runCommand is now public, and commandOutput is less peculiar. Fixes: QTBUG-3859 Change-Id: I138703352c37c98297c0574a9a440510c1c494b8 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Don't insert items into the wrong rowLars Knoll2019-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happened to work by chance, as QList::insert() would gracefully handle out of bounds insertions. Change-Id: I7ee1e645ed9a538946a509957ce5155641ffea1d Reviewed-by: David Faure <david.faure@kdab.com>
* | | | QChar: add FormFeed (FF) special characterThiago Macieira2019-08-121-0/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QChar] Added FormFeed (FF) special character. Fixes: QTBUG-77089 Change-Id: I1024ee42da0c4323953afffd15b245a508f545f0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Support missing white-space:pre-line CSSAllan Sandfeld Jensen2019-08-122-4/+39
| | | | | | | | | | | | | | | | | | | | | A mode that only preserves new lines. Change-Id: I612347b181c6e6c41dfae0cf60b22a662cba1b7e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | CMake: Add support for auto-importing plugins in CMakeKyle Edwards2019-08-1238-1/+1079
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds transitive dependencies to the plugins, so that a sane set of default plugins get auto-imported when linking against a module. It also provides a new function, qt5_import_plugins(), which allows you to override the set of plugins that get imported. The decision of whether or not to import a specific plugin is based on several custom target properties and a very clever generator expression. Note that this change only imports plugins on static Qt builds. It does nothing on shared Qt builds, as the shared libraries already have their own plugin import mechanism. [ChangeLog][CMake] Added ability to auto-import non-qml plugins on CMake builds Task-number: QTBUG-38913 Task-number: QTBUG-76562 Change-Id: I2d6c8908b521cf6ba1ebbbc33a87cb7ddd9935cf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Deprecate QStringViewLiteralMarc Mutz2019-08-102-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a macro, we can't directly deprecate it, but need to make it call something deprecated. That is a new ctor with a new enum type added. The type might be useful for other such ventures, so put it into qglobal.h Remove the QT_NO_UNICODE_LITERAL protection, as it's always false these days, and QT_UNICODE_LITERAL is unconditionally #defined a 20 lines above. [ChangeLog][QtCore][QStringView] Deprecated the (undocumented) QStringViewLiteral macro. Just use u"" or QStringView(u"") instead. Change-Id: I9141320225037e1bc6b7f920bf01a9d0144fdac2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Refactor memory allocation for arguments of QMetaCallEventsVolker Hilsheimer2019-08-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two cases: In a BlockingQueuedConnection, QMetaCallEvent doesn't allocate memory and instead passes already existing pointers through. A QSemaphore is used to serialize data access between threads. So the constructor taking a QSemaphore can be simplified to only accept an existing arg array. In a QueuedConnection, QMetaCallEvent needs to make deep copies of the arguments, and memory needs to be allocated based on the number of arguments. The previous code put the burden of memory allocation on the code generating the event, while the memory was free'd by ~QMetaCallEvent. Instead, make it QMetaCallEvent's responsibility to allocate and free the memory as needed, and adjust the code generating QMetaCallEvents. We can allocate the memory for types and pointers to arguments in a single block, starting with the space for the array of void*, followed by the space for the array of integers to avoid byte alignment issues. By pre-allocating the space that's needed by three arguments, we can avoid all mallocs for the majority of QMetaCallEvents. Until this change has propagated through qt5.git, we need to keep the old API that is still used by QtDeclarative around. Once QtDeclarative has migrated to the new API, it can be removed. Change-Id: Id7359ffc14897237ea9672dabae9ef199a821907 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Warn about conflicting DESTDIR/TARGET combination in debug_and_releaseJoerg Bornemann2019-08-093-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a project has DESTDIR and TARGET set to fixed values, then the target paths conflict when doing debug_and_release builds. With this change we're detecting this situation and yield a warning. Fixes: QTBUG-2736 Change-Id: Ib163db3463322792ab9fa5b997285ac9fc9819ab Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | tst_qmake: Pass /nologo to jom like we do for nmakeJoerg Bornemann2019-08-091-1/+3
| | | | | | | | | | | | | | | Change-Id: Id9b2ac4dd7d591d471d3e21e8d78d4915620a2c1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | QTextDocument: add manual test for table border logicNils Jeisecke2019-08-099-0/+616
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a manual test for the QTextTable border logic. Two HTML files are bundled as resources: table-border-test.html: Contains various test cases for the border logic. table-border-test-header.html: Contains a test case for printing a table with a repeated header. The test application allows: - editing - previewing - printing - opening the HTML in the system browser (via temp. file) It is possible to edit the HTML with "live preview" so new test cases can easily be implemented. Change-Id: Ic88488bc8b7dd74d5c03c3363f55840423462325 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QDateTimePrivate: inherit QSharedData and other cleanupsMarc Mutz2019-08-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't manage the ref-count yourself, as this requires the code to use the QAtomic copy ctor, which we want to remove going forward. Using QSharedData, we can let the compiler write the code for us. Since 'ref' this way moves to the first spot in the list of effective members, creating a 4B hole between itself and 'msecs', swap 'status' and 'msecs' to fill the hole: offset: 0 8 16 24 | | | | without v v v v adj.mnt: |*R*| | msecs | S | U | TZ.... before: | msecs | S | U |*R*| | TZ... after: |*R*| S | msecs | U | | TZ.... This keeps the padding out of the critical first word, which improves latency. That said, for accessing the members the old layout surely was optimal. This layout optimizes copies and pessimizes access to 'msecs' on 32-bit platforms without the Critical Word First optimization. Requires adjustments to tst_toolsupport and the qhooks version. Also default members using NSDMI, consequently drop the manual default ctor. Change-Id: I3c48e68694ad29b28a13aa47ea0f283fae52edd7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QPoint/F: add transposed()Marc Mutz2019-08-072-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For symmetry with QSize and QRect and because there were some users in Qt. Port those users. [ChangeLog][QtCore][QPoint/QPointF] Added transposed(). Change-Id: If4f23dbcf7d67983a6b1885e0d1d538115b49e2b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QVector/QList/QLinkedList/QVarLengthArray/QSet: add missing deduction guidesMarc Mutz2019-08-0710-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 2e1763d83a1dacfc5b747934fb77fa7cec7bfe47. The new range ctors need deduction guides, since the compiler can't deduce the value_type from a pair of iterators. Change-Id: I3ec1e5f91305b317c443b6a70246be416b55bad9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | CMake: Fix some failing cmake testsKyle Edwards2019-08-073-2/+8
| | | | | | | | | | | | | | | Change-Id: I74f2bf270726feba8367ea222a3c669110c99e08 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove the unused includes for QSignalMapperSona Kurazyan2019-08-051-1/+0
| | | | | | | | | | | | | | | Change-Id: I13f19fadc7ad3fed8eb0a6718244cc8880e91be9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Add an easier way to change colorspacesAllan Sandfeld Jensen2019-08-021-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds setters for transfer-functions and primaries. This allows us to remove use of private QColorSpace API from the PNG handler. Change-Id: Ieeff81c813c253649500acd1e53f35247b872325 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Improve our color space terminologyAllan Sandfeld Jensen2019-08-021-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace our use of 'gamut' with 'primaries'. One is the axes of the color space, the other the volume of representable values. For the currently supported color spaces those are mostly equivalent, but when we later add support for scRgb, this would be misleading as it has the same primaries as sRGB but a much wider gamut, and we would like to use the same primaries/"gamut" id for it. Also few people would know what "the sRGB gamut" is, but "the sRGB primaries" is easily googable. Change-Id: I3348ccaae27a071ec77a4356331b9bbbf92e0d19 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Remove usages of deprecated APIs of qtbase/widgetsSona Kurazyan2019-08-0115-30/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace the usages of deprecated APIs by corresponding alternatives in the library code and documentation. - Build docs for deprecated APIs conditionally, based on deprecation version. Remove the docs of methods deprecated since 5.0.0, these methods are not compiled anymore. - Modify the tests to make them build when deprecated APIs disabled: * Make the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, add tests for the replacement Task-number: QTBUG-76491 Task-number: QTBUG-76540 Task-number: QTBUG-76541 Change-Id: I6aaf0a1369c479fb880369a38f2b8e1e86b46934 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Improve the keypadnavigation manual testSona Kurazyan2019-08-011-21/+16
| | | | | | | | | | | | | | | | | | | | | | | | - No need to use QSignalMapper here, replace its uses with lambdas. - Replace index 'for' loop with iterator loop, to simplify the code. Change-Id: Ide3d2db99a074c0233eb5c2fd7a9b217d804973f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>