summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Improve performance of QArrayData::Grow autotestJoão Abecasis2012-08-301-5/+26
| | | | | | | | | | Doing element-wise insertions for the full range of the test made testing under valgrind extremely slow. When a reallocation is detected we now resize() the container close to capacity(), while verifying this doesn't unnecessarily re-allocate either. Change-Id: Idf7015cf390e366fe444e7ca14c904a2d54ff48b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSqlQueryModel: fix nested beginResetModel/endResetModelMark Brand2012-08-301-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to 83c9ebbd6692cde99ee692e6549c591100f12545. Consider the case where calls to the reset methods on the same object are nested as in the following sequence: 1. beginResetModel() 2. beginResetModel() 3. endResetModel() 4. endResetModel() In such cases, only the outermost calls, i.e., 1) and 4), should emit signals. After 83c9ebbd6692cde99ee692e6549c591100f12545, 1) and 3) emitted the signals, which is wrong. This is corrected by keeping track of the nesting level. Such sequences can come about when a base class calls the begin/end methods between the calls made by the subclass. QSqlTableModel::select() is an example of this. Test included. Change-Id: Ia62b45cb1abaab00a32bb8357de4a958bcff83e5 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Ensure that printer orientation is preservedTitta Heikkala2012-08-301-0/+2
| | | | | | | | | | | | | | | | | After setting the printer name the initialization is no longer done for a printer with a name. Instead doReinit() method is called to preserve the orientation (set with setOrientation() method before calling setPrinterName()). Before the orientation was changed back to default when setPrinterName() method was called ignoring the orientation set. Updated also the autotest because the case: taskQTBUG4497_reusePrinterOnDifferentFiles() is no longer expected to fail on Windows. Task-number: QTBUG-26008 Change-Id: Ia6bc9ae14d79a646e61bfc97652f9f5af90738b3 Reviewed-by: Andy Shaw Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Make tests/auto/corelib compile on Windows CEKevin Funk2012-08-304-2/+8
| | | | | Change-Id: I71987d40ae69d95f645c4c7d26d50add4c799327 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QString::append: add (const QChar*, int len) overloadMarc Mutz2012-08-301-3/+23
| | | | | | | | | | | Both insert and replace have this overload, so one reason to add it to append(), too, is consistency. But I can also make good use of this overload in the the new QStringList::join(QChar) overload, so it's actually useful in its own right. Change-Id: Iccd48f9cb84831399e4db7e3e78eba25c0ced30d Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed the QTreeView expansion/collpasing when animatedThierry Bastian2012-08-291-2/+39
| | | | | | | | | | | | | | | | | | If you had a QTreeView with expandable items, if you tried to expand and while the animation was still running you'd try to collpase the node, the display would be completely broken: the items below that items would not be visible any more except for a fraction of a second when expanding or collapsing it again. The problem is in the fact that when starting an animation the QTreeView stores the state before animating. And it does that even if an animation is already running. So the stateBeforeAnimation becomes AnimatingState and when the animation finishes, AnimatingState is the state that is restored breaking the painting. Unit test is included. Change-Id: I015212c1ed8962e6df705655099a5660f195caf3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Made QImage::fill(uint pixel) for RGB888 accept QRgb values.Samuel Rødal2012-08-292-3/+20
| | | | | | | | | | | | Previously QImage::fill() for Format_RGB888 expected a BGR value instead of the RGB order defined by QRgb, making it counter intuitive to use related to the 32-bit formats. Fixed the QPixelLayout data for RGB888 and changed the byte order of quint24 based on what the optimized image conversion routines expect. Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Ensure child items are updated even if the parent item has no contentAndy Shaw2012-08-293-0/+84
| | | | | | | | | | | | When a parent item had its visiblity toggled, then the child item would not update if the parent item had ItemHasNoContents and ItemClipsChildrenToShape set. This is a common use case in declarative as the root item has ItemHasNoContents set. Task-number: QTBUG-26846 Change-Id: Id6592ebc4ba2caa4331a4a71f7247e40993131b6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add support for explicit TLS 1.1 and 1.2Brendan Long2012-08-291-5/+39
| | | | | | | | | | | | Add SslProtocol enums TlsV1_1 and TlsV1_2 and use the appropriate OpenSSL methods when they're selected (TLSv1_1_client_method, TLSv1_2_client_method, TLSv1_1_server_method and TLSv1_2_server_method). This allows us to explicitly use TLS 1.1 or 1.2. Task-number: QTBUG-26866 Change-Id: I159da548546fa746c20e9e96bc0e5b785e4e761b Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* test: Mark tst_qtextboundaryfinder::generateDataFromFile() with internal buildSergio Ahumada2012-08-291-1/+1
| | | | | | | | | | | | This function only makes sense on a developer build. In non developer-builds you get: tst_qtextboundaryfinder.cpp:116:13: warning: ‘void generateDataFromFile(const QString&)’ defined but not used [-Wunused-function] Change-Id: Id1bda2d27b00048f7401606959b566a59c05b38d Reviewed-by: Toby Tomkins <tjtomkins@gmail.com>
* QSharedPointer: make QT_SHAREDPOINTER_TRACK_POINTERS work with QObjectsGiuseppe D'Angelo2012-08-281-0/+7
| | | | | | | | | | | | | | | | If setQObjectShared crashes because a QObject is tracked by two different QSharedPointers, we lose the debug feature offered by #defining QT_SHAREDPOINTER_TRACK_POINTERS, as the check done by this define happens after the setQObjectShared call. Therefore, move setQObjectShared after the internalSafetyCheckAdd call. This is actually a noop change in 5.0, as setQObjectShared does nothing. However it prevents a bug in case the Qt 4 behaviour is brought back in some later version. Change-Id: I71340d0f878828354537762d01c46d441efc918c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't attempt to test DBus on QNX.Stephen Kelly2012-08-281-1/+1
| | | | | | | It is not expected to be there currently. Change-Id: I9e0ece35b8064ecb7cb24e55604ea78c9e6ab242 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add automatic metatype registration for invokable methods.Stephen Kelly2012-08-281-0/+234
| | | | | | | | | | | This works similarly to the automatic registration for Q_PROPERTY types, but in this case it mostly affects the need for users to call qRegisterMetaType<T>() before using queued connections with methods using non-built-in metatypes, or before using invokeMethod manually. Change-Id: Ib17d0606b77b0130624b6a88b57c36d26e97d12d Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add automatic metatype registration for Q_PROPERTY types.Stephen Kelly2012-08-281-0/+172
| | | | | | | | | | | | | | | | In Qt 4, the user needs to call qRegisterMetaType if the property could otherwise be read before the type is registered with the metatype system. This patch makes that unnecessary and automatic by registering it when the first read indicates that it is not yet registered instead or when QMetaProperty::userType is called before it is registered. The types which are automatically registered exclude the built-in types, which do not need to be registered, and include metatypes which are automatically declared, such as pointers to QObject derived types and containers of existing metatypes. Change-Id: I0a06d8efdcb64121618e2378366d0142fa0771f5 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Handle invalid dates properly for QDataStream versions < 5.Mitch Curtis2012-08-281-0/+61
| | | | | | | | | | | | | | | In Qt 5, when streaming an invalid QDate using a QDataStream version earlier than Qt_5_0, QDate.jd is written and read as 0, which is an invalid julian day for Qt versions earlier than 5.0. For Qt 5.0 however, 0 is a valid julian day, so when comparing a deserialised invalid date (read using a QDataStream version < Qt_5_0) against a default-constructed invalid date, they won't compare equal when they should. Task-number: QTBUG-26989 Change-Id: Ia76df493471f3b068c7d7187be20e3178eff2cc7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix some warnings in tests.Friedemann Kleint2012-08-282-3/+3
| | | | | | | | | - Unused variables - Signed/Unsigned comparisons. Change-Id: I0f4cc92a8366ad501d703d19c3358ac24db47270 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Make letter spacing APIs in QTextFormat more consistentEskil Abrahamsen Blomfeldt2012-08-271-8/+12
| | | | | | | | | | | | Change d060b6f04f956ab3a6358f826dc6928b3353f5f7 introduced some new properties to QTextFormat which were unfinished and did not match the documentation in the same change. I've updated the API and docs to use the regular QFont enum for letter spacing type instead of introducing bools (which inhibits expansions later) or mutually exclusive properties in the text format. Change-Id: Ife44993b6746c413e421fdaf92ebaaab6ba95977 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix limitting shortcuts to keypad onlyJani Honkonen2012-08-271-0/+47
| | | | | | | | | | | | | | | | | The Qt::KeypadModifier modifier is internally masked away from all shortcuts. So it is not possible to set a keypad only shortcut. Changed the implementation so that first a full keysequence match is searched. Then if no match is found the same sequence is tried without the keypad modifer. Added a autotest for this also to cover the basic use cases relating to this. Task-number: QTBUG-20191 Change-Id: Ibe7740c705fd0ab1eece4809b9a0b48882172933 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* moc: test slots marked final/override in various waysMarc Mutz2012-08-263-0/+297
| | | | | | | | | While writing the test, I found that moc doesn't yet support volatile slots. I left the tests in, commented, for a time when it does. Change-Id: Ib5fa00b25600618aedcc66739630054f3c879b99 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* moc: parse classes that use Q_DECL_FINAL|final|sealedMarc Mutz2012-08-263-3/+167
| | | | | | | | | | | | | | | | | | | | This only works with the C++11 contextual keyword directly, the MSVC equivalent 'sealed', or the Qt define for it. While this isn't a problem for syncqt, being an internal tool, moc should eventually be able to parse user code using local C++11-final-wrapping macros. For this, I guess moc would have to be taught to expand macros in code and not just test #if clauses, potentially driven by something like #pragma qt-moc expand-this #define MY_FINAL_CLASS final but that's something for someone more intimately familiar with moc's source than I am. Change-Id: Id6aec961a881e8d5a9b76a7fc8e1c02c71913f64 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QUrl: port thread-safety autotest from Qt4.David Faure2012-08-262-1/+92
| | | | | | | | This detected the same missing detach()s in QUrl::resolve. Everything else works, no need for a mutex in Qt5's QUrl. Change-Id: I0da51b7b0c6b810d314a26d4b638383cd17de12b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix infinite recursion while dragging toolbar of QMainWindow.Markku Heikkila2012-08-251-1/+58
| | | | | | | | | | | | | Prevent recursion in QMainWindowLayout::endSeparatorMove(). Manually cherry-picked from Qt 4.8 change 90b71dc0ff4ec9bb150a0de9933d6eb06d995a34 Task-number: QTBUG-21378 Change-Id: I901ebfd96be0bdc6ab03dd8c3335d2622db843db Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Test for quadratic behaviour when rendering long line in QTextEditOlivier Goffart2012-08-231-0/+36
| | | | | | | | | | | | QTextEdit showing long lines using lots of text format (for example with a syntax highlighter) used to expose a quadratic behaviour which make it impossible to edit files with long lines. It was fiexed in the few previous commit Task-number: QTBUG-8389 Change-Id: Ib7203497a7699a85ae1dfb70fe65d5fb36884b58 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* tst_QMutex: add markers to the tryLock testsThiago Macieira2012-08-231-6/+13
| | | | | | | | Just to make it clear which two sections go together. Change-Id: If3724d1c84172a61bdd7931cc567f4b7140d4f8a Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove remaining bits of deprecated QInputPanelPekka Vuorela2012-08-231-3/+3
| | | | | | | Introduced during Qt5 development and renamed to QInputMethod. Change-Id: If6744648dc98b779e65c449ae32626db574181df Reviewed-by: Joona Petrell <joona.petrell@gmail.com>