summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Kernel: Fix gcc warning in qsharedmemory_win.cppKai Koehne2012-09-131-2/+2
| | | | | | | | | Fix gcc 4.7 'arning: converting 'false' to pointer type 'HANDLE {aka void*}' [-Wconversion-null]' Change-Id: I28d890d5fd4975517a9329d68c9ef73f6fadf36c Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Kernel: Fix gcc warning about narrowing conversionKai Koehne2012-09-131-1/+1
| | | | | | | | | | Fix gcc 4.7.1 warning: 'narrowing conversion of 'value' from 'int' to 'uint {aka unsigned int}' inside { } is ill-formed in C++11 ' Change-Id: I64ee1a35ecd60cc6a5d7d024c5f903078b3d4f60 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Threads: Fix mingw-gcc warning about 'cast to pointer from integer of ↵Kai Koehne2012-09-131-4/+4
| | | | | | | | | | different size' Use reinterpret_cast to convert from DWORD to pointer. Change-Id: I17a12940850aeb0bc27080725a18eb93fee72ff7 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Improve QMetaType docs.Jędrzej Nowacki2012-09-132-11/+215
| | | | | | | Change-Id: I4ad4188d1bb984b83ffe4bb4ff098158e888d183 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix crash when invalidating a QSortFilterProxyModelStephen Kelly2012-09-131-9/+19
| | | | | | | Task-number: QTBUG-27122 Change-Id: Ibca46b88442f4f92422d9b3182e4bbf25716a07f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix build with QT_NO_EXCEPTIONSHarald Fernengel2012-09-121-0/+2
| | | | | | | | | qTerminate is declared within a #ifndef QT_NO_EXCEPTIONS block, so the implementation must use the same #ifdef Change-Id: I5d2d58a55fce5084c0538d18a9dd3998b12ed703 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Arvid Picciani <aep@exys.org>
* Doc: Fix misc. doc errors and document undocumented functionsaavit2012-09-121-0/+12
| | | | | | Change-Id: I0c1e0a36ee37d5a8f3741f0405f63f9b26967f32 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Don't manipulate immutable dataJoão Abecasis2012-09-111-1/+2
| | | | | | | | | | QArrayData can point to data it does not own (cf. fromRawData()), which shouldn't be modified. Not even upon destruction, as this data can live in Read-Only memory or be otherwise shared outside the QArrayData realm. Change-Id: I8bdf3050a17802fb003b77d5f543fe31769a7710 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com>
* QFileSystemEngine: fix realpath() buffer sizeRafael Roquetto2012-09-111-1/+1
| | | | | | | | | realpath() returns at most PATH_MAX _plus_ the terminator. Change-Id: I4c2e3e166a5f476863ad8c6999800e6468535dbe Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QNX: fix call to realpath() on QFileSystemEngineRafael Roquetto2012-09-111-1/+1
| | | | | | | | | | | | QNX6, as opposed to later QNX versions, does not define the behavior of realpath() when the second parameter is NULL. We leave it then for the compiler to decide which implementation to call, by relying on the _POSIX_VERSION_ macro, which in QNX6 happens to evaluate to < 200801L. Change-Id: I3a6d3859858f56b69f0d391384c2703083a01257 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* don't require (dummy) qconfig.h for qmake buildOswald Buddenhagen2012-09-112-2/+1
| | | | | | Change-Id: I22a2c9aa1366ff858b3bb646617543968c810136 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* compile without CamelCase headersOswald Buddenhagen2012-09-113-5/+4
| | | | | | | | for faster bootstrapping without a full syncqt run Change-Id: I648f0a8fb09be021590c46e8e5e15667a316c817 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Several modifications in phrasing.Nico Vertriest2012-09-111-13/+12
| | | | | | | | Corrections of syntactic and spelling errors. Change-Id: I9d880b4d3f33ace53815d734f99d0b0396497158 Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Doc: Remove references to the deprecated QGraphicsItemAnimationGeir Vattekar2012-09-111-6/+1
| | | | | | | | | Task-number: QTBUG-23711 Change-Id: I1c1ce049016d0bea03d43631493ed8d248162eee Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Jason Barron <jason.barron@nokia.com>
* Fix example includes for qdoc.Frederik Gladhorn2012-09-111-3/+3
| | | | | | Change-Id: Ifa6a99db27ce51529489bf077a839a3107b524d2 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Do not include /examples in qdocconfs.Frederik Gladhorn2012-09-111-1/+1
| | | | | Change-Id: I84a925a8be4964fae667f5a2500157283a8057d2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Doc: Centralize more common settings in 1 global qdocconf.Casper van Donderen2012-09-111-36/+1
| | | | | | | | | | All qdocconf settings that should be used by all Qt modules are now in qt-module-defaults.qdocconf. Change-Id: I2a0315a55db3fcbb0160c4392d2da98611043d83 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Specify the project name when adding a test.Stephen Kelly2012-09-101-0/+2
| | | | | | | | | | | | | On Windows, with the devenv makecommand, this seems to be necessary. With msbuild it is not needed, nor with nmake, but it is no harm anyway. This is also what CMake does in its unit tests. Change-Id: I45f867e699c28a43ee607b47db108021fc7fef8b Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* DON'T parse the header files of guiJan-Arve Saether2012-09-101-2/+1
| | | | | | | | | | | This should not be encouraged, and it currently breaks cross-module linking for qdoc. With this in place, we can actually generated cross-references downwards (e.g. from corelib to gui), although in a bit hackish way at the moment. Change-Id: I32919e04535464438e3bb83e41f9a40b752c71c6 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Fix QFileSystemEngine::canonicalName() returning corrupt dataThomas McGuire2012-09-101-2/+7
| | | | | | | | | | | | | | In case of an error when calling realpath(), the return value buffer was uninitalized, but still used. Now the error value is checked to prevent this. Additionally, this fixes a memory leak in the error case. In addition, use the modern version of realpath() on QNX, since it is available there. Change-Id: I0ac83454679619f379df9c482c958789ab31866a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
* [Qt5 Docs] Fix typos and style of qtimer.cpp and qdatetimeedit.cppDavid Gil2012-09-101-7/+7
| | | | | | | | | | Fix some typos. Fix some sentences to make them clearer to understand. Fix some Qt4-widget-centric info. Change-Id: I77f23ce8cb9a6752a0f8dd214c9ff550d620cd21 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* [Qt5 Docs] Fix typos and style of qdatetime.cppDavid Gil2012-09-101-21/+21
| | | | | | | | | | | | Fix some typos. Fix some sentences to make them clearer to understand. After searching for Qt4-specific info, nothing found. Eskil Abrahamsen Blomfeldt Change-Id: I5c53d353d52c094c46d560bc4ff57b93def7550f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* android: we have mkdtemp.Arvid Picciani2012-09-101-2/+4
| | | | | | | | | | they just forgot to declare it. see: bionic ad1ff2fb268034074488f0b4b30b5311008b8617 Change-Id: Ide0c0edaa1b5fd17e58ffce1e3d49e320d80e57a Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Arvid Picciani <aep@exys.org>
* Move the non-C++ parts of qglobal.h outside of __cplusplusThiago Macieira2012-09-101-135/+134
| | | | | | | | This allows some more goodies to be available in C mode. Change-Id: I5c8a19b6150081a20aae8d3d9d8d7cb30d750536 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move the constructor and destruction function macros to the C++ partThiago Macieira2012-09-101-22/+22
| | | | | | | | | These macros expand to C++ code, so there's no point in having them defined in the non-C++ part of qglobal.h. Change-Id: Ic5763196391798e362d33466114969818e7e6793 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QNX: Add some optional debug output to event dispatcherSean Harmer2012-09-091-0/+18
| | | | | | | Change-Id: I4353619f2dc889f50a139dd5e224a79b780fb316 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Removing duplicate includesSergio Ahumada2012-09-096-7/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix missing or improper include guard in headersSergio Ahumada2012-09-0917-42/+42
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: Icf7d7d4bed91443b3b21ef5d4219dbd260dffef3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add support for the Intel Composer XE 2013.Thiago Macieira2012-09-081-0/+6
| | | | | | | ICC 13.0 adds some new C++11 features that we can now support. Change-Id: Ia870a3bb0172ff124983725300e8f9bf2e325ec6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make the default Qt API be Qt 5.0'sThiago Macieira2012-09-081-2/+1
| | | | | | | | | | | | This means user applications will default to Qt 5.0's API. Higher versions or Qt 4 compatibility are opt-in. Also set the default for Qt's own build to be 5.0 on all platforms except Windows. On Windows, we need to set it to 4.9. Task-number: QTBUG-25053 Change-Id: I603e0fda4785e64e1413cd82153a89e48005aa40 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* don't use QT_{BEGIN,END}_INCLUDE_NAMESPACE needlesslyOswald Buddenhagen2012-09-081-4/+2
| | | | | | | | these macros behave counter-intuitively, so don't use them unless the code structure really suggests their use. Change-Id: I58213b39f8a98e4368901217fac14ca49c28b8cf Reviewed-by: hjk <qthjk@ovi.com>
* Check for C++ operators that should be 'const'Sergio Ahumada2012-09-082-2/+2
| | | | | | | | Make sure all C++ class comparison operators are const. Change-Id: Ib4a66f2afe6c62f437dae1ecde94287d3db8442d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <faure@kde.org>
* Fix warning about not enough actual parameters for macro.Jędrzej Nowacki2012-09-081-1/+1
| | | | | | | | QT_METATYPE_INTERFACE_INIT_EMPTY_DATASTREAM_IMPL ignores arguments anyway so it is not a problem to give a void type. Change-Id: I66109cc9ae43b48d5cacbd11bebe135a71e10ed7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant: prevent QVariant(QMetaType::Type) from compilingMarc Mutz2012-09-071-0/+7
| | | | | | | | Reported-by: Stephen Chu <stephen@ju-ju.com> Change-Id: I298973174ff10f4462f04f3358c974c04dfd3383 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Stephen Chu <stephen@ju-ju.com>
* doc: Clean up QAbstractItemModel documentationEskil Abrahamsen Blomfeldt2012-09-071-5/+7
| | | | | | | | Mention QML as an alternative to widgets in the documentation, and fix a typo Change-Id: Ia6aaef9ec73d5112ff45c22b0bf57f1f9c7d31a3 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Use setenv in qputenv if possible, since it won't leakThiago Macieira2012-09-071-0/+3
| | | | | | | | | | | | | | | | | putenv(3) is evil: SUSv2 requires that the pointer passed to it be added to the environment and that modifying the contents of that pointer later will also cause the environment to change. That means we needed to strdup before calling it and that memory was never freed. This shows up all the time in valgrind's leak check. Instead, let's use the 4.3BSD & POSIX.1-2001 setenv(3) function, which does copy. That means there are either no leaks or, if there are, they're not our fault. Change-Id: I4576f91cc718b6b3cae790c4f2854c4976dded37 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Logging: Fix mingw32-gcc compiler warning about unused variableKai Koehne2012-09-071-4/+3
| | | | | | Change-Id: I985c2096e604a3cb14eb3a41c4f12aa28f0ea681 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix performance regression when appending one vector to anotherLars Knoll2012-09-071-2/+6
| | | | | | | | | | | | When appending a QVector to an existing vector the code would unconditionally realloc the vector instead of first checking whether we can do without. This gives a quadratic behaviour when repeatedly appending a vector to another. Change-Id: I2cd81253e6a8aec0bc4402e6fbda262435080966 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtGlobal: mark qVersion() and qSharedBuild() as nothrowMarc Mutz2012-09-072-4/+4
| | | | | Change-Id: Id9dcf71363754cf6aae94012b22d144455e213eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QRegularExpression* docsGiuseppe D'Angelo2012-09-071-2/+2
| | | | | | | | | A couple of runaway backslashes resulted in illegal code in the examples. Change-Id: Ib00d4e1d792e44bb73dafdd84c3a1843dcb34e27 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Move enums that was part of the Qt namespace to qnamespace.hJan-Arve Saether2012-09-072-4/+9
| | | | | | | | | | | | | | | | | This caused some headache wrt documentation, since in order to generate the proper documentation for the qt namespace qdoc also needed to parse the headers of gui, which breaks cross-module linking. (This is because qdoc will actually generate two almost identical nodes in the code tree; one from the header files from gui and another from the index file of gui). The best fix would maybe be to make it part of QAbstractTextDocumentLayout, but that will break source compat. Change-Id: I34e94d05fa4bec3034778d1f1cc0e53d0625e1ab Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Revert "Use true and false in preference to TRUE and FALSE"Sergio Ahumada2012-09-079-28/+28
| | | | | | | | | | | Even though I really think the change was the right thing to do, it seems like Windows people don't like this change because of some Windows Data Types specific rules. This reverts parts of the commit 56d5c909af6473be64a1ae487b45bd444a9a8553. Change-Id: I2c67d9b1bab36fc63937ef386aef56d2a4472a04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix g++ compiler warnings.Friedemann Kleint2012-09-072-2/+2
| | | | | | | | Unused variables, unsigned comparison DWORD >= 0 is always true, format string. Change-Id: I9f0a20392e262b2542fb23ea4f513e4c4e354b68 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix QDateEdit displaying day as a number for short and long day formatsMitch Curtis2012-09-052-20/+41
| | | | | | | | | | | When 2 (February) is entered as the month for (e.g.) 31/Jan/2000 (which is following the format: "dd/MMM/yyyy"), the day is corrected to 29 but displayed as its numerical value instead of its short (or long) name. Task-number: QTBUG-27036 QTBUG-19091 Change-Id: I558ee13b224707d22b26c2ec2c045f96118bd5a1 Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: aavit <qt_aavit@ovi.com>
* Fix 3 digit day being displayed by QDateEdit.Mitch Curtis2012-09-052-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | When a QDateEdit has its display format set to "yyyy/MM/dd", its day set to 31 and its month set to 2, it will display 291 as the day until the cursor is moved or the focus changed. This is because QDateTimeParser::parse calls sectionSize() for the day section, which will sometimes return an incorrect size. There are also other display formats affected by this bug (e.g. long day names). For example, (in the context of sectionSize()) when text is "2000/01/31" and displayText() is "2000/2/31", there is a difference between displayText() and text - text is the previous value and displayText() is the new value. The size difference is always due to leading zeroes. This patch makes QDateTimeParser keep track of the quantity of zeroes added to each section and then factors this value into the result of sectionSize() if there is a size difference between text and displayText(). Task-number: QTBUG-26847 Change-Id: I3823cc41167ec920f742cb6a20d39fc5f433c915 Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> Reviewed-by: aavit <qt_aavit@ovi.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-0510-29/+29
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clarify QDateTime::secsTo and QDateTime::msecsTo documentation.Mitch Curtis2012-09-041-2/+2
| | | | | | | | | | | Changed: "Returns 0 if either time is invalid." to: "Returns 0 if either datetime is invalid." Change-Id: I52d291459f215c1bb7fc78e70eaac90b2498158b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* fix QT_{BEGIN,END}_INCLUDE_NAMESPACE mixupOswald Buddenhagen2012-09-041-0/+2
| | | | | Change-Id: Id25b6aa56681b5bb5989472a96128789c0c4e73a Reviewed-by: hjk <qthjk@ovi.com>
* Clarify QDateTime documentation re timeSpec conversion.Mitch Curtis2012-09-032-2/+52
| | | | | | | | | Clarify the documentation for setTimeSpec, toTimeSpec, toUTC and toLocalTime, to be clear on which ones return the same point in time, and which one simply changes the timezone. Change-Id: Ic47dd8876ea733f1df0f64eca5bdf00d04f8d0d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Need #include <string.h> to use memcpyShawn Rutledge2012-09-031-0/+1
| | | | | | | | Caused a compile failure in qtmultimedia. Change-Id: I73652d93848c2005c0132d24bb0d269e7b450396 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>