summaryrefslogtreecommitdiffstats
path: root/src/testlib/qsignalspy.h
Commit message (Collapse)AuthorAgeFilesLines
* QSignalSpy: fix -Wweak-vtable by removing the QObject inheritanceMarc Mutz14 days1-25/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, we'd fix -Wweak-vtable by exporting the class and making at least one virtual method out-of-line (typically the dtor), thereby pinning the vtable to exactly one TU. We can't export QSignalSpy, though, because it also inherits QList, and we don't want to export QList subclasses to avoid QList API becoming part of the ABI. So remove the vtable, and therefore its being a weak symbol, by moving the qt_metacall implementation from QSignalSpy into its newly-added Private, at the cost of an additional memory allocation at construction (though there was already the wish to make this class pimpl'ed for extensibility, and this patch accomplishes exactly that). This class used to be one of few places left that prevents adding -Wweak-vtable to headersclean, so while this is a breaking change, QSignalSpy doesn't really model is-a QObject. It uses QObject to reuse, not to be reused. In fact, no external code should use the QObject-ness of QSignalSpy, so it should be an acceptable SC break to drop the inheritance. We don't need to care about BC here, as we don't promise BC for QtTest. This now also allows (and requires) to make the dtor and the private ctor out-of-line, avoiding the need for the init() hack. [ChangeLog][QtTest][Potentially Source-Incompatible Changes] QSignalSpy no longer inherits from QObject. If your code uses the fact that QSignalSpy is-a QObject, you need to redesign around this now. Task-number: QTBUG-45582 Fixes: QTBUG-123544 Change-Id: Id93ba0ee6bbb811455d3744a045e38e1b9f9c584 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jason McDonald <macadder1@gmail.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QSignalSpy: inline connectToSignal() into its only callerMarc Mutz2024-04-261-2/+0
| | | | | | | | | | Following the verify() Extract Method refactorings, this function has only one caller left, so it doesn't pull its weight anymore. Task-number: QTBUG-123544 Change-Id: I93a296a9be81ef9c3b702065e76ecc4b822a0a43 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSignalSpy: de-inline most of the private ctorMarc Mutz2024-04-261-9/+3
| | | | | | | | | | | | | | | | ... by moving its body into an out-of-line init() function. This allows to drop the exporting of connectToSignal(). We can't de-inline the whole ctor (yet), because that would pin the vtable to the qsignalspy.cpp TU, which would require us to export the class wholesale to make the vtable accessible to users of the class, but we can't export the class because it inherits QList. Task-number: QTBUG-123544 Change-Id: Ieffd6d2f542daa20e876c6114cb5dc8150870bb4 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QSignalSpy: make args member constMarc Mutz2024-04-241-9/+3
| | | | | | | | | | This means it's implicitly thread-safe now and we don't need to protect accesses to it with the mutex. Task-number: QTBUG-123544 Change-Id: I9f826003dca6fb81e7a75e283482c81ecff09be0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QSignalSpy: make two private static helpers file-staticMarc Mutz2024-04-241-3/+0
| | | | | | | | | | | ... because they can be. As a drive-by, fix clazy-function-args-by-value by taking QMetaMethod by value. Task-number: QTBUG-123544 Change-Id: Icdad68b91850d284c918e6180f3ce841de2af016 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSignalSpy: pull makeArgs() out of ctor critical sectionMarc Mutz2024-04-241-2/+9
| | | | | | | | | | | | | | | | | | First store the result in a temporary, and, in the critical section, only move it into place. This minimizes the amount of code in the critical section (Amdahl's Law) and also means we don't need to permanently drop the mutex when we call unbounded code using metacall(). That, in turn, makes sure the args member is only ever seen empty or fully populated. Since makeArgs() no longer accesses member functions now, we can make it static. Task-number: QTBUG-123544 Change-Id: If19db53f85d7c9eb18d4fb2c61e1aa3d4b9c2e00 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* QSignalSpy: make initArgs() return the resultMarc Mutz2024-04-241-2/+2
| | | | | | | | | | | ... instead of working directly on the member variable. This is in preparation of making said member variable const, so it need no longer be protected by the mutex. Task-number: QTBUG-123544 Change-Id: Ifc407502ec2c5c52dc3b42edea18be7fc672a968 Reviewed-by: David Faure <david.faure@kdab.com>
* QSignalSpy: de-inline chrono wait()Marc Mutz2024-04-241-14/+1
| | | | | | | | Because we can now that there's a .cpp file. Task-number: QTBUG-123544 Change-Id: Ie525e157016cb3c0c7a273fba3fadb13d54c1877 Reviewed-by: David Faure <david.faure@kdab.com>
* QSignalSpy: de-inline verify() helper functionsMarc Mutz2024-04-241-40/+3
| | | | | | | | | Now that we're moving the code anyway, also move their declarations into the general private: section of the class. Task-number: QTBUG-123544 Change-Id: I6b1e7006b73b710daa4b511b2fd643293a3d4844 Reviewed-by: David Faure <david.faure@kdab.com>
* QSignalSpy: de-inline private helpersMarc Mutz2024-04-241-78/+5
| | | | | | | | | | | | | | | | | Reduces the code a compiler including qsignalspy.h needs to parse and codegen. The order of the functions in the .cpp file is chosen to minimize the diffs to follow-up changes. We can't de-inline the private ctor, because that would pin the vtable to the qsignalspy.cpp TU, which would require us to export the class wholesale to make the vtable accessible to users of the class, but we can't export the class because it inherits QList. Task-number: QTBUG-123544 Change-Id: Ib26fdb68e1fc0e6f6919e4cd25759b7047f9977c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSignalSpy: make verify() methods staticMarc Mutz2024-04-181-2/+2
| | | | | | | | | | | | | | | | | | ... because they can be. We call them without a value object and while they don't touch *this, ubsan complained (rightfully): qsignalspy.h:29:28: runtime error: member call on address 0x7ffdfaab2b20 which does not point to an object of type 'QSignalSpy' 0x7ffdfaab2b20: note: object has invalid vptr 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 00 00 c0 60 00 00 60 14 00 00 60 60 00 00 70 14 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ invalid vptr Amends e68edd6a07adf33db14c2d2f6e4e3785596fa496. Task-number: QTBUG-123544 Change-Id: I8e9ba3270a35777a704e68130d2f2bccb658a536 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QSignalSpy: inline verify(obj, func) into the only callerMarc Mutz2024-03-221-12/+1
| | | | | | | | | | | | | | First, realize that we don't need the isObjectValid() call, because that's done by verify(QObject*,QMetaMethod) later. That leaves said fromSignal() and verify(QObject*, QMetaMethod) calls, which we can just inline into the (QObject*, Func) ctor, thus making said constructor SCARY, having extracted all template-independent code into other functions/ctors. Task-number: QTBUG-123544 Change-Id: I6b8afc541f75936045e2d28cfde51a34f98a1fdd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSignalSpy: separate messages for invalid and non-signal meta-methodsMarc Mutz2024-03-221-11/+10
| | | | | | | | | | | | | | | If a signal was invalid, the code still called messageSignature(), which returns a null QByteArray, and passed its constData() to qWarning("%s"). That probably worked in our implementation, because it falls back to QString::asprintf(), but it raised eyebrows, so avoid calling messageSignature() on invalid QMetaMethod. This changes the warning output, so adjust the test. Task-number: QTBUG-123544 Change-Id: I41bc6650de091f61354ff91ee45659668f0e0223 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSignalSpy: inline init() into its only callerMarc Mutz2024-03-221-8/+3
| | | | | | | | | | Following the verify() Extract Method refactorings, this function has only one caller left, so it doesn't pull its weight anymore, esp. considering that it'll be exported soon. Task-number: QTBUG-123544 Change-Id: I1690b4b6e5a0e0c56fcc9c34544fca3b34e2f9a6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSignalSpy: move signal verification from init() to verify()Marc Mutz2024-03-221-4/+1
| | | | | | | | | | ... where it belongs. Amends e68edd6a07adf33db14c2d2f6e4e3785596fa496. Task-number: QTBUG-123544 Change-Id: Ic0e5128555465485b579607a61925cefa5f4716d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSignalSpy: share more codeMarc Mutz2024-03-221-9/+39
| | | | | | | | | | | | | | | | | | | | Add per-ctor verify() functions that take care of the warnings for invalid inputs, and return a struct { QObject*; QMetaMethod; } to feed into a delegatee constructor. This solves the problem that the varying parts between the ctors are at the beginning, not the end, using another level of indirection, and will eventually allow to make the `args` and `sig` members const, and therefore remove the need to protect either with the mutex. This patch tries to keep the diff minimal. I'm planning to de-inline most of the class in a future commit, so it doesn't matter that private and public sections are interleaved, that will be cleaned up when the code is moved to a .cpp file later. Task-number: QTBUG-123544 Change-Id: Idc628c927736880a8fd580089ed5177361c94ed9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSignalSpy: Extract Method init() from three ctorsMarc Mutz2024-03-211-23/+16
| | | | | | | | | | | | Ideally, this wouldn't be a named function, but a delegatee constructor, but the current structure of the three constructors doesn't, yet, lend itself to extracting a delegatee constructor (the tail is copied, not the head). To get there, we need more work (coming up in follow-up commits). Task-number: QTBUG-123544 Change-Id: I46dd030e314d67c2ab624279d669db76e58bc569 Reviewed-by: David Faure <david.faure@kdab.com>
* QSignalSpy::appendArgs(): move-append the QVariantListMarc Mutz2024-03-211-1/+1
| | | | | | | | | | | Using the rvalue overload of append() is more efficient, since we skip the alias check and the appendee's atomic ref-count ping-pong inside lvalue append(). Pick-to: 6.7 Task-number: QTBUG-123544 Change-Id: Ia76fdf28cba13d524fbbe894658a86a45a1ebe79 Reviewed-by: David Faure <david.faure@kdab.com>
* QSignalSpy: fix clazy-function-args-by-valueMarc Mutz2024-03-211-1/+1
| | | | | | | | Clazy complains that QMetaMethod should be passed by value, so do that. Change-Id: I42afda5af6910eefc8783b1feac00fd11e1f017e Reviewed-by: David Faure <david.faure@kdab.com>
* QSignalSpy: use NSDMI for m_waitingMarc Mutz2024-03-211-4/+1
| | | | | | | | | One step closer to DRYing the ctors. Pick-to: 6.7 6.6 6.5 Task-number: QTBUG-123544 Change-Id: Iff73fe70e3d2de52548d10b2f38a7ba2bd7029cd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSignalSpy: fix indexed loop (int instead of qsizetype)Marc Mutz2024-03-201-1/+1
| | | | | | | | | | While a signal with more than 2Gi arguments is only a theoretical possibility, still use the correct index variable for the indexed loop over this QList<int>. Pick-to: 6.7 6.6 6.5 Change-Id: I2ed33238c2cd9d2d1c39cd29c988a2adfd821897 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSignalSpy: make the mutex a member variableDavid Faure2024-03-191-1/+1
| | | | | | | | | | | | The static inline was only a workaround for maintaining BC within minor releases while backporting the fix. Since we don't promise BC for QtTest between minor releases, we can make the mutex a proper member variable for Qt 6.8. Amends c837cd75936cbeeb898dd5808edb9dfaf716a76e. Change-Id: I0d6353bdd6a11daa4f927139abf9a867d8c9f95f Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSignalSpy: fix C'n'P mistake in a qWarning()Marc Mutz2024-03-191-1/+1
| | | | | | | | | | | | | | | | | The warning for the new-style signal constructor was copied from the old-style signal constructor, but not adjusted to its new home. The signal pointer passed here is not the signal "name", but a signal "pointer" (-to-member-function, but no need to go into that much detail). Amends 6fc7d76e7309c01a364b0f72d253735366674f29, but not picking to very strict LTS branches, just in case someone has a QTest::ignoreMsg() installed on it. Pick-to: 6.7 6.6 6.5 Change-Id: Ia1f6b7001f38202ac72f9945c4a822d81562cdbf Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSignalSpy: fix data race between wait() and emit from another threadDavid Faure2024-03-191-6/+21
| | | | | | | | | | | Detected by TSAN in tst_QThread::terminateAndPrematureDestruction() but better have a dedicated unittest, with values emitted by the signal and recorded in the spy. Pick-to: 6.7 6.6 6.5 Change-Id: I141d47b0ea0b63188f8a4f9d056f72df3457bda5 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSignalSpy: add wait(std::chrono::milliseconds) overloadAhmad Samir2023-03-031-2/+5
| | | | | | | | | Make the wait(int) overload call the new one. Task-number: QTBUG-110059 Fixes: QTBUG-100041 Change-Id: Ia085453c05e09e219ba56010b2504113bbc1dd34 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTestEventLoop: add enterLoop(std::chrono::milliseconds) overloadAhmad Samir2023-03-031-1/+1
| | | | | | | Task-number: QTBUG-110059 Change-Id: Ibf1d76afd313e390103be4a22e44af7fb41ace1b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace usages of Q_CLANG_QDOC with Q_QDOCLuca Di Sera2022-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | To allow the user to customize the C++ code that QDoc sees, so as to be able to work-around some limitations on QDoc itself, QDoc defines two symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an entire execution of QDoc. At a certain point in time, QDoc allowed the user the choice between a custom C++ parser and a Clang based one. The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol would be defined only when the Clang based parser was chosen. In more recent times, QDoc always uses a Clang based parser, such that both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent. To avoid using different symbols, and the possible confusion and fragmentation that derives from it, all usages of Q_CLANG_QDOC are now replaced by the equivalent usages of Q_QDOC. Change-Id: I5810abb9ad1016a4c5bbea99acd03381b8514b3f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add -Wshorten-64-to-32 to headerscleanTor Arne Vestbø2022-07-211-1/+1
| | | | | | | | Fix existing warnings by casting to the appropriate type. Change-Id: Ic44d2a71e1a2e508199dbb46bea7a19e183ec42c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QSignalSpy: Use QMetaType instead of metatype id in initArgsFabian Kosmale2020-11-101-6/+4
| | | | | | | | | | | | | | | The RegisterMethodArgumentMetaType had been changed to take a QMetaType instead of a type id in 0161f00e5043090f22b23de9822c09062b17d675. Unfortunately, the usage of it in QSignalSpy was missed. This patch adjusts the metacall to correctly use a QMetaType. Moreover, use parameterMetaType instead of parameterType to benefit from metatypes which are already resolved at compile time. Task-number: QTBUG-88260 Fixes: QTBUG-88356 Change-Id: Id8fa46581a005d62818971ea24d8aa2e39dcd6d0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QVariant(int type, void *data, ...) constructorLars Knoll2020-08-151-1/+1
| | | | | | | | It was marked internal anyway. Use the constructor taking a QMetaType instead. Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in qtbaseJarek Kobus2020-07-071-2/+1
| | | | | | | | Fixes all other QVector occurrences Task-number: QTBUG-84469 Change-Id: I5f9311298d341a9a3061a6a640539583d1618939 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in testlibJarek Kobus2020-06-251-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: Icbc3c3130399296f6b5a7e9a313ad4737669de00 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce QSignalSpy constructor allows to spy on a meta methodVitaly Fanaskov2019-08-131-0/+10
| | | | | | | | | 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>
* 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>
* QSignalSpy: Extract connection functionality into a separate methodVitaly Fanaskov2019-08-131-10/+16
| | | | | Change-Id: Ie6406c79b070cba715250711578cd3d80c089559 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* More nullptr usage in headersKevin Funk2019-03-141-1/+1
| | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* testlib: Remove Q_CC_BOR usesKari Oikarinen2018-03-061-8/+0
| | | | | | | Borland's compiler is no longer supported. Change-Id: I61e3fa2cfbb244b9ca4d1db734992abb96f64709 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* doc: Fix remaining clang parsing errors in QtTestMartin Smith2018-01-181-2/+3
| | | | | | | | This update also corrects all the remaining qdoc warnings in the mnodule. Change-Id: I1cea2cb1dd515d075a1e49a52ca78fc407c3a324 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QSignalSpy: Improve warning about unregistered parameter types.Friedemann Kleint2015-11-251-2/+5
| | | | | | | | | | | | Don't know how to handle 'hint', use qRegisterMetaType to register it. becomes: QSignalSpy: Unable to handle parameter 'hint' of type 'QAbstractItemModel::LayoutChangeHint' of method 'layoutChanged', use qRegisterMetaType to register it. Task-number: QTBUG-49623 Change-Id: I5020bb5b6f4ba87438d0f862279bed1ceb203d12 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtTestLib: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-061-1/+1
| | | | | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Since QtTestLib has a lot of templates and macros, not all uses of 0 as nullptr might have been detected by the headersclean check. Task-number: QTBUG-45291 Change-Id: I21e9d8822e3a708010938e8d5ef2fd42ae6c8c68 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Remove an useless assert.Jędrzej Nowacki2014-06-251-1/+0
| | | | | Change-Id: Icf6f6234d6f090fe4928830783620e7255362293 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>