summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Android: Fix unused variable/argument warningsEskil Abrahamsen Blomfeldt2013-09-092-0/+7
| | | | | | | There were a bunch of these in Android specific code. Change-Id: Icf6cda40302171810c1b559f9d442fba6444a3a5 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Fix unused static function randTLS() warningEskil Abrahamsen Blomfeldt2013-09-091-1/+1
| | | | | | | | | Match the preprocessor conditions for using the randTLS() function in the place where it's defined, otherwise we will get a warning for this. Change-Id: I0fa20f2671da618e31f30a4536f55bc680131e4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: Fix QString(char*) warnings in qlogging.cppEskil Abrahamsen Blomfeldt2013-09-091-2/+3
| | | | | | | | | Both context.file and context.function are already char*, so using qPrintable() here would first convert them to QString() with the scary constructor and then back again. Change-Id: I822655c37fb8b9baaddc8f95d7c1842519859a0e Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Add first/last accessors to QMapMathias Hasselmann2013-09-082-27/+77
| | | | | | | | | | | | | | | QMap explicitly sorts its entries by key value. For an ordered container it's (often?) useful to access the first or last entry, for instance to quickly compute the next key of the mapping. The first entry is easily accessible by the STL begin() method, but for accessing the last entry pretty ugly iterator arithmetics must be applied: *(end() - 1). With their first() and last() accessors the container classes QList and QVector provide a much nicer method of accessing extrema, so for consistency this syntactical sugar also should be applied to QMap. Change-Id: Ibd544acbad8c3ac16f12a1e74362207ea1694375 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Change template parameter name of qt_check_for_QOBJECT_macroOlivier Goffart2013-09-071-1/+1
| | | | | | | | | | | | 'T' is a fairly common name for template parameter. So if we use it in Q_OBJECT, it means you cannot use it as a template parameter name of the object itself (otherwise it does not compile as it shadow a template parameter) Use a more explicit name instead Change-Id: Id317c5b11d87f370eed6d1dc0b0142c9eb4994db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reimplement qBinaryFind in terms of std::lower_boundGiuseppe D'Angelo2013-09-071-2/+3
| | | | | | | | qBinaryFind is not going to be deprecated now. This commits prepares the deprecation of the qLowerBound function. Change-Id: I6131582c981c151d632ad44305fe602c76735e14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime - Change debug output to ISO FormatJohn Layt2013-09-062-3/+22
| | | | | | | | | | | Change the debug format from Qt::TextDate to a more detailed ISO style format including better time spec output. [ChangeLog][QtCore][QDateTime] The debug datastream is now an ISO-like format instead of Qt::TextDate Change-Id: Iddbb8199c3bfbf7bca845482617e7a85da43259d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move the preprocessor iterator for Qt smart pointers with the others.Stephen Kelly2013-09-061-8/+10
| | | | | | | Use it to forward declare the types. Change-Id: I48d9e32dcf02471d197a82502d96d60807d11d57 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make the automatic 1arg and 2arg metatype macros work with namespaced Qt.Stephen Kelly2013-09-061-4/+13
| | | | | Change-Id: I64aa3cacd0cf57235ad43f089716765b384ef412 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix the automatic declaration of smart pointer types.Stephen Kelly2013-09-061-6/+34
| | | | | | | | | | | | Before this patch, qRegisterMetaType<QSharedPointer<double> >("QSharedPointer<double>") without a metatype declaration fails to compile, whereas it works with Qt 5.1 (ie, before commit e9a69c3ba928bd88974563b386b000ad6583f969) Change-Id: I9408f711c9df810ff29b879b7696dab81c1160f1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add C++11 features supported by the Intel Compiler 14.0Thiago Macieira2013-09-061-0/+9
| | | | | | Change-Id: Ib9789223d487c29c5ce0830afa1f74b66ea6adfe Reviewed-by: Guillermo A. Amaral <gamaral@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QDateTime - Documentation clean-upsJohn Layt2013-09-061-27/+33
| | | | | | | | | Clarify the documentation with regard to what locale is used for names, fix missing hour, timezone and am/pm format code details. Change-Id: Ic2d507a89a005427bba0df6368364b47bcf58756 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime - Clean up Qt::DateFormat formatting and parsingJohn Layt2013-09-061-309/+271
| | | | | | | | | | | | | | | | Clean-up the implementation of toString() and fromString() methods in QDate, QTime and QDateTime code to be more consistent in ISODate and TextDate behavior, especially when handling TimeSpec. Reformat some code so all methods are consistent in appearance and function to make maintenance easier. This changes some corner-case behavior in TextDate and ISODate, but this either fixes bugs or makes the behavior match the documentation. Change-Id: I457aa1d7cd4f448cd9f8a2e80ec635f3cb98e58c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QDateTime - Remove incorrect year range checkJohn Layt2013-09-061-6/+0
| | | | | | | | | The limit on formatting a year outside the range 0 to 9999 only applies to Qt::ISODate formatting, not to general date formatting. Change-Id: Ifc971961412c190d721f23627982283e13d526b6 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime - Switch to using the QLocale date formatterJohn Layt2013-09-051-197/+9
| | | | | | | | | | Switch the implementation of toString() methods in QDate, QTime and QDateTime to use the QLocale formatter, and remove the now redundant QDateTime formatter. Change-Id: Ie4f17c8a6e31acde3ce066f19835bb2b83351ce8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QLocale - Improve date formatterJohn Layt2013-09-052-77/+63
| | | | | | | | | | | | | | | | Modify the QLocale date formatter to be consistent with the QDateTime date formatter and able to replace the QDateTime formatter in a subsequent change. Fix the treatment of negative years. The internal QLocale::timeZone() has been replaced by the QDateTime::timeZoneAbbreviation() to ensure the correct tz for the date/time is used rather than always the current system default. Change-Id: I2ef26700856e2e69b979069226aa504ecbb50071 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* add QProcess::InputChannelModeOswald Buddenhagen2013-09-055-10/+75
| | | | | | | | | | | this enables forwarding standard input from the parent process. Change-Id: I7ee72b9842acc96320d4da693b95dd15d9a7b4d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* add QProcess::Forwarded{Output,Error}ChannelOswald Buddenhagen2013-09-054-6/+36
| | | | | | | Change-Id: Ifc5ed20c38f3228ef25c28681f296d0456b61abe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* make the pipe setup code less convolutedOswald Buddenhagen2013-09-051-16/+21
| | | | | | | Change-Id: Ied870c892cc3dbbf24a3d9416f685e51a74e5c17 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* never create a console for command line tools launched from gui appsOswald Buddenhagen2013-09-051-3/+6
| | | | | | | | | | | | | | | commit 219b0d217 fixed forwarding of stdio to a console. unfortunately, it also forced the creation of a console in the first place if there was none, which is not part of the contract. instead, give the child process a window (== console) only we we already have one. this can be done irrespective of our channel mode, which has the nice side effect that an explicit redirection to a console would now also work. Change-Id: Id25cab5da1ac1cc8ce452127ff95bac8d0a0fea8 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* QVariant: Make it possible to extract a QObject* from a wrapper without ↵Stephen Kelly2013-09-051-1/+3
| | | | | | | conversion. Change-Id: I3a054d87d12e08d72dd4c77b6d467dc63f9a2231 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QVariant: Don't crash when doing user-defined conversion to QObject*Stephen Kelly2013-09-051-0/+2
| | | | | | | | | The destructor of the ConverterFunctor calls unregisterConverter. If the instance is static (as it is in qmetatype.h), then this method can be called after the QGlobalStatic has already been destroyed. Change-Id: I33b70734cbe09dfa888e887280c349e43ad1b855 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QVariant::canConvert: Use the old type when checking for QObject* conversion.Stephen Kelly2013-09-051-1/+1
| | | | | Change-Id: I8450c74ecfdeee96e73b82438c5ef83c3acf4444 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Simplify the smart pointer metatype templateStephen Kelly2013-09-051-17/+6
| | | | | | | | | | Don't use ## concatenation to create an identifier. That won't work for types in namespaces: Q_DECLARE_SMART_POINTER_METATYPE(QtPrivate::FutureSmartPointer) Change-Id: I876ea93d817724005efc28413f09c01623c2a7a1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* remove redundant conditionOswald Buddenhagen2013-09-051-3/+2
| | | | | | | ForwardedChannels implies that both stdoutReader and stderrReader are null. Change-Id: I9d5f02d3a1eac62316a6016b90c612d716ecaafc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* qpluginloader: fix static build (on iOS)Richard Moe Gustavsen2013-09-051-0/+2
| | | | | | | | | | Since the function locatePlugin is unused when building Qt statically, the build fails on iOS. This patch will ensure that we only define it for shared builds. Change-Id: Idf3c3246d3cac94a3c001cc261f326e9a396aa31 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix Clang 3.3 warning on using an undefined inline functionThiago Macieira2013-09-051-12/+16
| | | | | | | | | | | | | | | | Clang doesn't like forward-declared inline functions. qmetatype.h:70:29: error: inline function 'qMetaTypeId<QtMetaTypePrivate::QPairVariantInterfaceImpl>' is not defined [-Werror,-Wundefined-inline] inline Q_DECL_CONSTEXPR int qMetaTypeId(); ^ qmetatype.h:1463:30: note: used here const int toId = qMetaTypeId<QtMetaTypePrivate::QPairVariantInterfaceImpl>(); ^ Change-Id: I1454af5cce56512f0b3d63cfaf51a536207fc511 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Revert "Implement move-ctor and move-assignment-op for QScopedPointer"Stephen Kelly2013-09-052-38/+0
| | | | | | | | | | | | | | | This reverts commit 5b9006bbdba7dcab01b8e640554a7d7a4b64f76b. Also revert "Doc: Enable documentation for QScopedPointer's rvalue ref functions" This reverts commit 5f8416ec659b134db90df7e7f857db77fd27b6ab. Adding a move contructor to QScopedPointer makes no sense, because moving means 'escaping the scope', which breaks the fundamental point of QScopedPointer. Change-Id: I4ac1b108bf199af6e436fa1629aa2d3b93c27724 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add an advisory interruption mechanism to QThread.Corentin Jabot2013-09-055-1/+67
| | | | | | | | | | | | | | To ease interruption of long running tasks, a new method QThread::setInterruptionRequested() can be called. The task can check QThread::isInterruptionRequested() and act upon it by stopping itself. These methods are designed to replace the use of a global variable and other hacky ways to stop a task running in another thread. Change-Id: I17622dd60d2262078210e7e4294ad6c53a6dc179 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* ICC supports __builtin_unreachable(), so use itThiago Macieira2013-09-051-1/+1
| | | | | | | __assume(0) is not strong enough in some cases. Change-Id: Ifac42a58af891d636e3e0b2fa476da787bd0d1ce Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* qdatetime: fix build on iOSRichard Moe Gustavsen2013-09-051-1/+1
| | | | | | | Change-Id: I7c6225c54a863f29aa747caf2f57303b2bf6c398 Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove qFind usages from QLinkedListGiuseppe D'Angelo2013-09-041-1/+3
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I00f5a2bf96e969b85d63479bab6497d6e1bd17b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove qCopy from QVarLengthArrayGiuseppe D'Angelo2013-09-041-1/+2
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I854f64ebd6d83718b1bcb3c70a1697e38243296c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove qSort usage from QIODeviceGiuseppe D'Angelo2013-09-041-1/+3
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: If9fbcaf714f10659a3571f9e55ab913a85538038 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Get rid of qSort usages in QDirGiuseppe D'Angelo2013-09-041-2/+2
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I951a2b9b16fce9d6d29cca0012cdeb06cad79fce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fixed information about the default modules when using qmake.Jerome Pasion2013-09-042-0/+6
| | | | | | | | | -Qt GUI and Qt Core are included by default -Added entry about disabling "gui" in the .pro file -Information placed in snippet files Change-Id: I1c70dcac9ca2d443e9f658e2a27727d24a25cae1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Unhide QObject::parent() from QAbstract{Table,List}model.Milian Wolff2013-09-041-0/+18
| | | | | | | | | Both overwrite QAbstractItemModel's parent taking a QModelIndex which hides the QObject::parent() method. This must be explicitly forwarded like e.g. QAbstractItemModel is doing. Change-Id: I6149ae365cd8467248f4ca79a3cb898e62068b10 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QPluginLoader: add 'staticPlugins' functionRichard Moe Gustavsen2013-09-045-15/+66
| | | | | | | | | | | | | | | | | | Currently there is no API to extract the meta data from static plugins. This is needed in e.g QtDeclarative for loading static module plugins. This patch moves the 'staticPlugins' function from QLibraryPrivate into QPluginLoader, and makes it public. As such, we now also export QStaticPlugin. Since an application developer cannot do much with raw metadata, we add a new function QStaticPlugin::metaData() that returns the QJsonObject for the plugin. The old metaData function is renamed 'rawMetaData'. Change-Id: Idb0bf9ad8ebb13340565512e1998b26e762a357e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix ICC warnings about functions declared but not usedThiago Macieira2013-09-042-1/+3
| | | | | | | | | | | | | | | Added Q_DECL_UNUSED for the function used in Q_ASSERT; removed the functions that really weren't used and added the #ifdef for the function that was only used under #ifdef. qmetaobjectbuilder.cpp(93): warning #177: function "priv" was declared but never referenced qobject.cpp(2349): warning #177: function "check_and_warn_compat" was declared but never referenced qpathsimplifier.cpp(141): error #177: function "<unnamed>::Rational::isValid" was declared but never referenced qtextengine.cpp(2584): error #177: function "<unnamed>::QScriptItemComparator::operator()(const QScriptItem &, const QScriptItem &)" was declared but never referenced Change-Id: I89a140d59211f10ecd88d751f0bcc0ea2fedff7f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QDateTime - Add api for Time Zone AbbreviationJohn Layt2013-09-032-0/+107
| | | | | | | | | | | | | | | | | Add a new method to return the time zone abbreviation for the current time spec. For LocalTime this is the abbreviation returned by mktime. This new method will later be used in changes to the date formatter and QTimeZone. Note this change does not implement WinCE support. [ChangeLog][QtCore][QDateTime] Add method timeZoneAbbreviation() to return effective time zone abbreviation. Change-Id: I265a5e96c72eb7236974f80f053f1fb341e3c816 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix typo in qwaitcondition_unix.cppDavid Faure2013-09-021-1/+1
| | | | | Change-Id: Ifc1fdaaa05275b6f68a868a2fc8ccc332e5355ce Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Added applicationState() to QGuiApplication.Yoann Lopes2013-09-021-0/+1
| | | | | | | | | | | We only had the QApplicationStateChangeEvent to know about the application state. Added a function and a signal to offer a more convenient way to query the current state. Change-Id: I926aac0b3b53bd285df5825aff5b4c37ae863d03 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-0214-37/+84
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-2714-37/+84
| |\ | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| | * Revert "Fix compilation for Android ARMv5"Eskil Abrahamsen Blomfeldt2013-08-271-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9fa1bdeeb2bca6f9ba370fce594a47a066a7e81a which is no longer needed because the Android NDK now contains a toolchain without the bug for which it was a work-around. Task-number: QTBUG-31051 Change-Id: I601ba2fccb927ee7e818644de4474700e2eec8f1 Reviewed-by: BogDan Vatra <bogdan@kde.org>
| | * Soft-deprecate obscure feature on property getters returning pointersThiago Macieira2013-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | moc actually generates the right code for getters returning a pointer to the type in question, or a reference to the type (a reference, one would assume, does not require code changes). However, the same extension is not valid for the setter: it can't receive the new value by pointer. Therefore, let's soft-deprecate the feature by removing its existence from the documentation. Task-number: QTBUG-33091 Change-Id: I27844213e051ec7fafeb4744089a0653aea6f1f3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | * Doc: Add Q_OS_ANDROID macroTakumi Asaki2013-08-231-0/+7
| | | | | | | | | | | | | | | Change-Id: If428f0b7c1540e809f756f426a6d222acea5d310 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| | * Add json/savegame example.Mitch Curtis2013-08-228-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There wasn't any example documentation besides json.html, which doesn't actually describe usage of the various QJson* classes. This also makes each QJson* class page link back to json.html. Change-Id: If5ad6493d2728df0cec7bdbbc5790f0b755f816c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * CMake: Allow specifying a TARGET in invocations of macros.Stephen Kelly2013-08-211-29/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward-port of 9ce60ff509c4ff27fe861fc5b2080f50897a68c4 (Qt4Macros: Allow specifying a TARGET in invokations of macros., 2013-02-26) from cmake.git. This causes the INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS to be used from the specified target when running moc. Change-Id: I868a35ade3c6b059e64d226291cf2046709d86d4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Populate INTERFACE_LINK_LIBRARIES property in the cmake files.Stephen Kelly2013-08-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This is new in CMake 2.8.12 and replaces the old properties matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>. Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>