summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Introduce cross platform high-dpi scalingMorten Johan Sørvig2015-07-3022-87/+1174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a coordinate scaling layer to QtGui, which supports 'devicePixelRatio' type high-dpi on all platforms, in production and also for development and testing purposes. High-DPI scaling is opt-in, by setting environment variables: QT_SCALE_FACTOR - sets a global scale factor QT_AUTO_SCREEN_SCALE_FACTOR - sets per-screen scale factors, where the scale factors are provided by the platform plugin. This QtGui scaling can be used instead of or in addition to scaling done by the window system. This distinction is not visible to applications [when they use Qt API], which will see a change in the value returned by the devicePixelRatio() accessors as usual. Introduce a new (private to Qt) coordinate system: native pixels. The coordinate system stack now looks like: device-independent pixels (app, upper parts of Qt) native pixels (lower parts of Qt Gui, platform plugins) device pixels (backing stores and OpenGL) Add private QHighDpi namespace with scaling functions that convert between device-independent pixels and native pixels: T toNativePixels(T, QWindow *); T fromNativePixels(T, QWindow *); Add scaling calls the QWindow (and friends) cross-platform implementation, around the calls to QPlatformWindow functions. QPlatformWindow now uses native coordinates - platform code remains largely unchanged since native coordinates are window system coordinates. QWindow now uses (possibly) scaled coordinates. This means that platform plugins no longer can rely on QWindow::geometry() and related functions. QPlatformWindow::windowGeometry() and other convenience functions have been added for use when the platform plugin needs to convert scaled geometry to native geometry. Add Qt::AA_NoHighDpiScaling, which can be use to disable any scaling in QtGui, effectively ignoring the environment variables. (Note that this does not disable any scaling done by the window system.) Contributions from Friedemann and Paul. Task-number: QTBUG-46615 Change-Id: I673bbd69c130e73b13cce83be11bfb28f580bf60 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Enable non-integer device pixel ratioMorten Johan Sørvig2015-07-3027-46/+112
| | | | | | | | | | | | | | | | | | | | Work around QPaintDevice::metric's int return type by adding a new metric that returns a scaled devicePixelRatio. Choose a scale factor that gives us more than enough range. The QPaintDevice::devicePixelRatio() convenience accessor is public API and can unfortunately not be changed to return a qreal. Add devicePixelRatioF() which returns the (unscaled) devicePixelRatio. Change all call sites of QPaintDevice::devicePixelRatio() to use QPainDevice::devicePixelRatioF(). Task-number: QTBUG-46615 Change-Id: I97ec4000fe379b7ff5e1624a871ae2512790aad9 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* eglfs_kms: Implement DPMS modePier Luigi Fiorini2015-07-294-3/+49
| | | | | | | | | | Implement the new QPlatformScreen API for power state. [ChangeLog][QPA][eglfs][kms] Allow to set DPMS mode and get the current value for each screen. Change-Id: I5abfb53c3e2f6579a2d6ff19d780b67f424903bf Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Add power state to QPlatformScreenPier Luigi Fiorini2015-07-292-0/+28
| | | | | | | Allows platform plugins to set the power state for each screen. Change-Id: I4164ca63cbae9fa2ab186dc84c8f704c33fd7c69 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Refactor QVersionNumber so it stores values in-classThiago Macieira2015-07-292-21/+205
| | | | | | | | | | | | | | | | | | | | | | | | | The common case of QVersionNumber is that there are few segments and each segment is a small integers. So instead of allocating a QVector<int>, just store those numbers in the class itself if possible. Think of this as a "Small String Optimization" for QVersionNumber. QVector<int> costs 16 + 4*N bytes, plus malloc overhead. After this change, QVersionNumber(5,4,0) will have an overhead of zero. The memory layout is explained in the header. I've coded it so big endian also works, but I have not tested it at all. Aside from the special functions for QVersionNumber and operator>>, all the rest of the algorithm could have been left unchanged. I only updated segments(), normalized(), compare(), commonPrefix() and fromString() to take advantage of the smaller implementation in a more efficient way. Note: QVersionNumber's constructors often leave half of the object or more uninitialized. That's not a problem. Change-Id: I4a2a0ce09fce2580f02d678e2f80b1dba74bac9d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Replace ifdefs with QDir::listSeparator()Sérgio Martins2015-07-291-6/+1
| | | | | Change-Id: I98fab8e0d83b2e7851ba8c0a4adfc02af1271a92 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Support MRT in QOpenGLFramebufferObjectLaszlo Agocs2015-07-295-164/+395
| | | | | | | | | | | | Introduce overloads in the API to allow specifying multiple color attachment sizes and formats. When these are in use and MRT is supported, a texture or renderbuffer is created for each of GL_COLOR_ATTACHMENT0, 1, 2, ... [ChangeLog] Added support for multiple render targets in QOpenGLFramebufferObject Task-number: QTBUG-39235 Change-Id: Ie7cfd81d1b796a9166b80dff7513aafe0120d53d Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Remove QT_DEVICE_PIXEL_RATIO support from xcbPaul Olav Tvete2015-07-299-292/+74
| | | | | | | | It will be reintroduced as a cross-platform feature. Task-number: QTBUG-46615 Change-Id: Ia6d03275018b2a25ebed438fe51f15e491f1c3ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Doc: Increase accuracy of QString documentation discussing size()Topi Reinio2015-07-291-13/+14
| | | | | | | | | | There are multiple QString and QStringRef functions that document behavior "if n is greater than size(), ...", but a comprehensive, correct statement is "if n is greater than or equal to size(), ...". Change-Id: I5d2112e08013edaf6f2f6d7e8a6740ea26a076e2 Task-number: QTBUG-47479 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Fix various issues in QDoc ManualTopi Reinio2015-07-297-172/+149
| | | | | | | | | - Fix QDoc warnings for broken links - Use \badcode for code snippets that are not C++ or QML code - Remove/update obsolete information Change-Id: Ie5ce6ec588709059fc7ba7b47e0cc8ad5385c42f Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Allow using group name as a QHP subproject selectorTopi Reinio2015-07-293-49/+124
| | | | | | | | | | | | | | | | | | QDoc already recognized "group" as a document type selector, but provided no way of defining which group the members should be selected from. This commit adds that feature, by allowing 'group:groupname' as a selector. All members (from the local tree) of the specified group are added to the subproject. Introduce up-to-date selector names for QML types and documentation pages, but keep the old legacy names for compatibility. Add documentation for the selectors. Change-Id: Ic3f60a028d15f5f8e0035d28fbc503630af8f1d1 Task-number: QTBUG-32985 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Revert "Add devicePixelRatio support to the Windows QPA plugin."Friedemann Kleint2015-07-2919-398/+112
| | | | | | | | | This change reverts c47b04696a9d1dab04c4a59ed9ce4c28aa00fe98 . Task-number: QTBUG-38993 Task-number: QTBUG-46615 Change-Id: I180dcac3a65a33498b90a71bbcad5e45a12af77c Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* forkfd: introduce system_forkfd to do system calls that do forkfdThiago Macieira2015-07-281-0/+16
| | | | | | | | | | This is just to make the code cleaner. The static variable will control whether we've detected that the system call exists -- if it does, we are expected to always use it. Change-Id: Iee8cbc07c4434ce9b560ffff13cb4adc049413c1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Introduce QHash key iteratorsSérgio Martins2015-07-283-1/+194
| | | | | | | | | | | So we can have interoperability with algorithms. Motivated by inefficient code like qDeleteAll(hash.keys()) [ChangeLog][QtCore][QHash] Added key iterators, accessible through keyBegin() and keyEnd(). Change-Id: I1f9db8a7a4294e1556cbb50b8fe5ebdcf0dc29a2 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Introduce QMap key iteratorsSérgio Martins2015-07-283-4/+197
| | | | | | | | | | | So we can have interoperability with algorithms. Motivated by inefficient code like qDeleteAll(map.keys()) [ChangeLog][QtCore][QMap] Added key iterators, accessible through keyBegin() and keyEnd(). Change-Id: Ieee2f9ad031e9d1e845a71447746699bbe95b96c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* doc: Corrected docs for QList and QVectorMartin Smith2015-07-273-73/+120
| | | | | | | | | | | | The docs for QList advised users to choose QList over QVector for efficiency reasons. The advise should be to use QVector over QList for efficiency reasons. This update corrects that misunderstanding. Change-Id: Ie04c99ab7fe6aef4bd1d39175c9564455b0122de Task-number: QTBUG-47196 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QTimer: Force a compilation error with pmf without objectOlivier Goffart2015-07-271-2/+6
| | | | | | | | | | | | None of this should compile (foo is non-static): QTimer::singleShot(0, &TestObject::foo); QTimer::singleShot(0, SLOT(foo())); Task-number: QTBUG-47426 Change-Id: I54b7d14124459e450c6a0a93a3033f21b57605d9 Reviewed-by: Dario Freddi <dario.freddi@ispirata.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use ibus ProcessKeyEvent asynchronously.Takao Fujiwara2015-07-252-10/+133
| | | | | | | | | | | ibus-hangul sends "CommitText" dbus asynchronous API during "ProcessKeyEvent" dbus API is called. If "ProcessKeyEvent" is synchronous, "ProcessKeyEvent" finishes before "CommitText" finishes and the order of Hangul characters and space is not correct. Task-number: QTBUG-40541 Change-Id: Ia526bc11833853082205ef1c3d64cf7943e2274f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* qdoc: Improve customization of generated html file namesVenugopal Shivashankar2015-07-245-29/+84
| | | | | | | | | | | | | | | Introduce 'outputsuffixes' QDoc configuration variable, which allows defining a module name suffix inserted into the generated html file names. The suffix can currently be applied to QML and JS documentation. This is useful in cases where we have multiple versions of a module as part of the documentation build, and writing to a common output directory would otherwise result in file name clashes. Change-Id: I1437874fad09f041e506b93b62b6a4a8cae49ec9 Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Improve searching of collection nodesTopi Reinio2015-07-245-26/+50
| | | | | | | | | | | | | | | | | | | QDocDatabase provided a way to search for a collection node in the primary tree only. This was insufficient for use cases where we want to list groups, C++ classes or QML types in other modules using the \generatelist or \annotatedlist commands. This commit does the following changes: - Add a function to find a collection node across all trees, use it for generating output for the list commands and generating C++ class/QML/JS type requisite tables. - Modify the code for \generatelist command to accept 'qmltypesbymodule' and 'jstypesbymodule' as parameters. - Modify constness of some functions to enable above changes. Change-Id: I3dbdadfd224754db4bdc1602a5ffab9d46c51f00 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Some further optimizations in the qdoc codeLars Knoll2015-07-244-134/+113
| | | | | | | | | | Replace a lot of c strings with QLatin1String to avoid utf conversions. Make one constant data structure static to avoid it being recreated the whole time, and optimize our tag replacement code. Change-Id: I6513f3c70781a1bac658cbb3164c45d4cab36f57 Reviewed-by: Martin Smith <martin.smith@digia.com>
* use Xml stream reader to read qdoc index filesLars Knoll2015-07-244-270/+291
| | | | | | | | | We get rid of the last usage of QDom and the old xml parser in our build tools, and it makes parsing of index files a lot faster. Change-Id: Iccf01a4a73cc74a77806470fb4c4625f5331a7be Reviewed-by: Martin Smith <martin.smith@digia.com>
* Don't generate invalid XMLLars Knoll2015-07-241-1/+5
| | | | | | | | | | An attribute is not allowed twice in XML. So change the associated-property attribute, so that it contains a list of associated properties is required instead of listing them a couple of times. Change-Id: Ibfb21c1a1de5ed39cda2eb29ac318bdbbf0eab4e Reviewed-by: Martin Smith <martin.smith@digia.com>
* Optimize CppCodeMarker::addMarkUp furtherLars Knoll2015-07-243-15/+12
| | | | | | | | | This avoids a couple of more string/memory allocations, giving another 5% speed gain for qdoc --prepare. Change-Id: I455f615bb4388d883dca5a8cd31bf50629db23e0 Reviewed-by: Martin Smith <martin.smith@digia.com>
* QStateMachine: add defaultTransition in QHistoryStateErik Verbruggen2015-07-236-21/+111
| | | | | | | | | | | | | | | | | | | The history state had the limitation that it was hard (or impossible) to use when more than one default state had to be entered. For example, using it in a parallel state was impossible without ending up in an infinite loop. This patch changes the QHistoryState to only have an initial transition, and the state selection algorithm is changed accordingly. It also brings QStateMachine closer to the SCXML standard. The existing defaultState is implemented on top of the defaultTransition: when used, a new transition, with the default state as its target, is set as the defaultTransition. Task-number: QTBUG-46703 Change-Id: Ifbb44e4f0f26b72e365af4c94753e4483f9850e7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix qHash(QFontEngine::FaceId)Marc Mutz2015-07-231-3/+10
| | | | | | | | | | | | | | | | | | | | There were two problems: 1. qHash() hashed FaceId::uuid, but op== didn't use it for determining equality. Thus, x == y => qHash(x) == qHash(y) might be broken if fileName and uuid have an orthogonal component, if you excuse my vector analogy. 2. To hash fileName and uuid, it concatenated the two, causing a temporary QByteArray to be created just for hashing its contents. That prevented marking qHash() as nothrow. Fix by using new QtPrivate::QHashCombine and adding uuid to the list of fields compared in op==. Change-Id: I49f2379d514d6d3669929e737562cf6de823127e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* moc: Make toExpand const, we do not modify it.Milian Wolff2015-07-232-2/+2
| | | | | Change-Id: I7036ea7ee9e533670ebed425e6c4a8bb0063f751 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Expose GLES 3.0 and 3.1 functionsLaszlo Agocs2015-07-237-209/+6327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the approach we already do for some GLES 3.0 functions we can provide a cross-platform, cross-GL-GLES wrapper for ES 3.0 and 3.1 functions too. Applications only have to take extra care about the version requests (context version and version directives in shader code), the rest of their code can stay the same across desktop/mobile/embedded, even when ES 3 functions are used. The new functions are placed to a new subclass which is placed between QOpenGLFunctions and the internal QOpenGLExtensions. This is necessary because, unlike with QOpenGLFunctions, there is no guarantee that these functions are always available in all configurations. When running on desktop OpenGL, we resolve as usual. If the OpenGL version contains the function in question, either in core or as an extension, it will all just work. This is handy because it does not rely on 4.x extensions like GL_ARB_ESx_compatibility, and so ES 3.0 functions will be functional on OpenGL 3.x systems too by just setting a 3.x version number in the QSurfaceFormat. We will no longer qFatal on broken systems where the driver returns a 3.0 or 3.1 context without the corresponding functions present. Instead, we show a warning and gracefully fall back to resolving as usual, via eglGetProcAddress or similar. For functions that are available in ES2 as an extension this may just work fine. Added also an example that runs identically both with OpenGL and OpenGL ES 3 and utilizes some ES 3.0 features like instanced drawing. [ChangeLog] Added QOpenGLExtraFunctions providing OpenGL ES 3.0 and 3.1 function wrappers in a cross-platform manner. Task-number: QTBUG-46161 Change-Id: I9f929eb61946c35c415b178c4d6ab2c1c958684e Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* StateMachine: remove initial state for parallel states.Erik Verbruggen2015-07-231-0/+8
| | | | | | | | | | | | A parallel state cannot have an initial state, as all children of the parallel state will be entered. Setting such an initial state on a QState marked as ParallelStates would already produce a warning and ignore the initial state. Now any initial state that has been set before changing the child-mode to ParallelStates will also produce a warning and remove the previously set initial state. Change-Id: Ie5fcd44b03516744f785f2d1880bf806918c44d4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Optimize CppCodeMarker::addMarkUp()Lars Knoll2015-07-233-12/+38
| | | | | | | | This cuts away another 15% of the running time of qdoc -prepare. Change-Id: I81bc32fa191b73fad5d7bd27ff22ac845f83a9ce Reviewed-by: Martin Smith <martin.smith@digia.com>
* Skip loading of index files if we are running with --prepareLars Knoll2015-07-231-3/+5
| | | | | | | This makes generation of the index files 3 times as fast. Change-Id: I89af86e54d932fa19330f36a33af6ed9ea81461d Reviewed-by: Martin Smith <martin.smith@digia.com>
* QStateMachine: remove left-over method.Erik Verbruggen2015-07-232-68/+5
| | | | | | | | | | This method was probably there in older versions of the specification, but it is no longer used now. The only caller was in QStateMachinePrivate::setError, which has been changed to use the newer methods. Change-Id: Ic4961990d8d2c902676e63193d3f30ef427e6f0c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QColor: make nothrow move-assignable and -constructibleMarc Mutz2015-07-222-4/+18
| | | | | | | | | The move special members were inhibited by the presence of user-defined copy ctor and assignment operator, which we cannot remove since the class is exported. Change-Id: I54fe6c28351fe69ca4b75066adb76ea07c959dfe Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* qvariant: Pass a couple of large types by const-ref in Qt6Sérgio Martins2015-07-222-0/+16
| | | | | | | sizeof is approx 100 bytes Change-Id: Ibd5fb50674effee832ce4529d737c060c570ffa3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* qjsonarray: Remove a copy-ctor in Qt6Sérgio Martins2015-07-221-1/+3
| | | | | | | Makes the class trivially-copyable Change-Id: I5b8ebadf351b65344f7ee30f0e7211738fdf54e4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* qdoc: replace some inefficient QLists with QVectorMarc Mutz2015-07-224-6/+6
| | | | | | | | | The types are either too large or too small for QList, which only has acceptable performance with movable types of size = sizeof(void*). Change-Id: I5a2354e9400baad44095f1eac18d76ef915f6545 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* tools: mark some types movable/primitiveMarc Mutz2015-07-228-0/+13
| | | | | | | They are held in QList or QVector. Change-Id: Ic0e379560e554e5cd3de4319e402ec1655e77874 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QSet/QQueue/QStack: remove docs for removed special member functionsMarc Mutz2015-07-223-59/+0
| | | | | | | | Commit 5c442321220e9ba7818e2eba4fa22b159b6477ab removed the functions, but not the docs. Change-Id: If12ec8a268cf67c7a62ba4f523360e0c79ce63ca Reviewed-by: Martin Smith <martin.smith@digia.com>
* QLocale: mark some private types movable/primitiveMarc Mutz2015-07-221-0/+3
| | | | | | | Because they are. Change-Id: I7f0b595fed568becdc33d1705fc8d7e372ec0c9d Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* doc: QTimeZone::OffsetDataList is a QVector, not a QListMarc Mutz2015-07-221-1/+1
| | | | | Change-Id: Ib5eb635fe267b743b970714c99db8c0abc9ac2c8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QStringRef: make nothrow move-assign- and -constructibleMarc Mutz2015-07-221-9/+13
| | | | | | | | | | | | The move special members were inhibited by the presence of a non-trivial copy constructor/assignment operator and destructor. Restore them. While we're at it, move all the special member functions we should not have defined into an #if QT_VERSION block. Change-Id: I873a99bfefe03e0fb02676e3431fd51f8c8f0adc Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QRegExp: remove pointless QRegExpCharClass copy special member functionsMarc Mutz2015-07-221-14/+0
| | | | | | | | | They do exactly what the compiler-generated ones would do, but their presence inhibits the move special member function from being synthesized. Change-Id: Ib2046dbcee3c21ac3b5087f41d19e2a4a3e0a54f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QXmlStreamAttribute: make nothrow move assignable and -constructibleMarc Mutz2015-07-221-0/+22
| | | | | | | | | | | | | | | Unfortunately, we cannot rely on Q_DECL_EQ_DEFAULT, so I needed to code the special member functions by hand. The 'reserved' field is pretty useless, since the existing ctors didn't initialize it, but just in case someone finds a way how to store information in there, deal with the field in the usual way: set to nullptr in the move ctor and swap in the move assignment operator. Change-Id: I15a5f61807cb67deb6e979d4f3e5a260384b20ab Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QItemSelectionRange: make nothrow move-assignable and -constructibleMarc Mutz2015-07-221-0/+11
| | | | | | | | | The move special members were inhibited by the presence of a user-defined copy ctor, which we cannot remove since the class is exported. Change-Id: I7118588b808387f2733d93216c8c3b117666bb9e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QItemSelectionRange: use ctor-init-listMarc Mutz2015-07-221-8/+3
| | | | | | | | Avoids default-constructing two QPersistentModelIndex instances just to copy-assign to them. Change-Id: I0f3e04e3d202f58905f74df44d37dba27911a927 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QItemSelectionRange: add nothrow member-swapMarc Mutz2015-07-222-0/+14
| | | | | | Change-Id: Ie550f4a66b3c623b0ec630c18f38bcd96f6bbc99 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Clarified the documentation for QTextDocument::find.Kavindra Palaraja2015-07-221-4/+12
| | | | | | | | | | | | QTextDocument::find has a behavior that is different from the typical QRegExp/QRegularExpression behavior where finding a given expression is always constrained by the paragraph (block), regardless of newline characters in the expression. Task-number: QTBUG-21785 Change-Id: Ia6a061c6feb5a19e6b8caa3d8009da5ca31ec422 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QTestLib: Add macros QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2().Friedemann Kleint2015-07-222-2/+51
| | | | | | | | | | | | | | Add QTRY_VERIFY2_WITH_TIMEOUT() similar to QTRY_VERIFY_WITH_TIMEOUT() except that QTRY_VERIFY2() is used below the loop and QTRY_VERIFY2() based on it. Add tests to cmptest. [ChangeLog][QtTest] Added macros QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2() making it possible to output a message after the timeout has expired. Change-Id: I587e24f3aeb73542dbf3ccb936a16f2e0806555f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Optimize moc: Preallocate space for list of arguments on the stack.Milian Wolff2015-07-221-1/+1
| | | | | | | This removes the temporary QList allocations. Change-Id: I1f255e94730202f719e0a97b9ab4a83e28b805c1 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QTestLib/Windows: Try to obtain a stack trace on crash.Friedemann Kleint2015-07-221-2/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper class for resolving debug symbols by dynamically loading dbghelp.dll and try to obtain a symbol at the exception location and a stack trace by using CaptureStackBackTrace(). The output looks like: A crash occurred in d:\dev\projects\crashingtest_5d\debug\tst_crashingtesttest.exe. Exception address: 0x0000000052E2853A Exception code : 0xc0000005 Nearby symbol : QString::length Stack: # 1: windowsFaultHandler() - 0x00007FFE080CACD0 ... # 8: QString::length() - 0x0000000052E28530 [ChangeLog][QtTest] A stack trace will be output on standard error if a test crashes. Task-number: QTBUG-47370 Change-Id: I7217e02ec7dc0c96132fe84d1a175d0bed9c5aaf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>