summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add byte-based units to CLDR dataEdward Welbourne2017-06-135-559/+699
| | | | | | | | | | | | Scan CLDR for {,kilo,mega,giga,tera,peta,exa}byte forms and their IEC equivalents, providing SI and IEC defaults when missing (which all of IEC are) in addition to the usual numeric data. Extrapolate from any present data (e.g. French's ko, Mo, Go, To imply Po, Eo and, for IEC, Kio, Mio, etc.), since CLDR only goes up to tera. Propagate this data to QLocale's database ready for use by QLocale::formattedDataSize(). Change-Id: Ie6ee978948c68be9f71ab784a128cbfae3d80ee1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QTimeZone: make UTC offset range available for other code to reuseEdward Welbourne2017-06-133-5/+12
| | | | | | | | When QDateTimeParser learns to parse zones, it'll need to know the valid range of offsets. Change-Id: I44cd88a140ebaf6a2b98b0f9a1be0cbc7a35bae4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tidy implementation and use of QDateTimeParser::setDigit()Edward Welbourne2017-06-131-11/+11
| | | | | | | | | | | | | | | The implementation did a validity check on data it then gave to constructors that repeat the validity checks; so do the construction first and use the cheaper instance isValid() methods instead. Fixed local callers (but not QDateTimeEditPrivate::stepBy, the only other caller) to actually attend to the return value; if the attempt to set a field fails, it probably means the min is too low, or max too high; and comparing the modified date-time against global min and max makes no sense if it hasn't been revised anyway. Change-Id: If4505c43c92e247445dcd10ac436b775c3ead4da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* generate_expected_output.py: more refinements to filtering of noiseEdward Welbourne2017-06-131-5/+6
| | | | | | | | Two more ways line numbers were making it through. Corrected a doc-string to tell nearer to the truth. Change-Id: I946aaeb936d47fffe50d7ec15e2524992cc9e428 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* generate_expected_output.py: refer to tst_selftests.cpp for test listEdward Welbourne2017-06-131-11/+76
| | | | | | | | Document that the saved output is used by tst_selftests.cpp and use a crude parse of it to get the list of subdirs that it actually tests. Change-Id: I73023228c9e547f965b7749dd66de7ef09c3815e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Native Windows file dialog: Observe Windows Explorer "Show hidden files" settingFriedemann Kleint2017-06-134-16/+30
| | | | | | | | | | Extract a helper function to read the setting and use that in file dialogs and tray icon. Task-number: QTBUG-60593 Change-Id: I03cf1e45611690a128bf2cc17eba5dff23b86969 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QPlatformCursor: Add functions for setting/clearing override cursorsFriedemann Kleint2017-06-136-7/+121
| | | | | | | | | | | | | | | | | | | | QPA is modeled on the assumption that the cursor is a property of the window and therefore sets the override cursors on all windows. However, on macOS and Windows, the cursor is set per application (or screen). On these platforms, the per window cursor setting needs to be emulated which is a source of bugs especially for override cursors. Add new virtuals to QPlatformCursor allowing to set override cursors which can be implemented by directly setting the cursor on those platforms. Task-number: QTBUG-40122 Task-number: QTBUG-61133 Change-Id: I31d6a927128d22bb1620a8ace35988c0e126236e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Move QTextFormatPrivate::Property out of the classThiago Macieira2017-06-131-17/+17
| | | | | | | | | | | This allows us to have the Q_DECLARE_PROPERTY before the QVector<Property> use. Not important for Qt 5, but it helps me. The operator!= function is never called, so it can be dropped (caught by ICC 17 beta). Change-Id: I149e0540c00745fe8119fffd1463c9bc1b356ec6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove ancient embedded pixmaps and scripts from uicJarek Kobus2017-06-1224-3406/+444
| | | | | Change-Id: Iec06e1af91a6d61226ae484325b1ec82810d634d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QRandomGenerator: mix the Linux AT_RANDOM random bytes in the fallbackThiago Macieira2017-06-121-3/+26
| | | | | | | | | | | | | | | | | | The Linux kernel gives us 16 bytes of random data and sets a pointer to it in the ELF AuxV (the same one that allows us to get HWCAP on ARM systems). So if we end up in the fallback generator, at leat we'll get a good amount of entropy to seed the Mersenne Twister. This could happen if the application is run in a chroot(2) or container without /dev/random or /dev/urandom. That is probably an installation mistake, so we don't optimize this case for performance. With this commit, we have now good, high-quality fallbacks for Windows (rand_s), for BSDs (arc4random) and for Linux. The only missing, supported OS without a good entropy source is QNX. Change-Id: Ia3e896da908f42939148fffd14c5b1084051f1a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QRandomGenerator: improve the fallback seeding in emergenciesThiago Macieira2017-06-121-1/+31
| | | | | | | | | | | | | | | | If we've never read any samples from hardware RNG or from /dev/urandom, then there are no stored samples for us to seed the Mersenne Twister. In that case, attempt to obtain an emergency sample that consists of some random bits from the variable addresses (ASLR should help) and from the clock (using nanosecond quality, instead of seconds). There's still the possibility that we'll get poor entropy: very close to boot, if the kernel entropy pool is empty, ASLR could be poor and the monotonic clock value could be consistent from boot to boot. There's nothing we can do about that. Change-Id: Ia3e896da908f42939148fffd14c5b0c7b608371b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QRandomGenerator: use arc4random as fallback on BSDs (including Darwin)Thiago Macieira2017-06-121-0/+7
| | | | | | | | | This function works even in chroots where /dev is not available. Since it's part of the OS, it may have better ways of gathering entropy even when we don't. Change-Id: Ia3e896da908f42939148fffd14c5afedc8569dbc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QRandomGenerator: add support for hardware-based random generatorsThiago Macieira2017-06-121-2/+46
| | | | | | | | | | | This commit adds support for the x86 RDRAND instruction for QRandomGenerator. This is the same that libstdc++-v3 uses for std::random_device() by default. If it fails because the hardware does not have enough entropy collected, we fall back to the operating system generator, which often has more entropy collected from other sources. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5167214e1ea3f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add proper detection of x86 RDRAND instructionThiago Macieira2017-06-129-8/+83
| | | | | | | | | The instruction is "RDRAND", but the feature name, according to GCC, is RDRND, so I had to change some macros in qsimd_p.h. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5166779137e63 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QUuid, QHttpMultipart and QHash: use QRandomGeneratorThiago Macieira2017-06-124-140/+20
| | | | | | | | | QRandomGenerator can produce more than 31 bits of data. And it uses /dev/urandom for us on Unix, so QHash does not need to duplicate that part. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b52a0d91f179eb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTemporaryFile: fix the generation of names from templatesThiago Macieira2017-06-122-6/+5
| | | | | | | | | | | | | | | | First and most importantly, let's not use more than half of the template for the application's PID. With over 71% of all PIDs on a typical Linux system and 90% of those on a Darwin system having 5 decimal digits, using them all in a template that is usually 6 characters long is wasteful. That leaves only 1 character for the random part, thereby reducing the number of temporary files possible to only 52. So limit the PID to half the characters of the template. Second, let's use QRandomGenerator::bounded to create the the random part, instead of qrand (which is often unseeded at this point). Change-Id: Icd0e0d4b27cb4e5eb892fffd14b52eda5e467395 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QtPrivate::FunctionPointer to get the type of srand's first argThiago Macieira2017-06-121-7/+2
| | | | | | | Avoids #ifdefs and guesswork. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5210efaea7d00 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move qrand() & qsrand() to qrandom.cppThiago Macieira2017-06-125-137/+151
| | | | | | | Now that we have the file, may as well consolidate Change-Id: Icd0e0d4b27cb4e5eb892fffd14b51d3e701c6a94 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Long live QRandomGeneratorThiago Macieira2017-06-128-4/+1673
| | | | | | | | | | | | | | | | | | | This class provides a reasonably-secure random number generator that does not need seeding. That is quite unlike qrand(), which requires a seed and is low-quality (definitely not secure). This class is also like std::random_device, but better. It provides an operator() like std::random_device, but unlike that, it also provides a way to fill a buffer with random data, not just one 32-bit quantity. It's also stateless. Finally, it also implements std::seed_seq-like generate(). It obeys the standard requirement of the range (32-bit) but not that of the algorithm (if you wanted that, you'd use std::seed_seq itself). Instead, generate() fills with pure random data. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b4e3ba9ea04da8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up in CLDR scripts for QLocaleEdward Welbourne2017-06-092-85/+57
| | | | | | | | | | | | | | Use python more fluently; DRY - use functions to avoid repetition; use dict-comprehensions; use os.path.join() in preference to arithmetic with path strings; use elsif to avoid the need for a local variable; set() can take a generator directly, no need to go via a list; don't end lines in semicolon (this is python). Test isdir() once instead of exists() twice on the same name. Just, generally, use python's feature-set. Change-Id: Ib114aa016f70b3be09e968d9cfc069b057f49d41 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace three functions with one simpler functionEdward Welbourne2017-06-091-35/+9
| | | | | | | | | | load{Language,Script,Country}Map() were all structurally very similar, so replace them with a single loadMap() that takes a second argument to say *which* map to load. At the same time, use a dict comprehension to simplify constructing the result. Change-Id: Ie43a71156010277200543a8937056efd35251955 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Turn a next-node function into an iterator over nodesEdward Welbourne2017-06-091-32/+21
| | | | | | | | | | | | | | This simplifies a duplicated iteration pattern in the calling code. It also frees the first-node function to raise an Error (which the iterator now catches) if it finds no node, where it used to return False (instead of a node, so other code using it would raise confusing errors from trying to use False as a node, where now it'll get a clear Error about a missing node). There were also no callers passing an empty name, so the test for matching nodes (here moved to its own short function) didn't need to handle that as a special case. Change-Id: Ife6cad8943cf5dc2c6ed68429d4a217cb9bea446 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify cldr2qlocalexml.integrateWeekData()Edward Welbourne2017-06-091-65/+13
| | | | | | | | | It had a separate variable for each of three lists for each day of the week; and used each list only once. Iterate the days of the week for each lookup, discarding it once used. Change-Id: I32c8bd5bfcbb99f0a8697d374e63112761f18dbb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Reduce code duplication in writing of string data for localesEdward Welbourne2017-06-092-87/+24
| | | | | | | | | | Each StringData object got its own block, of common form, to output its C array; give each object a name so that we can automate this as an iteration over StringData objects. One (endonyms_data) gains a blank line that the others all had but it lacked. Change-Id: I96c014728a58343c82304c5117b474fee980d9c7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rework locale serialization and parsing with less repetitionEdward Welbourne2017-06-093-249/+255
| | | | | | | | | | | | | | | | ... because copy-and-paste is worth discouraging. Moved code that writes and digests our Q Local XML form of the data into a common class, localexml.Locale, for use by the scripts that write and read it. Hopefully, it'll be easier to keep what's written and read in sync hereafter. Inlined some trivial functions in the process; and only create a day-number mapping dictionary once, instead of once per use. Also made it easier to see which attributes get which special handling (and documented this); and revised an assertion to be more helpful. Change-Id: I711b6a193a4ad94b5ff714c025f2732cd1a965a7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up the output code for the big table of CLDR dataEdward Welbourne2017-06-082-563/+642
| | | | | | | | | | | | | | | | | | | Include headers for all fields (several were missing). Make field widths explicit to headers can line up with content. Use the same format for the (common part of the) all-zeros line. Document and lay-out headers and format string, to make them easier to keep in sync. Make a pair of comments clearer. Re-ran the script to regenerate the table: the result is best viewed with git show -w, to ignore the spacing changes (or git show -b to notice only the one harmless discrepancy exposed in old all-zeros data). Aside from spacing, locale_data[] has gained some missing columns in its header comment, which now lines headings up properly above actual data. Change-Id: I44242f38391353f2ec8e144cb7e8b54b0a359341 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Made the "do not edit generated code" notice clearerEdward Welbourne2017-06-084-6/+10
| | | | | | | | | Say where to find the scripts and make clear what to update to get changes. Change-Id: I424b7fdf846f7141c6df81eef90eb1ca0378bcf8 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Give reasons when skipping filesEdward Welbourne2017-06-081-4/+4
| | | | | | Change-Id: I397d17ad252363dd0d7d9b4f53b7d105075da306 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use python more competently in CLDR/qLocaleXML scriptsEdward Welbourne2017-06-085-281/+158
| | | | | | | | | | | | | | | | Make the python2 dependency explicit (sooner or later, python3 shall be the default /bin/env python), make time-zone script executable (it had a shebang). Use triple-quoted strings, or single quotes, to avoid extra backslashes, remove some simply spurious backslashes. Use generators rather than map or filter with lambdas and iterate rather than duplicating code. Clarify some comments. Regenerated headers: this upates the date of generation, cuts back a double-blank-line to single and skips a spurious trailing comma-newline on an array's data. Change-Id: I54439f0dec132865991fe5147d509cea0f9419a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix CLDR C++ generation to name "Han with Bopomofo" properlyEdward Welbourne2017-06-082-2/+3
| | | | | | | | | | | | | | | We were using "Han With Bopomofo" (capitalized With) so that an enum member in qlocale.h would be suitably camel-case; however, this lead to spurious changes in qlocale_data_p.h where it names the script. Use the correct (lower-case with) form and arrange for the enum members to be generated with first letter of each word upper-case (but not with each word capitalize()d; some words in there are already camel-case, so .capitalize()ing would lower-case the later sub-words in these). Change-Id: I974c89dd40814eaf3bd538f06b9b4ebf17492f20 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Document how to use the CLDR-related scriptsEdward Welbourne2017-06-083-20/+46
| | | | | | | | Say where to find the data, how to unpack it and how to run the scripts to update our source tree from it. Change-Id: I5b680090bb5850f29c1e7d61efd1d450856b9949 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Document the ci key in the BLACKLIST file formatEdward Welbourne2017-06-081-4/+10
| | | | | | | | Rearranged existing top-level example to let the ci example make some kind of sense. Change-Id: I0a5dd6270aef419c8a33d390c801460f23e10667 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Typo-fix: s/looses/loses/gEdward Welbourne2017-06-084-4/+4
| | | | | | | | | | | | | When an archer lets go of the bow-string, she looses an arrow; when the hounds are straining at their leashes and the handler lets go, he looses the dogs. It's archaic usage now; we'd normally say "lets loose", "lets go" or "releases". In any case what was meant here was that something got lost; a widget loses focus or a network loses its connection. Change-Id: Ic1fbe9e1f76185bcb7caf034d6be97ebfeb2e270 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix typo in QMutex's free-list's Sizes[3]Edward Welbourne2017-06-081-1/+1
| | | | | | | | | | | A QFreeList's MaxIndex is clearly meant to be the sum of its Sizes; but the parentheses in MaxIndex - (16 - 128 - 1024) doesn't give the same as without the parentheses. Noticed while reviewing a copy of this code now used by QReadWriteLock (which has this fix). Change-Id: I9f68171475b3c6edc18896056b5532183fee92b2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Start supporting purely offscreen QOpenGLWidgetLaszlo Agocs2017-06-083-12/+95
| | | | | | | | | | | | | | | | | | | | | | | Due to popular demand. It does have it benefits (especially when it comes to convenience) to allow grabbing QOpenGLWidgets even when they are not part of an actual window and are not actually visible. Does not involve much more than dropping the warnings and bailouts when there is active native window (because the QOpenGLWidget/its parents are still hidden). In addition the device pixel ratio from metric() has to be fixed as well. [ChangeLog][Qt Widgets] QOpenGLWidget is now able to render and return its content via grabFramebuffer(), QWidget::grab() or QWidget::render() even when the widget has not been made visible. Task-number: QTBUG-47185 Task-number: QTBUG-61280 Change-Id: Icc2b0b3ce9778a3eb6409d54744238568abb0f0d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* xcb,evdevmouse: don't use qpa compatibility functionsGatis Paeglis2017-06-085-17/+30
| | | | | | Change-Id: If3f474dcb6ee117c6dd26cd56fd4ad8d39e60e1f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* json: Add operator[] to QJsonDocument for implicit object and array accessTor Arne Vestbø2017-06-083-0/+76
| | | | | | | | | | | Makes it easier to pull out data from a document when the structure is known up front, while still supporting default values if the structure does not match the expectation, eg: int age = QJsonDocument::fromJson(ba)["users"][0]["age"].toInt(-1); Change-Id: Ief0899bbb81610f6f22a56e2ac846121bffe77a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* json: Add operator[] to QJsonValue for implicit object and array accessTor Arne Vestbø2017-06-083-0/+86
| | | | | | | | Saves a lot of manual toArray() and toObject() calls when the JSON structure is usually known anyways. Read only access for now. Change-Id: I5fd787144198e0443e4da285a11ce2597b66f99f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QKeySequence: remove a clause guarding an impossible conditionMarc Mutz2017-06-081-1/+0
| | | | | | | | | | | All code paths leading up to this line unconditionally dereference the pointer, so it cannot be nullptr. Remove the check. It only confuses readers of the code and probably will trigger warnings with tomorrow's compilers. Change-Id: I31a643738e951da9c04f0091645016276b047761 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QSSLSocket::readData return -1 when socket is not connectedAlbert Astals Cid2017-06-082-0/+9
| | | | | | | | | | As QAbstractSocket::readData does and as the documentation of QIODevice says "this function returns -1 in those cases (that is, reading on a closed socket..." Change-Id: I1e64673f6a6d792a640bd6cb28b2bb5a0f18dc36 Reviewed-by: Aleix Pol Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-06-07171-658/+1391
|\
| * Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-07171-658/+1391
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| | * Remove -permissive- flag from MSVC 2017 buildOliver Wolff2017-06-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flag makes the build fail for UWP as well as desktop Windows . It will trigger a compile error as soon as UWP API is used, which happens in qtbase for desktop in the direct2d backend, but it is also used for other Qt modules, so we decided to disable the flag for now. This patch partly reverts b7d76e533c76f7d9e9373d68f33ff9595fe8ce52 Task-number: QTBUG-61239 Change-Id: I0cc630f4c09c52f0c116f4a7b95a44c3a55e0be3 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * Revert "moc: remove _MSC_EXTENSIONS #define"Jani Heikkinen2017-06-052-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems this change is preventing us to integrate qt5.git in '5.9' This reverts commit c3030d7163245b55abfd09eefe696c035c55011c. Task-number: QTBUG-61204 Change-Id: Id98afaa23be0a8dd6f2c54a899f46542c65436aa Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Work around uname(2) on Apple mobile OSes not returning the proper archThiago Macieira2017-06-051-0/+20
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-61205 Change-Id: Ia3e896da908f42939148fffd14c46fc991650f6f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * Fix build with clang 4.0 and libstdc++ 7.1.1Sérgio Martins2017-06-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this setup clang cannot use c++1z yet. Fixed with clang 5.0. In file included from /data/sources/qt/qt5/qtbase/src/corelib/codecs/qtextcodec.cpp:53: In file included from ../../../include/QtCore/5.9.1/QtCore/private/qcoreglobaldata_p.h:1: In file included from ../../../include/QtCore/5.9.1/QtCore/private/../../../../../../../../../sources/qt/qt5/qtbase/src/corelib/kernel/qcoreglobaldata_p.h:55: In file included from ../../../include/QtCore/qmap.h:1: In file included from ../../../include/QtCore/../../../../../../sources/qt/qt5/qtbase/src/corelib/tools/qmap.h:52: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/map:60: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/bits/stl_tree.h:72: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/bits/node_handle.h:39: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:27: error: use of class template 'optional' requires template arguments Change-Id: Ib4cd8a9f5791a6e6cae4e6d61dfec3ad50dd63ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * define QT_NO_EXCEPTIONS reliably when using ClangR.J.V. Bertin2017-06-032-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang's definition of the __EXCEPTIONS macro is inconsistent across platforms. When compiling for Darwin, Clang 3.6 and newer will set the token when exceptions are enabled in either C++ or ObjC. This change adds the reliable check described in the Clang 3.6 release notes to ensure that QT_NO_EXCEPTIONS is defined when required. The check requires the use of the Clang-specific __has_feature() syntax for which a new proxy macro QT_HAS_FEATURE(x) is added in qcompilerdetection.h Task-number: QTBUG-61034 Change-Id: Ie7b482dfa1a4a5b700a6b97562c26b626be1fc04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * MSVC: Enable standard-conformance mode by defaultThiago Macieira2017-06-032-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | That's not the same as -Za. Change-Id: Ica9894dc9b5e48278fd4fffd14bb316b687abffe Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Disable bogus GCC 7 warning about string op overflowThiago Macieira2017-06-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis proves this is a false positive: qarraydataops.h:69:17: error: ‘void* memset(void*, int, size_t)’: specified size between 18446744056529682436 and 18446744065119617024 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] Change-Id: I7814054a102a407d876ffffd14b6ab0be9e222fc Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Ssl socket - fix broken certificate verificationTimur Pocheptsov2017-06-021-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On iOS QSslConfiguration always has an empty list of system CA certificates. Calling SecTrustSetAnchorCertificatesOnly(.., TRUE) on iOS results in SecTrustEvaluate failing to verify a valid certificate, since there are no 'anchors' at all. We can use SecTrustSetAnchorCerificatesOnly(.. TRUE) on macOS only, where we do extract/copy system certificates using SecTrustSettingsCopyCertificates and save them in a QSslConfiguration's list. Task-number: QTBUG-61053 Change-Id: I70d4e46273d78414baaac8531273def707c3eebc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>