summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Implement QDataStream operator for QCborSimpleValueJędrzej Nowacki2018-10-033-14/+21
| | | | | | | That allows us to remove custom handling in QMetaType. Change-Id: Ic09fb96e1a05c6897803811d70aebbc6ea6e4f2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Implement QDataStream operator for main CBOR classesJędrzej Nowacki2018-10-036-1/+79
| | | | | | Change-Id: Ib3b68b1963625432c68d02be3bf2ec3c4baf1104 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Implement QJsonValue data stream operatorJędrzej Nowacki2018-10-032-0/+81
| | | | | | Change-Id: I9cff40828ab68b4e2474da506b2da2cfed479f2c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* Implement QJsonObject data stream operatorJędrzej Nowacki2018-10-032-0/+22
| | | | | Change-Id: I8528f18ad72828cd97a5ac00e1925958acf73f9f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Implement QJsonArray data stream operatorJędrzej Nowacki2018-10-032-0/+22
| | | | | Change-Id: Ib3c83c06605f0fe39108855bc3416bf453cab043 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Handle errors when streaming QJsonDocument through QDataStreamJędrzej Nowacki2018-10-031-1/+5
| | | | | | Change-Id: I96df896d446e89dc4f9733a6cc6cec61a6826a1f Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Finish qmetatype migration to type switcherJędrzej Nowacki2018-10-031-434/+190
| | | | | | | | | | | | | | | | The matatype should not keep manually maintained list of stream operators. The patch adds automatic detection for all builtin types so load and save functions pick the right delegate automatically. This change exposed some existing anomalies: - char is enforced to be signed while it seems that just calling the operator directly does not have that feature. - [unsigned] long type is always upgraded to [unsigned] long long - QCborSimpleType doesn't have the data stream operators while metatype is able to stream it through casting Change-Id: I51178d6acd97d0585a6089e30ddd6acb2a29af54 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Implement QJsonDocument data stream operatorsJędrzej Nowacki2018-10-033-2/+27
| | | | | | | Task-number: QTBUG-48313 Change-Id: I25ebeed94c9340819e925a7740bbee21de73a0ca Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOffsetStringArray: fix compilation error with clang-802.0.42Mikhail Svetkin2018-10-011-1/+1
| | | | | | | | error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] return StaticString<N1 + N2>{ls[I1]..., rs.data[I2]...}; Change-Id: I30f5f50378f1faed648d092eefc5edb46e940239 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-0118-80/+62
|\ | | | | | | Change-Id: Ic8cdb1c2b7c0a786b1313b6c3a3bf7e9ec288712
| * Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-3017-74/+46
| |\ | | | | | | | | | Change-Id: Iaa438d14357be1bf75bb645cb8d3245947c055b8
| | * Fix QUrl::matches for when removing authority parts (other than host)Thiago Macieira2018-09-291-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUrl::RemoveAuthority is RemoveUserInfo | RemovePort | 0x10, so the condition if (options & QUrl::RemoveAuthority) would match if any of the other bits for the username, password or port were set, which meant we would skip the host comparison. Ditto for username and RemovePassword. [ChangeLog][QtCore][QUrl] Fixed a bug that caused QUrl::matches to incorrectly compare two URLs with different hostnames or different usernames as equal, if certain QUrl::RemoveXxx options were passed. Change-Id: I015970a03b874898bba7fffd155856ab9d6cb1be Fixes: QTBUG-70774 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * QCommandLineParser: Ensure that an option text ends with a newlineAlexander Akulich2018-09-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change we inserted newline only if an option has a description and ended up with an arbitrary long line with all options. [ChangeLog][QtCore][QCommandLineParser] Fixed a bug that caused the help output to show two options or more in the same line if the options didn't have a description. Task-number: QTBUG-70174 Change-Id: Id54b9ae13ee596869e4dc14e09301aea19eed2f8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Android: fix log output patternLuka Modric2018-09-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove hardcoded android log pattern as this is already part of the message to match behavior on other platforms. Task-number: QTBUG-69450 Change-Id: I529b550114a2164beafe305f8392891c4ead88f0 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Modernize the "filesystemwatcher" featureLiang Qi2018-09-2714-62/+32
| | | | | | | | | | | | | | | | | | Change-Id: If030b56ad97e047d89d442629262b4839df306d4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | Windows: Fix QDir::drives() to no longer list ejected mediaFriedemann Kleint2018-09-291-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a check using GetVolumeInformation() (modeled after QStorageInfo::ready) within a SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX scope. Remove old #ifdef used for Windows CE. [ChangeLog][QtCore][QDir] On Windows, QDir::drives() no longer returns drives whose media were ejected. Fixes: QTBUG-69029 Change-Id: I2d4a32e9281ccf3c0f2ebfa427122609aa4f327f Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | Fix namespaced buildJędrzej Nowacki2018-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | It is not allowed to include files within Qt namespace. Change-Id: I8b87cdc7093bdf0129acca263316f8ea3a037a90 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Expose type id from QMetaType instanceJędrzej Nowacki2018-10-012-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is not reason why it should be kept in secret. Not having public accessor forces a user code to keep a copy of the id. Visible for example in QML (QQmlValueType). Change-Id: If0de65fb8d91bcd50880c66b5f87c68f6d888dd3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Use a std::vector instead of a QVector in QMimeDatabasePrivateIvan Komissarov2018-09-292-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using std::vector saves a bit c++ code when using range-for loop over the vector. Besides, no shared copies created anymore which is a bit faster. Change-Id: I564306ed9ac907e9f32f59b33ed15c027a59b4eb Reviewed-by: David Faure <david.faure@kdab.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-2925-111/+159
|\| | | | | | | | | | | Change-Id: I6083c3e61b7dbe188f83676f7e7bb268e5ccf2f3
| * | Fix QXmlStreamWriter xmlns attribute placementhjk2018-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Done-by: Eugenio Rustico Change-Id: Ibd6aa6cc8be9090a4fad4f96628086d8a498b8e0 Fixes: QTBUG-63434 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into ↵Liang Qi2018-09-2713-72/+78
| |\ \ | | | | | | | | | | | | refs/staging/5.12
| | * | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-2713-72/+78
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/widgets/util/qcompleter.cpp Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
| | | * Modernize the "datestring" featureLiang Qi2018-09-2410-49/+52
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2236a456fe3758d9054b22e36fe6316f3522d533 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * Modernize the "textdate" featureLiang Qi2018-09-244-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic0b6f13e17c301ed66d6a8297c242086c94ac87d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | * Export qt_open64 from QtCoreThiago Macieira2018-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other libs use qcore_unix_p.h. qopenglprogrambinarycache.cpp:function QOpenGLProgramBinaryCache::load(QByteArray const&, unsigned int): error: undefined reference to 'qt_open64(char const*, int, unsigned int)' Change-Id: I44e7d800c68141bdaae0fffd155675d15eded2e4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eric Lemanissier <eric.lemanissier@gmail.com>
| | | * Clarify docs regarding the states of a QFutureWatcher with no future setAndy Shaw2018-09-241-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-55554 Change-Id: I49b475a95d8ee65864cfa6d1024cb17cfe648b43 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | | * Fix integer overflow in very long sections in ELF objectsThiago Macieira2018-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The source is an ElfXX_Off, which is an unsigned 32- or 64-bit. That means any section bigger than 2 GB would cause an overflow when we assigned in m_stringTableFileOffset = strtab.offset; Change-Id: Ib47c56818178458a88b4fffd15546bd47a89894e Fixes: QTBUG-70560 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | Doc: Add link target to fix QDoc warning in Qt DeclarativePaul Wicking2018-09-271-0/+1
| |/ / | | | | | | | | | | | | Change-Id: Iddaef1ce3f739c3dfb98eb87430fe85e3b2bd01c Reviewed-by: Martin Smith <martin.smith@qt.io>
| * | Fix erroneous use of errno with qErrnoWarningThiago Macieira2018-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the error code to be used with qErrnoWarning is not errno, but Windows's GetLastError(). Obviously, right? So don't pass errno to it, just let it get the error message straight from qt_error_string(), which will use GetLastError(). Change-Id: I44e7d800c68141bdaae0fffd155619c93e3f3dab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Add tests for decoding too-short UTF-8 sequencesThiago Macieira2018-09-253-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were handling this properly, but not testing them. I guess we weren't testing because the condition is a valid intermediate state, so hasFailure() is correct it returning false. Testing inspired by the bug reported in https://github.com/intel/tinycbor/issues/137 Change-Id: Ib47c56818178458a88b4fffd1554ecfdd0af637e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Tracepoints: trace signal activationGiuseppe D'Angelo2018-09-252-2/+23
| | | | | | | | | | | | | | | | | | Change-Id: I1ef8074178386166157d9b3416fd432014585857 Reviewed-by: Rafael Roquetto <rafael@roquetto.com> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
| * | Correct documentation about the datastream versionsAndy Shaw2018-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This amends f5fe9fc5a4136a696f07c4bd3567d85348ec42d9 Change-Id: I1d21f5b5f4896a11376f37ed0e39f00f2214c67b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | Doc: Fix QEasingCurve code snippetsTopi Reinio2018-09-252-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ff2a71e3 accidentally removed a code snippet used in documenting EasingCurve::EasingFunction. This commit restores it and fixes other minor issues in QEasingCurve code snippets. Change-Id: Ib19f602a4abbca3511d3d26c5f6da4910f7104a3 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * | Fix some infelicities in the Q(Date|Time)+ docsEdward Welbourne2018-09-251-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | Some of the claims made were not strictly acurate. Change-Id: Ia7c83ce44257acce32814c0bbb3b787bb6b8596b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | No-thread: prevent double delete of QThreadPrivateMorten Johan Sørvig2018-09-251-0/+1
| | | | | | | | | | | | | | | | | | Change-Id: Ie34c06ad798be6bd91f5c356051daaa72800c20a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix a few overrides in Qt CoreAlessandro Portale2018-09-2510-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removes redundant 'virtual' from function declarations. Clang Tidy's modernize-use-override check reports: warning: 'virtual' is redundant since the function is already declared 'override' CppCoreGuidelines say: C.128: Virtual functions should specify exactly one of virtual, override, or final Change-Id: I9a4bdd6cc041d46ae64b25597ba4f7268ac4c2b7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-251-0/+9
|\| | | | | | | | | | | Change-Id: I65e4457a218f333161e9e72735b62fc821475f45
| * | doc: add note about QAbstractEventDispatcher::wakeUp() for {Unix,Glib}Gatis Paeglis2018-09-161-0/+9
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-70229 Change-Id: I3efc20baf0cfeb79834f3f2b7aa5a4cb049542f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | doc: Fix several miscellaneous qdoc warningsMartin Smith2018-09-242-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This update fixes several qdoc warnings for things like incorrect links to section titles, missing enum \value commands, and incorrect \fn signatures. Change-Id: I35ae18810d386a78ffa87d674489c7ad8c5fa215 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Liang Qi2018-09-163-5/+10
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-163-5/+10
| |\| | | | | | | | | | | | | | Change-Id: Ic3ffc44d61448a44353c004b9f6703786cc1b213
| | * | Fix binary compatibility with old generated moc filesOlivier Goffart2018-09-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1c623bc6d1c0a7ca52d81ca72c64f36898b3e12c introduced a new QMetaObject revision, which change the size of the QMetaEnum data. When looking up QMetaEnum in a QMetaObject, this size need to be checked for every different QMEtaObject from the hierarchy, not just the first one. Change-Id: I6f0d3982329822e15e284aef9b141d4c9ab351b9 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | Windows QPA: Dispatch skipped touch/pen events if compression is offRomain Pokrzywka2018-09-141-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the hardware produces events faster than the app can consume between two updates, Windows automatically coalesces them into a single message with the latest touch/pen pointer state and coordinates, effectively compressing those events. But the pointer API also supports querying and retrieving the skipped individual touch and pen frames. There are cases where keeping all the events generated by the hardware is desired, especially for pen events where having the most sampled points available is critical to precisely rendering curves. Qt already defines application attributes to control event compression for general high frequency events and for tablet events in particular. Use them on Windows also to control whether to retrieve skipped frames. [ChangeLog][Windows] The application attributes AA_CompressTabletEvents and AA_CompressHighFrequencyEvents are now supported on Windows 8 and above for touch/pen input, with the same defaults as on X11 (compress touch events, don't compress tablet events) Task-number: QTBUG-44964 Task-number: QTBUG-60437 Change-Id: I1b11a043e2d71ee502895971fafb3a46306a89d8 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | Doc: Remove extra \a command causing QDoc macro expansion errorPaul Wicking2018-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I453a68a579e4fd519616cd1a9f934501b01ef44c Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | | Fix return value of GLib event dispatcher socketNotifierSourceCheckAndreas Hartmetz2018-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The wrong return value didn't seem to result in observable bugs. Change-Id: Iaba74d0acd4352af9be70498a7d5556bb1e02f5f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | GLib event dispatcher: fix iteration in source check in error caseAndreas Hartmetz2018-09-161-2/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | It was accessing the deleted current element in a potentially reallocated container. Change-Id: I81d86410907b7b0c20c2edc62ad256315606bc96 Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QOffsetStringArray: fix compilation error with ICC18Mikhail Svetkin2018-09-141-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | error: expression must have a constant value static constexpr const auto messages = qOffsetStringArray( Change-Id: I80a6bf5b83f99a8325511ac8a14e0c9819e3d2b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Make updateSystemPrivate() local to qlocale.cppEdward Welbourne2018-09-113-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not thread-safe so should only be used within systemData()'s locked code. This eliminates the last callers of it by making it a local function of the compilation unit, exposing a method from QSystemLocale() to get round its use of private parts. Make the constructor for QSystemLocale only stomp its _systemLocale global if previously unset, but let instantiation still clear globalLocaleData.m_language_id, so that it can be used as a way to trigger an update to system locale data. Change-Id: I908dca9fd30bbf20f42321ab8f9094f2fa37b7b0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-113-4/+16
|\| | | | | | | | | | | Change-Id: I1df9adea124326ef7c7802839eb93efc4302b287