summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Avoid using iconv for text conversion where possibleLars Knoll2012-05-164-43/+44
| | | | | | | | | | | | Try to use a builtin codec as codecForLocale() if possible first. Fall back and instantiate the iconv codec only if that failed. In addition, make sure we initialize the locale correctly before we try to setup the codec. Change-Id: I86d635f9d11e8ff93093f162e79fb37f3d85731b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Limit the nesting depth of the Json parserLars Knoll2012-05-163-4/+47
| | | | | | | | | | | | | | | The parser is recursive and too deeply nested json would cause it to exhaust the available stack space leading to crashes. We now abort parsing with a DeepNesting parse error if the document is too deeply nested. The current nesting limit is set to 1024, which should be more then enough for any real JSON data set. Change-Id: I4adea3fd727149f7342536d73cf4530361a0a3a1 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* QElfParser: double check section size before using it.Arvid E. Picciani2012-05-161-1/+1
| | | | | | | | | In rare cases, if the section is empty, we're reading the whole object into memory because size -1 = UINT_MAX. Change-Id: Ibf9a1534159ce626e4f2327536076d0cc1ebf0ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* MIPS DSPR2 optimization of routine fetchUntransformedRGB16Damir Tatalovic2012-05-163-0/+92
| | | | | | | Change-Id: I109deb969009214c4d81677e127f50120443acd2 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Support specifying fallbacks in font request on QPAEskil Abrahamsen Blomfeldt2012-05-162-2/+18
| | | | | | | | | | | | | Because the QPA font database would query fallback families inside findFont(), support for requesting multiple font families in order of preference (like QFont("Times New Roman, Arial")) did not work, because the Arial fallback was never attempted. To fix this, we pass in the queried fallbacks and make sure they are tried before any platform specific fallbacks. Task-number: QTBUG-20986 Change-Id: Idb2b717856f013ce2874f00a8debaff60176d2fc Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* QChar: add isSurrogate() and isNonCharacter() to the public APIKonstantin Ritt2012-05-168-71/+96
| | | | | | | | + QChar::LastValidCodePoint enum value that supercede the UNICODE_LAST_CODEPOINT macro replace uses of hardcoded values with the new API; remove leftovers Change-Id: I1395c9840b85fcb6b08e241b131794a98773c952 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QChar: add missing UCS-4 overloads, get rid of UCS-2 onesKonstantin Ritt2012-05-162-204/+219
| | | | | | | | | | inline all non-static members to a static ones (declared with QT_FASTCALL), ushort converts automatically to uint and the conversion cost is minimal. Task-Number: QTBUG-13052 Change-Id: I189a6f205736766adcd3de2d61cee71f30cc64f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QJpegHandler: add an embedded text supportKonstantin Ritt2012-05-161-9/+83
| | | | | | | | | | | texts for the textKeys are stored each in a separate COM(ment) section so that the maximum text's size is almost 65KB Task-number: QTBUG-10568 Task-number: QTBUG-111 Change-Id: I7d693741e10e5d78d497cb0af448160077350bb2 Reviewed-by: aavit <qt_aavit@ovi.com>
* Fix QFile::permissions for long filenamesShane Kearns2012-05-161-1/+1
| | | | | | | | | | When qt_ntfs_permission_lookup is used, QFile::permissions failed for files with long filenames. Also created a test case for this API, which revealed another bug. Task-number: QTBUG-25629 Change-Id: I73b7676a9d059c0e782b3f701b2e6bbc92f671ed Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
* QHttpNetworkReply:readBodyFast return early if nothing to read.Martin Petersson2012-05-161-0/+2
| | | | | | | | | Incase there is no bytesAvailable on the socket there is no need to try to read. Change-Id: Ied9e4b8d86854b356a733fab4948739db206b6ad Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QNetworkAccessManager: Read all from socket on remote host closeMartin Petersson2012-05-161-0/+26
| | | | | | | | | | When we get a remoteHostClosed we should try to read everything from the socket before we close the channel. Change-Id: Iaa87d79ea16d69735f6ba3e8b3b4a0f86fbd5f73 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix cases where functions are called with a drive and no slashAndy Shaw2012-05-161-9/+9
| | | | | | | | | | | | | | | When a file is specified on a path that includes a drive letter followed by a colon but no slash then it didn't always account for the fact that this refers to the current path on that drive. This fixes the problems in completeBaseName(), baseName() and path(). Tests are also added for these three cases and some others too. Task-number: QTBUG-25353 Change-Id: I47a197c6af066f532442ad269be57597ec61303a Reviewed-by: Irfan Omair <irfan.omair@gmail.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* udev: improve device discovery with udev for add/removeJohannes Zellner2012-05-151-5/+10
| | | | | | | | | | As the udev device tree structure varies between distros and udev versions, first probe the actual leaf node for device properties. If leaf does not contain needed properties, walk up the tree to the next node matching the queried submodule. Change-Id: I09329d5a76a1a2a797513f4a787cb27fed5293c7 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* printsupport: set duplex setting correctly to CUPS printerTeemu Katajisto2012-05-151-14/+14
| | | | | | | | If CUPS printer default is not DuplexNone then setting duplex to None for printer did not have any effect on duplex setting. Change-Id: Ifdd82241952c9a63cdf9b53fe787f7503b8049bd Reviewed-by: John Layt <jlayt@kde.org>
* input: Use UDev or specific device pathsJohannes Zellner2012-05-153-19/+23
| | | | | | | | | Keyboard,mouse and touch plugins using evdev now either use udev for device discovery or the plugin arguments for fixed device paths. Change-Id: I72606ad48c15c55a49724a82f7bc285dd3984c43 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Restore the QEvent::d pointer to null after we're done using itThiago Macieira2012-05-151-1/+4
| | | | | | | Change-Id: I2fd6ebd80bf47456d74e939d49bff4ac9f199e8b Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QElfParser: fix type of sh_sizePino Toscano2012-05-152-3/+3
| | | | | | | | | The type of the sh_size field of a section header is either Elf32_Word or Elf64_Xword, so the type used cannot be qelfword_t (always 32 bits) but qelfoff_t. Change-Id: Ia380b6823913fee7a96b39f742630ae3a9ca0cb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com>
* qdoc: Improve fileToOpen detection for examples manifestAlessandro Portale2012-05-151-1/+1
| | | | | | | | | When looking for a suitable "fileToOpen", do a case insensitive file name comparision. So that it also works in this scenario: AnExample/anexample.qml Change-Id: Ic4cd1d59a7a35e534bfd26cd174a3c2ab5383025 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Windows: Trim filter specification of the native file dialog.Friedemann Kleint2012-05-151-1/+2
| | | | | | | | In the event customer code (namely Qt Creator) does not pass a clean specification (corresponding to 4.8 behaviour). Change-Id: I8271e3a45bea4bea912fcdf0b7c0aae6c022c6a8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Do not limit mingw mkspec to "win32-g++" only.kb2012-05-151-1/+1
| | | | | | | | | | | | The Qt configure script and various qmake project files interpret mkspecs with a win32-g++ prefix as needing special mingw treatment. This patch corrects one instance of the too-specific "win32-g++" qmake platform scope and broadens it to "win32-g++*" -- bringing it in line with the rest of the Qt project files -- thus re-enabling custom mkspecs for crosscompilation. Change-Id: I8c5107053ce9e0c499002b1990b492bda0eec52b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix font printing on Windows using the native engine.Friedemann Kleint2012-05-154-28/+55
| | | | | | | | | | | - Add HFONT, LOGFONT, trueType as properties of the Windows font engine, make it a real Q_OBJECT. - Query properties in the Windows print engine and use the HFONT, LOGFONT there. Change-Id: I5c35275b32ef6580d7fa15ed83c6e79e33dc3334 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Rename QMimeDatabase method for consistency.David Faure2012-05-153-10/+19
| | | | | | | | Name is about mimetype names, while FileName is about, well, file names. Task-number: QTBUG-25748 Change-Id: I34a9ac1a5fc06dc3e3855365e19c4dc7a1aa2671 Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* qdoc: Don't include internal QML properties in outputMartin Smith2012-05-155-8/+18
| | | | | | | | | QML properties marked internal were still appearing in the the HTML output. Also, the title for QML type pages was not correct in the help project writer. Change-Id: Icaad7cefce77a4af70796bc185c99a3035fb17c8 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QDoc: Use capitalized navtitles in ditamap.Casper van Donderen2012-05-151-10/+10
| | | | | | | | The auto-generated ditamap used titles like "articles", this now becomes "Articles". Change-Id: I32fa6353443aaa66cbfc2b2fea1fea26e3e33684 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* qdoc: Fixed some terminology output by qdocMartin Smith2012-05-152-2/+2
| | | | | | | | | | There were still a few places where qdoc generated "element" instead of "type" or "class" instead of "type." These have been fixed. Change-Id: Id75156810212edb468198b6f269e3a91c55ac22c Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix include path to fb_base.priGirish Ramakrishnan2012-05-152-2/+2
| | | | | | | Also fixes a typo in fb_base.pri. Change-Id: I4fae156640325a7a2894ea0d1fbe96936f190bdb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix QPA files inclusion headersGirish Ramakrishnan2012-05-158-24/+24
| | | | | | | find . -name "*.h" | xargs sed "s/^#\(.*\)_QPA_H/#\1_H/" -i Change-Id: Ifa96f8cfcb67070a961c7e5f05719b82653a1174 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove const char *-based connectNotify() APIKent Hansen2012-05-152-40/+0
| | | | | | | | | | | | | | | | This completes the transition from connectNotify(const char *) and disconnectNotify(const char *) to the new QMetaMethod-based functions. Removed the old connectNotify autotests and renamed the connectNotifyMethodXXX autotests to connectNotify, since there is no longer any ambiguity about which overload is being tested. Change-Id: Icf108a80177155f21bb73c165fb8ab5d4e997bc2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Deprecate the ability to change the FS encoding separate from the localeThiago Macieira2012-05-153-72/+43
| | | | | | | | | | | | | | | | | Changing the encoding used by filenames separately from the locale encoding is a broken concept and cannot work properly. This creates ambiguity depending on the data source and how it's being treated. Instead, enforce that the locale encoding is the only possibility to deal with file names. The QFile::encodeName and decodeName functions are retained due to the Mac-specific issues and due to the sheer number of current uses. There's no point in deprecating them and moving away from them. Change-Id: Iedb2d8715d166a59a824f05bc11d107fd44f9c17 Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003782.html Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Enable Gtk file iconsFrederik Gladhorn2012-05-153-7/+7
| | | | | | | | This needs some build system fixes to let widgets depend on the platform support library (and be built after it). Change-Id: I6f5b878971d1002a18e2fd66db4f34ffd0ac939a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
* Use org.qt-project for the QFactoryInterface's IIDThiago Macieira2012-05-151-1/+1
| | | | | | | Task-number: QTBUG-23273 Change-Id: I935d2e20a4905121ca226f052528fa7c9d80e88b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Split Q_COMPILER_DEFAULT_DELETE_MEMBERSBradley T. Hughes2012-05-152-8/+25
| | | | | | | | | | | | | | | | Based on reviewer comments on https://codereview.qt-project.org/#change,25992, split Q_COMPILER_DEFAULT_DELETE_MEMBERS into Q_COMPILER_DEFAULT_MEMBERS and Q_COMPILER_DELETE_MEMBERS. Clang provides 2 separate feature checks for these, all other compilers always define both. Keep the Q_COMPILER_DEFAULT_DELETE_MEMBERS define, though, for any existing code that may be using it. Change-Id: I8969e10989c776a822da153152cfecb99dda8cb9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Properly handle unexpected EOF in QHttpThreadDelegateShane Kearns2012-05-151-6/+9
| | | | | | | | | This prevents http POST/PUT from hanging if the QIODevice being uploaded returns -1 from read. Task-number: QTBUG-24738 Change-Id: I76500cc4f0101cc8e5da5f1dc105508b3f519a3c Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Add private API for finding symbols on LinuxGlenn Watson2012-05-151-0/+7
| | | | | | | | | | | | Add an API for use by declarative that allows searching for a symbol that has been loaded, without opening a specific library. This makes it possible for declarative to determine if the profiling library has been preloaded, and to call functions on it that enable / disable / save the current profile. Change-Id: I2ec12d9babea2a152990c19735e98d4d7c10a062 Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove capitalization when specifying include-libraries.kb2012-05-148-11/+11
| | | | | | | | | | | | | MinGW installations on case-sensitive filesystems expect lowercase names of include-libraries and (usually) include files. When crosscompiling on Debian 6 (targeting MS Windows) linking fails because mingw is looking for non-existent include-libraries. Using lowercase names solves this. Change-Id: Id3454f4ed8ba42b6ea93d65d9c0ce567db6712df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Do not override CO_E_NOT_SUPPORTEDkb2012-05-141-0/+2
| | | | | Change-Id: Id0cb9e1dca67400a2e3a02da663d810b06bdb6ec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Query mouse double click interval from system.Friedemann Kleint2012-05-141-1/+4
| | | | | | Change-Id: I6bfd19a76bf3fde1344760d7f216a2dffa4b9018 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QUrl: using sectionIsPresent in operator== broke for local files.David Faure2012-05-141-1/+5
| | | | | | | | | QUrl::fromLocalFile("/foo") doesn't set Host, but QUrl("file:///foo") does (to remember that it saw a Host section, even if empty, which is useful for urls like "remote://"). So ignore the Host flag in operator==. Change-Id: I4322b4a75420c4e42766c0d65c1b121f28028a76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: a url with a fragment or query, and one without, are different.David Faure2012-05-141-1/+8
| | | | | | | | | Fix operator== and operator< so that a URL with an empty fragment or query, is not treated as equal to a URL without any fragment or query. This restores the Qt4 behavior on this particular issue. Change-Id: Ie989f37353fb13c791b1d558d638d2e8a5b5d1b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add missing include library to prevent link failurekb2012-05-141-0/+1
| | | | | | | | When cross-compiling the uuid library needs to be included explicitly so the linker has access to _IID_IUnknown et al. Change-Id: I713af426357603c08eef55857be20105e5aa6eba Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* clang: Use __has_feature() to detect C++11 featuresBradley T. Hughes2012-05-141-21/+74
| | | | | | | | | | | | | | Apple's clang version is often reported as the next official clang version, but Apple clang does not support all the features that the final official clang does. Instead of using version based feature detection, use the __has_feature() built-in instead, so that we correctly #define the various Q_COMPILER_* macros. Task-number: QTBUG-25554 Change-Id: I2195401dbf6cd8574c30aa1bd6f7cf1cf537dae7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Find Qt5 modules automatically in the qt5_use_modules function.Stephen Kelly2012-05-141-1/+4
| | | | | | | | | | This ensures that we only find Qt5 modules from the same directory as modules we have already found, not from multiple different directories which may be incompatible. Change-Id: I7ad1d81ec41bba2e543130740041338ba44a6c3b Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Restore QUrl::setEncodedQuery(QByteArray()) to the Qt4 behavior.David Faure2012-05-131-2/+2
| | | | | | | | | | Null bytearray means no query, and QString::fromLatin1(QByteArray()) doesn't give a null string, but an empty string. Same for setEncodedFragment(QByteArray()). Change-Id: I992e9253e35941d66886456872ea06aa2ae92450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDoc: Also use the CppCodeMarker for .qtx and .qtt files.Casper van Donderen2012-05-121-0/+2
| | | | | Change-Id: Iff44975bc17fbf1158b373ecd967782b6cb5a3c1 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Add a QStringBuilder::toUtf8() functionThiago Macieira2012-05-112-0/+5
| | | | | | | Just to match the ones that are already there. Change-Id: I25acc2391feded4cac79ebf65a6bc72176f5f931 Reviewed-by: hjk <qthjk@ovi.com>
* Use WChar method for reporting for WindowsAndreas Holzammer2012-05-111-3/+15
| | | | | | | | | | | Switch to Unicode reporting, as Windows CE does only support UTF-16 functions and to not open up some other ifdefs just switch to unicode. Change-Id: I82613a131313235e313cecd315bf6d1488af0532 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QGuiApplication::activeWindow() is deprecatedThiago Macieira2012-05-111-1/+1
| | | | | Change-Id: Id66740eb42fdaa86807222fbebc148de9434fa6e Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Fix sending UDP packets to link local addressesShane Kearns2012-05-112-20/+27
| | | | | | | | | | | | When the scope ID is not set, Mac and Windows will not transmit packets to link local addresses. This patch implements setting the scope in the native socket engines and adds a test case. (it was partially implemented already, though UDP specific code paths were missed in the unix engine) Task-number: QTBUG-25634 Change-Id: I23300bdc9856e38458078e913daaa59cd05a74b5 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Include scope ids in QHostAddress from QNetworkInterfaceShane Kearns2012-05-112-4/+17
| | | | | | | | | | | | The scope ID is a required part of the address for link local addresses (to solve the problem of the same link local address being created by two machines on different networks). It is required to send packets to a link local address on Mac and Windows, although Linux multicasts if scope is missing. Task-number: QTBUG-25634 Change-Id: Ie2bb09df8d261eefcb81716bafeb1475f0bed5fe Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Doc: Add a default license footer.Casper van Donderen2012-05-1111-0/+11
| | | | | | | | The CSS for the footer is not completely correct, but at this time it is better to have something than nothing. Change-Id: I7371e1e458a2abafcdb0fca5564ad73e209d64c3 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>