summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix plain text QStaticText with line breaksEskil Abrahamsen Blomfeldt2016-10-041-0/+55
| | | | | | | | | | | | | | The layout isn't actually created until endLayout() or setLineWidth() is called. So in the case where this was not done, the height of the line would be 0, thus multiple lines would be placed on top of each other, at y == 0. [ChangeLog][QtGui][Text] Fixed QStaticText when manually breaking lines and no text width was set. Task-number: QTBUG-56346 Change-Id: I7f6ed6260545882f05fe39b21134315eca7401b9 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* remove redundant conditionals regarding sslOswald Buddenhagen2016-10-041-2/+2
| | | | | | | | this actually fixes the build when ssl is not enabled, as the openssl features are in the not included network-private module. Change-Id: Ibafae9867af493da184a45cf3981628d475d37a6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Exclude tst_QSettings::rainersSyncBugOnMac() on all Apple OSesTor Arne Vestbø2016-10-031-2/+2
| | | | | | | It fails on iOS as well, and likely also tvOS and watchOS. Change-Id: Idfce98a5aeccb5680f6b4c6e66b526dd7922156d Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Speed up compilation of tst_qgraphicsview_2.cppMarc Mutz2016-10-032-580/+1180
| | | | | | | | | | | | | | | | Turn the list of newRow() calls into a for loop over a constexpr data structure. Fixes the GCC note: tst_qgraphicsview_2.cpp:47:13: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without and speeds up compilation of the file from 13s to 2.5s on my machine. Task-number: QTBUG-38890 Change-Id: I4f0b3565c7df64b286d1d32eb3f3d6bf4df92609 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Round to nearest millisecond in QDateTime::fromCFDate()Tor Arne Vestbø2016-10-021-4/+7
| | | | | | | | | | | | CFAbsoluteTime is measured in seconds, represented by a double, so when converting milliseconds to CFAbsoluteTime we may get a slight error due to missing precision in double to represent the milliseconds exactly. By rounding to the closest millisecond when converting back, we avoid truncating and being one ms off. Change-Id: If1e99f97b000fb8cb893ddfc5d7ba81096c0ea88 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Add qtest_network.hMarc Mutz2016-09-294-121/+0
| | | | | | | | | | | | | | | | | | | | | | | ... and move toString() implementations there which were repeated in network tests, or #ifdef'ed in qtest.h. Since the functions moved from network tests are now in a public header, had to massage them a bit to pass headersclean: - replace Q_FOREACH with C++11 range-for - avoid implicit conversion from QByteArray -> const char* (done by re-using toString(QByteArray) instead of calling strdup() manually) Also made the functions overloads instead of specializations. This allows to pass the enum by value instead of by const-&. Like the existing QHostAddress, the newly-added toString() overloads are marked as \internal. We can decide later whether to turn them into public API. Change-Id: I8c23db7a0a6575273567017d42d7b2a957acece8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-2912-81/+241
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/uikit/xcodebuild.mk tests/auto/other/lancelot/tst_lancelot.cpp tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp Change-Id: Ia0ae2de86094120281abd445138877c2cc3e882c
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-288-30/+190
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qfiledialog.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: I34bc8a990f8f526889a95a5c7099ef557b9681ad
| | * Plug memleaks in tst_QWidgetMarc Mutz2016-09-281-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to delete the style returned from QStyleFactory::create() ourselves, so put them into a QScopedPointer. The alternative would have been to create this once, as a member of tst_QWidget, but this is the minimal approach that ensures behavior just as the old code, but without the leak. Change-Id: I527f1031c57be6f05942f4acc057e7dae1af2571 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * tst_QApplication: Fix UBs (invalid cast) in focusMouseClick()Marc Mutz2016-09-281-22/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: tst_qapplication.cpp:1754:48: runtime error: member access within address 0x7ffda11f2220 which does not point to an object of type 'SpontaneousEvent' 0x7ffda11f2220: note: object is of type 'QMouseEvent' The code attempted to model the layout of a QEvent with another class that allows public access to the memory location that (hopefully) corresponds to QEvent::spont, gaining access by casting a QEvent object to that specifically-crafted class. Fix by the using the existing QSpontaneKeyEvent::setSpontaneous() call, which, despite its name, works for all QEvent subclasses, and which has already been fixed to not invoke UB (in bc087db). Change-Id: I7db8b8a8a823f7d61ab17375142d19dc3874fea5 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Extend tested formats in lancelotAllan Sandfeld Jensen2016-09-271-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds two formats that does not have optimized code-paths in qdrawhelper to ensure the generic path has coverage. This has already uncovered one bug fixed before this patch could go in. Change-Id: I0e0a1a873555b27f6438f69a76982b8e06263dcf Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QDateTimeEdit: synchronize time-spec before initializing displayEdward Welbourne2016-09-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDateTimeEdit ignores the time-spec of its date-time value, using its own time-spec instead; mostly, this works because it first conforms the value to its own time-spec. However, during construction, before doing this, it set up its display data, which could leave it with a different time (rather than a different representation of the given time) than it was asked to use. Moved the updateTimeSpec() calls to immediately after setting value in QDateTimeEditPrivate::init() to ensure correct handling. Added test. Task-number: QTBUG-54781 Change-Id: I3b07c10997abb858fc0b40558bff96e3fdabbd83 Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QSslSocket: respect read buffer's max size (SecureTransport)Timur Pocheptsov2016-09-271-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. QSslSocketBackendPrivate::transmit was ignoring 'readBufferMaxSize'; as a result, we can have a user trying to set read buffer's size to a small value (and more important - reading slowly in a small chunks from this socket), but SSL itself socket reading 'too fast', potentially growing its internal buffer to a huge size. This also results in auto-tests failing - whenever we're trying to limit read rate in some test. 2. Update qsslsocket auto-test. Task-number: QTBUG-43388 Task-number: QTBUG-55170 Change-Id: Iedece26df0ac5b3b7cad62cc8c98aedc28e7ca5b Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Plug memleaks in tst_QGridLayoutMarc Mutz2016-09-271-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In setMinAndMaxSize(), QLayout::removeItem() doesn't actually delete the removed item. We have to do that ourselves (RAII not necessary, since the spacer is owned by the layout until we remove it). In distributeMultiCell(), allocate the QStyle subclass on the stack so the compiler cleans it up properly on all exit paths (was: unconditional leak). Change-Id: I24f8f11af2bfc5abf78f9aab0139dcfe0187402b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Plug memleaks in tst_QBoxLayoutMarc Mutz2016-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In sizeConstraints(), QLayout::takeAt(), as the name suggests, doesn't actually delete the item. We have to do that ourselves. Likewise, in replaceWidget(), QLayout::replaceWidget() also doesn't delete the affected item, but returns it. That's spectacularly bad API design, but the leak is easy to fix: just delete the return value. Change-Id: I8dcbc59898949eabce766cda2c0edae2e1f2799e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * QObject test: check that throwing from a child's constructor worksGiuseppe D'Angelo2016-09-261-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | A check "just in case" -- we don't want leaks nor crashes due to double deletions, and so on. Change-Id: I24f1a486f0d438595bbe352ab780b07c5d53acbd Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | QGuiApplication, platform plugins: don't modify AA_DontUseNativeMenuBarShawn Rutledge2016-09-262-44/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default should be false, meaning the application will prefer to use a native menubar if the platform supports it. The application author can set it to true if he wants to always use a Qt-rendered menubar instead; or, he can call QMenuBar::setNativeMenuBar(). Qt and its plugins should not override the author's wishes. Instead, if the platform plugin cannot create a native menubar for whatever reason, createPlatformMenuBar() will return null, and QMenuBar will fall back to using a Qt menubar instead. The application can check the result via QMenuBar::isNativeMenuBar(). QMdiArea when maximized inside a QMainWindow with an empty title does not replace the main window's title if we are using native menus. This behavior turned out to be the same on Unity as it is on macOS, so the autotest needed adjustment to expect that behavior whenever the menubar is native, not only on certain platforms. tst_QMenuBar::allowActiveAndDisabled() tests a standalone QMenuBar. In f92f78094 it was disabled on macOS, but on Ubuntu it passes as long as we force it to be a non-native menubar, so it should pass that way on macOS too. Removed unused variable RESET to fix warning. Task-number: QTBUG-54793 Change-Id: I716e40da709f96331cbbf25213bd7bc153e4dbe2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-232-8/+11
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qlogging.cpp Change-Id: I9cc8f25ad897efab6a42cb5c5161b1c9402952f0
| | * Fix test for sandboxed platformsMaurice Kalinowski2016-09-231-3/+3
| | | | | | | | | | | | | | | | | | | | | The test function tries to create a file inside the application bundle. Change-Id: Ia429b42b102d5e98f20694058fa2633e3c7de30a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * tst_QGraphicsItem: Fix UB (invalid cast/member call) in prepareGeometryChange()Marc Mutz2016-09-221-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: tst_qgraphicsitem.cpp:5066:29: runtime error: downcast of address 0x2afcb006c7f0 which does not point to an object of type 'GeometryChanger' 0x2afcb006c7f0: note: object is of type 'QGraphicsRectItem' 00 00 00 00 d8 64 ca 98 fc 2a 00 00 40 a9 0b b0 fc 2a 00 00 75 65 29 00 00 00 00 00 35 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QGraphicsRectItem' #0 0x4c5f1c in tst_QGraphicsItem::prepareGeometryChange() tst_qgraphicsitem.cpp:5066 Fix by actually instantiating a GeometryChanger, which incidentally is the pattern used by paint() a few lines below, too. While at it, allocate the item on the stack (as is done in paint()) and create a local QRectF variable to avoid repeating the same magic numbers over and over again. Change-Id: If5a3d56511000a17703d78d7dd1f0ea072b8bc11 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | moc: support nested q_namespacesBogDan Vatra2016-09-283-1/+149
| | | | | | | | | | | | | | | | | | | | | | | | Nested namespaces are quite common, therefore moc should support them. Task-number: QTBUG-55415 Change-Id: I756cab36d498eb4342b402d255836d5d30f07b30 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Fix test for targets without process supportMaurice Kalinowski2016-09-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to switch to the current directory, when there is no process support. This also fixes running the test on sandboxed target platforms. Change-Id: I25fabb8b22d3510062a012884eb1eaab682901d3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Fix test for WinRTMaurice Kalinowski2016-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Only on win32 we can omit creating a new window. Change-Id: Ie49ef45ccb745aaa43f58096e7810c71671124ba Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | QColor: provide QLatin1String overloads of functions taking QStringMarc Mutz2016-09-231-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The inefficiency of QColor(const char*) came to light by a recent refactoring which showed that the existing char* overload of qt_get_hex_rgb() was never called. So, provide a QLatin1String interface for named colors that allows user code to reach that internal function without converting to QString first. Change-Id: I74df7b570ef28c00e35ca4adf46c4b7c7e9994b3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-222-62/+101
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/qiosviewcontroller.mm Change-Id: I2dda31867cbc79ea7fe965f52afb518aefa4ad20
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-212-62/+101
| |\| | | | | | | | | | Change-Id: I9cfefaf22b010fca937be77979f5fb50574bb71e
| | * Add missing test for QReguarExpression for QTextDocument::findMultipleSamuel Gaist2016-09-201-0/+18
| | | | | | | | | | | | | | | Change-Id: Ia9b3eb21a178da4ae2844dba37b7e1cc669d6b50 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * multiwindow: Base vsync debug output on actual surface formatTor Arne Vestbø2016-09-191-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | Allows us to detect cases where the requested vsync combination was not possible to fulfill. Change-Id: Ie8f3665129f7a1ab7fcefb94b2298d54520b753a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * multiwindow: Replace per window fps timers with unified approachTor Arne Vestbø2016-09-191-18/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FPS is now calculated and output on the command line in a single place. The animated fps counter has been replaced with a vertical line which should make it easier to observe tearing issues when vsync is disabled. Change-Id: Id356fc1958c048d85aba48edfed59124454038d4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * multiwindow: Call update() after swapTor Arne Vestbø2016-09-191-2/+2
| | | | | | | | | | | | | | | Change-Id: Ic2c26339bce9fe92b2ccc730c72f53ce94397b78 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * multiwindow: React to mouse press to allow debugging UI responsivenessTor Arne Vestbø2016-09-191-33/+20
| | | | | | | | | | | | | | | | | | | | | | | | The animated FPS counter should be enough to observe smooth animations, so we use the color of the window to visualize frame latency. Change-Id: I1171a1c4bdc261ca8655771290c6735357821781 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * multiwindow: Use showNormal() instead of show() to ensure normal geometryTor Arne Vestbø2016-09-191-1/+1
| | | | | | | | | | | | | | | Change-Id: Ice607f536a620da5a70f2ba066f4983bb78c6288 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-214-20/+138
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5971b88e is not needed in new configure. This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with apple SDK", 2c9d15d7, because it breaks iOS build with new configure system. Conflicts: mkspecs/features/default_pre.prf mkspecs/features/mac/toolchain.prf mkspecs/features/toolchain.prf src/dbus/qdbusconnection.cpp src/plugins/sqldrivers/mysql/qsql_mysql.cpp src/sql/drivers/mysql/qsql_mysql.cpp src/widgets/widgets/qmenubar.cpp src/widgets/widgets/qmenubar_p.h tools/configure/configureapp.cpp tools/configure/environment.cpp tools/configure/environment.h Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-163-20/+135
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
| | * QtWidgets: Fix enter/leave events on popup menusBłażej Szczygieł2016-09-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the sloppy menu popups - send the leave event to the last active menu (except Cocoa), because only currect active menu gets enter/leave events (currently Cocoa is an exception). Check that the menu really has a mouse before hiding the sloppy menu - don't rely on enter events. This patch removes some unnecessary synthetic mouse enter/leave events from QMenu which causes event duplications with different mouse cursor position. Refactor sloppy menu timer handling - start or restart timers on mouse move events. Enter/leave events are not reliable. Fixes: - better enter/leave events handling for native widget actions, - reduce duplicated enter/leave events for menu actions, - better handle torn off sloppy menus. Partially reverts: 0ed68f3f58c63bd1496cb268bd83881da180051f Amends: 57ecd5aeeb1f609206933be66b92fcdf703703d7 Task-number: QTBUG-53068 Change-Id: I7ad56ac1619db124915d373fab82d0512d44c90e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * QLatin1String: Fix UB (nullptr passed) in relational operatorsMarc Mutz2016-09-151-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: qstring.h:1160:44: runtime error: null pointer passed as argument 1, which is declared to never be null qstring.h:1160:44: runtime error: null pointer passed as argument 2, which is declared to never be null Fix by avoiding the memcmp() calls if there's a chance that they might be called with nullptr. While at it, also implement !=, >, <=, >= in terms of ==, <, and add a test, because this particular UB was not fingered by any of the QtCore test cases, but by a Qt3D one. Change-Id: I413792dcc8431ef14f0c79f26e89a3e9fab69465 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Never return char variants when reading prepared MySQL statementsMilian Wolff2016-09-121-14/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has undesired effects when converting a QSqlRecord to JSON. A char(0) e.g. has special semantics that are undesired when reading a Tinyint column. I don't think that returning bool for the special case of a Tinyint(1) is required. This also did not happen before, and is also not happening when not using a prepared statement. Instead, a plain int/uint QVariant is returned. This patch extends tst_QSqlQuery::integralTypesMysql to also cover reading and writing booleans from/to a MySQL table column of type Tinyint(1). Additionally, the reading is now also done with a prepared statement and we also check the raw variant value. The broken behavior fixed by this patch was introduced by me in commit 194403a3483b7317cc9511bc8b2ab307775643c5. Change-Id: I028a3abd83fdd2b42d98d478950d205e5b6bbeb5 Task-number: QTBUG-53397 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * QtWidgets: Send show/hide event to children on restore/minimizeBłażej Szczygieł2016-09-121-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Child widgets should get the show/hide event when the TLW changes its state, because child widgets are also visible or invisible. This restores the Qt4 behavior (fixes the Qt4->Qt5 regression). Restoring/minimizing the TLW now sends the spontaneous show/hide event. Show events are now handled also in the expose event handler in the QWidgetWindow class, because the show event must occur before the expose event to avoid possible flicker e.g. the OpenGL content. This can happen e.g. on XCB platform. If the "WindowStateChange" event occur before the expose event (e.g. Windows platform) then the code in expose event handler will be ignored to prevent event duplications. Added autotest. Task-number: QTBUG-50589 Change-Id: Ie9a9329b1f29bff876de28d5948d0d5fb6bc1f05 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Blacklist modalWindowModallity on macOS aka “osx”Morten Johan Sørvig2016-09-151-0/+2
| | | | | | | | | | | | | | | | | | | | | Passes locally, unstable on CI. Change-Id: I132268ad0f6ad8b969701c9571fdb609d8225d07 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * | Blacklist selftest runSubTestTony Sarajärvi2016-09-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This one selftest is currently blocking OS X 10.11 from entering the CI. It can't be reproduced when run manually. Task-number: QTBUG-55155 Change-Id: I4553ef2d7813b29f5dc8577976c4482686346504 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | Blacklist modalWindowModallity on macOS aka “osx”Morten Johan Sørvig2016-09-181-0/+2
| | | | | | | | | | | | | | | | | | | | | Passes locally, unstable on CI. Change-Id: I251ad9603d14fd6195f721135ac606a1fd6b5060 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Add QStringList::join(QLatin1String) overloadMarc Mutz2016-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Costs only ~300B in text size in QtCore, which is roughly compensated by savings in other QtBase libraries, even without specifically porting users to QL1S. Of course, the raison d'être for this overload is avoiding the expensive QLatin1String -> QString conversion which, for small lists, can take up to 50% of the total runtime (assuming memory allocations dominate over scanning and copying the list). [ChangeLog][QtCore][QStringList] Added join(QLatin1String) overload. Change-Id: I91d7e1d4e2c76d6dc79f2b750cf8e256dd4e0ab6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | tests/auto/corelib/mimetypes: use local QThreadPoolMarc Mutz2016-09-171-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Isolates the test from anything that might be going on on the globalInstance(). Enabled by the explicit thread-pool feature on QtConcurrent::run(). Add explicit timed wait (unit tests should contain as little indefinite waits as possible). Also avoids the use of QFutureSynchronizer, which makes my static QList checker go nuts, with no way of fixing it until Qt 6. Change-Id: I0829992642b2a49bb6a10ddd4b31eb3f88e3adeb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | HTTP/2 tests: Remove execute permissions from source filesEdward Welbourne2016-09-062-0/+0
| | | | | | | | | | | | | | | | | | | | | Source (.cpp and .h) files should not be executable. Change-Id: I021d8733185d73d071fcaf3df7e529862a490b63 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | moc: Fix asserts on moc on empty token preceding ## operatorOlivier Goffart2016-09-162-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression introduced in c32ef0a725c7ac9d8a9ab053407389ef2fddc64e The expansion vector can be empty, in that case it is not allowed to call constLast() Task-number: QTBUG-55853 Change-Id: I47aa8eb7507ee91662215df42b4a66eebaa32bb5 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | Fix test for sandboxed targetsMaurice Kalinowski2016-09-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating files relative to the application binary, use a temporary directory. This also cleans up the test data after execution. Change-Id: I5d680fd01c60b0d33df06f9cb9aaef7c86279710 Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Check the context of Q_ENUM[_NS] and Q_FLAG[_NS]BogDan Vatra2016-09-151-0/+28
| | | | | | | | | | | | | | | Change-Id: Ifc8cb50efe3b07a79c8afbb382fba12649b602b2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Convert the old feature systemLars Knoll2016-09-152-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to the new qmake based configuration system. This removes the old qfeatures.txt (distributed over configure.json files) and qfeatures.h (distributed over qconfig-<module>.h files). qfeatures.prf is gone without replacement, as attempts to use it would lead to followup errors anyway. Change-Id: I1598de19db937082283a905b9592d3849d2199d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Modularize configure.json/.priLars Knoll2016-09-1511-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the different parts of configure.json/.pri into the libraries where they belong. Gui is not yet fully modularized, and contains many things related to the different QPA plugins. Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | winrt: Add tests to blacklistMaurice Kalinowski2016-09-071-0/+8
| | | | | | | | | | | | | | | | | | | | | This synchronizes with windows. Change-Id: I25a7d9969db37d44c2389a7dceb5f7096f658295 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>