summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Avoid deprecated QTest method in unit testPekka Vuorela2012-09-141-2/+2
| | | | | Change-Id: I1d6fc84962ba29a8963f99b87cccb4af465a2935 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* tests: Don't omit the body of a test function with QT_BUILD_INTERNALSergio Ahumada2012-09-1416-119/+188
| | | | | | | | | | Changing it outside of the test function definition to avoid running empty/inapplicable test functions. Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
* Fix QDBusServer with more than one connectionJan Arne Petersen2012-09-141-9/+29
| | | | | | | | | | | | | | | Create a new QDBusConnectionPrivate for every new connection in qDBusNewConnection instead of creating a single QDBusConnectionPrivate in the QDBusServer constructor which gets assigned the latest connected DBusConnection in qDBusNewConnection (and loses track on all previous DBusConnections). Also extend tst_QDBusConnection::registerObjectPeer() test with multiple connections to the server. Task-Number: 24921 Change-Id: I4341e8d48d464f3fe0a314a6ab14f848545d65a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QElapsedTimer instead of QTime to measure elapsed timeThiago Macieira2012-09-131-1/+1
| | | | | | | | | QElaspedTimer is a lot more efficient. Change-Id: I66d9514108f800a45181d8960b01a5e7d3fa9e80 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Increase the fuzziness of the QSemaphore test to 50 msThiago Macieira2012-09-131-1/+1
| | | | | | | | | | | | | The test tries to acquire a semaphore that isn't ready, so it will timeout. The test is working properly. The only problem is that 10 ms is too strict. For a wide variety of reasons, especially since the Qt CI system runs multiple tests in parallel, the program may not run again in that 10 ms window. Change-Id: Ic0f684895f73646db5f1cc783fe9ef75fb1ab02b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed: QFileInfo::lastModified() returning wrong value.Markku Heikkila2012-09-131-0/+10
| | | | | | | | | | | | | | | Fixed so that empty QDateTime is returned for non existing file. Fixed also created() and lastRead() to return empty QDateTime for non existing file. QFileSystemEngine::fillMetaData() returned true for non existing files. This was also corrected. Task-number: QTBUG-25811 Change-Id: I523eb99e4405b4b813b2950f85cc646239181d07 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Christian Stromme <christian.stromme@nokia.com>
* Test: Redo remove QSKIP from printsupport testsCaroline Chao2012-09-133-1/+39
| | | | | | | | | | | | Redoing 5704cbc462ad0b316a6b55a0f1dadc3c50762ef This can't work, because the define comes from qconfig.h, not qmake. Skipping initTestCase and cleanupTestCase when QT_NO_PRINTER is defined. Change-Id: I2527c018294b7518a4692f2c93da933848640b5d Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* Blackberry: fix tst_QFileInfo::isWritable()Rafael Roquetto2012-09-131-1/+4
| | | | | | | | | This test checks the access permissions for '/etc/passwd', however the filesystem on Blackberry is always read-only Change-Id: I9299531397d4467287541b04184540ad6e2eae72 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix crash when invalidating a QSortFilterProxyModelStephen Kelly2012-09-131-0/+59
| | | | | | | Task-number: QTBUG-27122 Change-Id: Ibca46b88442f4f92422d9b3182e4bbf25716a07f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix regression in QTextDocument::toHtml() with font pixel sizeEskil Abrahamsen Blomfeldt2012-09-121-0/+14
| | | | | | | | | | | | Introduced by 2e0003eda4783f69a40fb4b31e7084c761d9640d. We were missing a attributesEmitted=true which caused the output from toHtml() to sometimes be invalid when using pixel sizes to specify the font size. Task-number: QTBUG-25778 Change-Id: Ied61fcaef425a590d71c0b52292ac676cb88ba52 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
* Test: Update QSKIP for tst_QGLThread on MacCaroline Chao2012-09-121-6/+16
| | | | | | | | Task-number: QTBUG-22361 Change-Id: I6182a37dc38294011fd3b3934317f22c7297a4ca Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Test: remove QSKIP from printsupport testsCaroline Chao2012-09-123-46/+18
| | | | | | | | | Exclude printsupport tests from the build when QT_NO_PRINTER is defined. Change-Id: Iedae91666a599f4b77250abc8aac14c256fde34e Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Stabilize qprinter testEskil Abrahamsen Blomfeldt2012-09-121-1/+10
| | | | | | | | | | | The CreationDate entry in the two PDF files can potentially be different depending on when the test is run. We ignore the line for this entry when comparing the two results. Task-number: QTBUG-27171 Change-Id: I8978678295217edd537edb0d2c25260813aa3d93 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Don't manipulate immutable dataJoão Abecasis2012-09-111-17/+71
| | | | | | | | | | QArrayData can point to data it does not own (cf. fromRawData()), which shouldn't be modified. Not even upon destruction, as this data can live in Read-Only memory or be otherwise shared outside the QArrayData realm. Change-Id: I8bdf3050a17802fb003b77d5f543fe31769a7710 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com>
* Close popups when switching applications on Windows.Friedemann Kleint2012-09-111-0/+12
| | | | | | | | | | | Bring back code from 4.8 (Note that ALT-TAB is not received as key event). Task-number: QTBUG-27146 Change-Id: I6dd2e9c88fdc4c89d26dfaa8ab47deb2be451f25 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove deprecated inputItem and inputWindow from QInputMethodPekka Vuorela2012-09-112-47/+8
| | | | | | | | Interfaces introduced and deprecated during Qt5 development. Change-Id: I804a02df8c4a03ed6558f4a86375f97d09513d5c Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Avoid duplicate setPen() in PDF when reusing QPrinterEskil Abrahamsen Blomfeldt2012-09-111-3/+0
| | | | | | | | | | | | The simplePen property was not reset when reusing the QPrinter, thus we would output two identical setPen() commands in the PDF making the autotest that compares the results fail. Task-number: QTBUG-27171 Change-Id: I601042ec59e45ef72a56f230f6112a91a259b4a5 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* port qmake to qt creator's qmake language evaluatorOswald Buddenhagen2012-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | this is a monster commit which does the following things: - import the evaluator as-is from qt creator into qmake/library/ - integrate it into qmake's makefiles - overwrite proitems.h with actual special types - remove the parts of Option which are redundant with QMakeGlobals - make QMakeProperty a singleton owned by Option::globals. the dynamic handling so far made no sense. - make QMakeProject a subclass of QMakeEvaluator, with relatively few extensions the changes to existing qmake code outside project.* and option.* are minor. implementing the changes gradually would mean changing a lot of code which will be just replaced in the next commit, so i'm not wasting my time on it. Change-Id: I9746650423b8c5b3fbd8c3979a73228982a46195 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* test: Remove QSKIP from tst_uic::stdOut()Sergio Ahumada2012-09-101-3/+0
| | | | | | | | | | This test actually passes on Windows, so removing the QSKIP Task-number: QTBUG-26730 Change-Id: Ife1b5bd0ffa20c433070a1875dde8b6a226c331a Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* test: Remove QSKIP from tst_QLocale::windowsDefaultLocale()Sergio Ahumada2012-09-101-2/+0
| | | | | | | | | This test actually passes on Windows, so removing the QSKIP Task-number: QTBUG-24543 Change-Id: Ic2666665f2882392aec92a665f51d6c5dd3355f8 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix semantics of the src dir in the include search paths with MinGWSimon Hausmann2012-09-105-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This issue originates from https://bugs.webkit.org/show_bug.cgi?id=95736 Suppose we have main.cpp somedirectory/someheader.h -- which has #include "anotherheader.h" anotherheader.h With unix generator, the directory where main.cpp is located is included, unless no_include_pwd is set. Hence the look-up of anotherheader.h from within someheader.h will work. With MSVC this works because MSVC looks "in the directories of any previously opened include files in the reverse order in which they were opened." (from http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx) Unfortunately the build breaks with MinGW, because it lacks support for including the source directory in the include search path just like the unix generator does. This patch adds the same functionality to the MinGW generator as well as an auto-test. Change-Id: Iea8bb06e34862c51b8fd4eca2ee26668e24a319a Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix build of tests/ on Windows CEKevin Funk2012-09-103-2/+10
| | | | | | | | | | Remove some subprojects that have missing dependencies or use API that is non-available on Windows CE. Change-Id: Iad7118b95a691a433c3f798d56a6a069e5e41917 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove old troll test servers' references.Leonard Lee2012-09-101-15/+15
| | | | | | | | | | | | Replaced with qt-project.org test domain. The connectToMultiIP auto test is still disabled due to lack of test infrastructure. Task-number: QTBUG-23294 Change-Id: Icf01aabb0ae503291abdda4e8f773f8e0a08931a Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use QStringList::join(QChar) overload where applicable [QtDBus]Marc Mutz2012-09-101-2/+2
| | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I807b0e88ac71a0cb367fb4170cca8f2cb0ad43f3 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* test: QFtp tests require `private_tests' setSergio Ahumada2012-09-092-1/+2
| | | | | | | Also fixing some includes and re-enabling the test Change-Id: I4a061e106c2e55db39b8000729737a93e3d7714a Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Use QStringList::join(QChar) overload where applicable [QtNetwork]Marc Mutz2012-09-072-7/+7
| | | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I5b75877ba192fa1357e67fee70dff7c0475991e8 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Use QStringList::join(QChar) overload where applicable [QtWidgets]Marc Mutz2012-09-071-1/+1
| | | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: Ia30048e0c40967dc86a4e4ad26ac02ab67519096 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QtNetwork: bypass proxy for local connectionsJulien Brianceau2012-09-071-0/+61
| | | | | | | | | | | | According to Qt doc, "Network proxy is not used if the address used in connectToHost(), bind() or listen() is equivalent to QHostAddress::LocalHost or QHostAddress::LocalHostIPv6. This is not the case in current implementation. Change-Id: I6b8a40c1e8bd8aad9504d8f939b87eda6e93337c Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Add a way to benchmark sem_t on Unix tooThiago Macieira2012-09-071-0/+23
| | | | | | | It's closer to what we do with in QMutex than pthread_mutex_lock. Change-Id: I86498a800b69b684bf096912e911bc5bca219727 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Test: Replace QSKIP by XFAILCaroline Chao2012-09-071-5/+19
| | | | | | | For tst_QtConcurrentThreadEngine::threadCount Change-Id: I14b904a26900a01d5d04245ad60d9752f5645e68 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Test: Remove QSKIP for tst_QXmlSimpleReader::inputFromSocketCaroline Chao2012-09-071-3/+0
| | | | | | | | | The test is now passing. Tested with intel compiler and vs2008. Task-number: QTBUG-22285 Change-Id: I728919833d9bcbf71bef68c06baef92667ff074b Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* Make gui/math3d classes use float rather than qrealSean Harmer2012-09-077-1892/+1862
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects the mismatch between using floats for internal storage and qreal in the API of QVector*D which leads to lots of implicit casts between double and float. This change also stops users from being surprised by the loss of precision when using these classes on desktop platforms and removes the need for the private constructors taking a dummy int as the final argument. The QMatrix4x4 and QQuaternion classes have been changed to use float for their internal storage since these are meant to be used in conjunction with the QVector*D classes. This is to prevent unexpected loss of precision and to improve performance. The on-disk format has also been changed from double to float thereby reducing the storage required when streaming vectors and matrices. This is potentially a large saving when working with complex 3D meshes etc. This also has a significant performance improvement when passing matrices to QOpenGLShaderProgram (and QGLShaderProgram) as we no longer have to iterate and convert the data to floats. This is an operation that could easily be needed many times per frame. This change also opens the door for further optimisations of these classes to be implemented by using SIMD intrinsics. This needs to be applied in conjunction with https://codereview.qt-project.org/#change,33548 Task-number: QTBUG-21035 Task-number: QTBUG-20661 Change-Id: I9321b06040ffb93ae1cbd72fd2013267ac901b2e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add example to test widget grab.Friedemann Kleint2012-09-073-1/+347
| | | | | | | | Compiles against Qt 4.8 and Qt 5. Change-Id: Ic246aeb38171361a8338f38f9b92e5cf3b54b368 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Stabilize test of QSpinBox.Friedemann Kleint2012-09-071-35/+15
| | | | | | | | | | | | The test shows spurious failures in editingFinished() on some Mac platforms (QTest::qWaitForWindowActive(testFocusWidget)). This is apparently caused by the widget testFocusWidget (member variable) interfering with the other tests widgets. As it is used in one test only, instantiate it on the stack there. Change-Id: I688cd21a2668d072660658302cf59197abe0b4d8 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Revert "Implement automatic mouse grabbing on mouse button press."Friedemann Kleint2012-09-071-0/+3
| | | | | | | | | | | | | | | | This reverts commit 6b5bbc531b30d8ece25425e39843c6ae1af1d045. Autograbbing mouse shouldn't be done in crossplatform code, as X11 does this automatically. Windows needs platform specific solution. Task-number: QTBUG-26962 Task-number: QTBUG-27039 Task-number: QTBUG-23699 Change-Id: I911df92c4a34deb50b729f50681497046657948b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QDateEdit displaying day as a number for short and long day formatsMitch Curtis2012-09-051-36/+88
| | | | | | | | | | | When 2 (February) is entered as the month for (e.g.) 31/Jan/2000 (which is following the format: "dd/MMM/yyyy"), the day is corrected to 29 but displayed as its numerical value instead of its short (or long) name. Task-number: QTBUG-27036 QTBUG-19091 Change-Id: I558ee13b224707d22b26c2ec2c045f96118bd5a1 Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: aavit <qt_aavit@ovi.com>
* Fix 3 digit day being displayed by QDateEdit.Mitch Curtis2012-09-052-1/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | When a QDateEdit has its display format set to "yyyy/MM/dd", its day set to 31 and its month set to 2, it will display 291 as the day until the cursor is moved or the focus changed. This is because QDateTimeParser::parse calls sectionSize() for the day section, which will sometimes return an incorrect size. There are also other display formats affected by this bug (e.g. long day names). For example, (in the context of sectionSize()) when text is "2000/01/31" and displayText() is "2000/2/31", there is a difference between displayText() and text - text is the previous value and displayText() is the new value. The size difference is always due to leading zeroes. This patch makes QDateTimeParser keep track of the quantity of zeroes added to each section and then factors this value into the result of sectionSize() if there is a size difference between text and displayText(). Task-number: QTBUG-26847 Change-Id: I3823cc41167ec920f742cb6a20d39fc5f433c915 Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> Reviewed-by: aavit <qt_aavit@ovi.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-052-2/+2
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* test: Check for null string comparisonSergio Ahumada2012-09-051-6/+6
| | | | | | | Do not compare a QString to QString(). Instead use the .isEmpty() method. Change-Id: I8bb5e64563bf173abe7288bb9e35375bee1fe445 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Optimize QTextLayout/QTextEngine usage outside of QTextDocument.Milian Wolff2012-09-051-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QTextLayout is used in a QTextDocument, many code paths use special caches and thus greatly outperform the raw QTextLayout version that operates directly on a QString. This patch brings some of these optimizations also to the raw version. We now also use a QFormatCollection in such cases and enable the functionality of QTextEngine::indexAdditionalFormats() and QTextEngine::resolveAdditionalFormats(). Thanks to that, we can greatly speed up QTextEngine::format(), which now uses an amort O(1) hash table lookup instead of a O(N) linear search. The added benchmark shows a gain in the order of one magnitude: ./tst_bench_QText formattedLayout:long-many before applying the patch: 378.19 msecs per iteration (total: 37,820, iterations: 100) after applying the patch: 25.80 msecs per iteration (total: 2,580, iterations: 100) Note: This change is source-incompatible for applications using the private QTextEngine API. Task-number: QTBUG-8389 Change-Id: Ifcf7a8902a394428979ea06a6d955f886ee739c7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Auto test for 'qmake -project' use case.Rafael Roquetto2012-09-047-4/+205
| | | | | Change-Id: Ifb6d64828ba1cb42fd64299438b7eec302112edf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Generate includes for Qt containers used as auto-metatypes.Stephen Kelly2012-09-032-0/+77
| | | | | | | | | | | | Otherwise the containers might be forward declared in the moc file, and when the moc file is compiled in a standalone translation unit, the full definition of it would not be available. This results in odd compile errors, so instead generate the includes if required. Change-Id: Ie01c5a5d45314daad0b00dec03b3e1e18cdbae64 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use QStringList::join(QChar) overload where applicable [QtSql]Marc Mutz2012-09-031-1/+1
| | | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: Ie395d82d17710683968d006d22de313ef49dc6e5 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QStringList::join: add an overload taking a single QCharMarc Mutz2012-09-031-0/+38
| | | | | | | | | | | | | | This overload avoids the needless heap allocation that the traditional overload incurs due to the implicit QChar -> QString conversion involved there. In order to share the implementation between the two overloads, QStringList_join now takes the separator as a (Char*,int) tuple instead of as a QString. Change-Id: I92961f13a3f19099de2a6e2df9f4789a12fc83a0 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change SChar to metatype id 40.Stephen Kelly2012-09-031-0/+0
| | | | | | | | | This fills the gap left by QWidgetStar, making the sequence between FirstCoreType and LastCoreType contiguous, which some benchmarks assume to be true anyway. Change-Id: I2d5d202b6246a9065fdf77f325a4a04279dbe4b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix moc generating invalid code for slots with reference types as argument.Volker Krause2012-09-021-0/+6
| | | | | | | | | | | We can't have T& declared/registered as a metatype (wont compile), but using it as type for a slot argument is possible. With the recent introduction of metatype auto-registration we have to make sure that moc doesn't attempt to auto-register those. Simple types are handled correctly already, this fixes containers and smart pointers. Change-Id: Id96857c57d6ebf158a67e9d527c89dc195473b1b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* auto tests: updated for new QStyle pure virtualsJ-P Nurmi2012-08-313-20/+34
| | | | | | | | QStyle::standardIconImplementation() & layoutSpacingImplementation() are removed, and standardIcon() & layoutSpacing() made pure virtual. Change-Id: If8ab6cfef0b639b7973be22dd630ba3e6f39a225 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* test: Mark tst_QFile::writeLargeDataBlock() unstable failure as XFAILSergio Ahumada2012-08-311-1/+11
| | | | | | | | The test has one unstable failure on Windows, so mark this with QEXPECT_FAIL Task-number: QTBUG-26906 Change-Id: I2f6c63ddefecacd224d93f83e6951e961a02a051 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make QGraphicsView respect scrollbar policiesJeremy Lainé2012-08-311-0/+288
| | | | | | | | | | | | | | | | | When calculating the maximum height / width which a QGraphicsView can display, make sure we only take the scrollbars' dimensions into account if their policy is set to Qt::ScrollBarAsNeeded: - if the policy is set to Qt::ScrollBarAlwaysOff, the scrollbar will not be displayed at all - if the policy is set to Qt::ScrollBarAlwaysOn, the scrollbar's dimensions have already been substracted from the available space by QAbstractScrollArea::maximumViewportSize() Task-number: QTBUG-14711 Change-Id: If5d24b41dbe7b089abca2bf61ccbd370d4de79a1 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix updating of drag icons.Friedemann Kleint2012-08-311-1/+185
| | | | | | | | | | | | Try to find a target widget that accepts drops; ignore the event if none can be found. Split the handleDrag*() functions to reduce indentation. Add an autotest. Task-number: QTBUG-22987 Change-Id: I516ac5f0c002caaf83c52ac16f821246e565230f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>