summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* corelib: eliminated usage of qttest_p4.prfRohan McGovern2011-10-25127-265/+371
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I7c1ffe9c8c294dbdc988e1582e580b1ed3f4593e Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Don't build app bundles for qmltestcase applications on Mac OS XCharles Yin2011-10-251-0/+2
| | | | | Change-Id: Ia61f12313908f42f7ff7a43be5443e779300e436 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't call QSKIP/QVERIFY outside of test functions.Jason McDonald2011-10-251-19/+24
| | | | | | | | | | | These macros should only be called inside a test function, otherwise they cannot abort the test function correctly. Solve this by making the helper function return a boolean result (and output a warning on failure to help with debugging) and verify the return value in each test function that calls the helper. Change-Id: I599673fda49051baf80a8c94b5d85a4d8c2cb406 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update bug number in autotests.Jason McDonald2011-10-252-2/+2
| | | | | Change-Id: I4b17736d86f8dc571090820a545107bb89cb493d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add CONFIG flag to use the compiler to generate makefile dependenciesTor Arne Vestbø2011-10-241-51/+65
| | | | | | | | | | | | | | Using CONFIG+=GNUmake will enable dependency tracking using included dependency files, but will use an implicit makefile rule to generate each .d file. We now support an additional CONFIG option, gcc_MD_depends, that instead passes the -MD flag to a GCC (compatible) compiler. This will generate a .d file as a side-effect of the normal compile step. Change-Id: Ib6ce1d93e7f07e316a345bf12aa6f2b4e9a6415d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Compile with clangBradley T. Hughes2011-10-241-5/+6
| | | | | | | | | | | | | | | | | | Clang does not accept this syntax, see http://llvm.org/bugs/show_bug.cgi?id=8875 The work around is to not use the typedef name. NS() around the template parameters is necessary to match the real types (and not the QMetaType::Type enumerators), otherwise we get the following: kernel/qmetatype.cpp:1647:72: error: template argument for template type parameter must be a type ...NS(QVariantMap)* >(where)->NS(QVariantMap)::~QMap<QString, ... ^~~~~~~ Change-Id: I3afa0cbbe4ef7ad899cfa9eafb3bcc10bedc20b3 Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com> Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Improve drawing scaled image with raster using SSE2Olivier Goffart2011-10-243-22/+153
| | | | | | | | | | | | | | That codepath is taken in qml when an Image specify with and hight and is not smooth, and the image contains alpha contents The changes in qdrawingprimitive_sse2_p.h just put some code from the BLEND_SOURCE_OVER_ARGB32_SSE2 macro into a sub macro to allow its reuse The code that is not SSE2 in qt_scale_image_argb32_on_argb32_sse2 comes from the qt_scale_image_argb32_on_argb32 in qblendfunctions.cpp Change-Id: I071a040af4514fb21777dead9f7c5baf16071d59 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Network - Use isLoopback API in place of existing localhost checksShane Kearns2011-10-246-10/+6
| | | | | | | | | | Various places in QtNetwork checked for Localhost or LocalHostIPv6, i.e. 127.0.0.1 or ::1. By using the isLoopback API, other loopback addresses are treated the same way (e.g. 127.0.0.2 and ::ffff:127.0.0.1) Task-number: QTBUG-22246 Change-Id: I46f55630d8646fd68034a509969a0b7cb72ca77c Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Network - Add QHostAddress::isLoopback API.Shane Kearns2011-10-244-0/+66
| | | | | | | | | | | | The standard IPv4 loopback address is 127.0.0.1, however anything in the 127.0.0.0/8 range is also a loopback address. isLoopback returns true for any address that is in the IPv4 loopback address range, or is the single IPv6 loopback address ::1 Task-number: QTBUG-22246 Change-Id: Ic39100e2e97a52db700e01b109998a1cfd4335e3 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* QIODevice - disallow setTextMode when not openShane Kearns2011-10-241-0/+6
| | | | | | | | | | | Calling setTextMode() before open() would make the device appear to be already open and cause later errors. Added a qWarning and documentation update to prevent this API misuse Task-number: QTBUG-20905 Change-Id: I2e06cd8e79f4afcf27417ac0eae6ebef980a17aa Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Extend QVariant benchmarksJędrzej Nowacki2011-10-241-0/+77
| | | | | | | Add new cases for custom types and QStringList. Change-Id: I79f8d415be43774e6b2488e8a6a8028bf4a5fd45 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* corelib: Remove Q_WS-macros.Friedemann Kleint2011-10-2424-250/+44
| | | | | | | | | | | | | | | | | | | | Q_WS_QPA is the only active code path after merging refactor, other Q_WS-macros are no longer used. Enable compilation without -qpa. - Remove Q_OS_MSDOS, Q_OS_OS2 - Remove Q_WS_QWS - Remove/replace definitions/conditionals of Q_WS_XX - Remove qpa branches from profiles - Replace Q_WS_MAC by Q_OS_MAC - Replace Q_WS_MAC && !Q_WS_QPA by Q_OS_MAC && !QT_NO_CORESERVICES - Similarly in profiles: mac:contains(QT_CONFIG, coreservices) - Replace Q_FS_FAT by Q_OS_WIN Change-Id: Icce5a6c55b052c8f72b3b979ddf31a4f388ea9c9 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* test: Split `qcontiguouscache' unit and benchmark testsSergio Ahumada2011-10-245-138/+204
| | | | | | | | | | | | | | | Moving three benchmark tests from 'tests/auto' to 'tests/benchmarks'. Also removing 'qttest_p4' usage while we are at it. - void asScrollingList(); - void cacheBenchmark(); - void contiguousCacheBenchmark(); were moved to 'tests/benchmarks/corelib/tools/qcontiguouscache' Task-number: QTQAINFRA-353 Change-Id: Icbdd852f9c14c3df042d2e19abd42af6c645a3cb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Keep Multi font engine in QFontCacheJiang Jiang2011-10-243-7/+16
| | | | | | | | | | | | | If we only keep single QFontEngineFT in QFontCache, then when we are looking for the MultiQPA next time with the same QFontDef, the FT engine will be returned and we get no font fallback support. That's why we need to keep the Multi engines in QFontCache as well and distinguish them from the single item. Since QPA doesn't use 'screen' field of QFontCache::Key structure, we use it here to indicate that we are caching a multi font engine. Change-Id: Id899d5c5ba52f4bccf134bcd6b1c6386ba22063c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* tests: do not run benchmarks by default in 'make check'Sergio Ahumada2011-10-241-0/+4
| | | | | | | | | `make check' is intended primarily for running functional tests. For the most part, it does not make sense to run benchmarks in the same test environment as the functional tests. Change-Id: I33b2cf1e833fc6b1d0b3525018945148ba2d3492 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Allow commiting and then reusing a QTouchEventSequence for testing.Michael Brasser2011-10-241-20/+33
| | | | | | | | | | | | | This method allows calls to stationary() to automatically remember the previous position for a given touch point id. Example usage: QTouchEventSequence sequence = QTest::touchEvent(&window); sequence.press(0, QPoint(10,10)).commit(); sequence.stationary(0).press(1, QPoint(40,10)).commit(); Task-number: QTBUG-22057 Change-Id: I489ab3d61f4637d2ed97d09ed0854afa814407a1 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove legacy Symbian code from qtestlib.Jason McDonald2011-10-246-71/+8
| | | | | Change-Id: Ia4ac52ce0b5f5a4ba1fcd6594daf424fd7208777 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix qcolumnview test for shadow builds.Jason McDonald2011-10-241-2/+2
| | | | | Change-Id: I4a81d7c8504400d7fb4bb42fb93508ac28cfb990 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix qsidebar test for shadow builds.Jason McDonald2011-10-241-2/+2
| | | | | Change-Id: I3b58a1c81881401edb2a768b2a9995b1e833e90c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix qfilesystemmodel test for shadow builds.Jason McDonald2011-10-241-1/+1
| | | | | Change-Id: Ic9d174670f7411561bdfc0881b426a7ff1ab546d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix QFileDialog test for shadow builds.Jason McDonald2011-10-241-3/+3
| | | | | | | Using relative paths in #include is best avoided. Change-Id: Iacaab7b4c402dfc96f944f21c634afa6e4a2a32a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Multiline editors not to limit anchor position inputMethodQueryPekka Vuorela2011-10-243-2/+15
| | | | | | | | | | | | The queries were limited to current block, because that is the available surrounding text. Input method side, however, cannot then distinguish between anchor being really at start or end of the surrounding text, or beyond it. Without the limitation there at least is a way to know anchor is at unknown territory. Change-Id: I388d33566388344ec816ea7d86662b7e36a3d7d0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* test: Split `qsqlquery' unit and benchmark testSergio Ahumada2011-10-234-39/+285
| | | | | | | | | | | | | Moving benchmark test from 'tests/auto' to 'tests/benchmarks'. Also removing 'qttest_p4' usage while we are at it. - void benchmark(); was moved to 'tests/benchmarks/sql/kernel/qsqlquery' Task-number: QTQAINFRA-353 Change-Id: I241bb1a2fba1c1b5524c21e5941a6c5daf5a4a89 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* Remove QAccessibleWidgetPrivate inheritance of QAccessibleFrederik Gladhorn2011-10-231-3/+3
| | | | | Change-Id: Iaa7455adc5845e6daceb7eaf9384cd5560fb2cd6 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Fix compilation with -fno-exceptionsDavid Faure2011-10-231-0/+4
| | | | | Change-Id: I3dbe8be62d2fe94ed6f97fb565a9e417544c58f9 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Deprecate QDesktopServices::storageLocation/displayNameDavid Faure2011-10-235-68/+28
| | | | | | | Which required porting the related unittests to qstandardpaths Change-Id: I6eb63c46845f05cd29cc42b59872707526277c90 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Make some qtestlib headers private.Jason McDonald2011-10-2313-35/+92
| | | | | | | | | These headers should have been private from Day One. Make them private now so that nobody will be tempted to use them outside testlib in the future. Change-Id: I5361777ade124d8187176f9af3cc79cd1a8ecb4f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove "duplicate objective-c class" warning.Morten Sorvig2011-10-231-0/+5
| | | | | | | | | | | Qt would dlopen both libqcocoa.dylib and libqcocoa_debug.dylib, causing duplicate implementations if the classes in the cocoa plugin (QNSView etc) Fix this by building the release version only. Change-Id: I1244a83c49999ce28edd97400e792fa2a0665fec Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: clean up compiler warnings.Morten Sorvig2011-10-237-35/+19
| | | | | Change-Id: I2cb65bb455b79b218a317b21e5a3b0d9792e0e22 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Add the missing unittestDavid Faure2011-10-232-0/+294
| | | | | Change-Id: I2384d9de7b9ef409db521087670070bd5afc85ff Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Rename storageLocation() to writableLocation().David Faure2011-10-236-15/+15
| | | | | Change-Id: I8f6522a70950f78ddd6141360d36d104bd697e28 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Add QStandardPaths::RuntimeLocation, for sockets ($XDG_RUNTIME_DIR)David Faure2011-10-235-7/+42
| | | | | Change-Id: I19c36a04a9deae49ffc20fdec6a2a7eb05155cb4 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Add QStandardPaths::findExecutable.David Faure2011-10-233-14/+92
| | | | | Change-Id: If30a83622e2ac5af48e47a38b8f70fce73044d74 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Check QFileInfo::isExecutable for symlinks, works as intended.David Faure2011-10-231-1/+18
| | | | | Change-Id: I35acce7ba0e111f651864b9d16abf1bac1923f22 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* QStandardPaths: add Config and GenericData, add methodsDavid Faure2011-10-236-74/+298
| | | | | | | New methods: standardLocations, locate, locateAll. Change-Id: I60bc90f8df53727a72c4b1839ea4d1d88a204e29 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Move path information from QDesktopServices (gui) to QStandardPaths (core)David Faure2011-10-2312-435/+701
| | | | | Change-Id: Ic596c21894d83b4dab0c3f5b1aed916ddd590f2f Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* QWindow: Re-create platform window only if screen actually changes.Friedemann Kleint2011-10-221-6/+10
| | | | | Change-Id: I3b7dd8b1307aa3cc9357dca861ea407644c5a2e9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add virtual QWindow::focusObject() methodLars Knoll2011-10-224-5/+23
| | | | | | | | | | The method allows to retrieve the object that currently has the input focus inside the Window. This is e.g. required to correctly determine the context for keyboard shortcuts. Change-Id: I9e05ef62717973bac275ce34cc70fb86aa2d1e5b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix two typos: docu for "deprecated since" and Q_DEPR... -> QT_DEPR...David Faure2011-10-222-2/+2
| | | | | | | | Shows that there should be an automated build with QT_DISABLE_DEPRECATED_BEFORE set to 0, too... Change-Id: If154786ea26bcbfab41efcd7001c222cc258a8af Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* Compile with clangBradley T. Hughes2011-10-221-2/+2
| | | | | | | | | | When using methods from a template base class, the lookup needs to be qualified. See http://clang.llvm.org/compatibility.html#dep_lookup_bases Change-Id: I5b7cd71e0d45414ac0eff97fe9ba5d3ccd5bd9e6 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* Add Q_DECL_CONSTEXPR to a QChar, QLatin1Char and QLatin1String constructorsThiago Macieira2011-10-222-26/+19
| | | | | | | | These types now technically are trivially-constructible and standard-layout in C++0x. Change-Id: I455bd905fd6e237a1dff517b86dcbe59d571266f Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* Make the default install path point to /usr/local/Qt-$VERSIONLars Knoll2011-10-211-15/+1
| | | | | | | | | | | Remove Trolltech from the default install path. Since QPA is the default now, so we don't need to treat it specially from regular Qt versions. It is the regular Qt version. Change-Id: I0bde75c90d2d5944be192e1249bc1a9371c70fcb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Off-by-one error in assert condition...João Abecasis2011-10-211-1/+1
| | | | | | | | | | | While this was safe, it was also over-zealous, disallowing the path from ending with the placeholder... Incidentally, the default. Laughed-at-by: w00t_ (cherry picked from commit 7b693627ee2a17718cb6d8bee5e3deb5a97b307f) Change-Id: I61a1511bca5cafe2edde20ef38c23154200dfcab Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Leftovers from 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6João Abecasis2011-10-211-14/+0
| | | | | | | | | | | This no longer necessary template specialization went unnoticed inside the Windows/Symbian #ifdef. It breaks compilation on those platforms, now that qstringbuilder.h is not included and QConcatenable is unknown to the compiler. (cherry picked from commit 9e656ce0f7bda4bca4ae55a7aefe1617bc2805ac) Change-Id: Ie7145c25bca01b808fa6a3fd99e34baa8375d304 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix QTemporaryFile regressions and new found issuesJoão Abecasis2011-10-212-50/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, the file template is always processed in original QString format. Trying to generate native paths before adding a missing placeholder mask could change the meaning of templates, such as "." and "..", which are now tested to mean "..XXXXXX" and "...XXXXXX", respectively. After ensuring the template includes a placeholder mask, the path is converted to a native *absolute* file path and the mask is sought for again. On Windows, native paths were already absolute. On Symbian, we'd need at least a clean path, as "." and ",," are not natively understood. There is a requirement that the placeholder mask /XXXXXX+/ makes it through this conversion unaltered, which relaxes prior requirements on *nix platforms. On Windows and Symbian the conversion is under Qt's control and not user-configurable. Reviewed-by: Shane Kearns (cherry picked from commit 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6) Conflicts: tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp Change-Id: Iac823881c865adf0931dc4f429c6c1ef135eeb56 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Use "native paths" on POSIX platforms as wellJoão Abecasis2011-10-211-27/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And don't rely solely on "local8Bit" conversions. QFile defines an API for overriding how encoding conversions are done for filenames. In generating unique names, QTemporaryFile ignored that API and hardcoded the use of local 8-bit, implicitly assuming that that was appropriate. With this change, we switch that assumption to one where user supplied encoding function keeps the byte value of 'X' and '/', also assuming that encoded 'X' takes up a single-byte (i.e., the byte sequence for "XXXXXX" remains unchanged). There was also, and there still is an assumption in name generation that byte values for ASCII alpha-numeric characters are valid in the "native" encoding. In practice this change is compatible with UTF-8, Latin-1 and other ISO/IEC 8859 encodings. At any rate, it's very likely that only UTF-8 is relevant here. Reviewed-by: Denis Dzyubenko (cherry picked from commit 0de701d01cb221464eed773fd3751aff73fe4d60) Change-Id: I9ee0fe8e3cad48694d5ec9a2bedd5412cfc0d172 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Cleanup #includesJoão Abecasis2011-10-211-2/+0
| | | | | | | | These are already required and included by qfsfileengine_p.h. (cherry picked from commit a153d50eea2dea0925695a90af2c12f1887a9020) Change-Id: I9efb635373239f6e6778eb4a3ee85c396cfeeeb5 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Atomic implementation of create file and obtain handle for Win/SymbianJoão Abecasis2011-10-212-60/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides generating a unique name, createFileFromTemplate now also acquires a file handle on all platforms. The file engine's native handle is passed by reference and modified in place. This fixes a long standing security issue on Windows. On Windows and Symbian platforms we directly use the "native" file path when processing the template and generating the unique name. Since the native encoding is known, conversions at this point are safe. Errors other than "file exists" are propagated to Q(Temporary)File, and result in a failure in open(). The changes also unify error handling and should give consistent behaviour across all platforms. Worthy of note, there's a change in behaviour on Windows and Symbian: fileNames returned by QTemporaryFile on Windows and Symbian are always absolute after open has been called. This has to do with how QFileSystemEntry::nativeFilePath works on these platforms. (Test was updated to reflect change in behaviour.) Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns (cherry picked from commit ff9b69838ec146aeb43d4af8a03043f9c5f0454d) Conflicts: tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp Change-Id: Ibc9affb321ea4f4b193efc1f7336c9770b43d8df Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Minimize encoding conversions when generating unique file nameJoão Abecasis2011-10-211-15/+54
| | | | | | | | | | | | | | | | With minor adjustments, createFileFromTemplate is made to work directly on (UTF-16) QString data, which is already in the native encoding for Windows and Symbian. This is possible because the function only fills out the placeholder sub-string, without touching adjacent characters. This eliminates unnecessary conversions on those platforms. Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns (cherry picked from commit 9a76587363a2f37312326286e08cce502f7fe27e) Change-Id: I8732b88ece5e2befb2da2e717758954c9aa7e5b0 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Use QStringBuilder when copying template for modificationJoão Abecasis2011-10-211-15/+47
| | | | | | | | | | | | | | | | | This avoids modifying the original string in the case where a placeholder marker is not found. By marking the variable const we further avoid checks on the reference count and detaches, also allowing us to safely reuse it later in the function. The new approach also fixes an issue where suffix wasn't empty, but the toLocal8Bit conversion would be. This resulted in a buffer overflow inside createFileFromTemplate. Reviewed-by: Shane Kearns (cherry picked from commit d71d3b1ce31ffc585258330d825ff8ea535254ef) Change-Id: I6cb3fbc6c653d8a881426fddbc433826365d4816 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>