summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QPluginLoader: fix loading of plugins with a relative file nameDavid Faure2012-12-044-6/+30
| | | | | | | | | | | This makes QT_PLUGIN_PATH / QCoreApplication::libraryPaths() actually work, as a search path for plugins, when apps look for a specific plugin by name. To make it possible to write portable code (unlike the current QPluginLoader unittest), let QPluginLoader figure out the extension, too. Change-Id: I895d597d7cb05ded268734bc5f313f32d8d12cb9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix some typos in QProcess and QSslSocket unit tests.Stephen Kelly2012-12-042-3/+2
| | | | | | | | The QSslSocket one is both wrong and redundant as there is a Q_DECLARE_METATYPE for it already. Change-Id: I63d065abfb3d0e3d82a8b1f29a6752b7676db847 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* remove pointless QT.<module>.sources referencesOswald Buddenhagen2012-12-044-5/+5
| | | | | | | | there is no point to use this for in-module references. cleaning it out in an attempt to purge the constants entirely. Change-Id: I1da4d70e3778257dd43eda0bdfc71eaec1124732 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove pointless zlib includesOswald Buddenhagen2012-12-042-2/+0
| | | | | Change-Id: I352f6f9626c012c39ac97163ac83b3e24a9e9c7a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* properly syncqt-ize harfbuzz headersOswald Buddenhagen2012-12-046-8/+1
| | | | | | | | | we were already installing them into QtCore/private, so turn them into proper private headers to start with. this cleans up our project files. Change-Id: I0795f79e03b60b5854de9e4dc339e9b5a5e6fd87 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qregexp benchmark needs exceptionsOswald Buddenhagen2012-12-041-1/+1
| | | | | Change-Id: I3833345a09e49899c256b4410783b6a08111c4a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Clear focus of GraphicsItem focus scopes and their children.Andrew den Exter2012-12-041-0/+39
| | | | | | | | | | A focus scope has effective focus if one of its children is the focus item, clearFocus() should remove effective focus from an item and its children not just from the focus item. Task-number: QTBUG-28328 Change-Id: I62a292eff000151e50b2f5221e22f326a380fc3a Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Stop using the name "Trolltech" in QSettingsSergio Ahumada2012-12-036-16/+16
| | | | | | | | | Also change Trolltech for QtProject in other places Task-number: QTBUG-23269 Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [QTBUG-27420] Make Q{Box,Grid,Form}Layout::takeAt() unparent a nested layoutMarc Mutz2012-12-023-0/+70
| | | | | | | | | | | QStackedLayout doesn't have support for QLayout, only QWidget, so the issue doesn't arise there. Reported-by: Johannes Schaub Task-number: QTBUG-27420 Change-Id: I71f8d10a036918c16d8f8c9197a2ec61cd76cf01 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix wrong string lengthPeter Kümmel2012-12-011-2/+2
| | | | | Change-Id: Ic10aed6fc59d2518583caf78848711bdc97b4665 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve auto-test of QFile.Friedemann Kleint2012-12-011-158/+166
| | | | | | | | | | | | | Execute the test in a temporary directory, purge remaining files except the special readonly-files in cleanup(). Avoid repeated invocation of QFINDTESTDATA() by assigning to member variables. Do more checks in rename(), check on contents of file. Generally, use more QVERIFY2, print error messages. Task-number: QTBUG-3570 Change-Id: Ibd0e11a361208a716ea3efbcca76adeda70e061a Reviewed-by: David Faure (KDE) <faure@kde.org>
* Basic high-dpi "retina" support for Qt 5.Morten Johan Sørvig2012-12-017-3/+400
| | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 5 on par with Qt 4, prepare for more comprehensive support later on. Introduce device independent pixels (dips), device pixels, and devicePixelRatio. Add high-dpi support to QPainter, QGLWidget, the cocoa platform plugin, mac and fusion styles. Dips are similar to CSS pixels, Apple points and Android density-independent pixels. Device pixels are pixels in the backing store/physical pixels on screen. devicePixelRatio is the ratio between them, which is 1.0 on standard displays and 2.0 on "retina" displays. New API: QImage::devicePixelRatio() and setDevicePixelRatio() QPixmap::devicePixelRatio() and setDevicePixelRatio() QWindow::devicePixelRatio() QScreen::devicePixelRatio() QGuiApplicaiton::devicePixelRatio() Change-Id: If98c3ca9bfdf0e1bdbcf7574cd5b912c9ff63856 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QWidget windows have fullscreen button by default; manual test for itShawn Rutledge2012-12-013-6/+13
| | | | | | | | | | It's again possible for QWindows and widget windows to go into fullscreen mode on the Mac. Change-Id: I7b304a135838394ef0392f89be4f225f2949fad3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QGraphicsView - fix rubberband to stay right on scrollThorbjørn Lund Martsum2012-12-012-0/+103
| | | | | | | | | | | | | | We should consider the scene-position when we are expanding moving a rubberband. If the user does some auto-scroll (Qt should support that itself, but that is another matter) then the rubberband should not keep the (old) local position to calculate the rubberband extension, but instead use the scene-position that was actually clicked. Change-Id: I04a2df6a1edae8b3587e1ac2104c7fe4ccfb7762 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Added explicit threading API to QtOpenGL.Samuel Rødal2012-11-302-17/+91
| | | | | | | | | | | | | | | | | | | | | | | | Since QtOpenGL/QGLContext is implemented in terms of QtGui/QOpenGLContext which has stricter requirements about how it's supposed to be used, we need to apply these requirements to QGLContext as well. This change adds QGLContext::moveToThread(QThread *) and documents it as a necessity for making a context current on another thread. Also introduces QGLPixelbuffer::context() to access the QGLContext of a pixelbuffer, and made QGLWidget::context() return a non-const QGLContext, since there's no good reason why it shouldn't, and it leads to less const_cast clutter. We could have introduced a backdoor in QOpenGLContext instead, making it loosen its requirements, but that would have made it harder / impossible to fully support threaded OpenGL in all the platforms. Task-number: QTBUG-22560 Change-Id: Ibb6f65f342e7c963e80cc42ab5664c5f1cab30b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix connecting to a functor with 3 argumentsOlivier Goffart2012-11-301-1/+52
| | | | | | | Task-number: QTBUG-28285 Change-Id: I07bd870c093482035728aa783d0ecbc8aa8670d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Style auto tests: kill QWindowsStyle dependenciesJ-P Nurmi2012-11-282-46/+51
| | | | | Change-Id: I135fe2b0aae81c73c1cca6272f71db07ecb3fa6b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* tst_QLayout: use QStyleFactory instead of QWindowsStyleJ-P Nurmi2012-11-281-2/+2
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: I25ac344d349d07db94e2fbc9ef943e09c399f913 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* tst_QWidget: use QStyleFactory instead of QWindowsStyleJ-P Nurmi2012-11-281-8/+8
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: I75424d6fc2f36fb0faace86c960d78a4ba305658 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* GV auto tests: kill QWindowsStyle dependenciesJ-P Nurmi2012-11-275-26/+19
| | | | | Change-Id: I6236b7ca23897c5075bef21f5e62fe01f4cfc611 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixed abbreviations in QWindow::framePos() and QWindow::setFramePos().Samuel Rødal2012-11-272-9/+9
| | | | | | | | | | | | As 672e7c875e8680818e23d0aef98129d95eb7e91c did changing pos() to position() and setPos() to setPosition(). Luckily there's not much code that uses these. Change-Id: I1e1982f00412a22bd376e667a5e8c30b6149f9b5 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Ensure subfocus is not reset to 0 when hiding a panel.Andreas Aardal Hanssen2012-11-261-46/+91
| | | | | | | | | | | | | | | | | | | When hiding any widget that is not a panel, it is correct to clear subfocus. In case clearFocus() has been called, the result is that focusItem() / focusWidget() points to 0, which is correct. Upon reactivation, nothing gains input focus. When changing focus, the following setSubFocus() call will ensure subfocus points to the new widget. When hiding a panel, however, it's essential that subfocus within that panel is not cleared, otherwise, when re-showing the panel, nothing will have focus, whereas the expected behavior is that focus is restored to the last item that had focus, i.e., the focusItem() a.k.a. subfocus widget. Task-number: QTBUG-22256 Change-Id: I84d849a505764e074e1369fef923cef1ad5c0b1e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Examples: Install to $$[QT_INSTALL_EXAMPLES]/$submodule/$examplehjk2012-11-261-2/+2
| | | | | | | | This makes the structure of the examples after an 'make install' similar to the one in a 'developer build'. Change-Id: I9120bd741fab332e64e30adc01cefe87e5633454 Reviewed-by: Martin Smith <martin.smith@digia.com>
* qmake: Test recursive function callsKonstantin Ritt2012-11-261-0/+14
| | | | | Change-Id: If7d659728d30b2e5c52082ab999bc00de3733972 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* tst_QSharedPointer: update application typesJ-P Nurmi2012-11-262-13/+11
| | | | | | | | | QCoreApplication::Type enum was removed in 553e21. This change updates the (un)tested application types to match the application types available in Qt 5. Change-Id: I8631987a9ff31dc81baa013619cfc18616b851d1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* tst_QGridLayout: use QProxyStyle instead of QWindowsStyleJ-P Nurmi2012-11-261-9/+8
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: If163aae6910c0b082a9bcca1ebbab66660cc005f Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QFormLayout: use QProxyStyle instead of QWindowsStyleJ-P Nurmi2012-11-261-6/+5
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: Ie28d4ea074938b17827aa803a2298f881946f7e5 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QBoxLayout: use QProxyStyle instead of QWindowsStyleJ-P Nurmi2012-11-261-3/+3
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: I287c771a841ba96e445f0a0df96ea035be25ac74 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QMenuBar: use QProxyStyle instead of QWindowsStyleJ-P Nurmi2012-11-261-3/+6
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: I422e7d67fadbb169d19285aab0a8ba0f3d668697 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QComboBox: use QProxyStyle instead of QWindowsStyleJ-P Nurmi2012-11-261-4/+4
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: Ic76ecc20ff600a7d401b44c8dc4d93198c06becc Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Fix keyboard grab in QWidgetWindow.Friedemann Kleint2012-11-261-0/+22
| | | | | | | Task-number: QTBUG-28070 Change-Id: I6f55a2dd906ee896071137a5d47fb97c9a571b5f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* QHeaderView: - avoid cursor move on setDefaultSectionSizeThorbjørn Lund Martsum2012-11-251-2/+1
| | | | | | | | | | | If we are reacting on the sectionResized signal and we call setDefaultSectionSize we should ensure that we are not moving the mouse-cursor. This is an improvement of f8f6acb05ce9aa5fccc329bf5587adf14ed9a710 Change-Id: I1adee7821bc8fcc9633f692bfd515f2c458b12c8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QLocale: Fix matchingLocales() behavior if script or country is not Any*Konstantin Ritt2012-11-251-0/+30
| | | | | | | | | | | Since the documentation doesn't mention the search should be done by language only, consider the current behavior incorrect. As of now, it is possible to get a list of locales by Country or Script as well. Also fix countriesForLanguage() to be in-sync with matchingLocales(). Change-Id: I6a09ca459120143565fa6099d2b823df1fed7c25 Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* Fix QVariant streaming in Qt3 compatibility mode.Jędrzej Nowacki2012-11-241-0/+40
| | | | | | Task-number: QTBUG-27700 Change-Id: I0408293e43c3330dbc4746198a19709e795f552a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* tst_QDateTimeEdit: remove redundant includeJ-P Nurmi2012-11-241-1/+0
| | | | | | Change-Id: I3aeb90723b41b35e221b86b1767ed1ac45a9fe0c Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_QToolButton: remove redundant includeJ-P Nurmi2012-11-241-1/+0
| | | | | Change-Id: Ie55a530a89b85a4f3369ee3205221fb01fa1773e Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QLocale: Fix toCurrencyString() didn't respect group separator optionKonstantin Ritt2012-11-231-15/+21
| | | | | | Change-Id: Icda43d71d600d77fe1ed4fcde1ef4478ef29c1d5 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* Cleanup tst_QApplicationJ-P Nurmi2012-11-231-46/+46
| | | | | | | | | | | Remove redundant includes, remove references to deprecated QApplication::GuiServer (passing that has no effect anymore), and use QStyleFactory instead of referencing QWindowStyle directly (about to become an internal class). Change-Id: I08f94993a55ce6039c7694d8f7019cbd53594edc Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Make skipping of test consistent.Frederik Gladhorn2012-11-232-31/+1
| | | | | | | | | | | On Mac every function was skipped individually, on the other platforms it was marked as insignificant. See also QTBUG-22560 and QTBUG-22361 Change-Id: Ie9b9c617006d5a8c19d042b8be89e449c5ac70bc Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Prevent "number of sections exceeded" when compiling qmetatype tests.Mitch Curtis2012-11-231-0/+5
| | | | | | | | | | | | When compiling qmetatype auto tests with msvc2008 64-bit, I receive: qmetatype.h(383) : fatal error C1128: number of sections exceeded object file format limit : compile with /bigobj This patch follows that advice and adds /bigobj to QMAKE_CXXFLAGS. Change-Id: I05b3cf9dfdb6a93649c692e2df22365d200e6f2f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Do not detect directories ending in ".lnk" as link files.Friedemann Kleint2012-11-231-0/+7
| | | | | | | Task-number: QTBUG-21863 Change-Id: I70b661fa5fcaba1293a80c971c506798826f5b23 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Proper macro replacment and branch evaluationLars Knoll2012-11-232-3/+38
| | | | | | | | | | | | Correclty replace macros according to the C++ standard. Use the correct replacement method also to evaluate With this moc correctly processes boost headers. Task-number: QTBUG-27546 Change-Id: I001b3054c5fcdc34d46cfa53d1387bd19436f361 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Emit destroyed() signal before children get deletedLars Knoll2012-11-231-0/+100
| | | | | | | | | | | Make sure we always emit the destroyed() signal before we delete our children. This wasn't working correctly for QWidget based classes, as the QWidget destructor deletes all children itself. Task-number: QTBUG-24672 Change-Id: Iecdff3489196271177edfeba1c4a2c5800e255af Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QHeaderView - Fix auto-scroll on manual move on sectionsThorbjørn Lund Martsum2012-11-231-5/+5
| | | | | | | | | | | | | This patch fixes the manual move of sections when auto scroll is on. It is done in QAbstractItemView::doAutoScroll by letting the qheaderView use its parents scrollbars if they are childs of a QTableView or QTreeView. Task-number: QTBUG-993 Task-number: QTBUG-1103 Change-Id: I70d999d9a07c3566e42d01cc5ebb47a69a83d9d4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make widgetgrab manual test compile with 4.8 and 5.Friedemann Kleint2012-11-231-3/+14
| | | | | | | | Task-number: QTBUG-27333 Task-number: QTBUG-27550 Change-Id: Iceb2ded9deff1d375bf02b88e214da20901bfa0e Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Made QMacStyle internalJ-P Nurmi2012-11-238-34/+12
| | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QMacStyle directly. Change-Id: I44a2f5ee3fe08ecc837b593a2a2737eb90e8c267 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* tst_qlistview: remove redundant includeJ-P Nurmi2012-11-231-4/+0
| | | | | Change-Id: If33518159feb202fa041ac2809817dff5616249f Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_qwizard: remove redundant includeJ-P Nurmi2012-11-231-1/+0
| | | | | Change-Id: I837aed1e5e601e67105562df2764327b7e8c44a6 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QTBF: Fix issue with no splitting the words at "." (FULL STOP)Konstantin Ritt2012-11-231-2/+41
| | | | | | | | | | | | As of Unicode 5.1, some punctuation marks were mapped to MidLetter and MidNumLet for better URL and abbreviations handling which caused "hi.there" to be treated like if it were just a single word; until we have the Unicode Text Segmentation tailoring mechanism, retain the old behavior by remapping (some of) those characters back to their old values. Change-Id: I49dea6064f2ea40a82fc0b1bc3c4f0b4e803919f Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Made QWindowsMobileStyle internalJ-P Nurmi2012-11-231-3/+3
| | | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsMobileStyle directly. Change-Id: Id64f3dabff38db7864e235c79b2e9276379f4ba4 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>