summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Update contact address in license headers.Jason McDonald2012-01-3116-16/+16
| | | | | Change-Id: I35bf916087511f26bfeb49ceb3256d9a20fbc1c0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QDateTime: Add validity checksJohn Layt2012-01-311-32/+144
| | | | | | | Check the validity of date/time before attempting to perform maths. Change-Id: Ia6a2caf07c6c36f7d7fac713a77bc4eb456c6ed6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime: Deprecate setYMD()John Layt2012-01-314-11/+10
| | | | | | Change-Id: I077332df554fb750666d51486c97724411276679 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix bugs when using a non 0 terminated QLatin1StringLars Knoll2012-01-301-20/+41
| | | | | | | | | | A few methods in QString still assumed that QLatin1String is always 0 terminated. Change this to rely on the size provided by QLatin1String instead. Change-Id: I9145a46e52ed8811f3b4e3d72d8a81a12588760a Reviewed-by: Kevin Simons <kevin.simons@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix debug format string in windows socket engineShane Kearns2012-01-301-2/+2
| | | | | | | %l has no meaning, should be %li according to the arguments. Change-Id: Ife9ec524109e021ad723865445e80b6bad51a5c6 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix crashing debug messageShane Kearns2012-01-301-1/+1
| | | | | | | | The debug message could derefence a null pointer, this crashed when running ssl autotests Change-Id: I176aaa9f3cf3c6cc1512cdc34db06d4c79f92e73 Reviewed-by: Richard J. Moore <rich@kde.org>
* Add a null pointer check to QJsonObject::toVariantMapLars Knoll2012-01-301-3/+5
| | | | | | | | | | If the object is null, simply return an empty variant map. Added another test case checking conversion from QJsonArray to a QVariantList. Change-Id: Ieccd163e76630f7db7f41255acd9d1baf66bb38d Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* Remove Symbian specific code from QtCore.Xizhi Zhu2012-01-3037-1112/+63
| | | | | Change-Id: I131303e28a12dccb96de3de4ca0073b389a9bbae Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Symbian specific code in platformsupport.Xizhi Zhu2012-01-301-1/+1
| | | | | Change-Id: I5f06f80ae47b2c9fcd93832c23a453a9193e6120 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove reference to Symbian in printsupport.Xizhi Zhu2012-01-303-9/+0
| | | | | Change-Id: I63b3559cd9ec620d76a177f57096dd8d38ef834c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Symbian code from tools.Xizhi Zhu2012-01-303-51/+33
| | | | | Change-Id: Id9d7b2b4f6bc8b558f92bc09b7956c49e5a3752a Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove type id/name conversion for QVariant::UserTypeKent Hansen2012-01-301-4/+0
| | | | | | | | | | | | | QVariant::UserType does not correspond to an actual type named "UserType". This logic didn't make sense. Change-Id: I369911e514f7902fc863cb05174011d6fc15c447 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove pass/fail/skip count getters from QTestResult.Jason McDonald2012-01-302-19/+0
| | | | | | | | These functions are no longer used, as the counters have been moved to QTestLog. Change-Id: I7cd13fc92a18920706fcc712804c304f9c333969 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Avoid non-standard indentation of license headers.Jason McDonald2012-01-308-312/+312
| | | | | | | | The strange indentation has made maintenance of license headers difficult on several occasions. Change-Id: Ib29a7e5275e2c7a2c13a3f32fd2479f34d3353ca Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add native event filters to Windows, forward to Widgets.Friedemann Kleint2012-01-3015-126/+93
| | | | | | | Use prototypically for qwizard_win.cpp. Change-Id: I075e81ae1bc3d62d9f27e51c73c800ffd71cbcd6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make the pause modes a QFlags.Richard Moore2012-01-304-8/+10
| | | | | | | | | | | The intention is to add additional pause modes over time, this will be easier if we can just test if a particular reason for pausing is turned on. If we don't do this we'll end up having to check for each enum value every time we check what is enabled. Change-Id: I6b08f0e819b5593e3f6463c3dd175eff8625e155 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Add support for DNS lookups using native APIsJeremy Lainé2012-01-306-3/+1943
| | | | | | | | | | | | | | | | The QDnsLookup class provides asynchronous APIs for performing DNS lookups. For now, the following lookups are supported: - A and AAAA - CNAME as defined per RFC 1035 - MX as defined per RFC 1035 - NS as defined per RFC 1035 - PTR as defined per RFC 1035 - SRV as defined per RFC 2782 - TXT as defined per RFC 1035 Task-number: QTBUG-10481 Change-Id: I46c1741ec23615863eeca3a1231d5e3f8942495e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change the type key for delegate editors to int.Stephen Kelly2012-01-304-30/+28
| | | | | | | | | | | | | | | | Previous type of QVariant::Type does not allow for custom types. While technically source incompatible I found no re-implementation of this class in qttools or qt-creator (most likely to use it for property editors). The virtual methods are not needed because registerEditor is all the API that is really needed. Task-number: QTBUG-1065 Change-Id: I2a9c578c444a80359416f2224a0ee03903bfe779 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add the QAbstractItemModel::canDropMimeData method.Stephen Kelly2012-01-302-1/+20
| | | | | | | | | | | Can be used by views to indicate whether a drop is allowed (eg adequete permissions in a filesystem model). Change-Id: Iefedb5399e44c8edc5f5df1403c8d5c0da618612 Reviewed-by: Peter Penz <peter.penz19@gmail.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Don't crash when source or target is nullGunnar Sletta2012-01-301-2/+18
| | | | | Change-Id: I4992867ad764bd1bd175478c6be1094ca8a72812 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix compilation of Qt apps with -Wshadow -WerrorDavid Faure2012-01-301-1/+1
| | | | | | | qstring.h:648:70: error: declaration of ‘size’ shadows a member of 'this' Change-Id: I96d2a5b1201b53b11d23bf194b89fa8967b9e25d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Removing Qt5 note that would break SC.Jonas Gastal2012-01-301-2/+0
| | | | | | | | | | This would be a silent behaviour change and is not particularly needed. Change-Id: Iee1e48408e605d671dfe0402880df3c93a14a8c7 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Prettify the plastique style's slider thumb.Pierre Rossi2012-01-301-2/+1
| | | | | | | | the bottom corners shouldn't be filled. Change-Id: I8be1c7a712225fe101b775ea04a8c2fc29e4e9da Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Jens Bache-Wiig
* QHeaderView - length returns wrong value fixThorbjørn Lund Martsum2012-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | setSectionHidden called with (logindex, true) will sometimes prevent a (correct) call to resizeSection(logicalIndex, 0). This seems a bit odd - however it does execute d->doDelayedResizeSections(). Therefore the section is going to be hidden later. However it is a problem that the length meanwhile is wrong. (That is a value that is not the sum of the sections) This is fixed by execute updates before returning the length. Task-number: QTBUG-14242 Change-Id: Ia1d2f6db3213792b250a6a37942b56554261cd3a Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-302351-2343/+2352
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Eliminate QTestResult::ignoreMessage().Jason McDonald2012-01-303-8/+1
| | | | | | | | | | The removed function was just a wrapper around QTestLog::ignoreMessage() and was only called twice (once in qtestcase.cpp and once in qtdeclarative). Better to just call the desired function directly and avoid the indirection. Change-Id: Ib900f35f5d584e8f323cef9b0e7b4f8a507c199e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Get rid of QColorGroup from QVariant.Jędrzej Nowacki2012-01-291-1/+1
| | | | | | | | | The type was removed long time ago. It has type id 63 which currently is unbound, but potentially can be reused in future. Change-Id: I099997c9bae93ce52ba8c46275d6267c25dee4ca Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix BC break with QAbstractFileEngine "mount points"Shane Kearns2012-01-291-0/+5
| | | | | | | | | | | | | | | | | | File system cached metadata can't be trusted when custom file engines are in use, because the custom file engine may want to override the metadata. (e.g. present an archive file as a directory) Therefore, check if a file engine should be instantiated for each result in QDirIterator. This is a fast check if no custom file engines are registered. When pushing a directory (using QDirIterator::SubDirectories) the file engine needs to be instantiated also. Task-number: QTBUG-23688 Task-number: ou1cimx1#965023 Change-Id: I0114c8df6258535553783a2486131c4194926649 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> (cherry picked from 3864ad09d578210b52e5f58fca2ee8a1144f5be2)
* Fix compilation warnings on MSVC.Jędrzej Nowacki2012-01-291-2/+2
| | | | | | | | Q_STATIC_ASSERT as condition should accept anything cast-able to "bool". Change-Id: Id76992080f9bb84d3a16b80adffc656d52eca91d Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
* Introduce QTypeInfo::sizeOf.Jędrzej Nowacki2012-01-292-7/+11
| | | | | | | | In QMetaType "void" is a regular type, lack of c++ sizeof operator force us to write a template specialization for the type. Change-Id: I9a56e135223b416b8031836d29ef33ef3fb750e4 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix null pointer call in QMetaType::destruct().Jędrzej Nowacki2012-01-291-1/+3
| | | | | | | | | | | Logic has a flow causing null pointer call during destruction of an instance of a custom type in bootstrap mode. The patch doesn't include autotests, because we do not test bootstrap mode. Change-Id: Ie70c6f4226cb604f094513621d96a560e84502d7 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Use per session socket to connect to maliit serverJan Arne Petersen2012-01-294-1/+157
| | | | | | | | | | | | | | In newer versions of maliit a per session abstract socket for communication between maliit server and input contexts is used. The address is published over the D-Bus session bus as address property in the org.maliit.Server.Address interface of the /org/maliit/server/address object at the org.maliit.server service. Fallback to old socket when org.maliit.server service is not available. Task-number: QTBUG-22982 Change-Id: I1b2cdd0c804d3d625e18b4958dd60008ea289d91 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Get rid of checks for Qt3 typesKent Hansen2012-01-294-39/+0
| | | | | | | | | | | | | | These types don't exist anymore, so it's pointless to check for them. Also remove the dead types from uic's type-to-header map. Change-Id: I7f0af5c337859f3da1c103157a802bbe5372df9f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Call connectNotify when connecting with function pointerOlivier Goffart2012-01-291-1/+13
| | | | | | | | Some objects expect connectNotify to be called in order the signal to be emitted. Change-Id: Id0460d9c2aef8f9c3618a2b62b2119a790e06f30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a set of atomics based on C++11's std::atomicThiago Macieira2012-01-283-1/+250
| | | | | | | | | | | | | | | | | | | | | The C++11 std::atomic type is very close to our API, to the point one has to wonder if the committe was inspired by it. It provides all of the memory semantics that Qt requires and more, plus some compare-and-swap operations that we don't use. The idea of returning the actual value in the event of a failed compare-and-swap is actually quite good, as often we'll retry with it. We just couldn't come up with a good name (fetchAndTestAndSet?). The C++11 atomics require that the compiler support constexpr as well, since std::atomic itself isn't required by the standard to be trivially-constructible (in fact, it has a constexpr constructor in the standard). For that reason, we need constexpr so we can add a constructor to QBasicAtomic too. Change-Id: I12c51455ba73350a6f7501aacc2ca7681c4369dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add a set of atomics based on GCC intrinsicsThiago Macieira2012-01-283-1/+133
| | | | | | | | | | | | | | | | | | | | | | | | | With this implementation, we can have Qt run on any architecture that GCC supports without having to write specialised code. However, on some architectures, the code that GCC generates is not optimal: it uses locking on ARMv5 and it's always fully-ordered. For that reason, it appears after the Qt native assembly implementations (it's a fallback, not an override). Since they all have fully-ordered memory semantics, we define only the xxxRelaxed functions. The exception is __sync_lock_and_test, which has acquire semantics, so we need to define the Release and Ordered versions too. On some architectures, GCC can support atomics on types different than 32-bit and pointer-sized (like x86, x86-64, ARM and even MIPS). However, there's no standardised way of telling: GCC seems to define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1,2,4,8} if those operations are present, but I couldn't find it on the ARM compiler (it was there for i386, x86-64, IA-64 and MIPS). Change-Id: I55ff7a7c0cfc6388b7ad8e2c0dedecffdf2a3e01 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Put the generated <module>version.h into build treeLiang Qi2012-01-2811-11/+11
| | | | | | | | | It was put in source tree before. Task-number: QTBUG-20439 Change-Id: Ib52d9c2e83ae375aad259ddc74138bbc728b3ed0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Making socketOption/setSocketOption virtual on QSslSocket.Jonas M. Gastal2012-01-281-3/+2
| | | | | | | | Per ### Qt5 comment and the fact that it was already virtual on QAbstractSocket. Change-Id: If2d2b2f9cdec1ef4c5bf625e3ce0d6f2d9a7bdfd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Code cleanup, remove QVariant::nameToType usage.Jędrzej Nowacki2012-01-281-3/+1
| | | | | | | | It is better to use QMetaType::type because it works well with custom types too. Change-Id: I30bc70d16b2aad4ba22682de1c215b917e64209b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not suppress tr() methods when QT_NO_META_MACROS is defined.Erik Verbruggen2012-01-281-1/+1
| | | | | | | | | | | | The tr() methods are unrelated to the "meta" part, so disabling them with that macro is not the proper way. They were originally included to make static checks for string translation simpler, but it just results in duplicating the definition every time QT_NO_META_MACROS is used. Change-Id: I29eb9b83a09e1fd6c66c85c9e4ff23d8dbe65f15 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: deprecate setEncodedUrl() and fromEncoded(), add url().David Faure2012-01-282-30/+48
| | | | | | | | | setEncodedUrl() isn't necessary anymore now that setUrl can handle encoded (and partially encoded) urls. url() is added for symmetry with setUrl(). Change-Id: I4e671482a5635a86797421ca50882db9cd60d852 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: use partially-decoded data in toString and QUrl(QString)David Faure2012-01-281-9/+34
| | | | | | | | | | | | | This fixes round-trip bugs. People expect to be able to do QUrl u(...); QString s = u.toString(); QUrl u2(s); and have u==u2. This was not true for paths containing a '#', for instance, which would be parsed back as a fragment. The solution is to make toString output partially decoded data (more readable than toEncoded, but not decoded to the point of changing the meaning, if parsing it back later as a QUrl), and to make the QUrl constructor work with partially decoded data. Change-Id: I013c01e8947d538435f3c20fc4ec57cd9ccbba6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compilation problem in qjsonvalue.hJani Uusi-Rantala2012-01-281-1/+1
| | | | | | | Extra ; after namespace was causing build failures with -pedantic. Change-Id: I340252810a04815820964c625377a1dc0635783f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed includes in public headersDenis Dzyubenko2012-01-275-6/+6
| | | | | Change-Id: I360c94d41691a618f1bec97da8317c9dcee658c0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* improvements to ModifiedRowMark Brand2012-01-272-16/+19
| | | | | | | | | -remove unnecessary explicit copy constructor -explicitly inline constructor -more convenient initialization Change-Id: I78b275ef9d5413f95278a044345e42303dc35624 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* use nameToIndex() instead of duplicating codeMark Brand2012-01-272-6/+7
| | | | | Change-Id: If55541aa8a2345f90984d8b82bee0c3ebb01a605 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* fix identation and styleMark Brand2012-01-272-2/+3
| | | | | | Change-Id: I18e9e752e8dc0cf980f424264f274177b98a98be Reviewed-by: Yunqiao Yin <charles.yin@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QSizeGrip: Fix Windows.Friedemann Kleint2012-01-273-33/+25
| | | | | | | Reactivate the old Windows code. Change-Id: Ied467cf83d89c76a0fa8edf3c76bb207cc2a70e0 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
* Decouple QPlatformTheme from QDialog.Friedemann Kleint2012-01-2711-91/+78
| | | | | | | | | | - Use an enumeration for the dialog type. - Implemented on Windows and Mac Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Change-Id: I213748a08168efbabc2ac0106308e97ff19d19c0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* WindowsXP-Style: Draw on DC of backing store for widgets only.Friedemann Kleint2012-01-273-30/+35
| | | | | | | | | - Check the device type pof the painter passed in. - Introduce convenience functions for retrieving the DC for widgets that default to the top level. Change-Id: I18a8db02c8ffd7a249310a5ffaf3a530f0a3df40 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>