summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| | * winrt: Get rid of one deferral when handling socket dataOliver Wolff2017-06-022-30/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of defering one more time by emitting the signal, we can add the data to the list of available data/pending datagrams. For TCP readNotification can be invoked directly so that emission of the readyRead signal is tightly coupled to the availability of new data. For UDP sockets calling readNotification directly stops handling of more data and thus cannot be done. With the old approach it was possible, that the last bit of TCP data was lost, because the socket was closed while the data was still being processed/transferred from the worker to the engine. Task-number: QTBUG-61078 Change-Id: I9330b87876be853d310dc9e8e817ab344939d5dd Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * Fix semi-opaque linear gradient on ARGB32Allan Sandfeld Jensen2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qt_gradient_argb32 routine optimizes linear gradients with the solid blend routines that is ARGB32PM only. If the gradient is not solid, it will not get unpremultipled on write like it should for ARGB32. Covered by lancelot, but the change is less than 5%. Change-Id: Id99f2fa125cc091f3b5b29ec2d06618785d628fa Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * QStringLiteral/QByteArrayLiteral: fix/add documentationGiuseppe D'Angelo2017-06-012-30/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Various editorial fixes. Also, in 5.9 QStringLiteral does not fall back to fromUtf8 any longer, but guarantees a compile-time construction. Change-Id: Ida4698cf8e32a6e3de97b2c16b997fc9630c9db9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Doc: Remove references to screenshots illustrating different stylesLeena Miettinen2017-06-0122-231/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... from widget class descriptions. Use one screenshot from Windows instead. The styles change and the screenshots become outdated very fast, so it is easier to update just one screenshot now and then. The styles can still be seen in the style gallery topics. The image files will be removed in a follow-up commit after all references to them have been removed. Change-Id: Id326c141f4884a2e4f67a4fe8681d8c65f8b24ba Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * Doc: Fix a typo in QVariant::toPoint docsLeena Miettinen2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-61050 Change-Id: I517f95df9d1019d37b6484e00220e8e325ee2ecf Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * winrt: Use styleHint as clue for fallbacks for font familiesOliver Wolff2017-06-013-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | Similar on how it is done for Windows desktop we also use the given style hint when building the list of fallbacks a font family. Change-Id: I71378581d07f20ebe5bf0bc757bba919cc70e118 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * Blacklist tst_QTimer::basic_chrono on macOSTony Sarajärvi2017-06-011-0/+2
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-61013 Change-Id: I1c877aeb3e141e0e19b71bf9e595ff478e313b10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * qEnvironmentVariableIntValue: fix the case of a non-numeric valueThiago Macieira2017-06-012-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation says that it's equivalent to qgetenv(varName).toInt() But the implementation wasn't. QByteArray::toInt() verifies that the entire string was consumed, so QByteArray("1a").toInt() == 0, but qstrtoll alone doesn't. That is, qstrtoll("1a", ...) == 1. The implementation also detected the base, a behavior I kept. Instead, I updated the documentation. Change-Id: I0031aa609e714ae983c3fffd14676ea6061a9268 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Merge "Merge remote-tracking branch 'origin/5.9.0' into 5.9" into ↵Liang Qi2017-05-313-4/+55
| | |\ | | | | | | | | | | | | refs/staging/5.9
| | | * Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-313-4/+55
| | | |\ | | | | | | | | | | | | | | | Change-Id: I2d7a3f3a80e6287e135e55b650f74f9a540332bc
| | | | * QHeaderView: fix visual/logical index corruption when restoring statev5.9.0-rc2v5.9.0David Faure2017-05-262-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a followup to 77a8e90cddcfa1c34518ef846a4838874a7bc0c7 which didn't handle the case where no columns had been moved. visualIndices and logicalIndices are empty until initializeIndexMapping() is called, in which case appending is wrong. As a result, visualIndex(i) would return -1 for the values over those added by read(), and an assert would happen at painting time. The fix is to leave visualIndices and logicalIndices empty if they are empty already, leaving it to initializeIndexMapping() to fill them later if necessary (e.g. when moving a column). Task-number: QTBUG-60837 Change-Id: Ia7e4b9d3122647984acd434dfaa0400df319d065 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | | | * Revert "Enable "combined-angle-lib" for ANGLE builds"v5.9.0-rc1Oliver Wolff2017-05-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combining libEGL and libGLESv2 into QtANGLE cannot be the default any longer, as the change was binary incompatible. We just had to return to previous behavior temporarily to be able to fix qtlocation. This reverts commit 97ab65076e30d8cd0cbe6bdbdb51d1dc2c0ff7e7. Task-number: QTBUG-60795 Change-Id: I3095cb5f9da30e2d873d9a186cfbc5aee3fb10b2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * | | QAbstractItemModel::supportedDragActions: fix regressionDavid Faure2017-05-314-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method now returns -1 by default, due to commit 6255cb893d which mistakenly replaced -1 with Qt::IgnoreAction (0x0). As a result, dropping is forbidden in a number of applications (I detected this in zanshin). Change-Id: I4922451216e08d5d3fe36f8ba87364a361b691bf Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>