summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Add missing interpolator for unsigned int.Jan Arve Saether2013-09-101-0/+3
| | | | | | | | | | Note that there are also some missing interpolators for char, short, long long etc, but those are most likely less common than unsigned int. Task-number: QTBUG-33268 Change-Id: I469cc4f38eaa48171307b737b15efea2cd98fe5e Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Deprecate QFontDatabase::supportsThreadedFontRendering()Konstantin Ritt2013-09-101-5/+0
| | | | | | | | As of 5.0, this always return true. Change-Id: If225c7219e283da97e870f0d66a87b21c3cacfc0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add detection for C++11 explicit conversion operators.Marcel Krems2013-09-091-0/+5
| | | | | Change-Id: Ib33049b538f072079c0f840bc10adf0899217199 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Normalise and deduplicate paths for XDG_DATA_DIRSMartin Klapetek2013-09-091-0/+11
| | | | | | | | | | | | | | | | | | This removes the trailing slashes from the path and then removes dirs set twice in XDG_DATA_DIRS (always removes those from the right side). There's no use for duplicit dirs in XDG_DATA_DIRS because if whatever is being looked up is not found in the duplicated dir the first time, it won't be there the second time. Currently it causes troubles for example in mime types, where it returns duplicated mime types as the same dir is searched multiple times. For obtaining the original value of XDG_DATA_DIRS, one can use qgetenv("XDG_DATA_DIRS"). Change-Id: Ic4f8ef6c6fe096555948e318899207e9d4ca8289 Reviewed-by: David Faure KDE (deprecated, use kdab instead) <faure@kde.org>
* Remove qCopy usages from QListGiuseppe D'Angelo2013-09-091-3/+4
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ib667321884b2f06de6f440f2b8e329361f926ce1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Metatype: Remove the need for runtime-registration of 3rd party containers.Stephen Kelly2013-09-093-100/+98
| | | | | | | | | Replace that need with a macro so that registration of the container helper conversions is done at the time of registration of the container (usually when it is put into a QVariant). Change-Id: I823fb3fdbce306ebc9f146675ac43724cec678d5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Windows logging: Fix check for console applications.Friedemann Kleint2013-09-092-15/+32
| | | | | | | | | | The old code used to check for usingWinMain, which is not set when Qt is used within a DLL. Try to check for presence of stderr by checking for a console window or a redirected stderr-handle. Task-number: QTBUG-32044 Change-Id: I87893c3438f5e92d73488e9c25b95cbfeaacc1f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QDateTime - Split QDateTimeParser into a separate fileJohn Layt2013-09-096-1923/+2045
| | | | | | | | | | | | | Not strictly needed yet, but helps to reduce the size of QDateTime and make it easier to read a major re-write. Imposes separation of parser which will be needed if we make QLocale always use the system backends, after which only QDateTimeEdit widget will need the parser and it can be moved there. Change-Id: I6a5e9a3edf6fe8ff2340af6afecd8ba4bfde9dd4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QMetaMethod and QDBusMetaObject: Give public access to signal methodsCaroline Chao2013-09-091-3/+2
| | | | | | | To be consistent with signals which are public since Qt5. Change-Id: I633077e37d0851b118c22da0681e8b8b1892ddbb Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove qSort usage from QSettingsGiuseppe D'Angelo2013-09-091-1/+2
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I5aabfd2dd4fa48a4d94407ca444591e9df7b981d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove qSort usages from QStringListGiuseppe D'Angelo2013-09-091-6/+6
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I38d220142d4f5e580503cc10f804e0d16f418cc1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Constify QDirSortItemComparator::operator() (used for sorting)Giuseppe D'Angelo2013-09-091-2/+2
| | | | | | Change-Id: I7149ec2fdabdfcfa7d6f28b1105da154a333096f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix cross-compiling V4 for Android on WindowsEskil Abrahamsen Blomfeldt2013-09-091-0/+2
| | | | | | | | | | The QT_POINTER_SIZE is not detected on Windows. We can safely set this to 32 bit for Android since we only support 32 bit builds on Windows. Task-number: QTBUG-33397 Change-Id: I891cf01444d1ba9216ed2c3ba33ef40c61d50dd9 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* 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>