summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* offscreen plugin: eradicate Q_FOREACH loopsMarc Mutz2016-08-272-9/+10
| | | | | | | | | | | | | | | | | ... by replacing them with C++11 for-each loops. In clearHash(), replace iteration over QHash::keys() with iteration over the hash itself. Also use the new const- iterator overload of QHash::erase() to save one attempted detach (in QHash::find()). Mark the plugin as QT_NO_FOREACH. Saves almost 2KiB (1.4%) in text size on optimized GCC 6.1 Linux AMD64 builds. Change-Id: I9bb3154130687c0061ea09b04ab5f627a4d2296c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tests/auto/corelib/xml: cleanupMarc Mutz2016-08-271-21/+42
| | | | | | | | | | | | | | | | | | | - port Q_FOREACH to C++11 range-for - mark types held in Qt containers as shared - port inefficient QLists to QVectors (required adding an artificial default ctor to one of the payload types) - fix algorithmic mistake: * don't use a QMap to sort a vector of QXmlStream{Attribute,NotationDeclaration}, constructing a QString key from the QStringRef name(). Use std::sort with a lambda. Since this code is used in two places, and we don't yet require poly- morphic lambdas, factor the code into a helper function template that also takes care of adding the const to the return type so the range-for doesn't detach the container. Fixes errors reported by my local tree's static checks. Change-Id: I3de97d9b03c87455aa6030998e9ca26c6c79a2e3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tests/auto/corelib/plugin: clean upMarc Mutz2016-08-271-3/+4
| | | | | | | | | - port from Q_FOREACH to C++11 range-for Fixes errors reported by my local tree's static checks. Change-Id: Ib8522ed424ba227d84f9664c3282f95f6bee547c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* mark some already-clean platform plugins as Q_FOREACH-freeMarc Mutz2016-08-264-0/+7
| | | | | Change-Id: I6ef2bb7caf2cf624e7832936202e546298ee9256 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* make 'angle' a public featureOswald Buddenhagen2016-08-261-1/+1
| | | | | | | the public win32/opengl.prf references it, so it must be public as well. Change-Id: I95f6571bd3cdb7d35b2182bebf663e50140e065e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* don't rely on configure.exe being in source packages any moreOswald Buddenhagen2016-08-261-4/+0
| | | | | | | | | now that configure.bat takes care of printing the help screen itself, there is no compelling reason to ship configure.exe in the source packages any more. consequently, always bootstrap it. Change-Id: I5bf0946549e3c426c1a4a94b1c22f6c0f4b4993c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QIconCacheGtkReader: use QStringRef moreAnton Kudryavtsev2016-08-261-4/+4
| | | | | | | | | lookup() method now takes QStringRef arg. Reduce allocations. Change-Id: I556d01be5c5f268672121ab4c67c652cb6cfe090 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Make QSurfaceFormat a Q_GADGET and add Q_ENUM for easier debuggingTor Arne Vestbø2016-08-261-0/+6
| | | | | Change-Id: I2fa0bc13bd90da53858ba3e0c6351f545e792fde Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* platformsupport: eradicate some easy Q_FOREACH loopsMarc Mutz2016-08-2610-22/+24
| | | | | | | | | | | | All loops trivially not modifying the iterated-over container. Saves ~9.4KiB in text size across all plugins and libs (statically) linking in QtPlatformSupport (optimized GCC 6.1 Linux AMD 64 build). Change-Id: I2d91da1f78d9b33d4c5e4a1627560d8e705a9b9a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* dbusmenu: eradicate Q_FOREACH loopsMarc Mutz2016-08-263-7/+8
| | | | | | | | | | | ... by replacing them with C++11 range-for loops. Saves ~1.7KiB in text size across all plugins and libs (statically) linking in QtPlatformSupport (optimized GCC 6.1 Linux AMD 64 build). Change-Id: I492bf2d6afe9bccdc1237003388fcb83a2261dba Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* fix build with various QT_NO_* definesNick Shaforostoff2016-08-2667-56/+411
| | | | | | | Done-with: Andriy Gerasika <andriy.gerasika@gmail.com> Change-Id: I90883a491dbddb005c3d756c339e42285d50e437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* don't cache test result after pre-dep failureOswald Buddenhagen2016-08-251-16/+18
| | | | | | | | there is no point in doing that, as we don't load it in that case anyway. in fact, it would lead to caching a new result in every run. Change-Id: Ia5cb27fa8a5d705d7f32a785b1e3b944f92d8929 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* don't cache results of build_parts and skip_modulesOswald Buddenhagen2016-08-253-10/+8
| | | | | | | | | | | as these tests do nothing but validating the command line, caching the result is more confusing than anything else. also make the tests silent, so they don't clutter an otherwise fully cached configure run. Change-Id: Ifc3d65278769b36a056650f077fd6274a7e192e7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* ensure that no license queries are made in -redo modeOswald Buddenhagen2016-08-252-4/+18
| | | | | | | implement it in configure.exe and fix it in configure.sh. Change-Id: I30764f4cba4bad0f23bfb40ce7a2ca614e1afd71 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* make failure to apply -redo fatalOswald Buddenhagen2016-08-252-5/+11
| | | | | | | like it already is on unix. Change-Id: Id55f8743ae0879fabe13c19ea214da74a35e43a6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* remove pointless conditional from reloadCmdLine()Oswald Buddenhagen2016-08-251-2/+0
| | | | | | | | the function is (nowadays) only called when the condition is true. Change-Id: I014f736c28c37b066a3f62e22f9002c025734386 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* fix location of config.{opt,status} in top-level buildsOswald Buddenhagen2016-08-253-28/+32
| | | | | | | | | | write them to the top-level build dir, not the qtbase build dir. the old files will be still used for a smooth migration. Task-number: QTBUG-46974 Change-Id: I6eae678ffc7dfb921ecd9e9012e79e3b915ad3fa Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* clean up qconfig/qmodule.pri handling in configureOswald Buddenhagen2016-08-254-48/+5
| | | | | | | | | | | | | | | | | | instead of saving the files away and restoring them afterwards, use the new and shiny discard_from() function to throw away everything the files might contain. strictly speaking, this is not precise, as the pris may also use *=, -=, and possibly other operations which cannot be trivially undone, but the purpose is essentially to discard the special outputs of some features which may affect subsequent tests, for which this is sufficient. as a side effect, the failure to load qmodule.pri is not fatal any more (like for qconfig.pri), to save the pointless effort of ensuring that it exists. Change-Id: I07625b60c4f2e27b21206b2c16d24ab111737395 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* add discard_from() functionOswald Buddenhagen2016-08-255-6/+61
| | | | | | | | | this function discards all values that come from a specific file. it will be needed for configure bootstrapping, but is too obscure to document it for general use. Change-Id: I62c18aeb1847712e33d0599dbb0b90ffa1722438 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* fix argument order in recursive qmake invocationsOswald Buddenhagen2016-08-252-7/+7
| | | | | | | | | | the inherited arguments may contain the '--' argument, which turns additional arguments into configure arguments. the simplest fix for that is injecting additional arguments at the front, not at the end. Change-Id: I7cc00a42f0148e5ccbbeda2ad59fa8c63749f02d Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* remove dead code relating to help outputOswald Buddenhagen2016-08-252-20/+0
| | | | | | | | amends mostly c027cffbe, but also pre-historic d32a03469 (2005). Change-Id: I2a897556191cff761ea8440bc5b7e47077947d75 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* remove extra empty line before configure reportOswald Buddenhagen2016-08-251-1/+0
| | | | | | Change-Id: Id985e4738dda89e4d1af1ceccda33d830316e66a Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* make include(,<into>) implementation a bit less convolutedOswald Buddenhagen2016-08-252-6/+9
| | | | | | | | | | this goes at the cost of <into> without the subsequent dot not being filtered before the result insertion any more. that's not expected to be a problem, as it's not particularly useful to iterate the target namespace without the dot in the first place. Change-Id: Ib3497a60613b4c8c26676fe76b731239e427b8a7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* optimize operator+ ProString vs. char*Oswald Buddenhagen2016-08-251-2/+2
| | | | | | | | we have all necessary overloads now. Change-Id: Ic4472eba15d4234e968fcb9443d0f79011aa43fd Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix reading of font namesAllan Sandfeld Jensen2016-08-251-2/+2
| | | | | | | | Correct a boundary check so the last present name can be read, and correct a typo that caused non-present names to read garbage. Change-Id: Ia9d0d3af7431c1f5f02824e884efb5f6f454dc5d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QMimeProvider: fix quadratic loopMarc Mutz2016-08-251-12/+14
| | | | | | | | | | | | | | Calling QMutableListIterator::remove() in a loop constitutes quadratic behavior (O(N) function called O(N) times). Fix by splitting the loop, simplifying it by sharing conditions, and using std::remove_if(), which is linear. Removes one more use of mutable Java iterators. Change-Id: I88bde414777b50996e546bc8cb238619ea4fb645 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* Fix issue causing pch configure test to always failJake Petroules2016-08-241-0/+1
| | | | | | | | | This fixes a regression introduced in 4a1bafcc4ee5b7d968620808e155c1617aa6f273. Change-Id: Iafeec043c39af79cee8b53cf74dcd452c03a4826 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* DirectWrite: Fix crash when embedding empty glyphs in PDFEskil Abrahamsen Blomfeldt2016-08-241-1/+1
| | | | | | | | | | | | Empty QPainterPaths can have one move-to element, so the test to detect this case was incomplete. For empty glyphs returned from DirectWrite this would trigger a crash. This is only reproducible after also enabling embedding of fonts with the DirectWrite engine. Task-number: QTBUG-54740 Change-Id: I3fbbfb8d958818550d5ab5234242d39688b84811 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows Font Engine: Fix MinGW developer buildFriedemann Kleint2016-08-231-1/+1
| | | | | | | | | Suppress warning: qwindowsfontengine.cpp:590:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] Amends change ac1e87d9f373ad649d989f254b37d2f29ddf25fe. Change-Id: Ibd25c522aac8e946c5e0759ea20e023883622914 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* qdbusxmlgenerator.cpp: reduce allocations in typeNameToXml()Anton Kudryavtsev2016-08-231-3/+3
| | | | | | | | | Don't create QString from QL1S, just iterate over QL1S directly. Change-Id: I35196991224c206841efb11894a9baf736ead97e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge dev into 5.8Oswald Buddenhagen2016-08-22786-9090/+11489
|\ | | | | | | Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
| * Android: Show the edit menu when things are selectedOlivier Goffart2016-08-218-7/+352
| | | | | | | | | | Change-Id: I3647fa39469c87bcc08bb439546e5e61c535c71d Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * qmake: Also add bitcode flags to linkerJake Petroules2016-08-201-0/+2
| | | | | | | | | | | | | | | | | | | | This fixes errors linking against Qt when built as shared libraries and with bitcode enabled (default on tvOS and watchOS). Change-Id: I3eb3bb0b9615e0bc41e43ffae8645248dbf803c6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * qmake: enable bitcode also for iOSJake Petroules2016-08-193-3/+1
| | | | | | | | | | | | | | | | | | It's optional but default in Xcode, and will probably become required Change-Id: I6917a9cf15b48dbaee57f1a92ea47d68fb3c253a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * Add support for Apple watchOSJake Petroules2016-08-1941-67/+266
| | | | | | | | | | Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * tst_QSslSocket: clean upMarc Mutz2016-08-191-55/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - port Q_FOREACH to C++11 range-for - port use of inefficient QLists to QVector - port from QSharedPointer to auto variables except where the payload is returned from a function (there ported to QSharedPointer::create()) Fixes errors pointed out by my tree's static checks. In sslErrors(), fixed an unwanted double-detach problem by adding a strategic qAsConst(). Change-Id: I8148e23b73337f6f1a721e009f2974536d8447cc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * Refactor Http2::FrameReader/Http2::FrameWriterTimur Pocheptsov2016-08-198-447/+393
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new entity: class Http2::Frame with accessors like payloadSize/type/flags/streamID etc. (they actually read /interpret raw bytes from a frame's buffer) instead of duplicating this functionality in reader/writer classes. Delete defaulted members and remove explicitly defined move ctors/operators (not needed actually). Update auto-test ('HTTP/2 server') to use these new classes. Change-Id: Ie3516efbd095704e212142eef9e792323678ccfa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Say hello to Q_NAMESPACEBogDan Vatra2016-08-199-202/+466
| | | | | | | | | | | | | | | | | | | | | | | | Q_NAMESPACE is useful to add Q_ENUM_NS/Q_ENUMS, Q_FLAG_NS/Q_FLAGS and Q_CLASSINFO to a namespace. [ChangeLog] Added Q_NAMESPACE which can be used to add Q_ENUM_NS/ Q_ENUMS, Q_FLAG_NS/Q_FLAGS and Q_CLASSINFO to a namespace Task-number: QTBUG-54981 Change-Id: Ic61b972794063e77134681fb347d6c4acddcdb44 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Don't compile dbus on iOS by defaultLars Knoll2016-08-191-1/+1
| | | | | | | | | | | | | | | | The library compiles, but is not usable on iOS, so don't compile it by default on that platform. Change-Id: I49b687b526a2998250ff5b57f1ea3df30cf8d7a5 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * fix up detection code for compiler defaulting to c++98Oswald Buddenhagen2016-08-192-4/+2
| | | | | | | | | | | | | | | | | | | | | | - remove the unconditional CONFIG+=c++11 from default_pre.prf, so the change actually has any effect - fix up the description fields somewhat this amends 091df96fb8, which was rushed in without maintainer review. Change-Id: I88b859d6e2f0fe3d6a4771afe464a7c445e7b47b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Micro-optimize QAbstractSocketPrivate::canReadNotification()Alex Trotsenko2016-08-191-13/+8
| | | | | | | | | | | | | | Remove unnecessary checks in release build. Refactor the code. Change-Id: Ibee96790cbc8beb000757fc8e152fb4dcae9d506 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Remove QPlatformCursorPrivateJędrzej Nowacki2016-08-192-18/+0
| | | | | | | | | | | | | | It was unused. Change-Id: I890fe2512355a691d693a26b599797a7dc7b06e2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * add configure test result cachingOswald Buddenhagen2016-08-194-0/+90
| | | | | | | | | | | | Started-by: Lars Knoll <lars.knoll@qt.io> Change-Id: I29bafc5913cf95d9908dbcdd9597df2258b69837 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Remove useless guards around #define's in qconfig.hLars Knoll2016-08-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | These are not meant to be overwritten by command line defines anyway. Bad things could happen if they are not in sync with the values in the pro files. If you want to change them, reconfigure Qt. Change-Id: Ic456e54b97e6909f01a4f4be33e3d7e2b2571e80 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Don't define QT_OPENGL_ES_2* in opengl.prfLars Knoll2016-08-192-3/+5
| | | | | | | | | | | | | | | | | | | | | | Defining QT_OPENGL_ES_2 would only lead to conflicts with defines from qconfig.h. QT_OPENGL_ES_2_ANGLE also moves to the .pri. QT_OPENGL_ES_2_ANGLE_STATIC is not used and is removed altogether. Change-Id: I614fb00525ac696e066ac8328bb9bf61fca08a01 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Cleanup QT_NO_FONTCONFIG usageLars Knoll2016-08-196-10/+6
| | | | | | | | | | | | | | | | | | | | Stop messing around with the define in pro files, and rely on the configuration system. Disable fontconfig on Mac, which in practice gives the same result as before. Change-Id: Iea3aec127af96f221f4ee8682fb20a624332b82f Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Add a qeventtransition featureLars Knoll2016-08-195-14/+20
| | | | | | | | | | | | | | | | | | This replaces the QT_NO_STATEMACHINE_EVENTFILTER define, and gives it a proper name. Change-Id: I2b9386458224ff2bd30003daac548daa61961085 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Don't use QT_NO_MIMETYPE in mimetypes.priLars Knoll2016-08-192-3/+7
| | | | | | | | | | | | | | | | Instead define a proper feature for it and use qtConfig(). Change-Id: I64b1d26b2419a24d3239e9935341b7d535990dfb Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * iconv-related cleanup in codecs.priLars Knoll2016-08-192-15/+12
| | | | | | | | | | | | | | | | | | | | | | The configuration system already takes care of setting QT_NO_ICONV. Also move the platform conditions for using iconv from the pri file to the .json. Change-Id: I91b08bcee6799deddabcbb4a91d0a3f9ed7f0f28 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Use qtConfig throughout in qtbaseLars Knoll2016-08-19192-449/+461
| | | | | | | | | | | | | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>