summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Add byte-based units to CLDR dataEdward Welbourne2017-06-132-555/+610
| | | | | | | | | | | | 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>
* 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-121-5/+3
| | | | | | | | | 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-123-126/+13
| | | | | | | | | 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-121-2/+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-122-136/+140
| | | | | | | 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-125-4/+968
| | | | | | | | | | | | | | | | | | | 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>
* Reduce code duplication in writing of string data for localesEdward Welbourne2017-06-091-1/+2
| | | | | | | | | | 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>
* Clean up the output code for the big table of CLDR dataEdward Welbourne2017-06-081-554/+554
| | | | | | | | | | | | | | | | | | | 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-082-3/+5
| | | | | | | | | 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>
* Use python more competently in CLDR/qLocaleXML scriptsEdward Welbourne2017-06-082-5/+3
| | | | | | | | | | | | | | | | 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 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>
* json: Add operator[] to QJsonDocument for implicit object and array accessTor Arne Vestbø2017-06-082-0/+56
| | | | | | | | | | | 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-082-0/+56
| | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-0711-45/+111
|\ | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * 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>
| * 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>
| * 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>
| * 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: 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>
| * qEnvironmentVariableIntValue: fix the case of a non-numeric valueThiago Macieira2017-06-011-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * QAbstractItemModel::supportedDragActions: fix regressionDavid Faure2017-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
| * QStorageInfo: Pass MNT_NOWAIT to getmntinfoThiago Macieira2017-05-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This forces the API not to wait for synchronous I/O from the filesystems and get the information, but instead just use the cached information directly. It's a good idea if we have an unresponsive FS, like NFS with an unreachable server. Task-number: QTBUG-61096 Change-Id: Iddeeffb6f4ad4a2894a2fffd14c32f6e90664a63 Reviewed-by: Tobias C. Berner Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QStackedLayout: Fix UB (invalid cast) in qt_wasDeleted()Olivier Goffart2017-05-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixup of commit b4995eb7491c1b4784a1bf48db834c11c42b8d9d. We can't call QWidgetPrivate::get(w) on a deleted QWidget, because of the call to the member function QWidget::d_func. We can however call QObjectPrivate::get since we still are in the QObject destructor. tst_qstackedlayout now pass without ubsan Warnings. Change-Id: I4e839a97ddbd1cf21435a8fca76523b98a1f7d9b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Add Integrity ARMv8 detectionTero Alamäki2017-05-291-4/+5
| | | | | | | | | | | | | | Change-Id: I352c9b16077011aad1175e31ffaadfa44d2403ea Reviewed-by: Nikola Velinov <nvelinov@ghs.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QScopedArrayPointer: document the most important ctorMarc Mutz2017-06-062-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | The ctor that everyone would want to use was marked as \internal, probably because of the SFINAE expression appearing in its signature. Move the SFINAE to the template argument list, which QDoc hides from the user, and drop the \internal. While at it, drop the home-grown std::is_same re-implementation and use the real deal. Change-Id: Ia357fe65f94e10ac9eeccb3490aa8b3e68114cbb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Remove QWinOverlappedIoNotifierJoerg Bornemann2017-06-023-522/+2
| | | | | | | | | | | | | | | | | | | | This class in unused in qtbase since Qt 5.6.1. The only outside usage was in qtserialport, which got its own copy of QWinOverlappedIoNotifier in commit qtserialport/65dba188. Change-Id: I7668e67a1cc49c4418c66141784b180cd5f9d479 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-05-3011-2767/+10543
|\ \
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-2911-2767/+10543
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/win32-g++/qmake.conf mkspecs/win32-icc/qmake.conf src/platformsupport/fontdatabases/mac/coretext.pri src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
| | * Doc: Replace "Macintosh" with something suitable or omit itLeena Miettinen2017-05-231-4/+4
| | | | | | | | | | | | | | | Change-Id: I3067bd7e6ae2d6d68d5232a56eaf368a0415876c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * Doc: fix grammar in QScopedPointer's detailed descriptionMitch Curtis2017-05-231-1/+1
| | | | | | | | | | | | | | | Change-Id: I3ce9650d62f3b53683c6b6f210c1413e94ae006c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QItemSelection: fix a quadratic loopMarc Mutz2017-05-221-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QList::erase(it) is a linear operation. Calling it in a loop constitutes quadratic behavior. Fix by using the erase-remove idiom. Write a generic function object QtFunctionObjects::IsNotValid, instead of a lambda, because I am building up a collection of such function objects in my tree, to be submitted any time now™, so this will reduce the churn once that gets merged. Wrap it in the unnamed namespace to avoid ODR violations in case this pattern repeats. Replace an existing erase-remove idiom's isNotValid lambda function with the new function object. Change-Id: I4f0af04e7b201eb168e79beeda332eee3c6f33c3 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-196-2748/+10505
| | |\ | | | | | | | | | | | | Change-Id: Ia8ac1960387c0f78c32f9d0385bb0aa9a8209af1
| | | * Revert "Add qt_safe_ftok wrapper for ftok"Thiago Macieira2017-05-183-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ac0184d6085d9e4f7f59352e563055311f4d8792. That commit added the use of qHash in qt_safe_ftok, which made ftok even more unsafe than previously. Since the algorithm in qHash can change across Qt versions, we need a stable algorithm instead. [ChangeLog][Important Behavior Changes] Reverted a change that caused Qt 5.6 through 5.8 not to connect to QSystemSemaphore and QSharedMemory created by running applications using Qt earlier than 5.6. Unfortunately, this means that Qt 5.9 will not connect to 5.6-5.8. Task-number: QTBUG-60771 Change-Id: Ibc3472e1c11d46358357fffd14bf51aeb48ef2c8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | * QMimeDatabase: update freedesktop.org.xml to shared-mime-info 1.8David Faure2017-05-081-2719/+10499
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and update the unittest accordingly. Compared to the 1.8 release there is one change in freedesktop.org.xml, the magic for application/x-java-keystore was changed from host32 to big32, as done upstream, see https://bugs.freedesktop.org/show_bug.cgi?id=99328 Task-number: QTBUG-60608 Change-Id: I47de71c9396cfc3eabc884d5679c73a3e4850a17 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Eliminate ambiguous casts involving qfloat16Glen Mabey2017-05-071-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The operator double() and operator long double() members of qfloat16 are causing cast ambiguities. This removes them, leaving only operator float() which seems to be adequate. Also, additional arithmetic operator tests were added which without this removal fail to compile. Change-Id: Id52a101b318fd754969b3de13c1e528d0aac2387 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Merge 5.9 into 5.9.0v5.9.0-beta4Oswald Buddenhagen2017-05-0412-34/+74
| | | |\ | | | | | | | | | | | | | | | Change-Id: Id3fc911f024cba292a5c426b36aa94ff9f3c0ef7
| | | * | QItemSelectionRange: don't compare pointers with op<Marc Mutz2017-04-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... use std::less<> to avoid undefined behavior. Change-Id: Ib6736f86359c4a16fd90ca63b57a8517c6137ead Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * | | Remove unnecessary FunctionPointer::ChangeClassThiago Macieira2017-05-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those were added by accident. Change-Id: I067fcfe299b34ab6a771fffd14bf28f2d3c096f0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * | | QDirIterator docs: add a cool recursive file-finding snippetShawn Rutledge2017-05-162-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is one of the main use cases for QDirIterator, but it wasn't obvious enough that it's possible. Change-Id: Idae11cfe75dd0e16f1a960bba2470b1695d11241 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | | | | QXmlStream: don't create QStrings just to look up entities in a hashMarc Mutz2017-05-303-39/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the entity's name into the Entity struct and use a QStringView into Entity::name as the hash key, instead of a QString. This avoids having to create a QString from QStringRefs every time an entity is looked up. Only costs 280B in text size on optimized GCC 6.1 Linux AMD64 builds. Change-Id: I8dbd04c90c1ff684b794685025204abc89f68a84 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | | QThread: Refine check for presence of std::futureFriedemann Kleint2017-05-291-2/+6
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MinGW with win32 threads might not have _GLIBCXX_HAS_GTHREADS, so it needs to be checked. Amends change 597d4ff7962c0add87e4b93da4c366503d11aff5. Change-Id: I5c91d1dd3967c4922ced315b475d653b8b102ad6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | | moc: Allow NOTIFY signals defined in parent classesAlbert Astals Cid2017-05-232-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limitation is that the signal needs to be parameter-less [ChangeLog][moc] moc now supports NOTIFY signals of parent classes in Q_PROPERTY Change-Id: Iad64c96c3ec65d4be8ad9ff1a9f889938ab9bf45 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* | | | Qt containers: use std::move in take*() methodsMarc Mutz2017-05-235-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the objects out of the data structure to avoid needless copies. Change-Id: I1a69fccc431e040b229d6ea9ded0e041c208c861 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>