summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix docs of qAbs to have the correct function signature.Jan-Arve Saether2012-09-031-1/+1
| | | | | Change-Id: I984032dc58387ae8f28318beeb053af28ccc8885 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QStandardPaths should still work without desktop serviceJing Bai2012-09-031-4/+0
| | | | | | | | | To fix a compile problem when QT_NO_DESKTOPSERVICES is defined. We should enable QStandardPaths on Mac even without desktop service, since it doesn't rely on desktop service and it is used in other files. Change-Id: I29267ebfe81b79c598043f8287fd2bb419573570 Reviewed-by: David Faure <faure@kde.org>
* QStringList::join: add an overload taking a single QCharMarc Mutz2012-09-032-5/+17
| | | | | | | | | | | | | | This overload avoids the needless heap allocation that the traditional overload incurs due to the implicit QChar -> QString conversion involved there. In order to share the implementation between the two overloads, QStringList_join now takes the separator as a (Char*,int) tuple instead of as a QString. Change-Id: I92961f13a3f19099de2a6e2df9f4789a12fc83a0 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the package macros from qglobal.hThiago Macieira2012-09-031-4/+0
| | | | | | | It's the wrong place to have these. Change-Id: I3b716317ba02ea2baf0f7053c8b16128e4c88e17 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change SChar to metatype id 40.Stephen Kelly2012-09-032-5/+4
| | | | | | | | | This fills the gap left by QWidgetStar, making the sequence between FirstCoreType and LastCoreType contiguous, which some benchmarks assume to be true anyway. Change-Id: I2d5d202b6246a9065fdf77f325a4a04279dbe4b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix docsFrederik Gladhorn2012-09-034-12/+14
| | | | | | Change-Id: Id57b7932afb89fe9d3f4f6e6c3b558265475d77b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* doc: fix example linkFrederik Gladhorn2012-09-031-1/+1
| | | | | Change-Id: Ie0235281c3a4d5e5dadc6e5823bbf722b7ca411f Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* checkForCodecs is not used when QT_LOCALE_IS_UTF8 is definedJiang Jiang2012-09-021-1/+1
| | | | | | Change-Id: I3d82863cbd123dbf73eb8f5721ef9294e6365de6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Don't reference widgets/widgets in example doc.Frederik Gladhorn2012-09-011-3/+3
| | | | | Change-Id: Ie1fe516f75ca8c1b2233dc6bb2b887b55593e730 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Doc: Fix docbuild when not using -developer-build.Casper van Donderen2012-09-011-2/+2
| | | | | | | | https://codereview.qt-project.org/#change,33974 only works in the case of a developer build. Not in a normal prefix build. Change-Id: I3a3e5029cefaa9f83c5deb71665f0efa9d812819 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* add macro wrap for QXmlStream related codeJing Bai2012-08-312-0/+13
| | | | | | | | To fix a compile error when QXmlStream is removed by defining macro, but it is still used in some files. Change-Id: I776c799732212b7401767440448248fc7b5dc480 Reviewed-by: David Faure <faure@kde.org>
* Don't set empty CMAKE_TOOLCHAIN_FILE or CMAKE_BUILD_TYPEStephen Kelly2012-08-311-2/+12
| | | | | | | | | | | | | | | The CMake Visual Studio 10 generator generates an include() for the empty CMAKE_TOOLCHAIN_FILE, causing the errors in the bug. There may be other remaining errors to cause the Windows CMake build to fail with that generator, but this patch is an improvement anyway - there is no point in setting empty strings as values for those variables. Task-number: QTBUG-27087 Change-Id: I68cce9e3dce07835db5f42777ac02d440f90f967 Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Force QT_NO_ICONV on win32:!win32-msvc*Lukas Geyer2012-08-311-1/+1
| | | | | | | | | | | | This behaviour was changed in Ide9800f6 to suppress macro redefinition warnings for MSVC, but MinGW has iconv support and therefore configure does not set QT_NO_ICONV, which prevents compilation on win32-g++ as QIconvCodec does not support Windows. Change-Id: Ic3c4ccceb3eaf9542c95b0c27847ca5ab51849b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Fix the name of the arguments of qAtan2 to match std::atan2Thiago Macieira2012-08-312-6/+6
| | | | | | | | | There is no change in functionality, just swapping of the names x and y. The std::atan2 function uses (y, x) in that order, so we should too. Task-number: QTBUG-27090 Change-Id: I7d4597a6c6909f574c517033f5d49fe17b7a7ead Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Document the purpose of QDateTimeParser::cachedDay.Mitch Curtis2012-08-311-0/+13
| | | | | | | | | It's useful to know what this member variable is used for, since there is very little documentation for QDateTimeParser, which makes maintenance yucky. Change-Id: I9ecf5aa5ef0b5d778ceb858c323e3bab1ebaa7dc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>