summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* winrt: Don't wait for runOnXamlThread to finish for timers.Samuel Nevala2015-11-042-13/+15
| | | | | | | | | Fixes possible deadlock that occurs when synchronous WS event handling (introduced in ee767c8) is used across threads. Task-Id: QTBUG-49051 Change-Id: Iae973c2d4f4619b9eeb6e9393330b166ec608d27 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* Workaround part 2: don't use the version tagging symbols on AndroidThiago Macieira2015-11-041-1/+1
| | | | | | | | | | | | | | Commit d020e0781cf8647d87f7088350e40adf4f0cf8fe added a workaround to the QtCore build due to a qmake bug in handling the extra target on a Windows host. The workaround removed the tagging symbols from QtCore. This commit removes the using of those symbols from everywhere else. Task-number: QTBUG-49208 Change-Id: Idba8c29717f34c70a58fffff14133399f9f0b7f2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6Liang Qi2015-11-043-17/+59
|\
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-11-043-17/+59
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/styles/qwindowsvistastyle.cpp Change-Id: Ie1725933815891cc8c86258d4c0e8ed0ab386edf
| | * QWindowsPipeReader: fix occasional "Unknown error 995"Joerg Bornemann2015-11-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After canceling the asynchronous read operation, the notified() slot receives ERROR_OPERATION_ABORTED. We must not handle this situation as an error. This amends commit 5ce567c5. Task-number: QTBUG-48336 Change-Id: Iff948ceb3ad1f805a9de8c188fbc39ed4c76ba82 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * Fix QStorageInfo on BSD4 systemsDmitry Shachnev2015-10-271-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - On NetBSD, the defines were not properly defined; - On all other BSD systems, we use statfs which does not have f_frsize member, revert to using f_bsize there. Task-number: QTBUG-48267 Change-Id: Ia1ed484ac61a615fcbb5b45affb516b5e86a64b0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * fix growth of event queue in QWinOverlappedIoNotifier::waitFor*Joerg Bornemann2015-10-261-15/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not emit _q_notified when we're in a wait function. Otherwise, the queued signals could pile up in the event queue. Task-number: QTBUG-48653 Change-Id: I071863e2356e17c7004e3b7ca359967cb115e343 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Make variable const as it should beEdward Welbourne2015-11-041-1/+1
| | | | | | | | | | | | | | | Change-Id: If5782473eceaa38de75b25d1da247dea9fe135da Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Use memset to clear struct tm before filling fields.Edward Welbourne2015-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This ensures any non-standard fields (e.g. glibc's tm_gmtoff) are clear, as well as the other fields mktime overtly promises to ignore. Change-Id: I45d69eff7b5cb37ab910bf3d4d2d1481fd93aedb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Update high-DPI scaling enablers.Morten Johan Sørvig2015-11-042-3/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to enable and disable both at the environment variable level and at the source code level. This applies to scaling done by Qt using display density information provided by the operating system. Disabling is done with a 'veto' system: both the environment and source code my prevent the other for enabling scaling. This covers use cases of 'my system does not provide correct display metrics' and 'my application needs access to display pixels', respectively. On the environment, scaling is now enabled with QT_AUTO_SCREEN_SCALE_FACTOR=1 and disabled with QT_AUTO_SCREEN_SCALE_FACTOR=0. In source code the corresponding application attributes are AA_EnableHighDpiScaling and AA_DisapleHighDpiScaling. Not setting any of these indicates 'no preference'. The global scale factor set by QT_SCALE_FACTOR is not affected by any if the disablers. Task-number: QTBUG-46615 Change-Id: If18607d4b56ace1914a710e5aa60b2f0968e0010 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Doc: Fix snippet tags for QString::[last]indexOf() overloadsTopi Reinio2015-11-022-6/+6
| | | | | | | | | | | | | | | | | | Duplicate identifiers were introduced for QString code snippets, resulting in the wrong snippets to be quoted. Change-Id: I75e9c99cbc73bf39262079f7f53342a6ac90c2a7 Task-number: QTBUG-49111 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | qcoreapplication_win.cpp: Correct FIXME comment on qWinMain().Friedemann Kleint2015-11-021-3/+4
| | | | | | | | | | | | | | | | | | Mention that it is still used by Active Qt. Task-number: QTBUG-49148 Change-Id: Ic31b2f60b25886cd55c5fa516082d79311ab84cc Reviewed-by: Fredrik Orderud <forderud@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | State machine: fix removeConflictingTransitions()Jarek Kobus2015-10-301-2/+2
| | | | | | | | | | | | | | | | | | Since QSet<>::intersect() modifies the original set, exitSetT1 has wrong content for next iterations. Use intersects() instead. Change-Id: I09e0961ec6dfb34ade88d48d1e009529aeab82b4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix C++11 compiler detection for QNX.Rafael Roquetto2015-10-291-7/+9
| | | | | | | | | | | | | | | | | | | | 1. _HAS_DINKUM_CLIB is defined whenever a C header is included, even when Dinkum is disabled. 2. _HAS_* macros are always defined, as either 0 or 1. Change-Id: I727b854a6a733e2028e6facc327e264d0c4c9e90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Workaround: don't create ELF version scripts for AndroidThiago Macieira2015-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Somehow qmake doesn't add the correct rules for the Android makefiles, so the build fails when cross-compiling from Windows. The reason for that is unknown (could be related to that "qt_android_deps" config, but that isn't used anywhere in qmake or the buildsystem). This isn't likely to be a problem, since there are no global installs of Qt on Android. Change-Id: I1d0f78915b5942aab07cffff140f95ce32324030 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QLocale: Actually get the language script for the system localeThiago Macieira2015-10-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows code was always returning AnyScript, which in turn made QLocale::textDirection() for the default and system locales always return LTR, even if the Windows UI was in RTL mode. [ChangeLog][QtCore][QLocale] Fixed a bug that caused QLocale::textDirection() to always return Qt::LeftToRight and QLocale::script() to return QLocale::AnyScript on for the Windows system locale. Task-number: QTBUG-49031 Change-Id: I7e6338336dd6468ead24ffff14112c8d348eedba Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QLocale: Add Q_ENUM for QLocale::ScriptThiago Macieira2015-10-281-0/+1
| | | | | | | | | | Change-Id: I7e6338336dd6468ead24ffff141129d557330f00 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Doc: corrected minor language mistakeNico Vertriest2015-10-281-2/+2
| | | | | | | | | | | | Task-number: QTBUG-42977 Change-Id: Icdd70a41c9ef72224992d59342f4f97c65de78fc Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | QIODevice: fix interleaving read() and write() in text mode under WindowsAlex Trotsenko2015-10-271-3/+4
| | | | | | | | | | | | | | | | Skip the correct number of bytes in the read buffer when expanding '\n' into "\r\n" upon writing. Change-Id: I5b01fc47c330dee5c83001abf0acd7d63d790b96 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6Liang Qi2015-10-261-0/+1
|\ \
| * | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-231-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcfsocketnotifier.cpp src/tools/qdoc/qdocindexfiles.cpp Change-Id: Iae365b23afc611de8794f22cceae8b210d25aa8a
* | | Move pointer size detection entirely to qprocessordetection.hThiago Macieira2015-10-263-23/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the legacy ptrsize check, which was deficient because it did not work for multiarch systems (when we supported fat OS X binaries) and did not work for bootstrap builds because the size might be different when cross-compiling. Instead, let's rely on the predefined preprocessor macros to detect correctly. As a nice side-effect, this fixes 64-bit Android builds cross-compiled from Windows. Task-number: QTBUG-48932 Change-Id: I1d0f78915b5942aab07cffff140f9a52b9342f23 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | | Android: use Q_UNIMPLEMENTED()Marc Mutz2015-10-262-11/+11
|/ / | | | | | | | | | | | | ... instead of explicit qWarnings() Change-Id: I986a11bf519eaefd400813776d173b0ab2c2bc62 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Compile the 64-bit version of some code on all 64-bit processorsThiago Macieira2015-10-231-1/+1
| | | | | | | | | | | | | | This is true for ILP32 on x86-64, IA-64 and AArch64. Change-Id: I1d0f78915b5942aab07cffff140f9d4c277bb5d4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Convert some QDateTime::currentDateTime() to currentDateTimeUtc() (I)Marc Mutz2015-10-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latter is much faster as it doesn't have to deal with time zones. This change handles the trivial ones: Either the call to currentDateTime() is immediately followed by a call to toUTC() or toTime_t(). The latter is much faster on UTC QDateTimes, too. Credits to Milian Wolff, from whose QtWS15 talk this advice is taken. Change-Id: I872f5bbb26cbecedc1e5c0dbee4d5ac2c6eb67ee Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | QTextStream: optimize streaming of QLatin1String and const char*Marc Mutz2015-10-232-4/+48
| | | | | | | | | | | | | | | | | | | | | | Instead of converting the QLatin1String to a QString at the first opportunity, keep it around until it is appended to one of the internal QStrings in write(). Avoids a memory allocation per QLatin1String / const char* streamed. Change-Id: Id973a9b743e5a6696defbc4ef4ed2db1ef54e9cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QTextStream: Extract Method padding() from putString()Marc Mutz2015-10-222-29/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation of adding a putString(QLatin1String) overload. To keep the change simple, I kept the construction of the padChar chain per putString() call. It probably makes sense to have a QString::resize(int, QChar) to perform the padding operation in-place. Let's leave that for another changeset. Change-Id: I9ef66b8df38117e1669fd2bece6ee180a2ce3369 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Several cases of s/decelerating from/decelerating to/.Edward Welbourne2015-10-211-4/+4
| | | | | | | | | | | | | | | | | | The relevant easing curves all start out fast and end stationery; so it's at the *end* that they attain zero "velocity", so they're decelerating *to* zero, not from it. Change-Id: I69874c46c8d42f185ff815295c4470a195cc43ae Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Doc: Update examplesinstallpath to include the repository nameTopi Reinio2015-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The examplesinstallpath variable in .qdocconf files defines the path under QT_INSTALL_EXAMPLES where examples are found. To match the way examples are packaged in Qt 5.6, prefix each install path with the repository name. Task-number: QTBUG-48736 Change-Id: I6a35c94fdacaad21cd044411aba02027b9019300 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | Add an automatic use of the ELF-versioned QtCore symbolThiago Macieira2015-10-203-1/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the comment in the header for an explanation of what it does. This trick is enabled for every single .o that is compiled, unless QT_NO_VERSION_TAGGING is defined. The assembly expands to a COMDAT section, which is mergeable by the linker, so only one copy of the output is present in the ELF module. This is enabled only for Linux and x86 / x86-64 / x32 due to the requirement of writing assembly and relocations, so it needs to be tested on each platform, which I have not done. It might work on Solaris/x86, but again it requires testing. Support for other architectures requires different assembly output and relocations and can be added as needed, but they are not as important since this trick is has most value on desktop systems. Change-Id: I049a653beeb5454c9539ffff13e3ff5782a8cb86 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Rex Dieter <rdieter@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update qversiontagging.cpp not to use too much assembler magicThiago Macieira2015-10-202-57/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only reason I had used them in the first place was because C preprocessor macros cannot call themselves recursively. But the magic was too magic and caused issues with some builds, so let's choose the safer option. Anyway, this solution now works for all ELF architectures, independent of the processor, whereas previously it was restricted to x86 and Linux/ FreeBSD. However, this does not apply to the assembly in qversiontagging.h. Change-Id: I42e7ef1a481840699a8dffff1404f032fc5cacb8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | winrt: use correct winapi family defines in mkspecs and system detectionAndrew Knight2015-10-201-1/+1
| | | | | | | | | | | | | | | | WINAPI_FAMILY_APP is deprecated, so use WINAPI_FAMILY_PC_APP instead. Also, open up the phone partition for use on MSVC2015. Change-Id: I7476d71c31395b2914f5a1439e8088341976bf2f Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | QLatin1String: add some nothrowMarc Mutz2015-10-201-24/+24
| | | | | | | | | | Change-Id: I488fe7c4122febf46caa6487d92f61391edd41a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | [docs] QLatin1String: add some guidance as to when to use itMarc Mutz2015-10-201-0/+7
| | | | | | | | | | | | | | Change-Id: I391be8bda3a5cb4873b89b437d2b76b1cd88261f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Android: Warnings--BogDan Vatra2015-10-201-1/+1
| | | | | | | | | | Change-Id: I79bef1e5e73fedf2bae61d6cfc9634a14958ba0e Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Fix compilation on OSX when building in a namespace.Erik Verbruggen2015-10-201-0/+3
| | | | | | | | | | Change-Id: I377d9ffe95b72e098a91e6da564b59a56b34cf4e Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | QLatin1String: add default ctorMarc Mutz2015-10-202-0/+7
| | | | | | | | | | | | | | | | | | | | A pending change in uic depends on this. [ChangeLog][QtCore][QLatin1String] Added default constructor. Change-Id: Ie6f5dfc7b38683a488b0ff7f31404800ef5ee188 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QLatin1String: add testMarc Mutz2015-10-191-5/+1
| | | | | | | | | | | | | | | | QLatin1String wasn't really tested except as a drive-by. Unearthed a discrepancy with docs. Fixed the docs. Change-Id: I1246bb33888132edbc4e22da792a480a156357bf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QMimeBinaryProvider::loadMimeTypePrivate(): avoid an unneeded QStringRef -> ↵Marc Mutz2015-10-191-1/+1
| | | | | | | | | | | | | | | | QString conversion Change-Id: Id6baae4b710fd9aa8bdc4721dbe64e2d881163bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | The C locale should omit group separators by defaultLars Knoll2015-10-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Numbers formatted in the C locale should not use group separators by default. [ChangeLog][QtCore][QLocale] The C locale does not use group separators when formatting numbers any more. Task-number: QTBUG-4044 Task-number: QTBUG-3068 Change-Id: Ia647a72efc11fecd66d22f9253562b1d4ef58168 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make the C++11 atomic support the default, if availableThiago Macieira2015-10-161-6/+6
| | | | | | | | | | Change-Id: Ib056b47dde3341ef9a52ffff13ef1647ccd607b1 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Move QEventDispatcherCoreFoundation to QtCoreMorten Johan Sørvig2015-10-165-2/+1323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Export it for use by the iOS platform plugin. Also move QCFSocketNotifier, and export for use by the Cocoa platform plugin. This is a pure code move with no intended behavior changes, in anticipation of using the Core Foundation event dispatcher as the default Qt Core event dispatcher on OS X. Change-Id: I43677d2f6f3c1d0ed0415c964225aa97d2f13078 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | QTextStream: add missing op<<(QStringRef)Marc Mutz2015-10-162-0/+16
| | | | | | | | | | | | | | | | | | | | | | It simply is missing. We could wait for QStringView to come around, but I need this function in uic _now_, so let's add it. [ChangeLog][QtCore][QTextStream] Can now stream QStringRef without converting to a QString first. Change-Id: Idd178e0ba8a89c025f4533d46de912cbdb3883d5 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Fix left-shift wider than an int's widthThiago Macieira2015-10-161-1/+1
| | | | | | | | | | | | | | | | The other left shifts in this file already have the Q_UINT64_C wrapper. This one was missed. Change-Id: I42e7ef1a481840699a8dffff140d758ac370c402 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QTextStream: optimize putString()Marc Mutz2015-10-151-10/+15
| | | | | | | | | | | | | | | | | | | | Instead of filling a QString with the padding characters, use a QVarLengthArray. Do this only in the code path where it's actually needed, and mark that code path as unlikely. Change-Id: I11e04ccc4a07e16e430f2ea6dbb2f0f736908f5b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Dispatch all key and all generic motion events java objects to QtCoreBogDan Vatra2015-10-152-1/+82
| | | | | | | | | | | | | | | | | | | | These events are needed to enable the usage of all input methods available on Android e.g. gamepads, stylus, etc. In orer to get GenericMotionEvents your application min API version must be at least 12, otherwise the application will receive only key events. Change-Id: I7564fccaf5423aa318ba4f62317eaf101ba6e97e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | QStateMachine: cleanup QAbstractTransition::setTargetStatesErik Verbruggen2015-10-151-11/+40
| | | | | | | | | | | | | | | | | | | | Prevent QPointer creation for every new target, and a copy of a QVector of QPointer, and two QPointer destructions, when setting new target states. The typical (only?) use-case, setting the target states right after transition creation, is also faster. Change-Id: I931783afbcea43c8a84200133f26454a4b689edc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QStateMachine: fix leak of delayed events.Erik Verbruggen2015-10-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | When a delayed event is queued, the state-machine is responsible for deleting it. Normal flow will ensure that: after the timer fires, the delayed event is handled normally, which includes deletion. However, when a timer cannot be set, the event was leaked. But more important: if there were unhandled (delayed) events when the state-machine was destoryed, the events were never deleted. Change-Id: I7d8a6b572765dc1551ddbdebb446aaa3258680c8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Move the official Qt version from qglobal.h to .qmake.confThiago Macieira2015-10-141-2/+2
| | | | | | | | | | | | | | | | | | It's easier to parse than qglobal.h. The objective is actually to have macros with parts of the version number, so the major or minor numbers could be used in other preprocessor macros. Change-Id: I42e7ef1a481840699a8dffff1404eda1dd5c308d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-134-10/+71
|\| | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qabstractsocket.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp src/sql/drivers/mysql/qsql_mysql.cpp Change-Id: Ifb73623d09f53340ee5e10283f1f86b580998902