summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QItemSelectionModel: Make selectedIndexes a Q_PROPERTY.Stephen Kelly2015-03-272-1/+7
| | | | | | | | | | With reasoning similar to commit v5.5.0-alpha1~124 (Make the QItemSelectionModel::selection a property., 2015-02-25), this should be a property instead of a Q_INVOKABLE so that it can participate in persistent bindings. Change-Id: Ib9a7900dfa3acbd6f9f7df7b6f00deb6e05c3937 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add QT_Q_FLAG for Qt::MouseEventFlag.Friedemann Kleint2015-03-271-0/+1
| | | | | | | Enable formatting it in debug streaming operators. Change-Id: I92efb70471653bbd4d91588f333ee132b392bf0c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Re-generate the time zones database from CLDR v.27Konstantin Ritt2015-03-271-954/+974
| | | | | | | [ChangeLog][QtCore] QTimeZone data updated to CLDR v.27 Change-Id: Ic25229d86ac4752ed70f5a729fd33c1a837241dc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix time offset for several time zonesKonstantin Ritt2015-03-271-6/+6
| | | | | | | They are in UTC-03:00, not in UTC+03:00 (just a C&P typo). Change-Id: Ib342b65967404b8756c62953258b17421b9245af Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update CLDR to v27Konstantin Ritt2015-03-274-4519/+4952
| | | | | | | | | | | | | + A bunch of fixes in the locale data + New scripts from Unicode 7.0 + New locales - Some locales disappeared (aa_DJ, aa_ER, st_LS, ss_SZ, swc_CD, tn_BW) - Some locales lost their contents (i.e. en_Dsrt_US) [ChangeLog][QtCore] QLocale data updated to CLDR v.27 Change-Id: Iba8c7884f8087e577cbb25a8fc106dd7bd3ebb5d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [QLocaleData] Extract defaultContent localesKonstantin Ritt2015-03-271-1795/+1822
| | | | | | | | | | | | | | This adds some locales missing in the common/main/ directory, namely: bss_CM, cch_NG, dv_MV, gaa_GH, gez_ET, ha_Arab_NG, iu_Cans_CA, kaj_NG, kcg_NG, kpe_LR, ku_Latn_TR, mi_NZ, ms_Arab_MY, mn_Mong_CN, nds_DE, ny_MW, oc_FR, sa_IN, sid_ET, tk_Latn_TM, trv_TW, tt_RU, ug_Arab_CN, wa_BE, wo_Latn_SN See http://www.unicode.org/reports/tr35/tr35-info.html#Default_Content for more info. Change-Id: I6b3082d370a21da64fbd5e72ab6344e1d7a6a3c9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Re-generate Unicode data tablesKonstantin Ritt2015-03-272-6294/+7321
| | | | | Change-Id: I289537377f37c36f88de9662bbb7ad108bdc9383 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update Unicode data up to v7.0Konstantin Ritt2015-03-273-4/+53
| | | | | | | | | | | | | | | | | | | | | | * Two newly adopted currency symbols: the Azerbaijan manat and the Russia ruble * Pictographic symbols (including many emoji), geometric symbols, arrows, and ornaments originating from the Wingdings and Webdings sets * Twenty-three new lesser-used and historic scripts extending support for written languages of North America, China, India, other Asian countries, and Africa * Letters used in Teuthonista and other transcriptional systems, and a new notational set, Duployan For more details, see http://www.unicode.org/versions/Unicode7.0.0/ The Properties struct's .*Diff members were narrowed down to signed 15 bits and the unicodeVersion has been expanded to 8 bits. [ChangeLog][QtCore] Unicode data updated to v.7.0 Change-Id: I93ab6f79fa3b05f61abc7279f1d046834c1c1a0b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add Qt::WindowFlag to signal that maximizing should cover full screen geometryTor Arne Vestbø2015-03-272-0/+10
| | | | | | | | | | | | | | | | | | | | | | | Normally when maximizing a window it will cover the available geometry of the screen, as represented by QScreen::availableGeometry(), which typically excludes status/menu bars and application launchers. On some platforms it may still be possible to place windows in the areas of the screen that are outside of the available geometry, but this will result in the window being partially covered by (possibly) transparent system UIs. The new flag allows the user to specify that when maximizing the window it should try to cover as much as possible of the screen geometry (in contrast to going full screen, which would typically hide any system UIs). For iOS this is a common use-case, as the status bar is transparent, and the user-interface guidelines for iOS7 and up recommend taking advantage of the full screen space, while keeping any user-interaction elements still inside the available geometry of the screen. Change-Id: I86d7fc937916d9cae245f7a3f9ae46abd92cdd29 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QDateTime: remove unused parameter from localMSecsToEpochMSecs()Marc Mutz2015-03-261-10/+4
| | | | | | | | ...a namespace-level static function. The ok parameter was never set by any caller. Change-Id: I668f78fe198f09fb0a9a52c10c8dea2fab070653 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDate: further optimize toString()Marc Mutz2015-03-261-11/+23
| | | | | | | | | | | | Factor the TextDate and ISODate legs into separate functions and replace a chain of QString::arg() with QStringBuilder. Saves 76B in text size. More importantly, restores (N)RVO for these code paths. Change-Id: I8b99bb672f5a4b5506d53487eca189d48b4025e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove extra semi-colons: clang doesn't like itThiago Macieira2015-03-261-8/+8
| | | | | | | qdebug.h:373:81: error: extra ';' outside of a function is a C++11 extension [-Werror,-Wc++11-extra-semi] Change-Id: Iee8cbc07c4434ce9b560ffff13cb759805b64dfc Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Update strtoll and strtoull from upstream FreeBSDThiago Macieira2015-03-262-215/+55
| | | | | | | | | | | | | | | There appears to be at least one fix, related to sign- or zero-extension in the call to isspace(). So it's a good idea to update again. This also brings the behavior to match strtoll and strtoull on Linux, including the fact that strtoull will parse negative numbers. For that reason, qstrtoll and qstrtoull are now wrappers that try and keep the behavior that we used to have. This update also changes the code from a 4-clause BSD license (bad) to a 3-clause BSD license (good). Change-Id: I73b01b02ebd1551bf924599d52284ad25cc1def0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make QAbstractProxyModel API invokable.Stephen Kelly2015-03-251-4/+4
| | | | | | | | | With reasoning similar to commit v5.5.0-alpha1~123 (Make some QAbstractItemModel API invokable, 2015-02-25) Change-Id: If0bf3a756ab1031f906c5bf9c823aafae4c3873c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Stephen Kelly <steveire@gmail.com>
* QAbstractItemModel: Make the match() method Q_INVOKABLEStephen Kelly2015-03-251-4/+4
| | | | | | | | With reasoning similar to commit v5.5.0-alpha1~123 (Make some QAbstractItemModel API invokable, 2015-02-25) Change-Id: I77c72f7bb856a1eee966b45950384fe03a8eaac6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QDateTimePrivate: replace out parameters with return-by-value in getDateTime()Marc Mutz2015-03-252-35/+35
| | | | | | | | | | | | Compilers don't like out parameters. Effects on Linux GCC 4.9 stripped release builds: text -584B data +-0B relocs +-0 Change-Id: Ie00c89b9edaced3a6adeb2707734c8f5238e67c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime: prevent aggressive inliningMarc Mutz2015-03-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function getDateFromJulianDay() is simple arithmetic, but still ~400 bytes in executable size. Yet GCC inlines this everywhere I looked, which makes some sense, as different users of the class only use parts of the return value and the optimizer has a field day removing all that dead code. However, that function has only one conditional, so presumably it executes at full pipeline speed and it doesn't matter that it calculates too much in some cases. More important is to use the I-cache more conservatively. That's what not inlining the function achieves. The function returns its result in registers and doesn't spill registers when called (at least on AMD64), so the effect on runtime should be negligible. Effects on Linux GCC 4.9 stripped release builds: text -1536B data +-0B relocs +-0 Change-Id: Ia16838102d29ad67ee5efdc8b7b0a26f2f921df1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTime: optimize toString()Marc Mutz2015-03-251-3/+1
| | | | | | | | | | | | | Instead of using a QString::arg() cascade, which creates tons of temporaries, use good 'ol sprintf(). Effects on Linux GCC 4.9 stripped release builds: text -308B data +-0B relocs +-0 Change-Id: I348577491d1399b5040f7ed9e9f6b111a9528e5d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Micro-optimize QDate::{long,short}{Day,Month}Name()Marc Mutz2015-03-251-32/+28
| | | | | | | | | Save one return statement per function. I don't see why the compiler can't fuse these itself, but apparently it cannot, since this transformation saves 72B in text size. Change-Id: I3a661456554bf451ed53110ad546946ff7b84ec5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDate: don't spend code size covering the impossible caseMarc Mutz2015-03-251-1/+1
| | | | | | | | | | | | All other similar functions in QDate just return an empty string in case none of the switch labels would trigger (which would now cause a compiler warning, after removing the default case label), so do that here, too. Saves 44B in text size. Change-Id: I80ee4975082706adcd15fe89511d08c67e149324 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDate: remove some useless default case labelsMarc Mutz2015-03-251-8/+0
| | | | | | | | | | | | They're pure whitespace, since in each case there is a fallback after the switch, anyway, and their presence prevents compiler warnings about unhandled enumeration values in switch statements, which is nice-to-have, when adding to the enum, eventually. No change in executable code size. Change-Id: I77aecaeff990601f957ec9ee827eff5ead25aaa1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVarLengthArray: Do not require operator!= for element comparisonKai Koehne2015-03-231-5/+4
| | | | | | | | | | The documentation claims that operator== is needed, not operator!=. While at it, we can also replace the loop with std::equal, which might even allow STL implementations to choose a hand-optimized version of the algorithm for C++ builtin types ... Change-Id: I988b326d6af3b767526952e303468e18ff6594f9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QVarLengthArray: Add initializer_list constructorKai Koehne2015-03-232-0/+22
| | | | | | | | | | | | | | | | | Implement an initializer_list constructor, which was probably just forgotten so far. Technically this is a SC incompatible change, since QVarLengthArray<int> array = {10}; will now create an array with one element 10, instead of an empty array with a reserved size of 10. Anyhow, keeping the inconsistency with the STL / other Qt containers here would certainly do more harm than good in the long run. Task-number: QTBUG-45047 Change-Id: I4675880f93e141181250939942fa32300916b0e3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Report a correct Unicode version used by QtKonstantin Ritt2015-03-232-3/+3
| | | | | | | The version bump was forgotten in edfce46a6c0406af749ca7ef659df6315e36cd5d Change-Id: I99501bb314baab68f037417db4b3b14e11f2de02 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Build bundled PCRE copy as qt_helper_libKonstantin Ritt2015-03-201-6/+2
| | | | | | | We already have an infrastructure for that. Change-Id: I9110b74dcf7f93362586687da6f112e72cb663a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Introduce icu_dependency.priKonstantin Ritt2015-03-201-13/+2
| | | | | | | Simply to hide the magic bahind the scenes. Change-Id: I69a159eb14712e68117f10e78745bdfbad46b6f2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Sort the entries in QDir by using the QDateTime::msecsTo()Andy Shaw2015-03-201-1/+1
| | | | | | | | | By using the QDateTime::msecsTo to do the sorting it means that if there is support for a precise time on the file system then this ensures it sorts correctly. Change-Id: I00528596908bba7b586aeffe5b0aa81019ff5722 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix QVector constructor documentationKai Koehne2015-03-191-1/+1
| | | | | Change-Id: Ib16df599553e482e981573afadf3c3f4e70ed5b1 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* Make sure remove() doesn't corrupt the json objectLars Knoll2015-03-181-1/+1
| | | | | | | | | When using non latin keys, remove() could cause corruption of the json object. Task-number: QTBUG-42270 Change-Id: I7305e57ebb78630a9bf68bc4f831a6d1646abb79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix support for iso8859-16 when compiling with ICULars Knoll2015-03-182-2/+5
| | | | | | | | | ICU doesn't support iso8859-16, so we need to fall back to the Qt codec for this encoding. Task-number: QTBUG-45053 Change-Id: I9754cf098c906fe8a75363a3d090029543cd0e35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QCollator::compare documentationLars Knoll2015-03-182-8/+8
| | | | | | | | | We don't guarantee -1, 0 and 1, but simply negative 0 or positive numbers. This is in line with e.g. QString::compare() Task-number: QTBUG-42860 Change-Id: I6009b2eb732ae3b4726cec06ec0eacc2c46a3c93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QJsonValueRef::toVariant()Lars Knoll2015-03-182-0/+6
| | | | | | | | to better mirror the API of QJsonValue Task-number: QTBUG-43686 Change-Id: I83edecf5226d44980a8a442a512a13ab9b2ac6a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix source incompatibility while connecting signals with forward declared ↵Olivier Goffart2015-03-181-4/+4
| | | | | | | | | | | | | | | | | | | arguments QObject::connect tries to determine if the arguments are registered metatypes. This used to work even for arguments that were forward declared. But now, the metatype system tries to call QtPrivate::IsQEnumHelper<T>::Value to know if it is registered. That fails on gcc if T is forward declared. Apparently gcc needs to know the full type of T to pass it in the ellipsis function, even within a sizeof expression. So change the ellipsis expression to a template one. Task-number: QTBUG-44496 Change-Id: I7fa07bd3cde470b134c2ec53b0d581333d16a6f1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDebug operator for Q_FLAG when the QFlags itself is registeredOlivier Goffart2015-03-181-2/+8
| | | | | | | | | | | | Currently, IsQEnumHelper<T> returns true also if QFlags<T> is registered as a Q_FLAG. But this is going to be changed in the next commit. For the QDebug operator to continue to work even when the QFlags<T> is registered and not the T, we need to take it into account in the QEnableIf condition Change-Id: If1fcffd133aa20ba95a07e2bfaaa308896ab01b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Don't cause a malloc before calling GetLastError()Andy Shaw2015-03-166-11/+11
| | | | | | | | | | When creating a string it would cause a malloc which would reset GetLastError() so we need to ensure that GetLastError() is the first thing it calls if a Windows API call fails. Task-number: QTBUG-27765 Change-Id: I5cc4ce59aa1f03a0ec978fe54949a7931a225d52 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QLockFile: use QCoreApplication::applicationName.David Faure2015-03-162-2/+2
| | | | | | | | | | | Unlike qAppName, it doesn't require a QCoreApplication instance, making QLockFile usable in destructors of global statics. This also uses the value passed to setApplicationName if called rather than always argv[0]. Change-Id: I40446aba410db42d7cfe6b4408878faf435246f7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix build of forkfd_qt.cpp on FreeBSDAlex Richardson2015-03-151-1/+1
| | | | | | | | | | | | | | | | | | | It no longer compiled after 614f37c8b559a722538c58dd1f65229cfca7d35b due to the following: - forkfd_qt.cpp set _XOPEN_SOURCE to 500 - It then includes qatomic.h which include sys/cdefs.h (the FreeBSD header that parses and sets _POSIX_C_SOURCE, _XOPEN_SOURCE and other macros) - sys/cdefs.h redefines _POSIX_C_SOURCE to 199506 due to _XOPEN_SOURCE's value - Several libc symbols expected to exist by libc++ are hidden due to _POSIX_C_SOURCE's value and the build fails Setting _XOPEN_SOURCE to 700 ensures that _POSIX_C_SOURCE is set to 200809 which is required for libc++ to work correctly Task-number: QTBUG-45006 Change-Id: Iac93220d19ca5ab9ba8ac61a79748252283c3c47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString: Don't force unrolling of the tail loop if optimizing for sizeThiago Macieira2015-03-151-7/+7
| | | | | | | | | | | | | This is quite good if space isn't a constraint: the unrolling ensures faster execution and limits the number of iterations. But it's long. Both Clang and GCC set the predefined macro __OPTIMIZE_SIZE__ if -Os is in effect. ICC does not; MSVC is untested but there are no macros for this effect listed in its documentation. Change-Id: I1a800c709d3543699131ffff13c48919a9a79ec3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* forkfd: make only one of forkfd or spawnfd be compiledThiago Macieira2015-03-141-0/+7
| | | | | | | We only ever use one, never both. Change-Id: Iee8cbc07c4434ce9b560ffff13caf94c05dba338 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QVariant: Fix wrong return type in toPersistentModelIndex()Gabriel de Dietrich2015-03-122-2/+2
| | | | | | Change-Id: I53afa712d38ec6a41fce77474acccf9c587ea6a8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix quadratic behavior when parsing very large objectsLars Knoll2015-03-121-2/+4
| | | | | | | | | | QVarlengthArray is not a good data structure when you need to dynamically append to it without knowing its size in advance, as it reallocates on every append. Use a QVector instead. Task-number: QTBUG-44737 Change-Id: I68eab11eacd8368e94943511874aead823a149ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add missing \since tag for the documentation for loopLevel()Andy Shaw2015-03-121-0/+1
| | | | | Change-Id: Ib5e23c40d9258db7986ddb892def207808ac89c7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Track modifications of white space in QString::simplified().Friedemann Kleint2015-03-121-4/+6
| | | | | | | | | | The existing check fails to detect the case where white space characters other than the space character are replaced by space characters without the length actually changing and returns the original string. Task-number: QTBUG-44936 Change-Id: Ice6faa975f8b41f185c76f6d0d4ff81603e25eb3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make Q_ASSERT_X also check its argument for validityThiago Macieira2015-03-122-2/+1
| | | | | | | | | | | | Commit ebef2ad1360c80ad62de5f4a1c4e7e4051725c1c did it for Q_ASSERT, but I somehow forgot to do it for Q_ASSERT_X. Do it now. This includes the fix from 9a3d7adaad367417aaa2e1ee1f996185a881a4b5 to silence a Clang warning. Change-Id: Iee8cbc07c4434ce9b560ffff13ca066a5b5ab5d4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Doc: Json classes added to list of implic.shared classesNico Vertriest2015-03-115-0/+5
| | | | | | Task-number: QTBUG-44053 Change-Id: I52a1b6c413aaa594bfee9bf7484c3d0ce7e9c9fa Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Clarify limitations of QCoreApplication::libraryPaths()Ulf Hermann2015-03-111-5/+16
| | | | | | | | | If you call libraryPaths() before constructing a QCoreApplication, intersting things may happen. Task-number: QTBUG-38598 Change-Id: I2861746277e391ede9e921e4a8ad825007e25fa0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Clean up QLibraryInfoPrivate::findConfiguration()Ulf Hermann2015-03-111-22/+22
| | | | | | | | | | | | | | The QFile::exists() check in the end was redundant if one of the !QFile::exists() had returned false before. By always doing the positive check we can get rid of it and also avoid excessive nesting. Also, on OSX the isEmpty() clause probably never evaluated to true, with the effect that qt.conf in an applicationDirPath was never found. Change-Id: I750735741b707d3e98c4bf6c6b9558618e1fcc59 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Doc: corrected snippet issue in Defining Plugins docNico Vertriest2015-03-112-2/+3
| | | | | | Task-number: QTBUG-44629 Change-Id: I70e20209b6b33f7adcbcafc6b7d959660cdc2e87 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: QDataStream Serializing doc errorNico Vertriest2015-03-111-2/+12
| | | | | | Task-number: QTBUG-44707 Change-Id: I0ccfb47fe0b2464c5b7331040ea658ace3442366 Reviewed-by: Martin Smith <martin.smith@digia.com>
* CMake: Fix regression with quoted OPTIONS parameterAndré Klitzing2015-03-111-1/+1
| | | | | | | If a parameter contains quotes the check for "-binary" fails. Change-Id: I27148b590d85291a93f1992dfd277fb857bec6e2 Reviewed-by: Stephen Kelly <steveire@gmail.com>