summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Move text-related code out of corelib/tools/ to corelib/text/Edward Welbourne2019-07-10100-53/+65
| | | | | | | | This includes byte array, string, char, unicode, locale, collation and regular expressions. Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Win: qdiriterator bench: fix missing null-terminator issuesMårten Nordheim2019-07-102-14/+15
| | | | | | | | | | | | | | It's not done by toWCharArray. This caused some issues as we were using API requiring a null-terminator. wcslen for instance was measuring the string as being millions of characters long, causing fairly quick crashes when appending. Change-Id: Iedaaf9f195be22a610543ab649da92a87cb71973 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QTestlib: Check compared images for device pixel ratioFriedemann Kleint2019-07-097-61/+135
| | | | | | | | | | | | | When accidentally running a test doing screen-grabbing with High DPI scaling active, sizes of the obtained pixmaps can differ due to the device pixel ratio. Add a check to make that clearer. [ChangeLog][QtTestLib] Comparison of QImage, QPixmap now checks for the device pixel ratio. Change-Id: Id8d5187e99c565c44a7bfb8b9cfb09737815fb15 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Revert "QFtp: Skip the flaky QTestEventLoop::timeout in Coin network"Ryan Chu2019-07-091-48/+32
| | | | | | | | | | This reverts commit 33d2715dd34d39a3250d7b66b785f421c7e07719. Reason for revert: <QTBUG-76367> Change-Id: I134514e729d7066ab5f67a0536e653868bf15ed7 Reviewed-by: Dimitrios Apostolou <dimitrios.apostolou@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* unblacklist passing testsDaniel Smith2019-07-0878-308/+537
| | | | | | | | These tests have not failed on the removed platforms for at least 60 days Task-number: QTBUG-76608 Change-Id: If7a9f4db907124e3cd54e3f4b0ad3e20717d1912 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add manual test for QNetwork{Connection|Status}MonitorMårten Nordheim2019-07-083-0/+225
| | | | | | | | | | | | | Simplistic console application with one test for each of the two classes. Simply tests that we receive the signal when the connection is disrupted in some way. This patch also exports the classes for tests/developer builds so that we can actually link with them. Change-Id: I8066312274350984110c3f3ad3e94854adca7c2a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkReply: Skip a test when QNetworkStatusMonitor is enabledMårten Nordheim2019-07-081-0/+3
| | | | | | | | | | | | | | QNetworkSession has a concept of UsagePolicy which can disable background* transfers to conserve battery or bandwidth. However, it is only possible to change the policy through QNetworkSessionPrivate::setUsagePolicy which currently doesn't have any callers outside of our auto tests. *background = transfers not initiated directly by the user, but needs to be marked as such by the application developer. Change-Id: I92c4abccaca040612b4795abe7c52d68a2d21749 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QTextBrowser: assume Markdown is UTF-8Shawn Rutledge2019-07-082-0/+29
| | | | | | | | | That's how CommonMark specifies it. The HTML codec-guessing algorithm was making it fall back to Latin1 in practice, which was screwing up any Unicode characters found in the markdown source. Change-Id: I4021adc4a68591ecfd56ef24971af53ce3e9c96d Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Q_ARRAY_LITERAL: protect the check for literal typesGiuseppe D'Angelo2019-07-061-0/+12
| | | | | | | | | | Some compilers (hello, MSVC) do not produce literal types in Qt because their constexpr support has been blacklisted. Therefore, amend the check for literal types in Q_ARRAY_LITERAL: only do the check if the compiler supports constexpr. Change-Id: I7cffe00dde447d975aa6a7d02248df9c351508ff Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Port some trivial cases from QMutex to QRecursiveMutexMarc Mutz2019-07-062-6/+2
| | | | | | | In all of these cases, the effect of the change is local to one file. Change-Id: I3bda3aadee3b42e7797183c2330183390b92d1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Short live QRecursiveMutex!Marc Mutz2019-07-061-4/+5
| | | | | | | | | | | | | | | Move the recursive mutex use case out of QMutex into a separate class, unsurprisingly called QRecursiveMutex. As an immediate benefit, 90% of the QMutex users now enjoy a constexpr QMutex ctor. This change prepares for a real split in Qt 6, so that both use-cases are no longer bundled up in one class. [ChangeLog][QtCore][QMutex] Added QRecursiveMutex as a replacement of QMutex(QMutex::Recursive). Change-Id: I79b8724e8a8ee65e4bd0f06acd76103fe4197b8c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.13' into dev"Liang Qi2019-07-055-5/+42
|\
| * Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-055-5/+42
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/generators/makefile.cpp Change-Id: Ifb2633a69d0bf8cdf12d799c6259beefc279c49e
| | * Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Qt Forward Merge Bot2019-07-033-4/+16
| | |\
| | | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-033-4/+16
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I936be3c0df2b9845ff6a85eb3d4442cdabe63d37
| | | | * Skip flaky test on MacOS_10_12Dimitrios Apostolou2019-07-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the most flaky-pass test currently. It fails the first time it is run on MacOS_10_12, but succeeds all the following times. This happens extremely often, so disable it until the issue is resolved. Task-number: QTBUG-76566 Change-Id: I94359eceb91c3b958930424e6c8b5957fb3f1252 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | | * Update visible window's alpha when toggling WA_TranslucentBackgroundVolker Hilsheimer2019-07-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidgetPrivate::updateIsTranslucent sets the surface format of the window with the alpha based on the translucency attribute, so we need to call this function when the attribute value changes. The test can confirm that the window's requested surface format has changed, we can't rely on what is actually set, and don't have to rely on hard-coded values like 8bit alpha. While WA_NoSystemBackground needs to be set for WA_TranslucentBackground to have an effect, we can't clear the attribute when clearing translucency (as it might have been set explicitly). Change-Id: I238d6930b7e0488397467a4e035b5f530566a1ff Fixes: QTBUG-60822 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | | * QSocks5SocketEngine: account for in-transit signal when waiting for readMårten Nordheim2019-07-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling waitFor{ReadyRead,Disconnected} it will wait for data but if the data is already received and the read notification has been queued (and there's no more data coming in) it will return false. By checking if a read notification has been queued and then handling this we can easily take care of this scenario. Fixes some flaky tests which missed the read data in waitForDisconnect and similar. Fixes: QTBUG-38385 Change-Id: Ic05d59883c1175783e56ff1822b6636c35aec874 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | | Handle multiple font-families in <font> face attributeAllan Sandfeld Jensen2019-07-031-0/+24
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This seems to be a common use case, and to be expected from pastes of MSWord documents. Change-Id: I5849d7f51408e76f15a0b03c2118649f118af1d6 Fixes: QTBUG-66794 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | QPluginLoader: fix failing test comparing the Qt versionThiago Macieira2019-07-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We stopped storing the patch release number of Qt in the plugin metadata in commit 7bd79b3cffbbbece23867c5e111a3dd2ebcad016 (5.13), to make it simpler to parse the validity of plugins before decoding the CBOR payload. Fixes: QTBUG-76855 Change-Id: I6aed4df6a12e43c3ac8efffd15adbbf83e928866 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | | tst_QTcpSocket::hostNotFound Only expect failure for the http proxyMårten Nordheim2019-07-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I added the QEXPECT_FAIL the http proxy was the only one. That's no longer true after fixing the SOCKS proxy, so let's make the condition more specific. Change-Id: I1eaa5117d5d0219e04cbd091ec54e522fe7b5509 Reviewed-by: Dimitrios Apostolou <dimitrios.apostolou@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Remove usages of QSysInfo's deprecated APIsSona Kurazyan2019-07-056-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced QOperatingSystemVersion::WindowsVersion, QSysInfo::windowsVersion(), QSysInfo::macVersion(), QSysInfo::MacintoshVersion with QOperatingSystemVersion::current(). - Added QOperatingSystemVersion::WindowsVista for convenience, as it is used in lots of places. Change-Id: If9c4ac496005b2e70b5c70be160747afa74b98c1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Remove usages of deprecated APIs of corelibSona Kurazyan2019-07-0518-68/+495
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of deprecated APIs of corelib by corresponding alternatives in the library code and documentation. - Modified the tests to make them build when deprecated APIs disabled: * Made 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, added tests for the replacement. Task-number: QTBUG-76491 Task-number: QTBUG-76539 Task-number: QTBUG-76541 Change-Id: I62ed4a5b530a965ec3f6502c6480808f938921aa Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Add QT_NO_JAVA_STYLE_ITERATORS and mark QtBase free of itMarc Mutz2019-07-035-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... except for tests, which manually undefine the macro. Like QT_NO_FOREACH, this is a technical way to keep JSI-free modules JSI-free going forward. Change-Id: Icf1342da00a700f42f9e32a253d1cdb94c38dd7e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QPainter: mark obsolete RenderHints as deprecatedChristian Ehrlicher2019-07-034-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RenderHint::HighQualityAntialiasing and NonCosmeticDefaultPen are obsolete since Qt5 but not marked as such. Therefore add Q_DECL_ENUMERATOR_DEPRECATED_X now so those two enumerations can be removed with Qt6. [ChangeLog][QtGui][QPainter] HighQualityAntialiasing and NonCosmeticDefaultPen are marked as deprecated and don't have an effect anymore Change-Id: Ib0c966a078a1d23d492d0255288e2066c50e87b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | tst_QShortcut: Remove test widget and other member variablesFriedemann Kleint2019-07-021-184/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the mainW, edit widget member variables from the test and use widgets instantiated on the stack in the tests. For the data-driven tests, use a static QScopedPointer, which is reset by a newly introduced TestEnd action. The book-keeping logic maintaining a list of shortcuts can then be removed. The setupShortcut() helpers are simplified and the special case TestWidget::SendKeyEvent is replaced by a lambda in keypressConsumption(). Task-number: QTBUG-76493 Change-Id: I15dfa86dfa0666ed8288b7190e37cdb862c261c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | tst_QShortcut: Brush up the code, preparing the extraction of a base class ↵Friedemann Kleint2019-07-021-230/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to QtGui - Use nullptr - Fix static method invocations - Use QString() instead of QString("") - Use override - Use member initialization - Remove unimplemented code related to status bars - Use Qt 5 connection syntax - Fix apparent oversights in ambiguousItems() and unicodeCompare(),where the 2nd shortcut was assigned to the wrong button - Use Q_ENUM for the enumerations which will output the value in QCOMPARE and automatically declare them to be a metatype - Use enums in helper function signature for clarity Task-number: QTBUG-76493 Change-Id: I0ed6ee7ee8dc2dbb48160a8383e6ed29164c3449 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Remove usages of deprecated APIs from QDateTimeSona Kurazyan2019-07-025-8/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of: * QDateTime::toTime_t() -> QDateTime::toSecsSinceEpoch(). * QDateTime::fromTime_t() -> QDateTime::fromSecsSinceEpoch(). * QDate::shortDayName() -> QLocale::system().dayName(). * QTime by QElapsedTimer, where the deprecated methods of QTime were used. - Modified the tests for the deprecated methods to be enabled only when the corresponding methods are enabled: when the deprecated APIs are disabled, the tests will be also disabled, and the compilation won't be broken. Task-number: QTBUG-76491 Change-Id: I4d565db2329e580c567aae511696eb1efe120843 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Make the default ctor of QVarLengthArray implicitUlf Hermann2019-07-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise "QVarLengthArray<Foo> x = {};" gives a warning. Also, some compilers get confused about "QVarLengthArray()" this way. Task-number: QTBUG-76199 Change-Id: I4296586c0181d3e6e82ca8b7b79aeb9a21645d1f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | uic: Implement form window setting to disable QObject::connectSlotsByName()Friedemann Kleint2019-07-022-3/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-76375 Change-Id: I16ad147366aa7d52b7a0e17ae240127d8ac34b3c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Liang Qi2019-07-0111-40/+63
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-0111-40/+63
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl.cpp src/platformsupport/vkconvenience/qvkconvenience.cpp Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-2811-40/+63
| | |\| | | | | | | | | | | | | Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
| | | * Brush up DiaglibFriedemann Kleint2019-06-2410-40/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix most clang warnings about override, nullptr, range-based for loops. Change-Id: Id47e57adb63a38e2f397a31511b788a2432c97cf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * Fix window shortcuts when a completer popup has focusVolker Hilsheimer2019-06-251-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The completer popup has focus, making QShortcut direct to it's window rather than to the window the completer belongs to. As QShortcut handles the case for Tool windows that have a parent, but doens't do the same for popups. And they shouldn't be treated the same way, as a context menu popup for a e.g. text edit should in fact block the text edit's shortcuts while open. However, the completer popup is special, in that it explicitly makes the widget completes for its focusProxy, which is what we can use to fix this issue. Change-Id: Ie7177d39668b3af14a1d9e0ee5d93eca9c67c8af Fixes: QTBUG-4485 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Move YearRange to QDateTime from its PrivateEdward Welbourne2019-07-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As planned when adding YearRange: now that it's merged up to dev, move it to QDateTime, since we can add to the API at 5.14.0. This follows up on commit 82ad4be4a2e0c2bccb6cd8ea2440aefee4ec48ec. Change-Id: I81b6c2331121a71e2592514781c02c5756e70c52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | rhi: Improve base vertex/instance supportLaszlo Agocs2019-07-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have feature flags as appropriate. OpenGL is causing a mess here but let's support what we can since some of this will become relevant in more sophisticated mesh drawing cases with 3D in particular. Change-Id: Idfa7b4642ec87147978e03d78d6233efbd151491 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | rhi: Add a test for instancingLaszlo Agocs2019-07-019-1/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Draws 1024 cubes at random x,y positions with varying color with a single instanced draw call. Change-Id: I8737503acf23866ad4734b1d88753415a3b93445 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | rhi: Enhance line width and point size supportLaszlo Agocs2019-07-012-0/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...but this will vary between backends, or in some cases even between implementations of the same API. Point size is settable only via the vertex shader (gl_PointSize). It is silently ignored with D3D and HLSL. Line widths other than 1 are supported only on OpenGL and Vulkan. (but this is in fact deprecated with GL and optional with Vulkan) Add QRhi::Feature values for both. The line width is now settable on QRhiGraphicsPipeline. It is not a dynamic state since the static, per-pipeline width is good enough for most cases. (and the feature is not supported on half of the backends anyways so it will get limited use in practice). Change-Id: I6d3a32269527c452b794b2cb8b0f03101eab40b2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QStringList: add QStringView overloads of join, filter, replaceInStringsMat Sutcliffe2019-06-301-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QStringList] Added QStringView overloads of join(), filter(), and replaceInStrings(). Change-Id: I9636e21e2e43ed46cce0aa7fa23ab0710aa641ba Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Share the common configurations among different modulesRyan Chu2019-07-013-179/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is used to generalize a template docker-compose file for all modules. Ideally, the leaf module only need to keep a docker compose file for all platforms (docker-compose.yml). NOTE: The version of docker-compose file downgrades from 3.4 to 2.1 because the 'extends' keyword is not supported in Compose version 3.x. Change-Id: I2e36fd9236eda86cb5fcf940d787ccefe9200696 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | Remove usages of deprecated APIs from QtAlgorithmsSona Kurazyan2019-06-299-34/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I9dab736a0cbd2e86588919640c26e8ce6b3674d0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | QObject: deprecate the undocumented userData() featureMarc Mutz2019-06-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and schedule it for removal in Qt 6. This appears to have come to some fame on the internet, so better add a deprecation warning before we remove it in Qt 6. Change-Id: I42d91d933f47dfd2d8d54c92358e9e46ced6bf21 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | rcc: Add -d option to output a Makefile-syntax depfileMarvin Scholz2019-06-296-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -d option makes rcc output a dependency file with the specified file name. The resulting dependency file is useful for make or ninja based build systems. [ChangeLog][Tools][rcc] Added -d option to generate a dependency file. Fixes: QTBUG-45460 Change-Id: I495ade50f8d9865d4c00dce9373b2b6d1a6c8f2f Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | Introduce Q_NAMESPACE_EXPORTGiuseppe D'Angelo2019-06-281-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recurring problem with the Q_NAMESPACE macro is that it declares an object (staticMetaObject) in the surrounding namespace. That object lacks any export/import qualification to make it usable with shared libraries. Introduce therefore another macro to work around this issue, allowing the user to prefix the object with an exporting macro, f.i. like this: Q_NAMESPACE_EXPORT(Q_CORE_EXPORT) The old macro can simply then be rewritten in terms of this new one, supplying an empty export macro. Note that NOT passing an argument to a macro expecting one is well defined behavior in C99 -- the macro will expand an empty token. Of course, MSVC doesn't like this and emits warnings. As a workaround, use a variadic macro. [ChangeLog][QtCore] Added the new Q_NAMESPACE_EXPORT macro. It can be used just like Q_NAMESPACE to add meta-object information to a namespace; however it also supports exporting of such information from shared libraries. [ChangeLog][Potentially Source-Incompatible Changes] Prefixing Q_NAMESPACE with an export macro may no longer work. Use the new Q_NAMESPACE_EXPORT macro for that use case. Fixes: QTBUG-68014 Change-Id: Ib044a555ace1f77ae8e0244d824ec473550f3d8e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | Corelib tests: Fix out of bounds string accessFriedemann Kleint2019-06-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings: Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt. introduced by qtbase/c2d2757bccc68e1b981df059786c2e76f2969530 (5.14). Change-Id: Ie6f0e2e3bb198a95dd40e7416adc8ffb29f3b2ba Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | tst_QAction(Group): Brush up the testsFriedemann Kleint2019-06-282-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use nullptr - Use Qt 5 connection syntax - Remove C-Style casts Task-number: QTBUG-69478 Change-Id: Icf8faf3433ff3bff667db050e79b560b221867b0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | tst_QThread: Add output for all elapsed testsFriedemann Kleint2019-06-281-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtain diagnostics. Task-number: QTBUG-76707 Change-Id: I051fb43802a9736cb9542f4adaaf5880b52a407e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-279-41/+47
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/network/ssl/qsslsocket_openssl.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ibb57a0548b4977797b400637487a56245ac1c024
| * | Skip tests if the required plugins were not deployedVolker Hilsheimer2019-06-191-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is usually the case on Android, where running this test would require deployment of files to the emulator. This doesn't give us any further testing that we don't already do by running this test on regular Linux, so skipping the test instead if the preconditions aren't met. Change-Id: I3722796634871213ba51c89ae7f40b19f954f2cb Fixes: QTBUG-73566 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>