summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-08-0423-92/+140
|\ | | | | | | | | | | | | | | | | Conflicts: config.tests/arch/arch.cpp src/opengl/qgl_qpa.cpp src/widgets/kernel/qapplication.cpp Change-Id: I80b442a4c2c9632743a5b5c7319ff201ec5bc4fd
| * pass --sysroot to compile tests also on windowsOswald Buddenhagen2014-08-012-0/+12
| | | | | | | | | | | | | | Change-Id: I486059197479842f32c3590d7fd269550d22698e Reviewed-by: David Schulz <david.schulz@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * add /ENTRY:main only for target buildsOswald Buddenhagen2014-08-011-2/+4
| | | | | | | | | | | | | | Change-Id: Ifa1d36607a1884ec989b5b514e7d1b9a2b40ddce Reviewed-by: David Schulz <david.schulz@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * avoid that CROSS_COMPILE affects host buildsOswald Buddenhagen2014-08-011-1/+3
| | | | | | | | | | | | Change-Id: Iee40cfd87d7ec640fb4b3526e58317bdc8a778c7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: David Schulz <david.schulz@digia.com>
| * ensure that arch_host.pro is used also on windowsOswald Buddenhagen2014-08-011-5/+7
| | | | | | | | | | Change-Id: I110ec33a40f37ecdec5ab952ea56a4fc00cd27a8 Reviewed-by: David Schulz <david.schulz@digia.com>
| * Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into ↵Oswald Buddenhagen2014-07-3112-55/+69
| |\ | | | | | | | | | refs/staging/5.3
| | * Merge remote-tracking branch 'origin/stable' into 5.3Oswald Buddenhagen2014-07-3012-55/+69
| | |\ | | | | | | | | | | | | Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
| | | * Fix warning message when re-setting text on tooltipJoni Poikelin2014-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warning message that gets printed when changing tooltip message without rect and widget parameters for already shown tooltip widget. Task-number: QTBUG-39550 Change-Id: I69ed8747e5e77ca618525d74479c72e02b7ab897 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | | * XCB: Enable loading of the Qt::DragLinkCursorAlessandro Portale2014-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It did not load due to an off-by-1 boundary error in a check. Qt::DragLinkCursor happens to be Qt::LastCursor. Task-number: QTBUG-39735 Change-Id: Ia7b11fc4eecc4329bd487bd5689c83c986fd2de6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| | | * move loading of testability driver from QApplication to QGuiApplicationMichael Zanetti2014-07-033-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful without QWidget too. Change-Id: Ic7857e52e4a8f57c1205615a1f30323b486814af Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | | * Mac: Don't register for Pan Gestures.Morten Johan Sørvig2014-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will enable touch events for the viewport widget, which has undesired side effects (see task). Fixes a regression from Qt 4. Task-number: QTBUG-38815 Change-Id: I7b9c0d1de985d1c82f946140fecf460fcfc5e686 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | | * Fix QFileInfoGatherer threading issueBernd Weimer2014-06-301-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFileInfoGatherer has a QFileSystemWatcher member that lives in the same thread as the QFileInfoGatherer object. If only the poller engine is available for the file system watcher, the engine will only be created when addPaths() is called. However the latter was called from anohter thread (the QFileInfoGatherer thread). Hence the QPollingFileSystemWatcherEngine had its parent in a different thread and worse, this thread didn't have an event loop needed for the QTimer used in the poller engine. This fixes tst_qfilesystemmodel on platforms that only support the polling file system watcher engine. Task-Number: QTBUG-29366 Change-Id: I83b58b4237e3438a27e5cdde4b1e4126e4740a94 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Support MIPS atomic on pre-MIPS32 architecturesAurelien Jarno2014-06-271-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The atomic functions on MIPS are based on the sync opcode with an immediate argument, which is something introduced in the MIPS32 instruction set. This prevent to use Qt on pre-MIPS32 CPU, like the Loongson 2 CPU. However some of the pre-MIPS32 CPUs interprets the sync opcode with and immediate argument as a sync opcode without argument (which is a stronger ordering than with the argument), and for the others the kernel emulates it. It is therefore fine to use the current MIPS atomic functions on pre-MIPS32 CPU. This patch allows that by temporarily changing the instruction set to MIPS32 around the sync instruction, so that binutils doesn't choke on it. Change-Id: I9cc984bd55b5f172736ce9e638a6f4e271b79fe7 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Enable sparc detection.Lisandro Damián Nicanor Pérez Meyer2014-06-271-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been working in Debian for some time. It also adds detection for 64bits Sparc. Change-Id: Ie4fc0f58b37672b79191ebe51de0caf2eaf8a1d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Remove -Wcast-align from QMAKE_CXXFLAGS.Lisandro Damián Nicanor Pérez Meyer2014-06-271-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | x86 doesn't care about alignment, and on all other platforms where it does something it causes build errors, so instead of removing it on those platforms just don't enable it at all. Change-Id: Idfeb387099b28af60ba161b6ca678b7c9df17fe1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | | * Create the 64 bits version strings for MIPS, SPARC and S390Lisandro Damián Nicanor Pérez Meyer2014-06-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that the specialization has to be declared before the common arch because of how qprocessordetection.h sets this variables. Else you would still get mips on a mips64 system. Change-Id: Ief949a5d30aa217c4bfda2d674ec2683e6c130c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * QNX: Fix QMdiWindow autotestsFabian Bumberger2014-06-251-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In "setOpaqueResizeAndMove" this patch makes sure that the content of a subwindow actually fits into the window, otherwise the resize does not work properly. The content is dpi dependent and thus the pixel size of it increases with the display dpi value. Furthermore when moving the QMdiSubwindow this patch makes sure that we actually grab the window's header and not one of it's tool buttons (minimize, maximize, close). Change-Id: I88314994957c5883f57c09c9240a3b83f1ee42ed Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
| * | | Add missing power button keycode to keymapRainer Keller2014-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I03682716aaea8344ebb5b71dcea5fe18babcd610 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * | | Android: export ANDROID_SDK_BUILD_TOOLS_REVISION.BogDan Vatra2014-07-313-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's needed by androiddeployqt tool to run "zipalign" tool and to set it to gradle properties. Task-number:QTBUG-40481 Change-Id: I3dd665a7461a4e981867cdad75a50940e46a5ae6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * | | cocoa: Fix compiler warnings about unused functions.Sérgio Martins2014-07-311-6/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: Id85c86dd2f2468b3ac17751aefdebe0e8666a0c0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * | | Propagate swapInterval to QGLFormatLaszlo Agocs2014-07-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-39370 Change-Id: Ib3a46a0ae24e5f6d690625b1d91be9e599bbc927 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * | | Fix double clicks in eglfsLaszlo Agocs2014-07-311-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window can be null in the qpa event. This is indicated by the nullWindow field to be able to differentiate between a dead window and a genuinely null input. [ChangeLog] Double click events are now sent correctly on eglfs. Task-number: QTBUG-40146 Change-Id: I63c8d08e0dec217b929161d2e827e0c273b4dd3e Reviewed-by: Will Wagner <willw@carallon.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * | Work around ICC bug in local static symbols for Q_GLOBAL_STATICThiago Macieira2014-07-301-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling the innerFunction() of the Q_GLOBAL_STATIC expansion, ICC emits global symbols for the internal "holder" local static variable and its guard. If there are two global statics of the same name in two different .cpp files, the linker will incorrectly merge the two "holder" variables. This was noted between the "customTypes" global statics of qmetatype.cpp and qdbusmetatype.cpp in a static build. The C++ standard requires that local static variables declared in inline functions must be the same, regardless of whether the body of the function got inlined or not. The IA-64 C++ ABI does that by requiring local static symbols for inline functions to be global and mergeable ("link once"). However, two functions in anonymous namespaces in different files are not considered to be the same function, so their local statics should not be merged. This is where ICC failed: the local statics are global and mergeable, even though the function is in an anonymous namespace. ICC correctly emits the function itself as a local symbol. Alternative solutions were: 1) add "static", but you can't use a static symbol in a template parameter in C++98 mode 2) remove the "inline" keyword, but then GCC 4.8 will not inline Intel issue ID: 6000058488 Task-number: QTBUG-40053 Change-Id: I307622222499682dde711b2771c8cf7557400799 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * | QCoreTextFontDatabase: Fix font weight value when populating a familyGabriel de Dietrich2014-07-291-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kCTFontWeightTrait returns a normalized value between -1.0 (lightest) and 1.0 (heaviest), 0.0 being the regular font weight. The threshold values used in this change have been estimated from the weight values of fonts from the Helvetica Neue and Myriad Pro font families. Change-Id: I49de8e8bd5894107de4842aeda7ace2e83f95be3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * | Don't convert signed to unsigned when we need all 32bitAllan Sandfeld Jensen2014-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fast scale methods qt_scale_image_16bit and qt_scale_image_32bit were incorrectly assigning an unsigned value to a signed variable, which broke their support of images with dimensions from 32384 to 65535. Images with dimensions higher than that are already using another code- path. Task-number: QTBUG-40297 Change-Id: I8c971889e069381224cea2befbb5c66cd93ea5c2 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | QNativeSocketEngine: Add debug in createNewSocket.Robin Burchell2014-08-041-1/+13
| | | | | | | | | | | | | | | | | | | | | If this fails, we want to know about it when trying to debug. Change-Id: I33f05186e93fcd9284a7e7c609d00fe7ac87cd4e Reviewed-by: Richard J. Moore <rich@kde.org>
* | | QNativeSocketEngine: use stream-style qDebug to fix a warning about FD types.Robin Burchell2014-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | FD types differ depending on the platform, so using the stream form is the easiest way to make this work. Change-Id: I00b1a303f3d865fe5e89ba97bd438c51c6cd8f09 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Add QFont strategy to disable subpixel antialiasingAllan Sandfeld Jensen2014-08-035-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the option to disable subpixel antialiasing on QFont basis. This can be useful when painting to offscreen surfaces. On OS X this option disables the aggressive LCD font smoothing, which can be necessary for certain fonts it may otherwise ruin. Task-number: QTBUG-40396 Change-Id: I1664b636520ae63ee1503b5df7436748106b9f5c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | QList: add missing reserve() call in the initializer_list ctorMarc Mutz2014-08-031-1/+1
| | | | | | | | | | | | | | | Change-Id: Idc46a347009556d06db4bc1f7ce3e2613fb1a405 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Add sqlite to Windows Phone default buildMaurice Kalinowski2014-08-022-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sqlite 3.8.5 supports Windows Phone 8.1. Make required adaptations and add it to the default build. For WinRT and Windows Phone the QSqlQueryModel unit-test fails, both with plugin compiled and using the system sqlite. Root cause seems to be deep inside sqlite, hoping for a fix soon. However, all other tests pass and hence we should enable it. Task-number: QTBUG-37770 Change-Id: I700dde4a44a8f1d74460ef6cb4a1e1d330073d66 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | | update bundled sqlite to 3.8.5.0Maurice Kalinowski2014-08-023-2038/+3666
| | | | | | | | | | | | | | | | | | | | | | | | | | | The "Fixed CE build of sqlite3" patch is preserved in this change. (ea70ec8711af45128d63634a01dfc4c1a51ac331) Change-Id: I8ae83bdb0006ee12e371a2a6f396b4a7b798a5e3 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | Support multimedia keys on WindowsAllan Sandfeld Jensen2014-08-028-4/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently do not receive events from most multimedia keys on Windows because they are sent using appcommand events instead of the normal key events. This patchs adds support for parsing appcommand events. Change-Id: I19f568b6fa0d3d136e3a22318df1499a1fab6edb Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | Android: Fix exceptions in ExtractStyle.java on Android LBogDan Vatra2014-08-013-5/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | Android L adds support for 64 bit (arm and x86) and they did lots of changes that are incompatible with old implementation. Task-number: QTBUG-40120 Change-Id: I69b78a9eed896d2ddabc1bf2a55886faeae47974 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | Avoid calling syncWindow with already destroyed platform windowsLaszlo Agocs2014-08-015-7/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issuing a metacall from swapBuffers is dangerous since the window may get destroyed by the time the slot is invoked. This patch changes it to use an event, which is more efficient anyway, that can be invalidated in case the QXcbWindow is destroy()'ed before the event is delivered. Change-Id: I44618ac1cb8b221aecce001ea39702164dcab6a5 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
* | | Update QOpenGLFunctions docsLaszlo Agocs2014-08-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mention QOpenGLContext::functions() which is used quite commonly in Qt itself and also some examples. Also, make it clear that new instances do not degrade performance since function resolving is done only once. Change-Id: I74ac194a0b3956a70e5078dd5a1bcdd277b5cc28 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Make QOpenGLWidget publicLaszlo Agocs2014-08-0145-374/+2388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget is now public. In addition Qt::WA_AlwaysStackOnTop is introduced to support the special case of semi-transparent QOpenGLWidget or QQuickWidget on top of regular widgets. hellogl_es2 becomes the qopenglwidget example. This example performs painting both via QPainter and native GL commands and has the OpenGL widget combined with other, normal widgets. The widget stack receives some changes when it comes to renderToTexture widgets like QQuickWidget and QOpenGLWidget. Calling update() will now result in a paint event, which is essential for QOpenGLWidget since we want it to behave like a regular widget. The dirty region handling is extended specially for such widgets due to performance reasons. (an OpenGL content update must not result in any backingstore painting, and is thus handled as a different kind of dirtiness) [ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget. Task-number: QTBUG-36899 Task-number: QTBUG-40086 Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | Fix high DPI icons in menu itemsAllan Sandfeld Jensen2014-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The position of high DPI icons is wrong in the Fusion style because the pixel resolution is not taking into account when centering them. Task-number: QTBUG-40277 Change-Id: I3593ed461ea57543c3ddfd473105fdc698789132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Android: Output QML import and root paths for qmlimportscannerEskil Abrahamsen Blomfeldt2014-08-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deploying QML applications, the androiddeployqt tool can use qmlimportscanner to detect the QML dependencies of the application, but then it needs to know the root of the project as well as additional QML import paths. We use the already-existing QML_IMPORT_PATH for the import paths, and default to using the location of the .pro file for the root path (same as for static builds in qt.prf). Change-Id: Ib536272ed1f3f1320ea8ef529655e2ba003bc734 Task-number: QTBUG-34175 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | Remove pointless debug outputAleix Pol2014-08-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes some debug output that indicates that we're dealing with a dock. It looks like somebody was testing some implementation more than useful output information. Change-Id: I04ebbc1f0f1d29ed2099bab9d9e9fc18c9bf0c86 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | Fix linking of the Direct2D platform plugin with dynamic Open GL.Friedemann Kleint2014-07-311-1/+1
| | | | | | | | | | | | | | | Change-Id: I0a3272233de7e685c750f001eb45a5e326d0f35b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | QTimeZone: optimize QTimeZonePrivate::isValidId()Marc Mutz2014-07-311-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is used in the named timezone ctor and was using QByteArray::split(), followed by size checks and a linear scan for invalid chars per section. The use of split() resulted in a lot of memory allocations and, unsurprisingly, bad performance. The new code just performs one linear scan through the byte array, calculating section sizes on the fly. Benchmark results (with the test data in tst_QTimeZone::isValidId_data()) show typical speedups of ~10x for valid IDs: RESULT : tst_QTimeZone::isValidId_bench():"minimal middle": - 0.00036 msecs per iteration (total: 95, iterations: 262144) + 0.000035 msecs per iteration (total: 74, iterations: 2097152) Even in the sweet-spot case of the old code---a space character anywhere in the string, checked for before the split---the new code is anywhere between slightly faster and not much slower: RESULT : tst_QTimeZone::isValidId_bench():"invalid char ' ' front": - 0.000011 msecs per iteration (total: 94, iterations: 8388608) + 0.000010 msecs per iteration (total: 86, iterations: 8388608) RESULT : tst_QTimeZone::isValidId_bench():"invalid char ' ' middle": - 0.000014 msecs per iteration (total: 62, iterations: 4194304) + 0.000016 msecs per iteration (total: 69, iterations: 4194304) RESULT : tst_QTimeZone::isValidId_bench():"invalid char ' ' back": - 0.000018 msecs per iteration (total: 79, iterations: 4194304) + 0.000023 msecs per iteration (total: 98, iterations: 4194304) This is not surprising, as the space character was singled out for a fast-exit check before. For any other invalid character, the new version is anywhere from 15x to 35x faster: RESULT : tst_QTimeZone::isValidId_bench():"invalid char ? front": - 0.00034 msecs per iteration (total: 91, iterations: 262144) + 0.000010 msecs per iteration (total: 87, iterations: 8388608) RESULT : tst_QTimeZone::isValidId_bench():"invalid char ? middle": - 0.00036 msecs per iteration (total: 96, iterations: 262144) + 0.000016 msecs per iteration (total: 68, iterations: 4194304) RESULT : tst_QTimeZone::isValidId_bench():"invalid char ? back": - 0.00035 msecs per iteration (total: 94, iterations: 262144) + 0.000021 msecs per iteration (total: 92, iterations: 4194304) If there was a deeper reason to single out the space character, that fast-exit path can easily be restored. This function is often used in conjunction with availableTimeZoneIds(), which currently vastly dominates the runtime of the function calling both, but I'll add another optimization for the common use-case of just checking for a time-zone's existence in a subsequent commit. Change-Id: Ife1d096fcd39464083ea464c23e49ad98fabf345 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | tst_QTimeZone: test QTimeZonePrivate::isValidId()Marc Mutz2014-07-311-0/+61
| | | | | | | | | | | | | | | | | | | | | This is in preparation of rewriting the function for efficiency. Change-Id: Id5c16b984b95d76e1f26d862e3813f75980f44fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add a test for move assignment to tst_QPaletteMarc Mutz2014-07-311-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | It was simply missing. Change-Id: I6645bb9fe9c81aec9c46ac5efc7d2295a3784ff6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Ensure valid data after QImage::invertPixelsAllan Sandfeld Jensen2014-07-312-3/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImage::invertPixels may produce invalid data after inversions of images with premultiplied alpha, because the inverted colors will be larger than the alpha. This patch converts any image with a premultiplied alpha channel to ARGB32 before inverting the pixels, and then back to the original format after the inversion. Support is added for correct inversion of RGBA8888 and RGB30 formats. Task-number: QTBUG-39901 Change-Id: Ief24c55f495e67ef2ad6429b5b418d02963a64dd Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Android: Cleanup androidjnimain.cpp/.h filesBogDan Vatra2014-07-312-54/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused includes Remove unused static vars use Q_NULLPTR insead of 0 or NULL Change-Id: Id8c99c83c64425c9725e441108010f3821bd3b44 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | Android: Fix expose region.BogDan Vatra2014-07-312-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | It seems that the second parameter of handleExposeEvent function is about the region inside the window, not its position on the screen. Change-Id: I89f5b2b13c9b0993253542823a84547d6a994c31 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | Android: Release all windows when the application is suspended.BogDan Vatra2014-07-318-22/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an application is suspended on Android all its Gl surfaces are destroyed and can't be used to render anymore, so we should release them in order to give back to the system the memory used by them. [ChangeLog] [Android] Release all windows when the application is suspended. Task-number: QTBUG-29069 Change-Id: I038aaa2006da1f3188fccba943ec4ffb3e551cf0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | | Android: Really suspend apps that are put in the backgroundBogDan Vatra2014-07-319-8/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main event loop will be paused when an application is suspended, this is also the normal behavior of any Android application. When an application is suspended on Android all its Gl surfaces are destroyed and can't be used to render anymore. So, we need to pause the main event loop in order to pause all the timers which might trigger drawings. The event loop is resumed immediately after the application is foreground. AndroidManifest.xml contains more info about how to disable this behavior and what might happen if you do it. [ChangeLog][Android][Important Behavior Changes] The main event loop is now stopped when the app is suspended Task-number: QTBUG-36274 Change-Id: I4c0ba5df9d95f348bca67ea5c76865d6d20775e4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | Add ascii_isspace to replace the locale-dependent isspace(3)Thiago Macieira2014-07-313-10/+37
| | | | | | | | | | | | | | | Change-Id: Icee42515179e6f3ddefe0692af69e90054449618 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Xcode: Reference files by absolute path, and name them by basename onlyTor Arne Vestbø2014-07-312-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xcode uses project and group relative file paths, but to keep things simple for ourselves we use absolute paths everywhere. We now make an effort to actually make these paths absolute before telling Xcode they are. We also make the visual representation of the files inside Xcode be just the filename, not the full path, like Xcode itself does. This is among other things a prerequisite for Xcode to stop complaining about missing launch images for retina 4-inch screens. Change-Id: I5ff6bf07f61888e3c9fe2f64cbc2beb896b8442d Reviewed-by: Andy Shaw <andy.shaw@digia.com>