summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-2318-34/+382
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| * QToolButton: properly reset the size hint when a menu is set on itGiuseppe D'Angelo2014-09-161-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | QToolButton::sizeHint() takes into account the presence of a menu. However, setMenu() doesn't retrigger a size hint recalculation. Hence, (un)setting a menu on an already sized tool button won't properly reset the size hint. Since the calculated size hint is cached, delete the cached value and call updateGeometry to cause a recalculation. Task-number: QTBUG-38949 Change-Id: I6e79e5e70e31afdfd129282b3668875eca86f51d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QSizeGrip: use a QPointer to the tracked TLWGiuseppe D'Angelo2014-09-151-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | And not a normal pointer. The problem is that in certain scenarios, if the TLW containing a QSizeGrip changes and the old TLW gets immediately destroyed, then the mechanism which updates the tracked TLW is run too late, and ends up accessing a dangling pointer. Therefore, we need to protect that pointer via a smart pointer. Task-number: QTBUG-22867 Change-Id: Icfb051132bacde604f660ac7a98bc0a9d1022c68 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Preventing caching of null authenticatorEric Lemanissier2014-09-091-0/+23
| | | | | | | | | | | | | | | | | | | | | | In some cases, e.g. when bad credentials are provided in an ftp URI, QNetworkAccessAuthenticationManager::cacheCredentials is called with a null authenticator. This authenticator should not be cached, because it is useless, and leads to inconsistencies in the use of the cache Task-number: QTBUG-40622 Change-Id: If2a0a422b915f268648f5eef1d68601446123371 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Avoid adding widget to its own layoutThomas Fischer2014-09-056-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Widgets and layouts added or inserted to a layout are checked for: - Not being NULL - Not being the parent widget of a layout or the layout itself, respectively Without this commit, adding a widget to its own layout would result in a CPU-hogging infinite loop. Now, a warning is written to stderr and the add or insert function call is ignored. The checks are implemented as public functions of QLayoutPrivate and thus accessible in QLayout's descendants to be used in various "addWidget", "insertWidget", etc functions. Unlike 'classical' layouts like QGridLayout, QFormLayout does indeed accept widgets that are NULL. To not break this behavior, any call for the check functions first tests if the widget or layout, respectively, to test is NULL or not and calls the check only in the latter case. Automated tests for QBoxLayout, QGridLayout, and QFormLayout were added. For an unpatched Qt 5.3, each of those automated tests will freeze as explained in QTBUG-40609. For a fixed version, warning messages about invalid parameters to addWidget/addLayout/... calls will be read by QTest::ignoreMessage, resulting in a passed test. Change-Id: I1522d5727e643da3f7c025755975aca9f482676d Task-number: QTBUG-40609 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Fix crash in QTextLayout::cursorToXKevin Funk2014-09-021-0/+23
| | | | | | | | | | | | | | | | | | | | When 'cursorPos' is out of bounds ([0, lineEnd]), this method crashed. Change-Id: Ia0540ab3afbffb5c598f7b8515263cce3b3928e4 Task-number: QTBUG-40753 Reviewed-by: Dominik Haumann <dhaumann@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Recreate child windows when changing screensDyami Caliri2014-08-282-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | When setting a new screen, the code calls QWindow::destroy(), which recursively destroys all child windows. It then calls create() on the top-level window, leaving child windows destroyed. This causes crashes if you have embedded native widgets. Task-number: QTBUG-40817 Change-Id: Iaace2589f48bbfd5faaf5ff95357ff43b310504a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix several regressions in font selectionEskil Abrahamsen Blomfeldt2014-08-203-8/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5.3.0 a change was added which automatically adapts Common script to surrounding scripts in accordance with the Unicode tr#24. This broke *a lot* of cases of font selection because the font selection algorithm is not prepared for handling characters with adapted scripts. We need to disable this change for now and redo it later with patches to font selection to avoid the regressions. [ChangeLog][Text] Fixed several regressions in font selection when combining different writing systems in the same text. Task-number: QTBUG-39930 Task-number: QTBUG-39860 Change-Id: Id02b5ae2403c06542ed5d81e7c4deb2e0c7d816e Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * OS X - QCollator::compare() returns wrong results.Timur Pocheptsov2014-08-191-25/+37
| | | | | | | | | | | | | | | | | | kUCCollateDigitsAsNumberMask works only if kUCCollateDigitsOverrideMask is also set. Update 0: - test added. Task-number: QTBUG-40777 Change-Id: I48bfec78f5f8439a51f8d749f0fc4397a72b29f2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * refactor disconnectFromFtp to remove cached entries when necessaryMatt Broadstone2014-08-151-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cases where a cached ftp connection fails to connect, or a file transfer has failed, we should removed the cached connection. Since qnam has an idea of a single internal QFtp per full operation, when file transfers failed previously the cached connection would be reused for subsequent connections and thus fail. [ChangeLog][QtNetwork][QNetworkAccessManager] QNetworkAccessManager now properly handles FTP transfer failures by removing failed cached ftp connections. Task-number: QTBUG-40797 Change-Id: Ie090a39ceddd7e58a0d8baf7d01f2a08c70162e5 Reviewed-by: Richard J. Moore <rich@kde.org>
| * Make sure we don't cache old file sizes prior to new writesThiago Macieira2014-08-131-0/+40
| | | | | | | | | | | | | | | | | | If we write to a file, its size changes. We should drop previous size caches. Change-Id: Ib687c91e5fc88cab588c89023f23da9622160da9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| * Show the correct cursor for QLineEdit's side buttons.Marcel Krems2014-08-121-0/+4
| | | | | | | | | | | | Task-number: QTBUG-40708 Change-Id: I5869f42bab3a27085b5572a4b83b16c39a67f733 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add support for blacklisting test functionsLars Knoll2014-09-2146-60/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to have a finer grained control over the tests we skip in our CI system. This adds a blacklisting mechanism that allows blacklisting individual test functions (or even test data) using a set of predefined matching keys for the operating system and some other relevant variables. QTestlib will search for a file called BLACKLIST in the test directory and parse it if found. The file contains a simple ini style list of functions to blacklist. For details see qtestblacklist.cpp. Change-Id: Id3fae4b264ca99970cbf9f45bfb85fa75c1fd823 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix default implementations of raster opsEskil Abrahamsen Blomfeldt2014-09-201-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the list of default implementations, the raster ops added in ae0ddb8c729c105a5b4f32a4f6765af8fe546333 were all offset by one composition mode because of a duplicate entry in the array. The effect would be, e.g. that using the NotDestination operator would resolve to the Set operator instead. Most users will probably not have experienced this since any of the asm-based functions will be preferred. [ChangeLog][Painting] Fixed some very rare cases of mismatched raster modes in QPainter. Change-Id: Ia242b54c78acbe1c89d9b4ecd10936564ec134b2 Task-number: QTBUG-41413 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | a11y: Don't try to update accessibility if there's no interfaceTor Arne Vestbø2014-09-201-18/+8
| | | | | | | | | | Change-Id: I970729e65ba0eb857e6974f9947f27ae8e6410c3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Update widget winId when screen changesDyami Caliri2014-09-192-1/+32
| | | | | | | | | | | | | | | | | | When a window's screen changes it may recreate the platform window. In that case, update the winId in the widget to keep it in sync. Task-number: QTBUG-40681 Change-Id: Iec815320214832bb63952de3a5bd1340a04dacd4 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | winrt: Fix gethostname linker error in qsqldatabase testsAndrew Knight2014-09-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | With VS2013 Update 3, Win32 sockets are now allowed in Windows Store Apps. Upgrading VS meant that gethostname was visible to the application, but failed to link as the mkspec doesn't link to ws2_32. Adjust the workaround not to call the newly visible symbol on WinRT. Change-Id: Ide6d8759cca7acab6c466a9bf4d6b876f6ca7605 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Restore -qt-block-indent on <li> elementsAllan Sandfeld Jensen2014-09-181-0/+13
| | | | | | | | | | | | Task-number: QTBUG-20877 Change-Id: If049065ed99eaf8ffc85c8ff54d3da892a095795 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Add a multiwindow manual test using QOpenGLWindowLaszlo Agocs2014-09-182-0/+181
| | | | | | | | | | | | | | | | | | This is a very useful tool to test the behavior of a given platform when it comes to rendering on three contexts to three window surfaces from the gui thread and calling swapBuffers for each. Change-Id: If3abd055d0dee7cfb24098484326aa24261556bc Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fix accessibilitylinux autotest failureJan Arve Saether2014-09-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Each test function is responsible for removing the children it added to m_window, since m_window is reused for each testcase. Due to this, the test QCOMPARE(children.length(), 2); failed, (it was 3). Change-Id: Idbd13214d2e841450800df0542fbdbcfaac85ce1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Fix saving handle width in QSplitter::saveState()Alexander Volkov2014-09-161-0/+37
| | | | | | | | | | | | | | | | | | | | | | QSplitter::handleWidth() returns either a style dependent value if d->handleWidth is negative or the value of d->handleWidth itself. So to preserve this choice after calling saveState()/restoreState() we should save and restore the value of d->handleWidth rather than a result of handleWidth() which is non-negative. Change-Id: Idc11f8063d34b6c4a5f9b0a0032868679766dfb9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Make the default value of QTreeView::indentation() be style dependentAlexander Volkov2014-09-151-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a new PM_TreeViewIndentaion enum value to QStyle and get the corresponding pixel metric in QTreeView. [ChangeLog][QtWidgets][QTreeView] Indentation is now style-dependent by default. [ChangeLog][QtWidgets][QTreeView] Added resetIndentation(). Change-Id: Ifad7987b8f3c6cd32987b89d95390f33043d8f19 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Adam Majer <adamm@zombino.com>
* | QNetworkDiskCache: fix expiration calculation heuristic with Last-Modified timeDong-Heon Jung2014-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Heuristic with last-modified time in Qt has some problems. 1) Remove redundant expirationDate.isInvalid() check expirationDate.isInvalid is already checked. So I removed. 2) Add dateHeader.isInvalid() check The dateHeader is used in expiration calculation. I add invalid check for the dateHeader. *. The dateHeader is the origin server's Date 3) Change diff time calculation. The expirationDate is calculated with time diff. Previous calculation is // The lastModified is earlier than the currentDateTime. // The diff has negative value. int diff = currentDateTime.secsTo(lastModified); // The expirationDate is earlier than lastModified // , currentDateTime and dateHeader. expirationDate = lastModified.addSecs(diff / 10); *. currentDateTime: current time *. lastModified: last modified date in server It means that files are not cached with the heuristic. I changed diff calculation. int diff = lastModified.secsTo(dateHeader); freshness_lifetime = diff / 10; // RFC 2616 13.2.4 4) httpRequest.headerField setting If current_age is larger than 1 day, the cache MUST attach Warning 113. *. The current_age is value of age in header or elapsed time from dateHeader in Qt source code. Previous code does not check current_age is larger than 1 day correctly. // dt = 1970-01-01T00:00:00 + current_age dt.setTime_t(current_age); // currentDateTime is much bigger than 1970-01-01T00:00:00 if (dt.daysTo(currentDateTime) > 1) Task-number: QTBUG-40836 Change-Id: I4b00c3b287e6fafeea6b02681533fe75a198247e Reviewed-by: Jung Dong-Heon <dongheon.jung@lge.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | QVariant::compare shouldn't return match when QVariant::cmp does notAllan Sandfeld Jensen2014-09-111-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the types doesn't match in QVariant::compare we do a comparison based on QString, this may end up indicating a full match, though the we don't match according to cmp. In this case it would be better if we preserved the non-matching to avoid breaking ordering. [ChangeLog][QtCore][QVariant] Fixed ordered comparison between QVariants that do not match but produce identical toString output. Task-number: QTBUG-40363 Change-Id: I84a8eca11e8875dba9948bde2906ae7c5aa35704 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Revert "Reading QJsonObject property should not modify the object itself."Jędrzej Nowacki2014-09-111-51/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 20cf632ad5f3ffe7b0fd231724c971f4e07304eb. The commit produced to many problems during statics destruction. For example causing QtCreator crash (QTBUG-40987). Change-Id: Ib52f6a449c2d84deab2de792559a6a065ca45e8d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QLockFile: on Windows, retry deleting the lock file if it is being read.David Faure2014-09-111-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A "sharing violation" happens when trying to delete the lock file and another thread/process is reading it at that very moment. Detect the error and try again, up to 10000 times - to avoid an infinite loop if QFile::remove fails for another reason such as a sudden change of permissions preventing us from deleting our own lock file. On Unix the deletion can't fail because of readers, but it doesn't hurt to check the return value there too, to catch other reasons for failures such as a sudden permission change. Task-number: QTBUG-38853 Change-Id: Icf12a74faed4a4916e3427abc09d9c33aa141476 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix several issues in QCollatorLars Knoll2014-09-101-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the code and move more things into the cross platform code path. Make sure the flags survive changing the locale of QCollator. Use the correct locale on Windows, WinRT and OS X. We now pass all QCollator autotests on these platforms. Task-number: QTBUG-40778 Change-Id: Ic2d3334b5018c323a35a3ea8fc1d7ab5f99b4e62 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix user defined conversions to numeric typesLars Knoll2014-09-101-0/+93
| | | | | | | | | | | | | | | | | | The old code was completely broken. It did dereference val for user types, but val does in this case only contain garbage. Instead use the pointer to the correct data. Change-Id: I20ccf0bfa3dd3774c787d08c51cc8dd7b1ec9a1a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Don't accept json strings with trailing garbageLars Knoll2014-09-101-0/+14
| | | | | | | | | | | | | | | | | | | | A well formed JSON document is not allowed to contain trailing garbage at the end. Don't accept this in the parser. Task-number: QTBUG-40062 Change-Id: I0a09dbd099a8c643f58023342546c4e67d026fec Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Fix bugs in internal comparison operatorsLars Knoll2014-09-101-0/+24
| | | | | | | | | | | | | | | | | | | | | | The comparison operators between QJsonPrivate::String and QJsonPrivate::Latin1String weren't all correct, leading to wrong sorting of keys in QJsonObjects when the keys were outside of the latin1 range and resulting lookup errors. Task-number: QTBUG-41100 Change-Id: Idceff615f85d7ab874ad2a8e4a6c1ce8c2aa0f65 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Add an option to share between TLWsLaszlo Agocs2014-09-101-0/+27
| | | | | | | | | | | | Task-number: QTBUG-41191 Change-Id: I510d1631926ed0d9e371703d22229aed92432aa6 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Fix linking of tst_qwindow with dynamic Open GL.Friedemann Kleint2014-09-081-0/+2
| | | | | | | | | | | | Task-number: QTBUG-40696 Change-Id: If80a5e9b96e2eb7e50e02eefbe6e54d0b028c144 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | ssl: common certificate parser support for extensionsJeremy Lainé2014-09-051-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | This makes non-OpenSSL backends able to handle to certificate extensions. This also converts the Q_OS_WINRT #ifdef's in the unit test to QT_NO_OPENSSL as the behavior is the same for any non-OpenSSL backend. Change-Id: I6a8306dc5c97a659ec96063d5a59cee2ee9a63a9 Reviewed-by: Richard J. Moore <rich@kde.org>
* | GraphicsView: Fix resolvePalette() for QGraphicsItem's childrenMaks Naumov2014-09-051-0/+17
| | | | | | | | | | | | | | Use a proper function for that. Change-Id: I166ce44b8987d522cb01bae57009b2b862851b92 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | ssl: make peerVerifyError test agnostic of error orderJeremy Lainé2014-09-051-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | Currently the peerVerifyError test for QSslSocket makes an assumption about the order in which SSL errors are emitted by peerVerifyError. This assumption does not necessarily hold for non-OpenSSL backends. This change fixes this assumption, and also checks that HostNameMismatch was found both in the errors emitted by peerVerifyError and by sslErrors. Change-Id: I856d1ea43b36332db0f178d35fc14a4bb18ad673 Reviewed-by: Richard J. Moore <rich@kde.org>
* | ssl: enable non-OpenSSL backends to compile QSslSocket testsJeremy Lainé2014-09-051-0/+8
| | | | | | | | | | | | | | | | Some of the QSslSocket tests use OpenSSL-specific symbols. This change fixes this issue. Change-Id: Ib67efa42a15facaf0ad34fc0466341a37d945d1e Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | Fix endianness part of QSysInfo::buildAbi() stringAlex Trotsenko2014-09-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | Both Q_LITTLE_ENDIAN and Q_BIG_ENDIAN macros are always defined on all architectures. So, byte order detection results in "little_endian" value for big endian systems. Test the system endianness in a right way, according to Q_BYTE_ORDER macro documentation. Change-Id: I5523f90567e78d679a3ff2902a8f5377ed39ceb1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Accessibility: Improve line boundary helper functionsFrederik Gladhorn2014-09-043-46/+265
| | | | | | | | | | | | | | | | | | These functions are supposed to make it easy for third parties (and QLineEdit) to implement the textAt/Before/AfterOffset functions. Before the functions were ignoring newlines completely and thus only somewhat useful. Change-Id: I7136b9502a7fa6f8ad9ad7236761a34c1a7fd4da Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | ssl: add support for ASN.1 boolean valuesJeremy Lainé2014-09-031-0/+60
| | | | | | | | | | | | | | | | | | This adds support for reading and writing ASN.1 boolean values. It also adds an operator to test two ASN.1 elements for equality. Change-Id: I4a22cbf9808533d593fc59d27b63caaf650b1f57 Reviewed-by: Richard J. Moore <rich@kde.org>
* | ssl: check critical certificate extensionsJeremy Lainé2014-09-031-0/+47
| | | | | | | | | | | | | | | | This adds a test for a QSslCertificate containing extensions which are marked as critical. Change-Id: I314e1f5c9943bcad5d43129a97f9f834882dc6fb Reviewed-by: Richard J. Moore <rich@kde.org>
* | ssl: tighten QSslCertificateExtension testsJeremy Lainé2014-09-031-0/+13
| | | | | | | | | | | | | | | | | | This tightens tests performed on a certificate's extensions by checking isCritical() and isSupported() for all extensions. It also explicitly checks the keys when value() returns a QVariantMap. Change-Id: If51c55be25bbcd09cc3a6712ddfea2bf9a01360f Reviewed-by: Richard J. Moore <rich@kde.org>
* | Make QElapsedTimer default to invalid (and now non-POD).Robin Burchell2014-09-031-8/+2
| | | | | | | | | | | | | | | | | | | | | | The practical uses of a POD QElapsedTimer are not really that clear, and the number of misuses of this API are quite high. Default the state to invalid to prevent against mistakes. [ChangeLog][QtCore][QElapsedTimer] Is no longer a POD. Change-Id: I267292acf2bfca7404e3e449dd04410441d7ce26 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | ssl: common key parser support for encrypted keysJeremy Lainé2014-09-023-9/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the infrastructure for reading and writing encrypted private keys when using non-OpenSSL backends. Each platform must provide its cryptographic encrypt / decrypt functions. As WinRT already uses the common parser, this commit includes an implementation for that platform. Done-with: Andrew Knight <andrew.knight@digia.com> Task-number: QTBUG-40688 Change-Id: I0d153425ce63601ff03b784a111e13962061025f Reviewed-by: Richard J. Moore <rich@kde.org>
* | Remove vestiges of d3dcompiler_qtAndrew Knight2014-09-021-3/+0
| | | | | | | | | | Change-Id: I2a233cb0bfec27a7535a31818568955f8bf85c15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | qasn1element: add QAsn1Element::toIntegerJeremy Lainé2014-09-021-0/+8
| | | | | | | | | | | | | | | | | | | | This change adds the ability to decode ASN.1 INTEGER fields, provided they represent a positive number of less than 64-bit. This is needed for PKCS#12 decoding. Change-Id: Iafb76f22383278d6773b9e879a8f3ef43c8d2c8f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | ssl: disable (broken) i/o on DER encoded keysJeremy Lainé2014-08-301-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSslKey currently has methods which supposedly allow decoding and encoding private keys as DER protected by a passphrase. This is broken by design as explained in QTBUG-41038, as storing the encrypted DER data alone makes no sense: such a file lacks the necessary information about the encryption algorithm and initialization vector. This change: - explicitly stops using the passphrase when decoding DER in the constructor. The behavior is unchanged, it is not possible to read the encrypted DER alone. - refuses to honor the passphrase to DER encode a private key. The toDer method now outputs an empty QByteArray instead of garbage. Task-number: QTBUG-41038 Change-Id: I4281050cf1104f12d154db201a173633bfe22bd9 Reviewed-by: Richard J. Moore <rich@kde.org>
* | ssl: add a test for 3DES encrypted keysJeremy Lainé2014-08-303-63/+94
| | | | | | | | | | | | | | | | This adds a test for 3DES encrypted keys in addition to the current DES encrypted keys. Change-Id: I229e3ef710e9ee23efa2a3275b89d958491de4a2 Reviewed-by: Richard J. Moore <rich@kde.org>
* | winrt: complete QSslCertificate implementationOliver Wolff2014-08-301-0/+12
| | | | | | | | | | | | | | | | | | The native handle and import functions are now available for use in other parts of the winrt backend. Change-Id: I07e6f95b3411c3dc7c1a7a164544b18e5e435d01 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | ssl: Add common key parser for backendsJeremy Lainé2014-08-291-26/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This internal implementation of QSslKey can be used when OpenSSL is not available. Encrypted keys are not supported, as the cryptography must be supplied by a separate library. With this commit, WinRT is migrated to the new implementation, but qsslkey_winrt.cpp is left in place so that the missing crypto implementation can be added later. This also means most of the expected failures for that platform can be removed from the autotest. Change-Id: I24a3ad1053bb72311613b28b3ae845aa1645a321 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | QListView: Catch stack overflow on mutual scrollbar calculation.Christoph Schleifenbaum2014-08-291-0/+25
| | | | | | | | | | | | Task-number: QTBUG-39902 Change-Id: Ie850371098070e8ce485d5cb122aa89c18d97359 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>