summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Docker-based test servers for network-related Qt autotests on WindowsRyan Chu2019-01-239-19/+175
| | | | | | | | | | | | | There is no docker bridge on Windows. Docker document recommends using port mapping to connect to a container. The problem is that it causes a port conflict if the user is running a service that binds the same port on the host. This change applies the same solution of macOS to deploy the docker environment into VirtualBox and use the host network option. Task-number: QTQAINFRA-2294 Change-Id: Iedcb8daa39373f02adb59f02eae2775f02870c54 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Extend the default retry times of QtNetworkSettings::verifyConnectionRyan Chu2019-01-231-2/+2
| | | | | | | | | | | | Apparently, it is not enough to just retry 10 times (10 seconds) in the CI network. It happens from time to time that a test fails due to server port is unreachable. Especially, the docker containers are running in a virtual machine on Windows and macOS platforms. In such cases, it needs more time to warm up the service depending on the system loading. Change-Id: Ia0234bff2a82988b62f451e20b50671708784008 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Schannel supportMårten Nordheim2019-01-223-10/+57
| | | | | | | | | | | | | Adds support for Schannel, an SSL backend for Windows, as an alternative to OpenSSL. [ChangeLog][QtNetwork][Ssl] Added support for Schannel on Desktop Windows. To build Qt with Schannel support use '-schannel' during configure. Task-number: QTBUG-62637 Change-Id: Ic4fb8ed3657dab994f9f4a4ac5cbddc7001a0a46 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add QStringList::indexOf/lastIndexOf for QStringView and QLatin1StringAlbert Astals Cid2019-01-221-16/+48
| | | | | Change-Id: I42eac69c1f7ab88441d464b9d325139defe32b03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update manual qsslsocket test to use HTTP/2 instead of spdyMårten Nordheim2019-01-221-6/+6
| | | | | | | | | Some of the spdy/3 tests don't pass anymore because those services no longer support spdy/3. Solve this by updating it to HTTP/2 (h2). Change-Id: Ib3ef6109b75f4298fed15c1c7922deca35459df9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-2119-48/+99
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
| * tst_QPrinter: stabilize qprinter testChristian Ehrlicher2019-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | The CreationDate entry in the two PDF files can potentially be different depending on when the test is run. 97b4c5a5746a33a27076d72ceb3533fbd54b9642 already accounts for it but the current tag for creation date is '/CreationDate'. Therefore check if the line contains 'CreationDate' instead. Change-Id: I1fc069cf935bba07084ac4a0743ff05312374d10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_QString: fix localeAwareCompare() when using ICUChristian Ehrlicher2019-01-201-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | tst_QString::localeAwareCompare() is failing since ab448f731ecd8437c7c5c8b96a0e7f419ec3a7ca because the 'C' locale no longer initializes ICU and falls back to simple QString comparison. Fix it by explicitly setting the locale for the testdata to en_US so the QCollator is properly initialized. Task-number: QTBUG-73116 Change-Id: I9d4d55e666c5c52f93298dedb7e22da01a25318d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Eliminate some stray misleading paths from expected output filesEdward Welbourne2019-01-165-12/+12
| | | | | | | | | | | | | | | | | | The output files for the tuplediagnostics selftest of testlib had a stray non-canoical path fragment in them; so replaced with its canonical form. Change-Id: Ib421380036c3fb1b91447eb8c87be4ad0dfe5c96 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| * tst_qsyntaxhighlighter: fix no-op QTRY_VERIFY checkMårten Nordheim2019-01-161-1/+2
| | | | | | | | | | | | | | | | The bool is assigned on the previous line: QTRY_VERIFY will not do anything because the statement is already true. Change-Id: I067290e19ffd100819b2b631af431c6013623a00 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| * QSyntaxHighlighter: cancel delayed highlight if done manuallyMårten Nordheim2019-01-161-0/+19
| | | | | | | | | | | | | | | | | | | | It was an implicit effect before which stopped working after dec7961709c90f6977d2447f7fa6c6625af41cb2. Reintroduce it as some projects used this side-effect as a way to abort the initial highlighting. Change-Id: I5340ee9882a242bc8b5f7f843f1cfe793a65d357 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| * fix out-of-bounds access on trailing percent sign in tr() argumentOswald Buddenhagen2019-01-142-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | tr() recognizes %n and %Ln. it offers no way to escape lone percent signs, which implies that they must be interpreted verbatim, which is what the code actually does. except that it would run off the end if the % appeared at the end of the string. Fixes: QTBUG-57171 Done-with: Mateusz Starzycki <mstarzycki@gmail.com> Change-Id: Icf81925c482be1ea66ec8daafb3e92ad17ea7fab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
| * qWaitFor: Prevent being stuck in QCoreApplication::processEventsTor Arne Vestbø2019-01-098-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the overload of QCoreApplication::processEvents that takes a maxtime argument, the function will keep processing events until there are no more events, or until it times out. The problem is that the function doesn't distinguish between events that were on the event queue when the function was called, and events generated by processing events as part of its own execution. If for example a widget calls update() in its paintEvent, the function will spin for the entire duration of maxtime. That doesn't work for qWaitFor, where we need to check the predicate between each pass, so we use the overload of processEvents that doesn't take a maxtime. That's fine, as we have our own timeout logic. Change-Id: I9738d7d0187c36d4a5ddfcd3fd075b0bd84583c4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Blacklist a flaky qtableview function in WinRTTony Sarajärvi2019-01-081-0/+2
| | | | | | | | | | | | Task-number: QTBUG-72853 Change-Id: Iaf2b25712b571a3ce73387cb3d2e70d427808364 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Fix the timing issue of vsftpd during boot (probably invalid config)Ryan Chu2019-01-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This appears to be a timing issue of vsftpd's initial script (/etc/init.d/vsftpd). When starting the vsftpd service, the script uses a while loop to make sure that the vsftpd process has been created with the expected PID. The problem is that it should sleep if it can't grep the same PID via ps command. while [ ${n} -le 5 ] do _PID="$(if [ -e ...vsftpd.pid ]; then cat ...vsftpd.pid; fi)" if ! ps -C vsftpd | grep -qs "${_PID}" then break fi sleep 1 n=$(( $n + 1 )) done if ! ps -C vsftpd | grep -qs "${_PID}" then log_warning_msg "vsftpd failed - probably invalid config." exit 1 fi However, synchronization based on time is not working in general. This change will rewrite the while loop to an infinite loop and remove the exclamation symbol (!) from the if condition. Upgrading the version of vsftpd is not helpful here because vsftpd_3.0.3-11 (Ubuntu 18.10) didn't resolve it yet. Change-Id: I07382709c33bd9bab61fcea76ab7deca5f630084 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Support debug_and_release option (which is the default under Windows)Ryan Chu2019-01-151-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debug_and_release option is in use, qmake will generate one mata-Makefile and two additional leaf Makefile (Makefile.Debug and Makefile.Release). In such case, testserver.pri will be included in all three passes. The problem is that the mata-Mafile is used to invoke leaf Mafile recursively. The docker test server should only be integrated in the leaf Makefile. To resolve this problem, this change uses "!build_pass" condition to determine whether this is a pass of meta-Makefile, and then skip it. Change-Id: Ibc48d657680e089ebaa1bc356b87eb4cfd9f4580 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | disabledProtocol() - use the right address when connectingTimur Pocheptsov2019-01-091-2/+2
| | | | | | | | | | | | | | ... as we normally do in other tests, using localhost. Change-Id: I7969d7bfd50b545adae7e23476d17b6224e9a8fc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Skip smb-path test of tst_QNetworkReply when using Docker test serversRyan Chu2019-01-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The tests of smb protocol only work in the CI network. Therefore, the docker-based test server for Windows can't pass all the tests of QNetworkReply. These two tests should be reworked when adding Samba server to the docker-based test servers later on. Task-number: QTBUG-72861 Change-Id: I54e639b5414760ee929d0d28fe10f9e021aff7dc Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Don't treat the ampersand in a titlebar as a mnemonicAndy Shaw2019-01-081-0/+48
| | | | | | | | | | | | | | | | | | | | As the mnemonic has no meaning when it is in a dockwidget title, we should just treat it as a literal ampersand instead and display it as such. Fixes: QTBUG-54485 Change-Id: I96c856ce2771a68d226f48f8f47affc24f1c53cd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Make convert_generic_to_rgb64 more genericAllan Sandfeld Jensen2019-01-081-0/+10
| | | | | | | | | | | | | | | | | | This makes it possible to get rid of specialized functions for converting to RGBA64PM, while at the same time making the conversion faster as the painter routines are better optimized. Change-Id: I3e73856b2c1411977450e72af1741aab0ecf537e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Add clear, reserve and capacity methods to QPainterPathJean-Michaël Celerier2019-01-081-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows anticipating and reusing internal allocations of QPainterPathElements instead of using the common `m_myPath = QPainterPath{}` pattern. [ChangeLog][QtGui][QPainterPath] Added clear(), reserve(), capacity(). clear() removes allocated QPainterPath elements but preserves allocated memory, which can be useful for application with complex paths that are often recreated. reserve() and capacity() follow QVector semantics. Change-Id: I763461e2a421feda9053d3eb512af2fcf07ade2b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-074-136/+13
|\| | | | | | | Change-Id: Ieb57137ee2b7d0c505e3531d5aa1bcb66978847e
| * Fix warnings about uninitialized variablesJędrzej Nowacki2019-01-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/kernel/qmetatype.cpp: In static member function ‘static void QMetaType::destroy(int, void*)’: qtbase/src/corelib/kernel/qmetatype.cpp:2599:27: error: ‘info.QMetaType::m_destructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (m_typedDestructor && !m_destructor) ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_destructor’ was declared here QMetaType info(type); ^~~~ qtbase/src/corelib/kernel/qmetatype.cpp:2600:26: error: ‘info.QMetaType::m_typedDestructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized] m_typedDestructor(m_typeId, data); ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_typedDestructor’ was declared here QMetaType info(type); ^~~~ The extended (not inlined) function may be called on a half initialized invalid instance. Change-Id: I26d677a8ad2bd0c5846233f06393e774d377936d Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * qmake: add $$read_registry() functionOswald Buddenhagen2019-01-051-0/+2
| | | | | | | | | | Change-Id: I7f9f17e0f44c273e4754d1decc92a8594cad8658 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Revert "Blacklist tst_QTimer::basic_chrono on macOS"Tony Sarajärvi2019-01-041-2/+0
| | | | | | | | | | | | | | | | | | | | Incorrectly blacklisted. This reverts commit 40a7c57ba990dfd58814a4a9dc69948991458cd4. Task-number: QTBUG-61013 Change-Id: I7d9dc4a4b1c8d7ff77ab75c61027b908ffb74552 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Remove dead codeVitaly Fanaskov2019-01-041-134/+0
| | | | | | | | | | | | | | Task-number: QTBUG-44131 Change-Id: Ic092f2be5855840d6467560159c12f3c5aa36344 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-0411-50/+236
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QRawFont::unsupportedWritingSystem() and tst_QGlyphRun::mixedScripts() on windows for now. Conflicts: qmake/generators/makefile.cpp src/corelib/itemmodels/qstringlistmodel.cpp src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp tests/auto/gui/text/qglyphrun/BLACKLIST tests/auto/gui/text/qrawfont/BLACKLIST Task-number: QTBUG-72836 Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
| * Respect roles of buttons added to QMessageBoxVitaly Fanaskov2019-01-031-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a button added to QMessageBox has AcceptRole or YesRole, the signal accepted() will be emitted upon click on the button. If the button has RejectRole or NoRole, the signal rejected() will be emitted upon click on the button. If a button has a different role, neither accepted() nor rejected() will be emitted. This works for both standard and custom buttons. The signal finished() with result code will be sent regardless of a clicked button role. Also added documentation strings for some methods of private classes in order to have better tooltips in IDE(s). Task-number: QTBUG-44131 Change-Id: I521a4e5112eb4cf168f6fbb4c002dbe119aeeb09 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Fix QStringListModel::setData to check for actual changesLuca Beldi2018-12-241-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QStringListModel::setData documentation states that "The dataChanged() signal is emitted if the item is changed." This patch actually respects the doc. setData will check that the data actually changed before sending the dataChanged signal. [ChangeLog][QtCore][QStringListModel] setData will now emit the dataChanged() signal only if the string set is different from the one already contained in the model Change-Id: I4308a6f3b4851203fb899c5e29a36076e0c32f2f Reviewed-by: David Faure <david.faure@kdab.com>
| * macOS: Only do gamma-corrected blending for subpixel-antialiased textTor Arne Vestbø2018-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The grayscale font-smoothing doesn't expect to be linearly blended, as first assumed. Amended nativetext manual test to better diagnose the native Core Text behavior. Non-linear blending will result in the magenta text having a dark outline against the green background. Change-Id: I24a5f04eb1bd66fb98d621078d80ee9b80800827 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Fix text shifting vertically when elidedEskil Abrahamsen Blomfeldt2018-12-212-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When eliding text we would check for the existence of the ellipsis character and fall back to using the dot if it was not available. However, when font merging was in use, we would also use ellipsis from a fallback font if available. This could cause the metrics of the text to increase if the fallback font had larger metrics, and the result was that text could shift when elided. It is better to prefer the dot from the current font than to use the ellipsis from a fallback, so we only use the ellipsis if it is in the main font. [ChangeLog][QtGui][Text] Fixed a bug where eliding text could change the height of its bounding rectangle for certain fonts. Fixes: QTBUG-72553 Change-Id: Ib27fc65302465ddce661801bcc5ae32e55f1aeb9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QTableView: Fix keyboard navigation with disabled rowsChristian Ehrlicher2018-12-181-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard navigation with MovePageUp/Down and MoveEnd did not honor disabled cells in all cases which lead to inconsistencies in the navigation (esp. since MoveHome does honor them correctly). Therefore make sure that all four move operations work consistent by refactoring the code to use common functions. Fixes: QTBUG-72400 Change-Id: I63fa3b626510d21c66f4f9b2b1bfb3261728ecaf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * nativewindow: Add additional test for 8pt font sizeTor Arne Vestbø2018-12-161-4/+3
| | | | | | | | | | | | Change-Id: I5012eb6ffee8f81da61a6fe611352ee5900a5eee Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * moc: add support for C++11 enum structSamuel Gaist2018-12-152-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++11 added the new enum class key as well as enum struct. While the former is likely the most known and used, the later can be used in the same contexts and with the same effects. Currently moc doesn't parse enum struct while it does for enum class. This patch fixes this. [ChangeLog][moc] moc now parses enum struct the same way as enum class therefore that keyword can be used with the Q_ENUM macro as well as Q_FLAG and Q_DECLARE_FLAGS. Change-Id: Iaac3814ad63a15ee4d91b281d451e786b510449c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QRegularExpression: anchor wildcard patternSamuel Gaist2018-12-151-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of wildcardToRegularExpression doesn't anchor the pattern which makes it not narrow enough for globbing patterns. This patch fixes that by applying anchoredPattern before returning the wildcard pattern. [ChangeLog][QtCore][QRegularExpression] The wildcardToRegularExpression method now returns a properly anchored pattern. Change-Id: I7bee73389d408cf42499652e4fb854517a8125b5 Fixes: QTBUG-72539 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Revert "Disable Docker-based test servers on macOS temporarily"Ryan Chu2019-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c1fc47b06aa27e253271d59b6c1f11a6c4ab674a. CI is now running on 18.04 hosts and vmx is enabled on that level. As the update in QTQAINFRA-2288, the macOS 10.13, openSUSE 42.3 and Ubuntu 18.04 had vmx enabled inside the VM. Change-Id: I6ec4094ca826418f46f417b3cab89678bb089417 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Fix and unit test QPalette::resolveAlejandro Exojo2018-12-311-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | The function is setting the brushes correctly in the return value, but without updating the resolve_mask, making it return wrong results in functions like isBrushSet or the debug operator. Added a unit test for the member function, since the class is still mostly untested, and clarified the reference documentation of what the function is supposed to do. Change-Id: Iaa820dc44f095e125f9375cb00da5569986803c6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QbstractItemView: Allow Key_Space for keyboardSearch()Christian Ehrlicher2018-12-251-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | The keyboard search in QAbstractItemView did not handled Key_Space because this is also an edit trigger. It was also consumed if no edit was started. This patch changes this behavior and triggers the keybaord search when the editing was not started. Fixes: QTBUG-48505 Change-Id: I58e0d283f863c9b12ac5d2f6171f15522bd7c30a Reviewed-by: David Faure <david.faure@kdab.com>
* | QTreeView: fix keyboard navigation when first or last item is disabledChristian Ehrlicher2018-12-252-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard navigation did not consider the disabled state when trying to find the new index under all circumstances. This lead to a non-working PageUp/Down/Home/End navigation when the first or last item was disabled or hidden. Fix it by explicitly checking if the calculated item is hidden/enabled and skip it in this case. Fixes: QTBUG-44746 Fixes: QTBUG-34832 Change-Id: Ifa3b64a405e67b792db5db9d186d426fcfe183fb Reviewed-by: David Faure <david.faure@kdab.com>
* | Add overload of QSqlDatabase::cloneDatabase to allow cloning cross threadsAndy Shaw2018-12-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | Since QSqlDatabase::database() cannot be used to access another database from another thread, then the overload is provided to make it possible to clone with just the connection name. This will handle the cloning internally safely then. Fixes: QTBUG-72545 Change-Id: I861cc5aa2c38c1e3797f6f086594a1228f05bada Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QSsl: do not wait for 'connected'/'encrypted' if a protocol is disabledTimur Pocheptsov2018-12-211-44/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since we'll refuse to continue with a handshake, failing in initSslContext() on a disabled protocol versions. Then, functions like waitForEncrypted, connectToHostEncrypted, startServerEncryption and startClientEncryption should either bail out early (who needs a TCP connection which we'll abort anyway?) or bail out whenever we can, as soon as a disabled protocol was found in a configuration. This change also makes the behavior of different back-ends consistent, since it's a general code-path that reports the same SslInvalidUserData error. Update auto-test to ... actually test what it claims it tests. Task-number: QTBUG-72196 Task-number: QTBUG-72179 Change-Id: I548468993410f10c07ce5773b78f38132be8e3e0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QCommandLineParser: show application name in error messagesDavid Faure2018-12-201-0/+22
| | | | | | | | | | | | Change-Id: I2c39759294ca0a11a59b9a38207bf1aef941b070 Fixes: QTBUG-58490 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-151-163/+966
|\| | | | | | | Change-Id: Iad06d8c07dfc288c9d1a9f7ee3520285cea60546
| * QAbstractSlider: fix invertedControls having no effect for left/right keysMitch Curtis2018-12-131-3/+487
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a comment in the code that said: // It seems we need to use invertedAppearance for Left and right, otherwise, things look weird. It's not clear what that was referring to, but in its current state, a slider with invertedControls set to true will not behave as expected: pressing the left arrow key will decrease its value instead of increasing it, and vice versa for the right arrow key. As stated in the documentation (and by its name), invertedAppearance only controls the appearance of the slider, and not the effect of key events. Remove the comment and use invertedControls instead. Change-Id: I13296cbda9244413978ef0d7f0856065f74fd0bf Fixes: QTBUG-25988 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Refactor tst_QAbstractSlider::keyPressed()Mitch Curtis2018-12-131-163/+482
| | | | | | | | | | | | | | | | | | | | Don't do several tests at once in the test function. Instead, move the extra tests to the data function. This makes it possible to easily add a self-contained test (i.e row) for an upcoming fix. Task-number: QTBUG-25988 Change-Id: I65c8d7620f01107f8f59c96896b1a641d97f5fdc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | OpenSSL: drop support for SSLv2 and SSLv3Giuseppe D'Angelo2018-12-131-129/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per RFC 6176 (2011) and RFC 7568 (2015). Code-wise, we're left with the decision of what to do with a few enumerators in QSsl::Protocol; I've made TlsV1SslV3 act as TlsV1, and adjusted the description of AnyProtocol. A new test was introduced - deprecatedProtocol() - to test that we, indeed, do not allow use of SSL v2 and v3. protocol() and protocolServerSide() were reduced to exclude the (now) no-op and meaningless tests - neither client nor server side can start a handshake now, since we bail out early in initSslContext(). [ChangeLog][QtNetwork][SSL] Support for SSLv2 and SSLv3 sockets has been dropped, as per RFC 6176 (2011) and RFC 7568 (2015). Change-Id: I2fe4e8c3e82adf7aa10d4bdc9e3f7b8c299f77b6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | uic: No longer generate static_cast for enum values in legacy formsFriedemann Kleint2018-12-1313-25/+25
| | | | | | | | | | | | | | | | | | Add a lookup for the affected enum values and use the names instead. Task-number: PYSIDE-797 Change-Id: I6be166409000aff83d9465c9a3b2f37b44c5c085 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Qt Forward Merge Bot2018-12-135-50/+98
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-135-50/+98
| |\| | | | | | | | | | Change-Id: I0fe623517af28e408b642c879efd59f633ab63ac
| | * qt_imageFromWinHBITMAP(): Fix memory corruption when converting from bitmaps ↵Friedemann Kleint2018-12-121-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with low depths Insufficient memory was allocated when asking GetDIBits() to convert to 32bit. Fix allocation size and use a QScopedArrayPointer. Fixes: QTBUG-72343 Change-Id: I45f79c913a243316e01bc6efed08e50ccc7d25f4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>