summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move QOpenGLVersionProfile to its own filesJohan Klokkhammer Helsing2020-02-227-217/+330
| | | | | | | | Prepare to move it out of QtGui Task-number: QTBUG-74409 Change-Id: Iefde4945ede27cf3c2f6f50e5a693c03625cadf6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QOpenGLBuffer from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-229-11/+10
| | | | | | Task-number: QTBUG-74409 Change-Id: I72c839e54f24810b2bde2385c568921c4e4a2869 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* macOS: Use more of QStyleOption and less of QWidgetAlberto Mardegan2020-02-211-44/+31
| | | | | | | | This is a step in the direction of reducing QWidget usage in the macOS style. Change-Id: I247f39c2ba46c7fa5be51e01cc41fd8b8a93cea7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* CMake: Set minimum deployment target only for host macOSAlexandru Croitor2020-02-211-1/+2
| | | | | | | | A future change will come that sets it for iOS and friends. Change-Id: I74b688ee62d24137e3cdf5475e1a9e858698ccf0 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Do not try to find .qmake.conf past the root directoryFrederik Gladhorn2020-02-211-0/+4
| | | | | | | In case of .qmake.conf not existing, this would result in an infinite loop. Change-Id: I577aaed7a502efb7b01dc6b199dcf464358bf5a9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move function declaration to global scope so namespace is appliedMårten Nordheim2020-02-211-1/+3
| | | | | | | | | | | The function-local declaration ignores the current namespace and when linking it will look for a global exported function named qt_writing_system_for_script instead of the one found in our namespace. Move the declaration outside of the function to work around it. Change-Id: I161bf1760e2e4e37d0f548b01bb3bea5ebb9ecdd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Port lance manual test to qopenglJohan Klokkhammer Helsing2020-02-213-17/+18
| | | | | | Task-number: QTBUG-74408 Change-Id: I5e112a2024aebee4be740e770ea0fb4e5b2a9daa Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove legacy OpenGL examplesJohan Klokkhammer Helsing2020-02-2156-5290/+0
| | | | | | | | They all used QGL (which has been removed). Task-number: QTBUG-74408 Change-Id: Ied003625f14228b4951002a604fce91eaccec102 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Move QOpenGLVertexArrayObject from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-2114-22/+22
| | | | | | Task-number: QTBUG-74409 Change-Id: I6442693ca2b28b3a66f0f4fb41843e1e404df32b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove QUrl::topLevelDomainTimur Pocheptsov2020-02-2019-153/+67
| | | | | | | | | | And move the actual implementation from corelib/io to network/kernel sub-module. Fixes: QTBUG-80308 Change-Id: I554b05bae3552c68e1e1a405c169366ee19120b2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* DirectWrite font db: Fix fallback fontsEskil Abrahamsen Blomfeldt2020-02-206-174/+135
| | | | | | | | | | | | | The implementation of this was based on a misunderstanding of the API. The GetMatchingFonts() function does not give a sorted list of fonts that can be used in place of the given family, but just requests the fonts in the family itself. Instead, we use the same implementation as in the other two font databases we have on Windows (moving the implementation to be shared). Change-Id: I6a7b73e3d8376f7d97f598db0d7b63122ad1940c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Export an extern template for QMetaTypeForType for builtin typesOlivier Goffart2020-02-202-0/+31
| | | | | | | | That way not every translation unit generates the QMetaTypeInterface for the builtin types Change-Id: Id703c14532646a58f4088e8f3914564ce35e398e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Normalize types at compile timeOlivier Goffart2020-02-2014-233/+473
| | | | | | | | | | This also fix the normalization algorithm: - Some 'const' after pointers were not removed as they should. - No need to keep the space in '> >' and '< :' in C++11 anymore - Fix normalization of 'long unsigned int' and similar Change-Id: I2b72f0fede96c1063e7b155d9f25a85fccfc7bf9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* New QMetaType representationOlivier Goffart2020-02-208-1457/+638
| | | | | | | | | | | | | | | | | | | | the QMetaType is represented as a pointer to a "vtable" in the form of a QtPrivate::QMetaTypeInterface* The recomanded use of QMetaType is to construct an object with QMetaType::fromType. This does not require any registration. There is still an id() function which will do some registration for compatibility with Qt5. Also the patch does not really touch the other extra things that can be registered (data stream operator, comparison operator, iteratable, ...) and this still uses the previous system. This is only the change in QMetaType, other changes to use it in QVariant and QMetaObject will follow Change-Id: Iffad20085cf33f33447f58a68236013a8b60fdbf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make bytes-per-line safe for int overflowAllan Sandfeld Jensen2020-02-2031-73/+93
| | | | | | | | Goes through the Qt code and make sure bytes-per-line calculations are safe when they are too big for 32bit integers. Change-Id: I88b2d74b3da82e91407d316aa932a4a37587c0cf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Add missing compile flags for msvcLeander Beernaert2020-02-201-0/+24
| | | | | | | | | This patch adds a couple of missing compile flags that are defined in mkspecs/common/msvc-version.conf and mkspecs/common/msvc-desktop.conf that were not yet ported to CMake. Change-Id: I9ef0ef71cb0c063699fba4c067e90f6515169baf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move QOpenGLShaderProgram from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-2019-32/+29
| | | | | | Task-number: QTBUG-74409 Change-Id: I20dfafc0c9bf8e2b68b03e171d70c2cb4ad2bfaf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Docs: Remove traces of QGLJohan Klokkhammer Helsing2020-02-208-34/+27
| | | | | | | | | The QGL* classes have been removed and the examples ported to QOpenGL, update the documentation to reflect that. Task-number: QTBUG-74408 Change-Id: Ibb4787cdeedc05a807d673943b61838f19092234 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Docs: Remove lenghty comparison with QGLWidgetJohan Klokkhammer Helsing2020-02-201-62/+6
| | | | | | | | | QGLWidget doesn't exist any more, and has been legacy for a long time, so we shouldn't try to explain what QOpenGLWidget is in terms of QGLWidget any more. Task-number: QTBUG-74409 Change-Id: I87ff6c35dfed1303bd6d74621b244e1ed84ceafe Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* CMake: Fix tst_pluginLeander Beernaert2020-02-202-0/+8
| | | | | | | | | | | | | | It is not possible to exclude targets based on the build configuration in CMake. loadDebugPlugin() and loadReleasePlugin() will always fail as both debug and release plugins are built regardless of the build configuration. This patch adds the CMAKE_BUILD define and skips the opposite test on Windows. E.g.: With config = Debug, the loadReleasePlugin() test is skipped and viceversa. Change-Id: I2659882604bb39eb11d3e9e2b2b37a2972475285 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Apply the same fix from test/auto/network to network benchmarksLeander Beernaert2020-02-201-0/+15
| | | | | Change-Id: I81d41aa526d5c06adef637e756a3d81e799443e4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix use of compile define QT_NO_DEBUGLeander Beernaert2020-02-202-4/+2
| | | | | | | | | | | | Prior to this patch QT_NO_DEBUG would not be correctly set for generators which support multiple configurations such as Visual Studio and XCode. This patch also applies the define to all executables, which was previously missing. Change-Id: I16a911d15217a62093c68ba2b4c2545cdb8df1e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix inversed qmake logic for widget action testsAllan Sandfeld Jensen2020-02-201-1/+1
| | | | | Change-Id: I638f449d0067583a67ac91f2ab3b847d93480707 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Prepare QGuiAction::enabled property for declarative useAllan Sandfeld Jensen2020-02-205-23/+73
| | | | | | | | | | | Make the order of visible, group and enabled insignificant, by storing ignored explicit values of enabled. Also adds resetEnabled method QQuickAction has on the enabled property. Change-Id: I9299dec0d1f74fdf655721bb4f72ba565ae85c7a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add enabled to QGuiAction debug outputAllan Sandfeld Jensen2020-02-201-0/+1
| | | | | | | It is a rather important property Change-Id: I085031531235b1776faf5d2b52269ed4a05f0704 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* DirectWrite font db: Fix writing system detectionEskil Abrahamsen Blomfeldt2020-02-205-29/+78
| | | | | | | | | | The implementation here was accidentally missing from the first commit. We use the OS/2 table for determining the writing system support as intended by the font designer, and fall back to actually checking the Unicode ranges if the table should be missing. Change-Id: Ibfdf76c27f3a94eda2142b3e269a1ca30d4bc045 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QLinkedListSona Kurazyan2020-02-1947-5201/+43
| | | | | | | | | | | | | QLinkedList has been moved to Qt5Compat. Remove and stop mentioning it in docs, examples (the docs & examples for QLinkedList itself will be moved to Qt5Compat) and remove the corresponding tests. Also remove QT_NO_LINKED_LIST, since it's not needed anymore. Task-number: QTBUG-81630 Task-number: QTBUG-80312 Change-Id: I4a8f1105cb60aa87e7fd67e901ec1a27c489aa31 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix PATH environment variable for CMake testsLeander Beernaert2020-02-191-1/+3
| | | | | | | | | | | | This patch fixes setting the correct value for the PATH environment value. Currently, due to Windows' ; path separator, every list entry was treated as a separate environment variable that need to be set instead of properly extending the PATH list. Change-Id: Ib2fc031397459370beec84f9cb4ec6df7db00df3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix qmimeprovider_database.cpp generation for Win32 with CMakeLeander Beernaert2020-02-191-1/+1
| | | | | | | | Incorrect arguments were being passed to the command which generates the above file. Change-Id: I9f06aca30e747e4368c8f6a727a02cb93b936167 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QComboBox: remove currentIndexChanged(const QString&)Vitaly Fanaskov2020-02-1918-63/+27
| | | | | | | Fixes: QTBUG-81913 Task-number: QTBUG-81845 Change-Id: I8f24b858ce4e35b495440001d7734cc8f169cd5f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix sorting of fallback fonts based on writing systemsKonstantin Ritt2020-02-191-41/+26
| | | | | | | | | | This rewrites 243f4b2a8c027ae18c7ffce969c48d1f8d1b5431 in a more complete and optimized manner Task-number: QTBUG-81924 Change-Id: I52105a9ede07ce350fad3d50277dd631df371f06 Reviewed-by: Hikaru Terazono (3c1u) <3c1u@vulpesgames.tokyo> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Only install tests data for prefix buildsLeander Beernaert2020-02-181-2/+2
| | | | | | | | | | If we install tests data for non-prefix builds it can cause tests to fail as they find the data in the wrong location. An example of this is tst_qsslkey. Change-Id: I55bd2ff4cb5a0857dc857cb2149ffe4436ec6f99 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Set qt_add_test WORKING_DIRECTORY to OUTPUT_DIRECTORYLeander Beernaert2020-02-181-0/+2
| | | | | | | | | If qt_add_test() is called with OUTPUT_DIRECTORY and no WORKING_DIRECTORY is specified, default the WORKING_DIRECTORY to the same value as OUTPUT_DIRECTORY._ Change-Id: If373fe590508ad58d4632e0598cd0d9dddb2ae16 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Set a default value for CMAKE_OSX_DEPLOYMENT_TARGETAlexandru Croitor2020-02-181-0/+15
| | | | | | | | | | This replicates the behavior of QMAKE_MACOSX_DEPLOYMENT_TARGET in qmake. Change-Id: I273cd26994f2edfc52dc7b6278252c37b65b2356 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Use correct C++ standard flag when building standalone testsAlexandru Croitor2020-02-181-0/+5
| | | | | | | | | | | | | | Before the patch we set the standard flags in two places: - once when building qtbase - and always when including QtSetup (for every repo that is built) This change makes sure to also set the correct standards flag when building standalone tests, because QtSetup is called to early in that case. Change-Id: Iad130b731e9eb9605bb91637364c33fdd49ce3cb Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* cmake: C++17 is mandatoryOlivier Goffart2020-02-181-5/+1
| | | | | Change-Id: Ia0f2151d38fec84be31afc76fc380666861d7d80 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Fix c++ standard config tests with MSVCAlexandru Croitor2020-02-185-1/+28
| | | | | | | | | | | | Need to pass additional -Zc:__cplusplus flag when using MSVC, so that the __cplusplus define has correct values. Additionally make the option be propagated to consumers of Qt via the public Platform target, which QtCore links against. Change-Id: Ie1283c25334b93f993529beb7fb32bdb001627f5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Move QOpenGLWidget from QtOpenGL to its own moduleJohan Klokkhammer Helsing2020-02-1833-43/+141
| | | | | | | | Same pattern as QtQuickWidgets. Gets rid of QtOpenGL's dependency on QtWidgets. Task-number: QTBUG-74409 Change-Id: I4f9b55c23e25a1e0519734037b768a16e870c7d2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update references from QAction to QGuiActionAllan Sandfeld Jensen2020-02-171-13/+13
| | | | | | | A few places were still referring to the old class name. Change-Id: Iab99bdda2184c06ad24cb96419e33d4157bddaff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix build without features.threadTasuku Suzuki2020-02-172-2/+2
| | | | | | | | | | Disable forkfd when thread is disabled to fix the error below. forkfd_qt.cpp:(.text+0x953): undefined reference to `pthread_once' Change-Id: I79414c8ba84d4f5641a64d52b869329f32530c0e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use char16_t in favor of ushort for locale data tablesEdward Welbourne2020-02-1714-42/+42
| | | | | | Change-Id: I890dd2b52c1b786db1081744c8ca343baba93de4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow surrogate pairs for various "single character" locale dataEdward Welbourne2020-02-1715-1291/+1401
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract the character in its proper unicode form and encode it in a new single_character_data table of locale data. Record each entry as the range within that table that encodes it. Also added an assertion in the generator script to check that the digits CLDR gives us are a contiguous sequence in increasing order, as has been assumed by the C++ code for some time. Lots of number-formatting code now has to take account of how wide the digits are. This leaves nowhere for updateSystemPrivate() to record values read from sys_locale->query(), so we must always consult that function when accessing these members of the systemData() object. Various internal users of these single-character fields need the system-or-CLDR value rather than the raw CLDR value, so move QLocalePrivate's methods to supply them down to QLocaleData and ensure they check for system values, where appropriate first. This allows us to finally support the Chakma language and script, for whose number system UTF-16 needs surrogate pairs. Costs 10.8 kB in added data, much of it due to adding two new locales that need surrogates to represent digits. [ChangeLog][QtCore][QLocale] Various QLocale methods that returned single QChar values now return QString values to accommodate those locales which need a surrogate pair to represent the (single character) return value. Fixes: QTBUG-69324 Fixes: QTBUG-81053 Change-Id: I481722d6f5ee266164f09031679a851dfa6e7839 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Disable FTP support in QNAM by defaultKarsten Heimrich2020-02-177-5/+67
| | | | | | | | | If necessary, the feature still can be enabled with -feature-ftp. Task-number: QTBUG-80339 Change-Id: I7dafaad254d1396f24ac5c339d55c3bedfa97f1c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* QTypeRevision: Disallow floats and doubles as argumentsUlf Hermann2020-02-171-3/+4
| | | | | | | | | Previously those would be implicitly casted to qint8, with interesting results. Change-Id: I145a737a7ef7a6f5212461b9f6a1fcb5d7780558 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add major versions to REVISION and Q_REVSION markersUlf Hermann2020-02-172-13/+13
| | | | | | | | Statemachine had major version 1 in Qt5, and window had major version 2. Change-Id: I24cc6de5ca9270c61e0dba7d1ee6a61ef84b3018 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Move QOpenGLFrameBufferObject from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-1713-28/+22
| | | | | | Task-number: QTBUG-74409 Change-Id: I817ea6f052fc61a6465d443450c8017ac5d0c0e9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix build with -no-feature-bearermanagementNick Shaforostov2020-02-151-3/+1
| | | | | Change-Id: I07884c6808b99cc4383116f5e1b9ae83bd2ff2e9 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Silence another -Werror=class-memaccessGiuseppe D'Angelo2020-02-151-2/+2
| | | | | | | | QDataBuffer when used with non trivally copiable types will try to realloc them, causing GCC to complain. Change-Id: I778d32d00774b0a53b85257be0064f19d9fb2bb9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Implement better hash functions for integer typesLars Knoll2020-02-151-14/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | The hash function provides rather good mixing of the input bits. It spreads numbers out evenly through the uint range, a change of one bit in the input changes around half the output bits, and it is pretty fast. Using this as a hash function over the simple hash(int) == int has the advantage that it reduces the amount of collisions for badly distributed keys. In addition, it allows us to always use power of two sizes for the hash table, leading to better performance for inserts and lookups. the 32 and 64 bit hash functions where chosen from https://nullprogram.com/blog/2018/07/31/. I selected the ones that give a very good distribution of the hash values while using the integer for both multiplication steps. This should be slighty faster than using two different numbers. While the result is still being cast to a uint, the method is prepared so it can handle 64 bit keys and seeds. Fixes: QTBUG-29009 Change-Id: Id7a1b97b3c0d219e65de2e6e1fe6faf092f8ce16 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"Alexandru Croitor2020-02-14311-806/+724
|\