summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QRegularExpression: add QRegularExpression* set of classesGiuseppe D'Angelo2012-03-064-0/+1156
| | | | | | | | | | | Added QRegularExpression, QRegularExpressionMatch and QRegularExpressionMatchIterator as PCRE-enabled, regexp classes. Documentation is included, as well as a first round of autotests. Task-number: QTBUG-23489 Change-Id: Id47031b80602c913ccd2fd740070e3024ea06abc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix tst_QNetworkReply::httpWithNoCredentialUsage autotestShane Kearns2012-03-061-16/+39
| | | | | | | | | | | | The test was testing the wrong thing, and passing even though QNetworkRequest::AuthenticationReuseAttribute was not being respected, until recently when I fixed username/password in URLs Now the cache is properly bypassed when this attribute is set to manual, and the autotest is updated to check this. Change-Id: I87943515562d0b16b03504f0758ba265758d1c22 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Fix QNetworkReply ioGetFromHttpWithCache test caseShane Kearns2012-03-061-0/+1
| | | | | | | | | | | | | | Expiration date is calculated from max-age header when a response is inserted into the cache. Because the test case is prepopulating the cache outside of QNAM's control, the expiration date was uninitialised, causing the test to fail. This is due to a 2 year old change in QNAM, where max age calculation was removed from cache retrieval, and more recent changes to QDateTime where secsTo() returns 0 if one of the arguments is invalid. Change-Id: Ieecd46123dde4ca0fd0be3ae79e70e1528ec02bc Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* QSslCertificate - make lazy initialisation thread safeShane Kearns2012-03-061-0/+72
| | | | | | | | | | | | | | | | | | | QSslCertificate can be copied around into multiple threads, without detaching. For example, the https worker threads inside QNetworkAccessManager. There are const methods, which lazily initialise members of the private class without detaching (i.e. caching results of expensive function calls) These functions now lock the d pointer using QMutexPool to avoid concurrency related crashes. autotest crashes 20% of the time in release builds without the fix, passes 100 times in a row with the fix. Task-number: QTBUG-20452 Change-Id: I64a01af8159216f2dd6215a08669890f6c029ca8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* QMimeDatabase: Fix crash on empty filenameDavid Faure2012-03-061-0/+1
| | | | | | | | | This is due to the search in the suffix tree starting at position fileName.length() - 1. Change-Id: I98501c1724c7dde2626351ace8ba19faa0d2e1e1 Reviewed-by: Ivan Komissarov <ABBAPOH@nextmail.ru> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Stabilize tst_QCalendarWidget::buttonClickCheckRohan McGovern2012-03-062-3/+2
| | | | | | | | The window should be shown and activated before sending user input. Task-number: QTBUG-23615 Change-Id: I2fc1738d9dc4ee7f03c81b040eed6389910a9d3c Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Stabilize tst_QShortcutRohan McGovern2012-03-061-3/+1
| | | | | | | | | | | show() on a window is asynchronous. Wait for it to complete before continuing with the test. Note the test already contained code for this, but it was inside of a Q_WS_X11 block, making it dead code in Qt 5. Change-Id: I06f892eea86278c56b1773a7e968bbe065f86260 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Stabilize tst_QAccessibility::actionTestRohan McGovern2012-03-061-0/+1
| | | | | | | | | show() on a window is asynchronous. Wait for it to complete before continuing with the test. Change-Id: Icd0daa0c0e8f287171c57708bb2fce0b6cf0906a Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Remove AccessibilityPrepare event.Frederik Gladhorn2012-03-051-7/+0
| | | | | | | | | | | | | This event was completely unused. In addition it leads to crashes on linux when sending the Destroy accessibility update. The Destroy event on linux would still query an accessible interface. That in turn would trigger the event to be sent. Change-Id: I8915527de067b8b70ba41b1361e3ef5d12866d7d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Windows: Make QSettings autotest significant againMiikka Heikkinen2012-03-051-2/+0
| | | | | | | | | The latest windows run of CI has QSettings test passing, so remove the CONFIG += insignificant_test from it. Task-number: QTBUG-24145 Change-Id: I35c0d8d4f72ad49f9f21dcd486ab33a37ab95e15 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* remove injection of default_pre in infile()/$$fromfile()Oswald Buddenhagen2012-03-051-0/+1
| | | | | | | | | | this is a hack from the times when these functions were (ab)used to inspect proper project files, but the inclusion was done with a clean project, so that the included files did not have any functions to work with. Change-Id: I19925e8ead597ca38df040000c183e368b32c06d Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix tst_QStyleSheetStyle::qproperty to not implicitly rely on QHash ordering.Robin Burchell2012-03-051-2/+2
| | | | | | | | | | | | Changing qHash() for string data affected the order of properties to be set, causing 'checkable' to be set after 'checked'. As 'checkable' state affects 'checked' as well (setting it to false), this means that the test was unreliable, a bug, which was exposed by the qHash change. Change-Id: I03a8dd7d07609683d99f0b2a40012a147d409c6e Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* testlib: Make verbose2 selftest use QCOMPARE as well as QVERIFY.Jason McDonald2012-03-0511-163/+236
| | | | | | | | | The verbose output for QCOMPARE is not very helpful. Make the verbose2 selftest (which reuses the counting selftest) demonstrate this, so that a future commit can demonstrate improvement. Change-Id: I6b3bc8f5199e984aa11d0a67b76a8c916be86380 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge "Merge remote-tracking branch 'origin/api_changes'" into ↵Rohan McGovern2012-03-0521-30/+476
|\ | | | | | | refs/staging/master
| * Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-0421-30/+476
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
| | * Automatic metatype registration of two-template-argument types.Stephen Kelly2012-03-021-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is complimentary to the commit which introduced a similar partial specialization for single template argument types: 6b4f8a68c8da1af7c5be7dc6075b688c9d6ca55f If T and U are available as metatypes, then QHash<T, U> is too. Change-Id: I09097b954666418b424c8c23577032beb814343a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * QPair: specialise QTypeInfo based on the typeinfos of its argumentsMarc Mutz2012-03-014-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specialise QTypeInfo<QPair<T1,T2>> based on the properties of T1 and T2: - If either T1 or T2 is Q_COMPLEX_TYPE, so is QPair<T1,T2>. - Otherwise, if either T1 or T2 is Q_MOVABLE_TYPE, so is QPair<T1,T2>. - Otherwise, QPair<T1,T2> is Q_PRIMITIVE_TYPE. Change-Id: I8aecbd37e3b7924f77f38967498deabf1a19ca24 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Make some tests and benchmarks pass with QT_NO_QSTRINGBUILDERStephen Kelly2012-03-016-21/+21
| | | | | | | | | | | | | | | Change-Id: I6c91a613007043d0f26ac11e98353a0b9ce646ae Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * QEvent (and subclasses): make ctors explicitMarc Mutz2012-03-015-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do this regardless of whether the event subclass is public API or only used in examples. Examples are examples, used by others as templates or even copied verbatim, so they should also follow sound engineering rules. Anyway, there's only one in examples/... Change-Id: I586ff16407a956c9e89288fdd4377eed73f45c0f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| | * Fix build of QNetworkReply benchmark with QT_USE_QSTRINGBUILDER.Stephen Kelly2012-03-011-2/+2
| | | | | | | | | | | | | | | Change-Id: Ie46126aed0d2e83dc7784c027066c789d3fd7652 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * QFlags: mark as Q_PRIMITIVE_TYPEMarc Mutz2012-02-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I originally tried to put Q_DECLARE_TYPEINFOs into Q_DECLARE_OPERATORS_FOR_FLAGS, to declare not only the flags type, but also the underlying enum as primitive, but too many users (arguably correctly) used Q_DECLARE_OPERATORS_FOR_FLAGS at (non-global) namespace scope where QTypeInfo would have been specialised in the wrong namespace. So specialise QTypeInfo for QFlags<T> only. Change-Id: I4af6e29aefbd9460a3d2bc6405f03cdf6b1096bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Allow QChar::SpecialCharacter with QStringBuilder.Stephen Kelly2012-02-291-0/+3
| | | | | | | | | | | | | | | Change-Id: I3c91fd516bb13e5534aa6f26ee9df745c990dfb5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Merge master -> api_changesRohan McGovern2012-02-29157-728/+1416
| | |\ | | | | | | | | | | | | | | | | | | | | Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac. Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
| | * | Allow moc to handle symbols that have been redefined.Matthew Vogt2012-02-271-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow moc to produce the desired identifiers when used with C++ symbol names that have been redefined, for example by -Dfoo=bar. Two changes are required: firstly, when encoding a type name, the components of the name must be checked for substitutions that have been defined for that token (note that this is not done here by correct pre-processing, but only by processing the resultant table of definitions). Secondly, the arguments to the SIGNAL, SLOT and METHOD macros must be allowed to be substituted during macro expansion rather than stringized directly. This is a temporary change to prevent breaking existing projects that depend on the declarative module. After clients have had an opportunity to update their code to the use the new interfaces, it can be removed. Task-number: QTBUG-23737 Change-Id: I39e6844cebf6ca7984af6028160b8a3797ac44a5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| | * | Inline and mark as deprecated images's serialNumber()Olivier Goffart2012-02-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These function are marked as obsolete since Qt 4.3 The motivation here was too fix QPixmap::serialNumber which is marked as QT_DEPRECATED_SINCE but was not inlined. But then I took the oportunity to do the same with all the other functions. Change-Id: Ic50a7857461fc402b2f2b4528c83e53e8e28ea30 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | | Avoid using internal testlib API in QDbusConnection autotest.Jason McDonald2012-03-051-20/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCOMPARE should only be used in a test function because it makes the test function return if the compare fails. The test wants to compare without returning on failure because the compare is inside a helper function called by many test functions, so the test was calling testlib's internal QTest::compare_helper() functions instead of QCOMPARE. This commit makes this code slightly less objectionable by calling the public QTest::qCompare() instead. Change-Id: Ida17a641e89f8a297d6a036449f44b33aa266368 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QAbstractSlider - adding setRange as a slotThorbjørn Lund Martsum2012-03-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many situations it would be very nice to have setRange as a slot. It fits good with the rangeChanged signal - and in some situations it does make sense to synchronize scrollbars ranges. Change-Id: I6bcb41ed6e009e5822b56b621e4e187fe52502a6 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | | Change bugreports.qt.nokia.com -> bugreports.qt-project.orgSergio Ahumada2012-03-022-2/+2
| | | | | | | | | | | | | | | Change-Id: Ia795098f24cf358b15067f54cd08dff0bd792bc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix sizing in QGraphicsView itemsAtPosition auto testJonathan Liu2012-03-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The auto test may fail incorrectly depending on the width of the QGraphicsView frame. To ensure more consistent test results, the frame is disabled. Change-Id: I8d70fb07e45803230954f776947d525e4cf9050f Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | | Add additional QGraphicsView tests for regressionJonathan Liu2012-03-021-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add additional tests for graphics view tooltip regression introduced by 7c0d15a22266a425c9e9ac0120d6774e120fe01e. Task-number: QTBUG-17517 Task-number: QTBUG-22663 Change-Id: I5e0d0e19504730a3e14ac84712a366dbebe688e6 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> (cherry picked from commit aaa46755dcc15b8baaa0d1b928828eb60e0babbc)
* | | Fix QApplication autotest crash when running on multiple screensMiikka Heikkinen2012-03-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Screens need to be destroyed in reverse order to ensure the primary screen stays valid when other screens are destroyed. Task-number: QTBUG-24300 Change-Id: I9d9d710aa67ec045baa8bf292833ffe7d9eea935 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | | Add note about failing test when using shared-mime-info < 1.0David Faure2012-03-021-0/+3
| | | | | | | | | | | | | | | Change-Id: I3ba9d14d915a579b9e102114866f6c9e0344ba16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | Fix QPixmap::grabWidget() on Windows.Friedemann Kleint2012-03-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not draw on the backingstore DC when drawing to a pixmap. Access the paintdevice for checking via the QPaintEngine since QPainter returns the clipdevice, which is a widget. Fix warning about accessing handle of 0-window in the test. Task-number: QTBUG-24183 Change-Id: Ie91ea6ab9d09528c7ec1d35633f9a0ee667719b1 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | testlib: Add selftests for -v1 and -v2 command-line switches.Jason McDonald2012-03-0213-5/+1060
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests don't have their own source code but rather reuse the counting selftest with additional command-line options. Note that currently the -v1 switch only changes the plain text output, and the expected xml output is identical to that of the counting test. This may change in the future however. This commit also restores a couple of lists to alphabetical order, where the findtestdata selftest was not sorted into the list correctly. Change-Id: Ie38e255f8029157b34162b3864b5fa66e137d74a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | | Unset _NET_WM_USER_TIME_WINDOW before destroying the windowJan Arne Petersen2012-03-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise metacity was crashing when a QWindow was destroyed immediately after being activated, because metacity was trying to select events (XSelectInput) for the already destroyed m_netWmUserTimeWindow. Task-number: QTBUG-24492 Change-Id: Iedbe7bdd6b26110ca8bec6f33525209ae551ffd5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | Fix tst_qregexp with QStringBuilderOlivier Goffart2012-03-011-133/+133
| | | | | | | | | | | | | | | | | | Change-Id: I1ac2a5c9ea5657ad2916465b77271e3d53c67cde Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* | | Remove ARMFPA support and Q_DOUBLE_FORMAT detectionBradley T. Hughes2012-03-013-24/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the -armfpa option the config.tests/unix/doubleformat* detection. The places where we used QT_ARMFPA and Q_DOUBLE_FORMAT has been removed as well. Rationale: ARM FPA with GCC does not work with EABI. Qt currently does not support compiling without EABI, making ARM FPA an impossibility. It is unknown whether other compilers provide ARM FPA support with EABI. Support for ARM FPA can be re-added in the future should the need arise, but since ARM VFP is available for ARMv5 and up, we should encourage implementors to instead use soft-floats or VFP. Change-Id: I3671aba575118ae3e3e6d769759301c8f2f496f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | | Cocoa: Implement QPlatformTheme:palette()Morten Johan Sorvig2012-03-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Causes a new test failure in QGraphicsProxyWidget::updateAndDelete, expand the EXPECT_FAIL to cover that one as well. Change-Id: If9da757206445d17510c4fac82a559de7b8c0563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | Use QSystemError for QDnsLookup windows backendShane Kearns2012-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OS provides the error string in this case. This gives more information to the developer seeing a generic error. Change-Id: Ia03642982f3513ee5a8a9fa98d918e948f8d97a5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | qmake-test: Fix jom/nmake handling on Windows.Friedemann Kleint2012-03-011-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | The test fails if MAKEFLAGS is set up for jom since the test always uses nmake. Remove MAKEFLAGS from the process environment. Change-Id: Idaed3cc964832b83c282a59fc5257572c520b882 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* | | Skip the network SSL test on Windows.Friedemann Kleint2012-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | For SSL, this would require an OpenSSL library to be installed. Change-Id: I2a320e7faf40ef925c90dbe539f912e4a8fc13fc Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* | | Changed qchar unittest to check return from QFINDTESTDATAKurt Korbatits2012-03-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | - Changed qchar unittest to check string QFINDTESTDATA returns is not empty. Change-Id: Idb3997aaa5d5220272915c1e2538175205b3d6e8 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | | Fixed qlocale unittest to install subprogram syslocaleapp correctlyKurt Korbatits2012-03-012-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | - It was trying to install syslocaleapp sub program as TESTDATA instead of an application. Change-Id: I2117d11335bc2fd37a8ccc9a03b0337382f0177f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | | Changed qdir unittest remove() to check actual file removedKurt Korbatits2012-03-011-1/+2
| | | | | | | | | | | | | | | | | | | | | - Changed remove() test to check the file just removed is gone. Change-Id: I0b6c176e624134402b5547866064f436ce063f16 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | | Changed qlogging unittest to install subprogramKurt Korbatits2012-03-011-0/+3
| | | | | | | | | | | | | | | | | | | | | - Added install of app sub program so it works from install directory Change-Id: Ia83643519752a3cbb59d6da2aed132d683a94bee Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | | Fixed qdir unittest rename() test to skip if run as rootKurt Korbatits2012-03-011-0/+6
| | | | | | | | | | | | | | | | | | | | | - subtest not valid if run as root so added a check and skip Change-Id: Iae993e20f272f9303a75062ef00d22b49df5e84a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | | QRegExp: fix \i \I \c \C \p \P escape sequencesGiuseppe D'Angelo2012-03-011-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those escape sequences have a special meaning in the XML Schema 1.1 regular expressions, but not in Perl-compatible ones. An escape sequence that has no special meaning should match the escaped character itself; this patch fixes QRegExp's behaviour in that regard (previously, it added a character class matching nothing). Change-Id: I983f923baa7c2ec19938b96353f3a205e6c06d58 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Windows - fix getsockopt calls for narrower than int optionsShane Kearns2012-03-011-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows unhelpfully writes to only one byte of the output buffer when getsockopt is called for a boolean option. Therefore we have to zero initialise the int rather than initialising to -1 as was done before. This in general only works for little endian architecture, because the word would look like 0x01000000 on big endian. So I have added some compile time asserts in the assumption that windows is always little endian. This is ok for comparisons with 0/false, but not comparisons with true or nonzero values. In the case of IPV6_V6ONLY, it is documented as DWORD (unsigned int) but on some windows versions it is returned as a boolean triggering the warning. I removed the warning, as the conversion to int works on both LE and BE since it is only compared with zero. Task-number: QTBUG-23488 Change-Id: I3c586d1ada76465fc045a82661f289920c657a4c Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* | | Remove qhash_faster.Robin Burchell2012-02-293-73/+0
| | | | | | | | | | | | | | | | | | | | | | | | It's not faster under _any_ metric than the new algorithm, and it loses a lot of spread which is a bad thing. Change-Id: Ic87258f1c887822ffea1cb1517355564fabc3c26 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | | Copy Qt 4's QString hash algorithm.Robin Burchell2012-02-293-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We must do this the same way we do all other hash algorithms for fair comparison, as otherwise, the call to the PLT unfairly penalises QHash<QString>'s results, as it's in a different shared object. Change-Id: I69c891f5a97dcccdfcfbdbf32796f86242a42963 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>