summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Use custom class for storing distance fields instead of QImage.Yoann Lopes2013-08-272-29/+306
| | | | | | | | | | | | | | | Distance fields are stored using a one-byte alpha component per pixel, a format that QImage doesn't currently support. The Indexed8 format was used instead, limiting what could be done with the QImage. This patch introduces a new private class, QDistanceField, with a similar API to QImage and using the Alpha8 pixel format. Unlike QImage which aligns scanlines on a 4-byte boundary, QDistanceField tightly packs scanlines together. Task-number: QTBUG-30908 Task-number: QTBUG-32861 Change-Id: Ic273259ea07dfbd2b81a6358c0ca11a2330eb749 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Revert "Fix compilation for Android ARMv5"Eskil Abrahamsen Blomfeldt2013-08-271-4/+0
| | | | | | | | | | This reverts commit 9fa1bdeeb2bca6f9ba370fce594a47a066a7e81a which is no longer needed because the Android NDK now contains a toolchain without the bug for which it was a work-around. Task-number: QTBUG-31051 Change-Id: I601ba2fccb927ee7e818644de4474700e2eec8f1 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* JNI Convenience: Make single argument ctors explicit.Christian Strømme2013-08-261-3/+3
| | | | | Change-Id: I330e4acf9b944fc72066b608653edd4686620b7e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* JNI Convenience: Print exceptions in debug mode.Christian Strømme2013-08-261-0/+9
| | | | | | | | The exception message might contain valuable information about what went wrong, so we should print the message. Change-Id: I50c986d4c18cf6115017fcc92363c946be45024d Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* JNI Convenience: Make it possible to copy QJNIObjects.Christian Strømme2013-08-262-138/+168
| | | | | Change-Id: I692242147d5f908381ea9d3b393b3c591385efd4 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* JNI Convenience: Use isSameObject() when comparing jobjects.Christian Strømme2013-08-261-6/+12
| | | | | | | | | | Comparing the value of two jobjects are not safe, as it's not guaranteed that two jobjects that is referencing the same object, will have the same value. To make things worse two jobjects might have the same value even though they reference two different objects... Change-Id: I997ea8abfb8c687c342b261bba3848cbbd741633 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Android: Fix crash when hitting Back button to quitEskil Abrahamsen Blomfeldt2013-08-261-1/+1
| | | | | | | | | | On Android, it's possible to reach the condition when window == 0 if you hit the Back key, since the previous bail-out is disabled for this case. To avoid a null-pointer dereference, an extra check is required. Change-Id: Ic898cd82dd6e52c24505dd2248c98efcefc15b1c Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Update Linux interface getting to make fewer syscallsThiago Macieira2013-08-241-29/+29
| | | | | | | | | | | Each time we call if_nametoindex, if_indextoname or somesuch, the libc needs to open a socket, make an ioctl, and close the socket. Since we've got most of the information we need anyway in the data from getifaddrs(3), let's just use it Change-Id: I572c212a27c4b9ffe57980b36f75bb04e6d5cf29 Reviewed-by: Jonas Gastal <gastal@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Soft-deprecate obscure feature on property getters returning pointersThiago Macieira2013-08-231-1/+1
| | | | | | | | | | | | | | | | moc actually generates the right code for getters returning a pointer to the type in question, or a reference to the type (a reference, one would assume, does not require code changes). However, the same extension is not valid for the setter: it can't receive the new value by pointer. Therefore, let's soft-deprecate the feature by removing its existence from the documentation. Task-number: QTBUG-33091 Change-Id: I27844213e051ec7fafeb4744089a0653aea6f1f3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Ensure the docs for QOpenGLFunctions_ES2 are generatedThiago Macieira2013-08-231-1/+1
| | | | | | | | | | qdoc runs the preprocessor, so it probably skipped the definition for this class. Change-Id: I10933134d0c20131dd25e15bee914ebfac358b10 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Do not recreate window if it is moved to a virtual sibling screen.Friedemann Kleint2013-08-231-2/+3
| | | | | | | | Task-number: QTBUG-32681 Task-number: QTBUG-33062 Change-Id: Id37627231b7a129c398d90d3f01ded6bd5171088 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Return 1.0 for devicePixelRatio in QCocoaWindow if no valid windowDaiwei Li2013-08-231-1/+6
| | | | | | | | | | | | If m_window is invalid, devicePixelRatio returns 0, which leads to adverse effects in other parts of the code. For example, qquickshadereffectsource.cpp will get stuck in an infinite loop trying to multiply 0 by 2. Task-number: QTBUG-32975 Change-Id: Ie3db86f1f459df018ebce67bcb4226f6cffe854e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Windows: Keep monitors when system is locked.Friedemann Kleint2013-08-232-30/+41
| | | | | | | | | | | | | Prevent windows from being recreated due to screen changes which can cause GL widgets to stop updating among other things. EnumMonitors returns only one temporary monitor named "WinDisc" when locked. Do not remove monitors when that happens. Task-number: QTBUG-33062 Change-Id: Ia2247bb04b3e10f99f594245f84238b5f9044f70 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Doc: added excludedirs to qdocconf example.Nico Vertriest2013-08-231-0/+18
| | | | | | | | | Corrected style issues pointed out in review. Task-number: QTBUG-31801 Change-Id: Ibbc4e5f8dcd8ca129ae945b5e62b15daed47d86d Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: minimal qdocconf file with commentsNico Vertriest2013-08-231-0/+86
| | | | | | | Task-number: QTBUG-31801 Change-Id: Ia94989b066ab2cd4d6dbf64261b5d9b4207db12a Reviewed-by: Martin Smith <martin.smith@digia.com>
* XCB: Fix race with the event threadUli Schlachter2013-08-231-0/+3
| | | | | | | | | | | | | | | | | | | The XCB backend runs a thread which gets events out of the XCB event queue and feeds it to the main thread via another queue. This queue is protected by a mutex. However, when the event thread exits, it cleans up after itself and frees all remaining entries in the queue. This code messed with the event queue without acquiring the needed mutex and left behind a list full of stale pointers. Fix this and protect the freeing with the correct mutex and clear the event queue afterwards. Change-Id: Ie49cf6241b76be86d8cebbc931f7226a3f6a14e5 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Doc: Add Q_OS_ANDROID macroTakumi Asaki2013-08-231-0/+7
| | | | | Change-Id: If428f0b7c1540e809f756f426a6d222acea5d310 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* BB10: Do not send deactivate event twiceRafael Roquetto2013-08-221-0/+2
| | | | | | | | | | On BB10, NAVIGATOR_WINDOW_INACTIVE is called before NAVIGATOR_WINDOW_INVISIBLE, already triggering handleWindowGroupDeactivated() Change-Id: I7d82c0220fe8dc8e87bfa2b31af6085c7d1d6cee Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Playbook: Fix rendering when thumbnailed/minimizedRafael Roquetto2013-08-221-0/+3
| | | | | | | | | | | On Playbook, rendering should happen when the application is thumbnailed, therefore we need to send a window activated event to resume rendering once the thumbnail is restored from the minimized state. Change-Id: I0fa5da483dc101e25f718e52859a66edfe5c66c7 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Switch back to thumb for android armeabi.BogDan Vatra2013-08-221-0/+4
| | | | | | | | Add workaround for gcc 4.8 compile bug. Change-Id: Ie7a81ec25a79764989bbd9eb43dd5a8fbf442dfc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Cocoa: Fix memory leak in event dispatcherGabriel de Dietrich2013-08-221-0/+1
| | | | | | | | | We retain each modal NSWindow as long as its modal session is running, and we should release it every time that modal session ends. Task-number: QTBUG-32728 Change-Id: Ia30c9c2d15be1350e7150a0d3c2f530a2fe4f38b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Style: Remove useless background paint for menu scrollerGabriel de Dietrich2013-08-221-1/+0
| | | | | | | | | This would also cause an extra paint in QQuickStyleItem, resulting in the frame being erased for those styles not having a frame width set (e.g., fusion and GTK). Change-Id: I7a9371c540cd31fd9f1400a51c4ec57582996dd2 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Cocoa: Bring back old exposure behavior on Mac OS X 10.6Gabriel de Dietrich2013-08-221-0/+4
| | | | | | Task-number: QTBUG-31864 Change-Id: Ife2429b2d6b845e5ccca31a03e66351a3ff5ba4b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix scrollbar appearance on Win8J-P Nurmi2013-08-221-22/+24
| | | | | | Task-number: QTBUG-26503 Change-Id: Id74821e005483d05450467fcaea672bbf35113bc Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Add json/savegame example.Mitch Curtis2013-08-228-3/+18
| | | | | | | | | | | | There wasn't any example documentation besides json.html, which doesn't actually describe usage of the various QJson* classes. This also makes each QJson* class page link back to json.html. Change-Id: If5ad6493d2728df0cec7bdbbc5790f0b755f816c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Check for window handle in QBackingStore::flush().Friedemann Kleint2013-08-221-0/+5
| | | | | | | Task-number: QTBUG-33062 Change-Id: Iab4ccc3a2a855ee7f6964659b53b3401af436212 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* moc generated code should compile with QT_NO_KEYWORDSOlivier Goffart2013-08-221-2/+2
| | | | | | | | | Don't use the 'emit' keyword in the moc generated code for properties with MEMBER Task-number: QTBUG-33094 Change-Id: I5a0950e9c7a0dee347a6a6c79098e3e7d4776014 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Fix related objects containing itselfOlivier Goffart2013-08-221-2/+14
| | | | | | | | | | This may happen when we have namespaces and the qualified name is used to scope an enum. Task-number: QTBUG-32933 Change-Id: Ic4923bbfb138387bae1e3694172661ace8342089 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Issue a warning instead of an error when macro argument mismatchOlivier Goffart2013-08-221-2/+2
| | | | | | | | | | | | | moc's C++ is not 100% accurate, so better process the invalid macro with a warning rather than an error. Such errors occurred in the QSKIP macro with variadic arguments since that macro is defined conditionally. It is also causing problem in boost header (cf task QTBUG-29331) Task-number: QTBUG-29331 Change-Id: Ice6a01b675286540d6470c8e36920b7efd39b540 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Windows: Handle Qt::ForeignWindow.Friedemann Kleint2013-08-212-1/+15
| | | | | | | Task-number: QTBUG-33079 Change-Id: Iec2ddfe07b07b3a921098c7147f26aff316bf6e6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Generate expose events for layered transient children.Friedemann Kleint2013-08-212-6/+29
| | | | | | | | | | | Layered (translucent/non-opaque) windows do not receive WM_PAINT, expose events need to be generated. Improve 6800728d091e5122e6d93675db84ee028221d161 to handle transient children as well. Task-number: QTBUG-17548 Change-Id: Id113604512692dfbea1f2b10d0db3068213cf599 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* CMake: Allow specifying a TARGET in invocations of macros.Stephen Kelly2013-08-211-29/+51
| | | | | | | | | | | | Forward-port of 9ce60ff509c4ff27fe861fc5b2080f50897a68c4 (Qt4Macros: Allow specifying a TARGET in invokations of macros., 2013-02-26) from cmake.git. This causes the INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS to be used from the specified target when running moc. Change-Id: I868a35ade3c6b059e64d226291cf2046709d86d4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Populate INTERFACE_LINK_LIBRARIES property in the cmake files.Stephen Kelly2013-08-211-0/+5
| | | | | | | | This is new in CMake 2.8.12 and replaces the old properties matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>. Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QWidget: Apply window opacity set before show.Friedemann Kleint2013-08-211-0/+2
| | | | | | | Task-number: QTBUG-33078 Change-Id: Id9111f223a9dc58c88b072c52e36d42db450573a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QXcbBackingStore: don't crash in flush() if no platformWindowShawn Rutledge2013-08-211-0/+4
| | | | | | Task-number: QTBUG-32681 Change-Id: Iec7204985867a8d65cea393ba6ab66d328a5e7b2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Don't use qt_mac_get_fixed_pitch() to resolve fixed pitch fonts on OSXTor Arne Vestbø2013-08-211-24/+0
| | | | | | | | | | | | | | | The call was resulting in inifinite recursion on OSX 10.9 when Qt was built against the 10.7 SDK, as qt_mac_get_fixed_pitch uses QFontMetrics to resolve the pitch, and we would end up in the font resolver again when asking for the metrics. The CoreText font-database already takes care of resolving whether or not a font family is fixed-pitch, so the code is likely a leftover from the ATSUI-days, and can be removed. Task-number: QTBUG-31803 Change-Id: I37c90fa637927eb4adc16c0fd556c4c46c456034 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Android: Remove EGL_BAD_SURFACE warning on suspensionEskil Abrahamsen Blomfeldt2013-08-211-1/+0
| | | | | | | | | | | | When suspending the app we would destroy the surface twice, causing libEGL to output a warning on the second attempt. We would also destroy the surface before all references were released which is not 100% nice. We don't need to call the super class implementation at all, since we are managing the EGL surface ourselves. Change-Id: Ie1ab2ea8561d0018b5f16ac8cdf3296313a0a92c Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* [QNX]Fix transparenciesAndreas Holzammer2013-08-212-31/+16
| | | | | | | | | | It is not guaranteed that buffers are cleared when they are allocated. So don't use a buffer for the root window, and clear buffers for the actual content. Change-Id: I42939baec03fa05968c83bbf2739ab8d1d70c8be Reviewed-by: Matt Hoosier <matt.hoosier@garmin.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Construct a valid QTime when creating timestamps for iBase SQL driver.Mitch Curtis2013-08-211-1/+1
| | | | | | | | | 0e62fc73c905d1f476f3c1493db1bde8096ac609 requires this. Task-number: QTBUG-29261 Change-Id: Idd8b630c72d0fd1c255695a8c2c22f9fe32767ee Reviewed-by: John Layt <jlayt@kde.org>
* Specify maximum array size for QByteArray.Leonard Lee2013-08-211-0/+2
| | | | | | Task-number: QTBUG-33037 Change-Id: I3f39b1498fc70614402fca2281ffbd1a6ec4cf3f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tidy up QJsonObject documentation.Mitch Curtis2013-08-201-19/+19
| | | | | | Change-Id: I445e0573c3c4fdb86ef535299a4eb299e225c15d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: qtgui configuration file with commentsNico Vertriest2013-08-201-0/+292
| | | | | | | | Task-number: QTBUG-31801 Change-Id: I225edf67f586cc5822269c643020d5666465712d Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Use correct mask constant in the Windows event dispatcher.Friedemann Kleint2013-08-201-1/+14
| | | | | | | | | | | | Mask out QS_TOUCH, QS_POINTER when running a VS2012-compiled binary on pre-Windows 8 systems. Task-number: QTBUG-32257 Task-number: QTBUG-28513 Task-number: QTBUG-29097 Task-number: QTBUG-29435 Change-Id: I33ce3a659a234cb04d3b5ae9d668d193d681be7f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Revert "Disable precision timers when running MSVC2012 code on pre-Windows 8."Friedemann Kleint2013-08-201-8/+0
| | | | | | | | | | This reverts commit aa1b4c0943187d82e0c313b93559e99226a9c75a. It turns out that the bug is caused by a different mask constant in Windows 8 which should not take effect in pre-Windows 8. Change-Id: I1ad502262dae42856c07d48ee3bc9dc032ab379b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Add hit test handling for non-client areas.Friedemann Kleint2013-08-194-2/+51
| | | | | | | | Suppress resize cursor for fixed size windows. Task-number: QTBUG-32663 Change-Id: I9579bb13d494fe21e5db7b75d01a3cf1b693c7f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix potential division by zeroFrederik Gladhorn2013-08-191-8/+13
| | | | | | | | Since it's possible to call the function on an empty model, return failure in that case. Change-Id: I0a0eabe917da3e6294bdd616a85579f6dc894ec8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* xcb: Fix TouchPointPressed being sent multiple times.Jocelyn Turcotte2013-08-191-3/+5
| | | | | | | | | | | XI2 sends events for individual touch points, but QTouchEvent sends all of them with a stationary state if they didn't change. If a touch pressed event is received, and the next XI2 event is about a different touch point, we wouldn't update the state of the previously pressed touch point. Change-Id: I1ebcbea1cea54872064ef7710e2aac7b0b41cd70 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Rename template parameter: "I" -> "II"Sze Howe Koh2013-08-181-9/+9
| | | | | | | | | | C99 defines the "I" macro in complex.h. qobjectdefs_impl.h can be indirectly included in user code, which raises the possibility of a name clash if the user's compiler supports C99 and the user includes complex.h Change-Id: Ie79ec7baf2d49a34b66a01556c7e57324303dc04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix mouse test event in window warning message.Martin Jones2013-08-181-1/+5
| | | | | | | | | The tests use local coordinates, but window->geometry() gives the global position on the window, i.e. offset by the size of the decoration. Change-Id: Id63ffd7e160b77ddb0f5563d8c3c65c36ad45e89 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-08-171-1/+2
|\ | | | | | | refs/staging/stable