summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add qtwidgetsglobal.h and qtwidgetsglobal_p.hLars Knoll2016-07-14258-24/+383
| | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. That header will later on #include the configuration file for Qt Widgets. For now it defines the Q_WIDGETS_EXPORT macro for this library. Change-Id: I6698989b952b9bac94d086d9f219e03c000f7d53 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Clean up qwindowdefs_win.hLars Knoll2016-07-145-15/+14
| | | | | | | | | | | | | The file lives in Qt Gui, but declares a few methods from Qt Core and Widgets. All of those methods are actually mostly unused, not documented and pretty trivial. This patch removes the last few places the methods got used and removes the declarations. The implementations should get removed in a future release. Change-Id: I2b609c29f403d2ed4824ff4346008be08b3fd067 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove dead codeLars Knoll2016-07-141-16/+0
| | | | | | Change-Id: I4ece8a94c1ce8cac65fb1d90bb18267e22a4ea7a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* qdoc: Documentation for qFuzzyIsNull() is addedMartin Smith2016-07-142-6/+18
| | | | | | | | | The two versions of this function are now documented on the global variables page. Change-Id: Iee95e251d616f6c8b1b42458d23cbf64a70a5315 Task-number: QTBUG-50654 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* HTTP2 - autotestTimur Pocheptsov2016-07-147-1/+1332
| | | | | | | | | | Add autotest for QHttp2ProtocolHandler. This patch contains a very simplistic "in-process HTTP2 server" for testing the protocol's basic logic/flow control/error handling and emulating possible scenarios. Task-number: QTBUG-50956 Change-Id: Ie02d3329c5182277a3c7c84f1bae8d02308e945d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add qHash(QHash) and qHash(QMultiHash)Marc Mutz2016-07-143-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | The hash function is carefully designed to give the same result as the straight-forward implementation of qHash(unordered_map), which we'll probably add at some point, namely: std::accumulate over a container of std::pair. This is one reason to use std:: and not QPair in the implemen- tation of qHash(QHash). The other is that qHash(QPair) uses a bad hash combiner, which may xor out the 'seed' from the result. We can't fix that until Qt 6, but the qHash(std::pair) overload uses the well-known boost::hash_combine algorithm (implemented in Qt as QtPrivate::QHashCombine), so we can use that. I also trust std::pair to work without problems with reference template arguments, while QPair only very recently gained a very basic auto-test for reference parameters. [ChangeLog][QtCore] Added qHash() overloads for QHash, QMultiHash. Change-Id: I90879d8a99cf1aadb6e84ecc0c3704f52f3691da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the -version-override command line arguments in configure.exeLars Knoll2016-07-141-15/+0
| | | | | | | | | | | Those are not supported on Unix configure and are not something we should support IMO. Also cleaned up setting a QMAKE_QT_VERSION_OVERRIDE variable in qconfig.pri that's never used. Change-Id: I470483660118368abf7bd8aba4a53a25d9ab8a40 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Add qtdbusglobal.h and qtdbusglobal_p.hLars Knoll2016-07-1439-35/+105
| | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. QtDBus already had such a header, but its name (qdbusmacros.h) was not in line with what's being used in all other modules. So add a qtdbusglobal.h header, and turn qdbusmacros.h into a a forwarding header to that new global header file. Change-Id: Ib7eb2484c7b8b588eb89bf3290cb6c1c7c391fe2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Factor out qt_getImageText() and qt_getImageTextFromDescription()Anton Kudryavtsev2016-07-146-53/+44
| | | | | | | ... and re-use them in QImageReader, QJpegHandler, QPngHandler. Change-Id: Iec89e47205f3c420e1e7eb4a2d3c1fbfe887fd8c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Replace EXTRA_LIBS with EXTRA_LIBDIR and EXTRA_FRAMEWORKPATHLars Knoll2016-07-134-15/+17
| | | | | | | | Now that -l and -fw options are gone, using a combined EXTRA_LIBS makes no sense anymore and only complicates things. Change-Id: Ic12bf482f3bed041aff7f0891f008b1f34ae2b4d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove -fw and -l command line argumentsLars Knoll2016-07-134-14/+1
| | | | | | | | | These arguments were nonsensical, as they would lead to every single Qt module linking to those libraries. This was probably some left-over from old times, when Qt was just a single library. Change-Id: I0343a6df270fd0d2efa5333ba4e457670f5d0910 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Set QMAKE_DEFAULT_INC/LIBDIRS on MSVCLars Knoll2016-07-131-0/+5
| | | | | Change-Id: I19b60e178e7cc3cc5f73e5a9f252f886c8678c3d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Don't error out on preprocessor concatenation of two stringsLars Knoll2016-07-132-5/+8
| | | | | | | | | | | | | "foo" ## "bar" doesn't make a lot of sense, but MSVC allows them (although gcc errors out on them). Simply ignore the ## in this case instead of aborting with an error. Fixes parsing of the Windows winsock2.h header. Task-number: QTBUG-54560 Change-Id: I84cd5fbb56a006cf379430708c955cf0da475cff Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add missing logical bitwise operators to the little-endian storage classesSimon Hausmann2016-07-131-0/+16
| | | | | | | These make the (future) usage in declarative even more convenient. Change-Id: I12c0fec1ea843d8acd2ee3fdf2a2189939bebd95 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Handle QVariantHash in QJsonDocument::fromVariantAllan Sandfeld Jensen2016-07-132-1/+43
| | | | | | | | | | | It absence is just an oversight. The patch also adds test for the valid inputs of the method. [ChangeLog][QtCore][QJsonDocument] fromVariant can now take a QVariantHash argument. Task-number: QTBUG-39751 Change-Id: I7e051413f930023db3cbb81452e77c56a7ceffe8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add "We mean it." warning to HTTP2 protocol handler headersFriedemann Kleint2016-07-134-0/+44
| | | | | | | | | | | | QtNetwork: qtbase/src/network/access/http2/http2frames_p.h does not have the "We mean it." warning QtNetwork: qtbase/src/network/access/http2/http2protocol_p.h does not have the "We mean it." warning QtNetwork: qtbase/src/network/access/http2/http2streams_p.h does not have the "We mean it." warning Amends change b2c0f9713c1c39bc3214df49f0d2b44bcc84d790. Task-number: QTBUG-50956 Change-Id: Ia266a4f8625d89745b3a2dcaff6b15a712e9cadc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* QtSql: Fix qmake warning about missing qsql.hFriedemann Kleint2016-07-131-1/+0
| | | | | | | | qsql.h is superseded by qtsqlglobal.h. Amends change 7331d22c6f55b6cd76bcf05bc70ebac69cf51eb9. Change-Id: I6391f10c17649d52c598b24ea71f453a43ca1b0f Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Avoid busy wait in qnetworkreply testJędrzej Nowacki2016-07-131-11/+1
| | | | | | Change-Id: Ie45d298cbb2ec3854d3ca3d416b9ebeff6d363f1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Call disconnectNotify() when disconnecting a QMetaObject::ConnectionUlf Hermann2016-07-122-4/+24
| | | | | | | | In all other forms of disconnecting this is done. We also know the signal index, so there is no reason not to do this. Change-Id: Ic8b042cd8f45dbff74b42ee30c384a84bef78b20 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Remove SSL includes from qhttpnetworkconnection_p.hFriedemann Kleint2016-07-124-13/+6
| | | | | | | | | | | | | | | | | On Windows, qsslcontext_openssl_p.h pulls in an unsanitized windows.h, causing the infamous min/max macros to be defined, requiring a #define NOMINMAX in qhttp2protocolhandler.cpp. This in turn breaks the MinGW developer build since that has NOMINMAX globally defined: access\qhttp2protocolhandler.cpp:40:0: error: "NOMINMAX" redefined [-Werror] Remove the include, adding missing forward declarations and include directives to the source files. Change-Id: Ic1c2c711d87599b15ad6e2d87eae7153a44ace47 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Improve performance of Qt::mightBeRichText by using QStringRefRobin Burchell2016-07-114-4/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | I noted this taking around 1% of QtQuick Text creation with a few simple bindings which is quite considerable, so hopefully improvements here will add up gradually. Also add a benchmark measuring changes: Test | From | To | Details +--------------------------------------+----------------+----------------+-----------------------+ mightBeRichText:br-invalidspace | 14466.00 instr | 10563.00 instr | -26.98% FASTER! :) mightBeRichText:br-nospace | 18581.00 instr | 14635.00 instr | -21.24% FASTER! :) mightBeRichText:br-space | 18470.00 instr | 14377.00 instr | -22.16% FASTER! :) mightBeRichText:documentation-header | 16336.00 instr | 12992.00 instr | -20.47% FASTER! :) mightBeRichText:empty | 2618.00 instr | 2618.00 instr | more or less the same mightBeRichText:invalid closing tag | 11102.00 instr | 7159.00 instr | -35.52% FASTER! :) mightBeRichText:no tags | 12503.00 instr | 8581.00 instr | -31.37% FASTER! :) mightBeRichText:simple | 17316.00 instr | 14074.00 instr | -18.72% FASTER! :) mightBeRichText:simple2 | 14394.00 instr | 10745.00 instr | -25.35% FASTER! :) +--------------------------------------+----------------+----------------+-----------------------+ Overall result | -201.81% :) Change-Id: I1817a69959d176b381bcbf27b72bb751885c3e9b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QCoreWlanEngine: Remove calls to deprecated API in macOSGabriel de Dietrich2016-07-111-10/+10
| | | | | | Change-Id: I606c865e980b8ab8a8027c4b6d322c0bbd05c992 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* QWidgetBackingStore: Fix build with QT_NO_OPENGLAndy Nichols2016-07-111-0/+2
| | | | | | | A define moved out of the #ifndef QT_NO_OPENGL scope. Change-Id: I41c943b97f165b5171581e01f3a4b2d3fb25747e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Make QDateTime's default constructor not allocate memory on 32-bitThiago Macieira2016-07-092-27/+46
| | | | | | | | | | | | | | | | | Commit fb498a651990df5e04c75a9076da28e875c43f73 introduced the short datetime optimization, but it accidentally removed the optimization from Qt 5.7 that made QDateTime's default constructor not allocate memory. Instead of bringing back the Q_GLOBAL_STATIC that was used, let's use the short date time optimization on 32-bit too. The CanBeSmall constant remains false on 32-bit systems, but judicious non-use of that constant in a few functions allows 32-bit systems to use the optimization. We still say that any date/time value is "unsmall", as there's no sense in calculating whether the date is between 1970-01-01 and July 14 of the same year. Change-Id: I413d458307aa46469b80fffd145a9db0325c08cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QTimer: add support for <chrono> functionsThiago Macieira2016-07-093-18/+245
| | | | | | | | | [ChangeLog][QtCore][QTimer] Added support for std::chrono duration objects for QTimer methods, like QTimer::singleShot and QTimer::setInterval. Change-Id: I87e17314d8b24ae983b1fffd14536e24d5b12424 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* HTTP2 protocol handlerTimur Pocheptsov2016-07-0821-12/+2688
| | | | | | | | | | Add HTTP2 support in QNAM - QHttp2ProtocolHandler + aux. classes. [ChangeLog][QtNetwork] Added support for HTTP/2 protocol Task-number: QTBUG-50956 Change-Id: I3a119cfbb1fb3118d9003225f5e54b46ae2829b6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNativeSocketEngine/Win: fetch connection parameters only onceAlex Trotsenko2016-07-081-40/+44
| | | | | | | | Exclude sections of code that relate to 'Connecting' state from being executed in 'Connected' state. Change-Id: I5e7d28b74dcd9c87c37b4871cc90afc200b2dab9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* rectify opengl configuration under windowsOswald Buddenhagen2016-07-083-37/+18
| | | | | | | | | | | | | | | | | | | angle is an implementation of es2 and thus autodetected if es2 is requested. but this also means that it is actually *not* mutually exclusive with dynamicgl - quite the opposite. express that sensibly in the build system. this implies that we will now get sensible messages from configure if angle is not detected while building with dynamicgl. furthermore, this simplifies the handling of defaults, removes the unnecessary case in checkAvailability() (checkAngleAvailability() is always called directly), fixes the complaint on winrt if gles2 is disabled, and avoids redundant checks for the purpose of obtaining an error message. Change-Id: I3373f0ad7d5484d1bac8dbde3f8ee6fca89ebcb8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix log messageLars Knoll2016-07-081-1/+1
| | | | | Change-Id: I0192d3a3073038d98e72ce7abd3bf1ecae002989 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* fix command line option for avx512Oswald Buddenhagen2016-07-081-1/+1
| | | | | | | we need to map it to the avx512f feature. Change-Id: I565b5bd256003aa6f80180b0e06c04bad8ea68af Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix compile-examples command line optionLars Knoll2016-07-081-1/+1
| | | | | | | Map it to the correct feature name. Change-Id: I7e2128e66a575ae7e562018b766d25f85c64c961 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove qt_mac_execute_apple_scriptGabriel de Dietrich2016-07-072-64/+0
| | | | | | | | Not only these functions are never called, one of them also calls deprecated APIs. Change-Id: I172043b7059316e029a853e48e7f22f08e2a8b69 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* QStringRef: add chop()Anton Kudryavtsev2016-07-073-1/+62
| | | | | | | chop() was missing in the API. Change-Id: I15af86c8f218cf159b8ce19bbeb2ffa6201f98cf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QPointerUniqueId::numeric() is constShawn Rutledge2016-07-072-2/+2
| | | | | | | | Obviously it returns a copy of the number, and anyone who has a const QPointerUniqueId variable will need this accessor to be const. Change-Id: Ib224a4dfca5d0f71f2fa4f6f6197b2fb2cdb9410 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* winrt: Fix launch as background taskMaurice Kalinowski2016-07-061-27/+86
| | | | | | | | | | | | In case a background task wants to use Qt, winmain is not invoked. Neither can we create the same objects like winmain do (as in creating a application view). Instead runOnXamlThread uses the thread pool enabling the event loop to run successfully. Task-number: QTBUG-54396 Change-Id: Ia3ba23ed0fd6cd7d2ed8d43675e88073b9aec8b5 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows/QProcess::startDetached(): Don't always create consoleKevin Funk2016-07-061-1/+3
| | | | | | | | | | | | | | | | | | | | | Make QProcess::startDetached() behave exactly like QProcess::start() when it comes to the behavior of whether to create a new console window or not. Before this patch, QProcess::startDetached() created a new console window (CREATE_NEW_CONSOLE flag of CreateProcess()) unconditionally. Instead, use the same rules for deducing whether to show an console window or not as QProcess::start(). [ChangeLog][QtCore][Platform Specific Changes] QProcess::startDetached() changed behavior on Windows: it no longer creates a new console window unconditionally, instead it passes the same creation flags to CreateProcess as QProcess::start(). Task-number: QTBUG-53833 Change-Id: I0e3d4b161fb5cb94cfbbd21fb4edb8417ab543fd Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix/adapt the uses of {to,set,from}Time_t in the qtbase source codeThiago Macieira2016-07-0617-40/+36
| | | | | | | | | Move those to the equivalent {to,set,from}SecsSinceEpoch(), except for the cases that did QDateTime::currentDateTime{,Utc}().toTime_t. Those are best implemented with QDateTime::currentSecsSinceEpoch(). Change-Id: Ib57b52598e2f452985e9fffd145a366c92cfda20 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* UIKit: Handle UIPress eventsMike Krus2016-07-061-0/+53
| | | | | | | | | | | On tvOS the system will deliver UIPress events for touch gestures on the remote such as pressing up, down, left, or right, as well as for the dedicated hardware buttons, such as menu or play/pause. We deliver these as Qt key events when possible (the siri, volume and home button can't be handled). Change-Id: Id4bd4960e3036a7b8b67cf5b9e9d653f233dc4af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Added bsdmouse and bsdkeyboard input plugins for FreeBSDOleksandr Tymoshenko2016-07-0512-0/+1555
| | | | | | | | | | | | | | | | bsdmouse implements basic and extended level of psm(4) protocol. On extended level only x and y coordinates are used. Plugin specification is device filename, default value is /dev/sysmouse. bsdkeyboard implements keyboard input for raw terminal mode. Plugin specification is device name, normally /dev/ttyv[0-9], if not provided STDIN file descriptor is used. [ChangeLog][Platform Specific Changes] Added bsdmouse and bsdkeyboard input plugins for FreeBSD. Change-Id: I3c7b6f5cc22b4f1e405d56efc8b7ef2daa1dac74 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove unused command line optionsLars Knoll2016-07-051-18/+0
| | | | | | | | -embedded is dead since 187ea846a6, and -arch is obsolete since ba6952b28 (both 2012). Change-Id: Ife107c4f2ea26f62ce675544b7ad5c06630f5631 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove the -target command line optionLars Knoll2016-07-057-45/+2
| | | | | | | | | | | This was only used to specify XP as a target which is not supported on 5.8 anymore. Clean up all associated special handling in the mkspecs and pro files. This effectively reverts change 10a0ac75. Change-Id: I420d73002912989f1a5be961a2d09277ec4a4425 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Get rid of the qt_no_framework setting in the CONFIG variableLars Knoll2016-07-052-3/+2
| | | | | | | It's only used in one place, where it's actually not required either. Change-Id: I5766d2b5f0c1083bbd58a9b9fb07cc67bbd46a94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Make more configure tests work on WindowsLars Knoll2016-07-051-12/+18
| | | | | Change-Id: I87d775de7b6d790a44bbc3c9598d617ad57d9d4c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Add qtsqlglobal.h and qtsqlglobal_p.hLars Knoll2016-07-0323-11/+85
| | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. QtSql already had such a header, but its name (qsql.h) was not in line with what's being used in all other modules. So add a qtsqlglobal.h header, deprecate qsql.h and turn it into a a forwarding header to that new global header file. Change-Id: Ibaeb95b008cf08ba062cbfe8a3f4d3bf79294390 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Add qtnetworkglobal.h and qtnetworkglobal_p.hLars Knoll2016-07-03107-21/+243
| | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. That header will later on #include the configuration file for Qt Network. For now it defines the Q_NETWORK_EXPORT macro for this library. Change-Id: I9c45d425baf881c431ed71fd457c7feb2c123855 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-03285-99/+408
| | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. A similar scheme and naming convention is already being used for many other modules (e.g. printsupport, qml, quick). That header will later on #include the configuration file for Qt Gui. For now it defines the Q_GUI_EXPORT macro for this library. In addition, add a private global header, qtguiglobal_p.h, that can later on include the private config header for Qt Gui for things we don't want to export to the world. Change-Id: Id9ce2a4f3d2962c3592c35e3d080574789195f24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* tst_QDBusConnection: add a test for a regular signal connectionThiago Macieira2016-07-022-16/+61
| | | | | | | | | | | | | Since it's a slot with the same name as an existing one, this test also verifies that QDBusConnection::connect() can properly distinguish between overloads. This test moves the receiver out of the main class, just to be sure that we don't leave connections behind when tests are run (like slotsWithLessParameters did). Change-Id: I87e17314d8b24ae983b1fffd1453ad81952c49aa Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Move QElapsedTimer to src/corelib/kernelThiago Macieira2016-07-0212-10/+14
| | | | | | | | | | | | It's really a kernel functionality, as it implements really low-level functionality and it's used by the event dispatcher. It was in tools/ only because QTime is. QDeadlineTimer is also coming to kernel/. Change-Id: Ifea6e497f11a461db432ffff14491c6d9b839eb0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CoreLib: use QStringRef to optimize memory allocationAnton Kudryavtsev2016-07-0215-37/+46
| | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. Change-Id: Id9ea11b16947220cd27787c0b529de62d10b6c26 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* ItemModel: Extract Method isVariantLessThan()Anton Kudryavtsev2016-07-024-64/+42
| | | | | | | | | | | | | As noted in comments, QSortFilterProxyModel and QStandardItemModel duplicate code to compare QVariant; extract this into a separate method they can share. Since there is only one common suitable header for both files, the method was placed in qabstractitemmodel.cpp Change-Id: I82bb4a2d6084059b8a70a8d556c16f1a29f4f686 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>