summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* don't make false promises about configure FOO=bar assignmentsOswald Buddenhagen2017-02-221-2/+1
| | | | | | | they don't actually override values from pkg-config. Change-Id: I00bc7f4bcbfb4e036cb1ac9fa842d68523f54605 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* add configure -list-librariesOswald Buddenhagen2017-02-223-1/+40
| | | | | | | currently mostly for debugging purposes (especially with -verbose). Change-Id: I8af32c61df0b19861aa79bc4bbdd3f6095dbe9b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* add configure -list-featuresOswald Buddenhagen2017-02-224-965/+32
| | | | | | | | | also actually deletes qfeatures.txt, which was already claimed by a668c6a6, but not actually done. Task-number: QTBUG-58411 Change-Id: I686760632fee7c10b01bd2e83f2481b01bc2b774 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* use regular configure mechanism for openssl library referencesOswald Buddenhagen2017-02-225-34/+22
| | | | | | | | | | | | don't attempt to hand-craft a library export any more. instead, use the configure system's built-in mechanism, and refer to it via QMAKE_USE. this also allows us to rely on transitive dependencies in the autotest. as a side effect, this makes the openssl-linked feature imply the openssl one. Change-Id: I5dd209b63bc8fbbc62852f6ffc472d4452ea2e68 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* fix usage of "empty" librariesOswald Buddenhagen2017-02-224-21/+13
| | | | | | | | | | | | | a header-only library in a default location would produce no variables at all, making it appear undefined. fix this by forcing the writeout of the QMAKE_LIBS_* variable, and use its definedness (rather than non-emptiness) as a signifier. this works for both QMAKE_USE and configure tests'/libraries' 'use' entries. Change-Id: Id7a1e23725caba1a91ea4db448b4aeb7fe632393 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* prefer library's export name when looking up input variablesOswald Buddenhagen2017-02-221-5/+14
| | | | | | | | | | if multiple library entries provide the same export (as openssl is going to), it makes sense to make them recognize the same input variables, as it would be rather counterproductive to require different configure arguments for each. Change-Id: Ia32842e95294296d50220297f85689bc92de2d05 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* configure: refactor qtConfExportLibrary()'s interfaceOswald Buddenhagen2017-02-221-14/+18
| | | | | | | | pass the library name instead of a library source object. improves overall legibility at a marginal runtime cost. Change-Id: I248ee9622af2b2c37daa2dbc0cc0bca5701d7925 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTimeZone: do not access static functions through this->Marc Mutz2017-02-221-7/+7
| | | | | | | | The this pointer cannot be null, so we can't do d->staticFunction while d is a null pointer. This was caught by Clang 3.8's ubsan. Change-Id: I3c0d39b88cca83d827a69ed1544a4412b18ac907 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Disable optimizations for macx-icc debugThiago Macieira2017-02-211-2/+2
| | | | | | | | | | | icc defaults to -O2, so this was causing debug code to be built like that, making debugging very hard. This change also hardcodes -O2 for release builds, just in case. Change-Id: Ibc5c715fda334a75bd2efffd14a478ce539a3a3f Reviewed-by: Robert Pancoast <RobertPancoast77@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove alias options from linux-icc/qmake.confThiago Macieira2017-02-211-1/+1
| | | | | | | | | They are the default with icc. Change-Id: Ibc5c715fda334a75bd2efffd14a478c20b527d7c Reviewed-by: Robert Pancoast <RobertPancoast77@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash while dropping a tabbed group into a single floating QDockWidgetOlivier Goffart2017-02-212-5/+3
| | | | | | | | | | | | | | | | The problem was caused by commit 0feeb6f6d2cfaa964763ca1fcab65672812b4eef which fixed QTBUG-58036. It reparented widget that used to be skiped. In particular, floating widgets are skiped. But seting the parent of a floating widget docks it. And so as a result it would not be skiped anymore. This has two side effect: This breaks the animation (as the widget is docked too early; and cause crash when QDockWidgetGroupWindow get reparented as this breaks invariant that these are always floating. So restore the skip from before commit 0feeb6f6d2cfaa964763ca1fcab65672812b4eef, and explicitly set the parent in all cases when the animation finishes. Change-Id: I0e3e29ad22d6ffe4d62242d48a18dadb916fc14f Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* Make sure to use C locale during time tests that assume itEdward Welbourne2017-02-203-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some format and parse tests for time and date-time depended on locale but had test data for the C locale (so fail if the test-environment has, e.g., LANG=de_DE@utf8). So impose the C locale (until Qt 6). The date-time test did *some* attempts at fixing for locale, but failed to handle am/pm; and we do have "### Qt 6" comments in Q(Date|Time)+::fromString indicating that we intend to switch these methods to use the C locale by default (which shall fix this once and for all). So rip out the incomplete localization now and test we work properly at least when the locale used *is* C. Add a comment to the matching QDate test to rip out its (presently adequate) matching code once we do get to Qt 6 and make fromString() use the C locale. QDateTimeParser uses systemLocale(), which is initialized the first time it gets accessed; so we need to frob the locale *early*; doing so in the test-class constructor is about as early as we conveniently can; and seems to work (while doing it in individual tests does not). (There is no point rolling back at the end; the QSystemLocale global has been set up by then, so the roll-back would merely leave the global out of sync with setlocale() and the environment.) Task-number: QTBUG-58728 Change-Id: Ifa6778a80276050a099387a6dab15a1096be7561 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QLoggingRegistry: fix potential data raceMarc Mutz2017-02-202-7/+16
| | | | | | | | | | | | | | | | | The 'rules' vector is made up of all the individual {env,config,...}Rules vectors under mutex protection whenever init() is called (only from the QCoreApplication ctor) or, at any time, by a call to QLoggingCategory:: setFilterRules(). Yet, the writes to the individual *Rules vectors were never protected by registryMutex, racing against the reads of the same vectors in the updateRules() function. Fix by protecting all access of all member variables with registryMutex. Add some strategic comments to make analysis easier for the next guy. Change-Id: If68d15a553ec7038693574a34f10a39f4cd480e8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QMacStyle::sizeFromContents: don't do anything in CT_Menu caseOleg Yadrov2017-02-171-6/+1
| | | | | | | | | | In this case we can safely return the same QSize which we accept since it is already contains the right size for the given menu and this size will be bounded to screen geometry before QMenu will be displayed anyway. We also get rid of one dependency on HITheme. Change-Id: I7502a96d180fc4a41ce3dfabe8a200b886016348 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QMimeDatabase: fix matching of filenames with different length when lowercaseDavid Faure2017-02-172-1/+5
| | | | | | | | | AİİA.pdf takes 8 QChars, but after lowercasing it takes 10, so the code cannot assume the length to be the same. Task-number: QTBUG-58822 Change-Id: Id6fbb99f6afd08ee420099cd66372732d7598d9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QReadWriteLocker: Fix race in unlockOlivier Goffart2017-02-171-3/+3
| | | | | | | | | | | | | | | | | An Acquire barrier in QReadWriteLocker::unlock was missing to synchronize with the testAndSetOrdered on d_ptr in the lock functions. The race is between the write of d->writerCount in tryLockForWrite, and the read in unlock. The acquire on d->mutex is not enough because it is not on the same object. While that race could be fixed by taking the newly-allocate()ed d's mutex before publishing it with testAndSet, there's another race, on 'recursive', between a newly-minted Private* with recursive == false in tryLockForWrite(), and the read of 'recursive' in unlock(). Task-number: QTBUG-58917 Change-Id: I10ba36573c0e57468d11e9b77d85045711feaea1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* fix VNC platform plugin build on big-endian machinesShawn Rutledge2017-02-173-5/+10
| | | | | | | Task-number: QTBUG-58734 Change-Id: I3e44ee4be5003acaba2f1b8ed2658a3ff1bd700e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* Adapt to the C++ SIC introduced by P0012: noexcept overloadingEric Lemanissier2017-02-175-0/+268
| | | | | | | | see 5a1b4832a2 for more detail Task-number: QTBUG-58142 Change-Id: I51851ea9b4fe7b8eeadc452bc3dbb1ea00026d29 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Respect XDG_CONFIG_HOME when getting ibus socket locationFlorian Bruhin2017-02-171-1/+2
| | | | | | | | | Task-number: QTBUG-58687 Change-Id: I97ea8b7d7caf922227a92348fb914aead1ecd312 Reviewed-by: Tinu Weber Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix a race in QFreeListOlivier Goffart2017-02-171-2/+2
| | | | | | | | | | | | | The _next variable need the acquire and release fence in next() to synchronize with the equivalent operations in release() (which already have the them) The ordering on the _v[block] is not enough as this does not synchronize the same object. Task-number: QTBUG-58917 Change-Id: I17cc39e6791433348b6227363dbea92bcf03700d Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVarLengthArray: fix appending an already-contained itemMarc Mutz2017-02-172-7/+30
| | | | | | | | | | | | | | | Like the lvalue QVector::append() overload, when we reallocate, we need to take a copy of the function's argument because the reference will get stale upon reallocation. Add a test. [ChangeLog][QtCore][QVarLengthArray] Fixed a bug involving appending an item already in the container to the container again. Change-Id: I06eeed6cb383dd5924e47a302bb3d1666d04c8e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: use active window device pixel ratio for drag pixmapOleg Yadrov2017-02-171-0/+4
| | | | | | | | | | | | | | | | | | In QCocoaDrag::dragPixmap, it treats QDrag::source as a QWindow, but it is not - it's just a generic QObject* of some kind (which QQuickDrag sets to the originating QQuickItem, and the widgets stack sets to a QWidget). This failure means that dpr stayed at 1.0. Unfortunately it’s not possible to receive a pointer on QWindow directly from QQuickItem because QtWidgets and QtQuick do not share the sources, but we can use the same dpr as current focused window has because drag can only start from active window - press on a window which is not focused should activate it first. Task-number: QTBUG-57942 Change-Id: Id358c181d03d519188caaa83fb4226033b8ed1ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* QDir::mkpath: don't try to mkdir in automount filesystemsThiago Macieira2017-02-162-34/+64
| | | | | | | | | | | | | | | Automount filesystems like /home on many operating systems (QNX and OpenIndiana, at least) don't like if you try to mkdir in them, even if the file path already exists. OpenIndiana even gives you an ENOSYS error. So instead, let's try to mkdir our target, if we fail because of ENOENT, we try to create the parent, then try again. Task-number: QTBUG-58390 Change-Id: Ibe5b1b60c6ea47e19612fffd149cce81589b0acd Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> Reviewed-by: David Faure <david.faure@kdab.com>
* QNetworkSession - register types before connecting slotsTimur Pocheptsov2017-02-161-4/+4
| | | | | | | | | | | | | | | | | | | | | QNetworkSession's ctor has a race condition: it 1) connects signals/slots and also 2) registers meta-types (but after these connects). Our users apparently have a lot of per-thread QNAMs in multiple threads (and implicitly many QNetworkSessions on different threads too). From error logs it appears that while one thread tries to connect signals/slots and evaluates the types of signal and slot arguments, another thread can register this type. If the first thread extracted signal argument types, then the second registered this type, we can end up in a 'type mismatch' error on the first thread with seemingly the same types in a debug message (something like "type mismatch A::Some <-> A::Some") - they have the same name, but one has type() == 0 and another - some non-zero type(). Now we call qRegisterMetaType before connect. Task-number: QTBUG-50901 Change-Id: Idbb9515573e174bbc5e5bf55dc3a7911a81646ea Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Eliminate QT_NO_DYNAMIC_LIBRARYUlf Hermann2017-02-162-23/+11
| | | | | | | | | The library feature already covers this. As library depends on the dlopen compile check, we can assume dlopen to be available, also on vxworks. Change-Id: Idcdb07ab4688c6158651d9a5ad5e2ba126bd7d9e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QReadWriteLock: make field 'recursive' constMarc Mutz2017-02-161-1/+1
| | | | | | | | | | It is never written after initialization, and accessed concurrently outside mutex protection, so make sure that it never changes by marking it as const. Change-Id: Ib28b2e8b3067d596a95d1699165a6ebfb15fe674 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QJNIHelpers: unbreak runnables counterMarc Mutz2017-02-161-2/+2
| | | | | | | | | | | | | | | | | | Adding 0 each time will obviously not produce a new identifier each time... Also use static initialization for QBasicAtomicInt. A default-constructed static QBasicAtomicInt at function scope will be dynamically initialized. It will still be zero-initialized, but at least GCC adds guard variables for such objects. When using aggregate initialization, the guard disappears. Amends 265db5ad9bda9c984393c1e95fd27dcc4633ed1c. Change-Id: Ia71290cf26c486dcbcc74381f12cd0c4712d6019 Reviewed-by: David Faure <david.faure@kdab.com>
* xcb: Allow to disable XInput 2 support by setting QT_XCB_NO_XI2 env varAlexander Volkov2017-02-161-1/+2
| | | | | | | | | | Use of XInput 2 may result in regressions. For example we call XISelectEvents for each window every time a device plugs/unplugs. It causes significant delays when there are many native windows. Change-Id: I60b799bb667d0e4bca1f9c52cdaa07b04bcc749f Task-number: QTBUG-57013 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* qcssparser: Undef TILDE to fix compilation on HurdDmitry Shachnev2017-02-151-0/+4
| | | | | | Change-Id: Ic3168629565618bcd7f26e47579beaa1bbd22e39 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use Qt::PreciseTimer for the QDeadlineTimers in QTest::qWait*Thiago Macieira2017-02-151-3/+3
| | | | | | | | | QDeadlineTimer will eventually support CLOCK_MONOTONIC_COARSE on Linux, so let's be safe before that change appears. Change-Id: I9b423f1b71194205b27afffd14a383a7e9f66a9d Reviewed-by: Stéphane Fabry, Cutesoft <stephane.fabry@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove the name cache from QMetaType::typeNameThiago Macieira2017-02-151-25/+14
| | | | | | | | | | | | | | | It was unnecessary, since we only cached the static types, which are all generated by the macro anyway. The way it was implemented, this produced data races that are strictly-speaking UB, even if all the threads were writing the same values to the same data locations. This commit changes a little the code to simplify, since we're changing those lines anyway. Task-number: QTBUG-58851 Change-Id: Idc5061f7145940f987dffffd14a30047846e3113 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Example: migrate flightinfo to QRegularExpressionSamuel Gaist2017-02-151-3/+3
| | | | | | | | Update the flightinfo example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I2395b37170565e922500e675210c400e90ae0f73 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Example: migrate grabber to use QRegularExpressionSamuel Gaist2017-02-151-4/+5
| | | | | | | | Update the legacy grabber example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I1d1871b7e82cdb214fdd8ad55a606d5e7682fab1 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Example: migrate the arthur code sample to use QRegularExpressionSamuel Gaist2017-02-151-5/+4
| | | | | | | | Update the arthur code sample to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Ic7efd4466b4c0fa50170b80ebb22fcb3624399ce Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Example: migrate the codecs example to use QRegularExpressionSamuel Gaist2017-02-151-3/+4
| | | | | | | | Update the codecs example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Ibd60b7256071f8166c4bf38e6a40935494c3cf3f Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Example: migrate settingseditor example to use QRegularExpressionSamuel Gaist2017-02-152-33/+34
| | | | | | | | Update the settingseditor example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I07e34bf916bdde161c4253fca70b853061cd589b Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Example: migrate stylesheet example to use QRegularExpressionSamuel Gaist2017-02-151-3/+4
| | | | | | | | Update the stylesheet example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I7061b8fd462ff012cb67bfdade656b3bfe442dd8 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Doc: fixed explanation in Qt::Tool documentationSamuel Gaist2017-02-151-1/+1
| | | | | | | Clarify the the macOS implication of the flag. Change-Id: Ic68e1ac668cfa68abf868ba6bdd46241dfa9b9a7 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Package transient zone setting in test to ensure restore on failEdward Welbourne2017-02-151-13/+25
| | | | | | | | | | | tst_QDateTime::operator_insert_extract() was setting the time-zone and taking care to restore it at the end of the test; however, if the test were to fail, the restore would be skipped. Package the zone-setting and restore in a class instance, so that premature return can't bypass the restore. Change-Id: I3df63260da17e481ef4d0d107d9f0fdea3e147e7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QJNIHelpers: make mutexes staticMarc Mutz2017-02-151-2/+2
| | | | | | | Amends 265db5ad9bda9c984393c1e95fd27dcc4633ed1c. Change-Id: I707bb88285531ee9f82efec46901871d53413eb3 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* QFileDialog: Protect against nullptr dereferenceKevin Funk2017-02-151-1/+1
| | | | | | | | | | | | | | When the QFileDialog receives a language change event, and native dialogs are used, this code path dereference a nullptr in the qFileDialogUi member. Protect by checking the return value of QFileDialogPrivate::usingWidgets() as done in other places deferencing qFileDialogUi. Fixes a crash in GammaRay Change-Id: I3e9eb81c75d9fc983519a58c5ec06e316ac80263 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix indentation of source code example in docsFrederik Schwarzer2017-02-151-8/+8
| | | | | Change-Id: Icf94c9adc55d16acd26831cce331054a8c49652d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* tst_QThreadPool: don't deadlock when a cancel() test failsMarc Mutz2017-02-151-0/+20
| | | | | | | | | | | | | | | | | | | | | We keep the runnables from finishing by having them block on a QSemaphore::acquire() call inside run(). If we fail a test that precedes the call to sem.release() further into the test, the early return will cause the thread pool to be destroyed, which will then attempt to wait for the runnables to finished, which, in turn wait for the semaphore to be released. -> dead lock Fix by introducing a RAII object to release the semaphore with a sufficiently large number to unblock all runnables. That number will in some situations be too large, but that does not matter. Change-Id: I1ec7e29b37bc36309e93e6e30708cc7db3c9579c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Wait for runnables to start up in tst_QThreadPool::cancel()Marc Mutz2017-02-151-3/+10
| | | | | | | | | | In order to get reproducible runs of the test, we need to wait in the main thread until all runnables have started executing. Otherwise, what the cancel() loop below actually does will vary from run to run. Change-Id: Ib912b0943e7bbd55c9480ae6fd4011ba20ac457e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QThreadPool: simplify cancel()Marc Mutz2017-02-151-5/+8
| | | | | | | | | | Instead of allocating a statically-sized array on the heap, use an automatic C array instead. Replace some magic numbers with named constants. Change-Id: I17d29a76a67c4a413453ac26a5dee8cd54a8a37d Reviewed-by: David Faure <david.faure@kdab.com>
* Fix UB (data race) in tst_QThreadPool::cancel()Marc Mutz2017-02-151-10/+17
| | | | | | | | | | Manipulating a simple int from multiple threads is a data race, thus undefined behavior. Fix by using QAtomicInt and atomic operations instead. Change-Id: I5418bc260da57fe353a71b8e5c7c1c97adbe7597 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix UB (data race) in QtAndroidPrivate::requestPermissionsSync()Marc Mutz2017-02-151-2/+4
| | | | | | | | | | | | | | | | | | If the QSemaphore::tryAcquire() call times out, we mustn't touch *res, because there was no happens-before relation established between *res = result in the lambda and our returning *res; Fix by returning a default-constructed hash in that case. Add a strategic std::move(). The same problem exists in runOnAndroidThreadSync(), but I have no idea how to solve it, because there the shared object is the runnable itself. Change-Id: I9a2c431144c169fbd545763555d96153143a11bf Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* QJNIHelper: fix a potential race in sendRequestPermissionsResult()Marc Mutz2017-02-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The code obtained an iterator into a QHash under mutex protection, then dropped the lock, dereferenced the iterator several times and only retook the lock to erase the element from the QHash. This is very smelly. QHash provides no official iterator validity guarantees, and the container isn't const, either (which would imply thread-safety). In particular, the dereference into the container outside the critical section is cause for concerns. Simplify the code, removing any doubts about its race-freedom, by taking the payload item out of the hash before dropping the lock, and using only the local strong reference in the remainder of the function. The only other references to g_pendingPermissionRequests are insertions with unique-by-construction keys in QtAndroidPrivate's requestPermissions(), so there was no reason to keep the item in the hash for the whole duration of the sendRequestPermissionsResult() call. Change-Id: I39fe0803b13b3046d1f0fd9c8e96c531406d57da Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Update QSyntaxHighlighter docs to use QRegularExpressionAaron Linville2017-02-152-60/+22
| | | | | | | | | | | | | | Update the QSyntaxHighlighter examples to use the new QRegularExpression class in place of QRegExp. Fix typos. Remove duplicated snippet. Replace lengthy section of duplicate text in highlight(..) with a note to see the detailed description. Task-number: QTBUG-58494 Change-Id: Id8d94bddbed52e6e52feac107f6fc84e2fe4518a Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Enable QtAndroid::runOnAndroidThread in a ServiceHeikki Haveri2017-02-152-6/+17
| | | | | Change-Id: I214f5dc70c52011a5e1712ea70f97f8b564fb664 Reviewed-by: BogDan Vatra <bogdan@kdab.com>