summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Made QWindowsCEStyle internalJ-P Nurmi2012-11-231-5/+2
| | | | | | | | | | | | | | 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 QWindowsCEStyle directly. Change-Id: I6b3c0554e7a2a4a5f0027f4ea1342fd332af89ad Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Fixes problem with single precision floats in QDataStream (Windows).Christian Strømme2012-11-231-0/+44
| | | | | | | | | | | | When the floating-point behavior in MSVC is set to "precise" (default), assigning nan numbers to a float causes the bit pattern to be altered (only affects 32bit builds). We should therefore not assign the swapped value back to a float and use it. Task-number: QTBUG-25950 Change-Id: I7b6cc4d546e5c8aeafdede749056358b7d639ec7 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Account for the item spacing when using QListView::scrollTo()Pierre Rossi2012-11-231-5/+0
| | | | | | | | | Somehow this bug managed to stay hidden until the introduction of QFusionStyle. Task-number: QTBUG-27675 Change-Id: I86b049b869e9f2951426dc67a485ad7c60ef1403 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* tst_QMetaProperty doesn't need QtGuiMarc Mutz2012-11-221-1/+1
| | | | | Change-Id: Id286827f692b7c49436ae8247f49eff993a47bdc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add support for getaddrinfo using MinGW in tst_qhostinfoJonathan Liu2012-11-222-8/+5
| | | | | | | Change-Id: Ief9ddd22171ec2b852ca504957e0e11b90badccb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QMimeType::aliases().David Faure2012-11-222-0/+27
| | | | | | | | | Requested by Allan Sandfeld Jensen for QWebkit, which needs to register upfront all the mimetypes that a given plugin can handle. Change-Id: I64b8d39c7988adfc7db4ed8bfdc73acd16e999da Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove warnings from qtbase.Mitch Curtis2012-11-213-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | geometryengine.cpp: In member function 'void GeometryEngine::drawCubeGeometry(QGLShaderProgram*)': geometryengine.cpp:159:93: warning: cast to pointer from integer of different sie [-Wint-to-pointer-cast] geometryengine.cpp:167:95: warning: cast to pointer f rom integer ofdifferent size [-Wint-to-pointer-cast] benchmarking.cpp: In member function 'void TestBenchmark::multiple()': benchmarking.cpp:85:9: warning: variable 'result' set but not used [-Wunused-but-set-variable] benchmarking.cpp: In member function 'void TestBenchmark::series()': benchmarking.cpp:120:9: warning: variable 'result' set but not used [-Wunused-but-set-variable] qstandarditemmodel.cpp:2717:45: warning: unused variable 'd' [-Wunused-variable] qxcbconnection.cpp: In member function 'xcb_timestamp_t QXcbConnection::getTimestamp()': qxcbconnection.cpp:930:40: warning: suggest parentheses around assignment used as truth value [-Wparentheses] tst_qguiapplication.cpp: In constructor 'BlockableWindow::BlockableWindow()': tst_qguiapplication.cpp:340:9: warning:'BlockableWindow::enters' will be initialized after [-Wreorder] tst_qguia pplication.cpp:339:9: warning 'int BlockableWindow::leaves' [-Wreorder] tst_qguiapplication.cpp:342:12: waring: when initialized here [-Wreorder] tst_qsqltablemodel.cpp:570:10: warning: unused parameter 'value' [-Wunused-parameter] tst_qabstractitemview.cpp:1546:8: warning: unused parameter 'index' [-Wunused-parameter] Change-Id: I49c88547182e4669cfde2c2536403fc5573ca2da Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update Qlocale data up to CLDR 22.1Konstantin Ritt2012-11-211-4/+3
| | | | | Change-Id: Ie6ddfec14cb052e0b89230dc93290ff79488fb25 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update Qlocale data up to CLDR 2.0.1Konstantin Ritt2012-11-211-4/+3
| | | | | Change-Id: I4279fac57436d7009a6d61dab5936b72fd39fc14 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use likelySubtags to instantiate a locale id from it's short formKonstantin Ritt2012-11-212-365/+86
| | | | | | | | | ...just like described in http://www.unicode.org/reports/tr35/#Likely_Subtags. This is much more effective than current "guessing" algorithm + makes it possible to instantiate a locale by the script or territory code only. Change-Id: I674f8476e65b01c56960b6e83a1a346df0715274 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [SIC/BIC] QLocale: update enums up to CLRD 1.9.1Konstantin Ritt2012-11-211-7/+39
| | | | | | | | | | This patch adds some missing codes (two-letter ones only), removes an outdated ones, and updates some names. The legacy language codes are handled in QLocalePrivate::codeToLanguage() (fortunately, there are only 4 of such codes). Change-Id: Iff50aecd1c762b6399cd151aebb955f341d366c6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* uic - fix to handle QTreeWidget with empty header(s)Thorbjørn Lund Martsum2012-11-212-0/+159
| | | | | | | | | | | | | | | | | | | This makes it possible for uic to handle QTreeWidget that in the designer has one or more empty headers. Before the right(most) empty items where there wasn't a non-empty header to the right of them would not be visible. The other empty items - where there was a header to the right of it would not be empty but initialized with a number. This patch ensures the same behavior that the QTableWidget is having. Task-number: QTBUG-18156 Change-Id: I19bfd3307befe46a1af2d6a3275f7446a15b3442 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Made QWindowsXPStyle internalJ-P Nurmi2012-11-211-7/+4
| | | | | | | | | | | | | 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 and even merging style implementations (XP & Vista) later on, without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsXPStyle directly. Change-Id: Ib4fec35c2fcb3b5a193537a1de5b6e26fbbe0a06 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Made QWindowsVistaStyle internalJ-P Nurmi2012-11-211-5/+5
| | | | | | | | | | | | | 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 and even merging style implementations (XP & Vista) later on, without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsVistaStyle directly. Change-Id: I8b320036e241e877fc9bb5f4084cc6e63756cbc4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* BlackBerry: Changed QSettings file accessBernd Weimer2012-11-211-1/+60
| | | | | | | | | | | | | On the BlackBerry platform, applications run in a sandbox. They are not allowed to read or write outside of this sandbox. Hence in QSettings there is no use for the system scope and differentiating between organization and application. This change will also improve performance. Change-Id: I79fee0140595385f3d33bd89fe5daa36b04836bc Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
* Fix MinGW compilation for tst_qwinoverlappedionotifierJonathan Liu2012-11-211-3/+10
| | | | | | Change-Id: I664761e7e6fd1c00067ae1def496ba4974e539be Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Made QFusionStyle internalJ-P Nurmi2012-11-215-26/+19
| | | | | | | | | | | | | 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 QFusionStyle directly. Change-Id: I37d8acb13b6fd328a9cd53c74df971428bbbe443 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix regression in QXmlStreamWriter with codec set to UTF-16Jan Arve Saether2012-11-201-0/+22
| | | | | | | | | | | | | Actually, this broke using QXmlStreamWriter with any codec where characters in the ASCII range have a different encoding than the ASCII standard. This was a regression from 558fe9383ba0aecbec09cc411c0ebab132aac137 Task-number: QTBUG-23310 Change-Id: I75bd013e9d5de53da564a76c2f06e95ff35303a8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QLocale: replace hard-coded default country-for-language mapKonstantin Ritt2012-11-191-3/+3
| | | | | | | | | | ...with a generated one in a way similar to what http://www.unicode.org/reports/tr35/#Likely_Subtags suggests. The supplemental/likelySubtags.xml contains all the required data. This changes some default countries to a most-expected ones. Change-Id: I920a5623601d8661a943e78197d3bcc838191483 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix error reporting in TDS SQL driver.Aaron McCarthy2012-11-181-0/+32
| | | | | | | | | | | | | | | | | | | | The error and message handlers used by the freetds library were getting reset to back to the default every time a database was opened. The Qt TDS SQL driver was calling dbinit() from QTDSDriver::open(). This had two problems: 1. dbinit() would reset the error handler previously set by a call to dberrhandle(). A db error would then cause the application to abort. 2. freetds expects dbinit() and dbexit() to be called symmetrically. Opening multiple database connections would result in freetds not cleaning up on application close. Solved by moving the dbinit() call into the QTDSDriver constructor. Change-Id: I59018d83238672c903b96a4d7f3f21b664c3ff4c Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix QStringList::sort testGiuseppe D'Angelo2012-11-161-1/+8
| | | | | | | | Checking that the result of sort() is a specific list is wrong, as sort() can put equivalent elements in an arbitrary order. Change-Id: Ib06399cdecedb6cf01e721d4d92048449d66b40d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QMutex::tryLock timeout computation on LinuxOlivier Goffart2012-11-161-0/+15
| | | | | | | | | | | The timeout is in millisecond. So we just need to divide by 1000 to get the number of seconds Regression introduced in f587e8f4fd670f11fa1e878c1015d7241033559a Reported in the comments of QTBUG-24795 Change-Id: Id16e05e7d04d33605860926f7516d14cdefd6a36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Disable static contents optimization for now.Samuel Rødal2012-11-151-3/+1
| | | | | | | | | | Since none of the platform backingstore implementations currently implement this, skip trying to use the optimization for now to avoid graphical glitches. Task-number: QTBUG-27971 Change-Id: Ic6d263bb552ef0b4786910d71f965d26d810b7eb Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Regression fix to QHeaderView::setDefaultSectionSizeThorbjørn Lund Martsum2012-11-151-1/+7
| | | | | | | | | | | | When the sections has been resized we need to calculate new values for the section start-positions. Otherwise we break visualIndexAt and sectionPosition. This fixes a regression introduced in b800d8b94a7861ecf8853621f6556fca186fb5b7 Change-Id: I148dbf44f742208787ed59b70d82b8048d721e90 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>