summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typo in changes-5.0.0: there's no "S" after "INTERFACE" or "ADAPTOR"David Faure2013-05-071-1/+1
| | | | | | | in QDBUSXML2CPP_INTERFACE_HEADER_FLAGS and QDBUSXML2CPP_ADAPTOR_HEADER_FLAGS. Change-Id: Ibbe812fbe4912acfd2c9721b5193727ae0c0ade3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QApplication: fix touch to mouse bug when setting buttons()Richard Moe Gustavsen2013-05-071-1/+2
| | | | | | | | | | | | | | | | | | | QApplicationPrivate::translateTouchToMouse always sets buttons() to Qt::LeftButton for synthesised events. This is wrong for a mouse release, since 'button' should in that case be Qt::LeftButton, and 'buttons' should be Qt::NoButton (since no buttons are actually being pressed). This caused problems for QGraphicsView, which refuses to release any mouse grab set on a QGraphicsItem if at least one button is being pressed (which was always true). This resulted in broken drag behavior on touch platforms. Change-Id: Iefe63cd753f9f8bb04278fd04a4d728e3deda25e Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QGraphicsView: ignore unhandeled touch eventsRichard Moe Gustavsen2013-05-071-0/+2
| | | | | | | | | | | | | | | | | | | | When QGraphicsView has sceneInteractionAllowed == false (e.g when dragMode == QGraphicsView::ScrollHandDrag), all touch events are accepted. This is wrong, and will stop mouse synthesising from happening on touch platforms. This in turn will make ScrollHandDrag not work (since no mouse events will come through). This patch will call QEvent::ignore() if the touch event isn't send to the scene, which will cause a mouse event to be synthesised. Note that according to http://doc.qt.digia.com/qq/qq11-events.html the correct approach would probably be to just return 'false', rather than calling QEvent::ignore(). But this logic is not followed consistently elsewhere (e.g in QApplication::notify), so I choose to follow what the code actually expects for this bugfix. Change-Id: Ida777647134c41661bab156d7b164ebd882a6bb1 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: don't do mouse synthesis from touch unless we find a reasonShawn Rutledge2013-05-075-1/+43
| | | | | | | | | | | | One reason is when we are using XInput 2.2, because touch devices will then generate touch events only. For the other X11 scenarios, X11 does its own mouse emulation. QPlatformIntegration::styleHint() wasn't overridden yet. The remaining hints are TODO for now. Change-Id: I2e444a00a18b33ed840ebfa8d8218655c2c39aad Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Don't destroy the window if the QCloseEvent wasn't acceptedShawn Rutledge2013-05-072-3/+6
| | | | | | | | | | It's possible to override event() to receive the QCloseEvent and do event->ignore() to prevent the window from closing. Task-number: QTBUG-31019 Change-Id: I9abed47fca02a002b78727f98d678a824854adfc Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: Copying changes to external pages from qtdocJerome Pasion2013-05-073-6/+21
| | | | | | | | | | -the externalsites from qtdoc is being removed and the new copy is in qtbase/doc/global. Change-Id: I8f509acf05c0e1f399205daf4e4831cf46475746 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Removed pages from "qt-sql" group.Jerome Pasion2013-05-073-10/+0
| | | | | | | | | | | -"qt-sql" removed in qtdoc -no longer needed because "Data Storage" and Qt SQL pages already serve as the main introduction to SQL support in Qt Change-Id: I7384ae04ab4c09ecc9d76668e4e7f836095066c1 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* iOS: Set context and bind FBO before allocating render-buffer storageTor Arne Vestbø2013-05-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | defaultFramebufferObject() may be called from anywhere, at any point, not just makeCurrent(). One example is the glyph-cache, which uses it to re-bind the default FBO after generating the texture cache. If the default FBO had already been created, but the render-buffer was out of sync with the window size, we would end up in the resize code without the correct context current, and without the render-buffer's owning FBO bound. This caused "Failed to make complete framebuffer object 8cd7" warnings at runtime. We now make the context current and bind the FBO, even though it might already be bound and the context current from makeCurrent(), or when initially creating the FBO. For the future we should move the whole resize logic out of defaultFramebufferObject() and call it from makeCurrent(), or possibly [EAGLView layoutSubviews]. That's a higher impact change though, which we reserve for the 'dev' branch. Change-Id: I50ea949c12a02ad1af6ec9fdc3215d5da85b324f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Don't use GL_REPEAT for image-brush drawing on OpenGL ES2Tor Arne Vestbø2013-05-071-1/+9
| | | | | | | | | | | | | | | | | OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT, so for OpenGL ES2 we use a custom program that emulates repeat by taking the fractional part of the texture coordinates. This is not enough though, as merely setting GL_TEXTURE_WRAP_x to GL_REPEAT with a NPOT texture is an error in some implementations, so we have to guard the call to updateTextureFilter() in updateBrushTexture() with a check for OpenGL ES2 and use GL_CLAMP_TO_EDGE instead. This fixes missing/black backgrounds in the diagramscene example on iOS. Change-Id: I5020090b5f17faeb06dcab9dc0292459e021af30 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove the crash pending warningJan Arve Saether2013-05-071-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Even though the intentions of this warning were good, the warning was a bit harsh. In addition, in certain circumstances (like the autotest demonstrates) we could end up calling object() on an interface where the object was in the destructor. This could happen because: *after* we got the destroyed() signal, the widget would still notify the accessibility framework of a FocusOut event. Since the code even called object() from isValid(), we could not even (as a defensive measure to circumvent this issue) check the isValid() of an interface without getting this warning (duh). So - for isValid(), the warning is not needed at all, since the caller will of course check the result of isValid() and act accordingly. As for the result of object(), it should always be a pointer, but it might point to a partially destroyed object. To detect this, you simply check isValid() first: if (iface->isValid()) doStuff(iface->object()); Change-Id: I206307fe618806133d8c6bc338c412d0009d7181 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Autotest: Use the new test zone in all name-lookup unit testsThiago Macieira2013-05-073-61/+107
| | | | | | | | | | I also modified tst_QDnsLookup the test to use ';' as a separator as opposed to spaces because I added MX and SRV records with multiple RRs. Change-Id: I62c7b6ad342c1bb23c4d9ac9730e35ab422e3ea2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* QLocale: cache the QLocalePrivate for the default QLocaleThiago Macieira2013-05-011-6/+9
| | | | | Change-Id: I6f05da4d426a0aa685dd9f2fd0020e413a4bebad Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QLocale: cache the C locale's privateThiago Macieira2013-05-012-1/+15
| | | | | Change-Id: I81bbfeffebb5b7fc29d67bb7127beaf13838ac9f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix QFontConfigDatabase crashRafael Roquetto2013-05-011-2/+2
| | | | | | | | Take into account the possibility that the target platform plugin does not support platform services. Change-Id: I48e7fac2e1230a9a7d450414044d23ed26b334be Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix QLocale::standaloneMonthName when d->m_data == systemData()Albert Astals Cid2013-05-016-3/+17
| | | | | | | | | | | | | | | | | At the moment if d->m_data == systemData() it calls systemLocale()->query but forgets about the standalone part so you get the wrong data This patch introduces the new enums so that backends can implement properly the standaloneMonthName feature properly. At the moment the Windows and Mac ones still return the monthName, the Unix and Blackberry ones return the data we store in months_data Change-Id: Idc5a50b04ab1f914f16c7385be1dca2e027feae3 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Mehdi Fekari <mfekari@blackberry.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reintroduce QIcon doc image (from Qt 4 docs)Giuseppe D'Angelo2013-05-011-0/+0
| | | | | | | | | | | This fixes the [Missing image icon.png] warning on QIcon docs. Change-Id: I16aafb51c146fb675f657a7d8210033a17abf642 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Enable bundling Qt in Android package in build systemEskil Abrahamsen Blomfeldt2013-05-0111-28/+72
| | | | | | | | | | | | | | | | | | | | | For bundling Qt, we need two things: 1. We need to build a regular .jar file out of the Java files, so that they can be built into the app package. Dexing the classes first (i.e. compiling the JVM bytecode to Dalvik bytecode) is required for loading the .jar file at run-time, but cannot be used for building it into the app, so we need two different paths. 2. We need to specify which extra files have to be bundled for each module (this is primarily for plugins and imports). This is because there is no static dependency on these files, so it cannot be detected during deployment. Task-number: QTBUG-30751 Change-Id: I733603ee5d1c64bd7c5b9357eb5d993b9d0298f7 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Make it possible to bundle Qt libraries in Android apkEskil Abrahamsen Blomfeldt2013-05-014-4/+126
| | | | | | | | | | | | | | | | | | | | | | Add the enablers so that Qt Creator (or another deployment tool) can add a specification in the app's meta data of which libraries are bundled and the Java code required to extract plugins and imports into the required directory structure inside the app's data directory. This is intended to be an alternative to using Ministro for deployment, and the mechanism of extracting libraries on first startup is a work-around for the requirement in Qt of having this directory structure. For Qt 5.2, the approach should be changed to load plugins directly from the app's lib directory and the other files in imports will be bundled as qrcs in the native plugins. Task-number: QTBUG-30751 Change-Id: Ibdb3a672548b4802f9bf3ecd05fc194426ac30e7 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix more warnings, found by cross-compiling QtThiago Macieira2013-05-013-5/+11
| | | | | | | | | | | | | | | | | | | | | | | KeccakF-1600-opt32.c:497:5: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] harfbuzz-thai.c:264:49: error: comparison is always false due to limited range of data type [-Werror=type-limits] These warnings are caused by "char" defaulting to unsigned on ARM. In particular, the second warning was introduced by commit 785e95ef0a95ca8fb39ef57678cd4876ee657c43, which is not upstream... qbenchmarkvalgrind.cpp:224:5: error: variable ‘_qzz_res’ set but not used [-Werror=unused-but-set-variable] This one was fixed for x86-64 in 7b54571ec2032628ea71b0af but not for the other platforms. KeccakF-1600-opt32.c:250:5: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] This one is wasn't caught before because it applies only to big-endian code. Change-Id: Ice33b639e55d95140cbf912bb81b6f508ed3744a Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Oops: bugfix support for ref qualifiers in GCC 4.8.1Thiago Macieira2013-05-011-1/+1
| | | | | | | | 51ee309a7946f5377e26da23ae52171711e59461 introduced this check, but it was supposed to be >= (it's available in 4.8.1, not after 4.8.1) Change-Id: Id993b128de5c3500684833aea8ef556b31aac5f2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* iOS: Don't use -1 as magic value for UIDeviceOrientationFaceUp/DownTor Arne Vestbø2013-04-302-4/+14
| | | | | | | | | | | | | | | | | | | The check in [QIOSOrientationListener orientationChanged] ensured we never reported the two unsupported orientations through QPA, but we were reporting back the orientation through QIOSScreen::orientation() as well, and that didn't have a guard for -1. This resulted in crashes in client code that assumed the range of QScreen::orientation() was defined by the enum, such as the paintedwindow example. The listener now ignores the two unsupported orientations, which leaves us at the previous orientation. For the conversion function, we still have to support all UIDeviceOrientations, so we fall back to portrait for the two unsupported orientations. In the future we should consider caching the previous value explicitly, or fall back to the interface orientation. Change-Id: Ic19d0ce86b4ddea250ea927d5e8664396b2b68fd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Don't pretend like our OpenGL context is single-bufferedTor Arne Vestbø2013-04-301-4/+5
| | | | | | | | | | | | | | | Internally iOS double-buffers its rendering using copy instead of flipping, so we reported that our context was single-buffered so that clients could take advantage of the unchanged buffer. This failed when clients (such as Qt itself) then assumed that calling swapBufferes() was not needed. We now properly report that we're double-buffered, and we'll have to find another way to report the way double-buffering works if that's still an optimization we'd like to provide to clients. Change-Id: Id2e4faa68ed3b837ad01d6f22b2927fc9c9769c2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QAccessible::State is no longer an enumOlivier Goffart2013-04-301-1/+1
| | | | | | | | | | | Since 39a052c66479c6d7bd13c4f583fecf6a895b2948, QAccessible::State is no logner an enum that moc understand. moc currently silently ignores it the Q_ENUMS Change-Id: Iecc30ad57055fc9ccaa33e9e9c400d96997d0902 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Cocoa: Port QCocoaTheme::fileIconPixmap() to CocoaGabriel de Dietrich2013-04-301-19/+10
| | | | | | Task-number: QTBUG-30907 Change-Id: Ie460db63413ab9c8e0fb5fb85af907e1c7f12759 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Make QLocalePrivate PODThiago Macieira2013-04-302-12/+21
| | | | | | | | | QSharedDataPointer does not actually need a class derived from QSharedData. All it needs is a member called "ref". Change-Id: I2f7fe4cc143478ef7ef64681eada16e2d4c2e63a Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QLocalePrivate: remove QLocalePrivate::m_indexThiago Macieira2013-04-302-27/+10
| | | | | | | | | | | | | It's not used anywhere, so we don't need to cache the locale data index. We already have the pointer to the QLocaleData anyway. This saves us a few roundtrips calculating the index from the data pointer only to get the data pointer again. Change-Id: I6905d20a382ddcb9fb04cc886a17499b467f905a Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Move the code that creates QLocalePrivate to separate functionsThiago Macieira2013-04-301-27/+33
| | | | | | | | | | | | Direct benefit is that the code between the two QLocale constructors taking language, country and (maybe) scripts is merged. This will also allow us to cache the QLocale::c() result. Change-Id: Ia46c5a37764dc287bfcd3a52a022ac413c53a582 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Android: don't crash on exitPaul Olav Tvete2013-04-302-27/+21
| | | | | | | | | | | We have to call DetachCurrentThread() for each time we call AttachCurrentThread(). Fortunately we have this convenience class that we prepared earlier. Task-number: QTBUG-30847 Change-Id: I5ffb94b336d3787a3bae197bab22b91770d58848 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Don't block back button after keyboard is hiddenPaul Olav Tvete2013-04-301-4/+2
| | | | | | | | | | | | The back button would be non-responsive for 5 seconds after hiding the software keyboard. This is a minimal change that does not look into why we need to have a 5 second delay in the first place. Task-number: QTBUG-30752 Change-Id: Ied514b77650cea7accc37a03efef2ce861090f65 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Clarify documentation for QKeyEvent::textFrederik Gladhorn2013-04-301-5/+8
| | | | | | Change-Id: I4b455a512b2e678b6127ea488b456c68eb80cdbc Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* iOS: Simplify context format setupTor Arne Vestbø2013-04-301-9/+5
| | | | | Change-Id: I6a6a025410298cecd5f62abd08388a7379359af7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Doc: Adding Qt Creator Manual as \externalpageJerome Pasion2013-04-301-0/+491
| | | | | | | | | -This should allow any Qt 5 module which inherit qt-module-defaults to link to the Qt Creator Manual. Change-Id: If413fe299fa604d16c06fa261024c1a12be24b09 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Mac style: Fix text offset within 'small' comboboxGabriel de Dietrich2013-04-301-0/+2
| | | | | Change-Id: I2bde1c71e0e79a6d8ef2897acc053357b12dc00c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Mac style: Update appearance of 'button with menu'Gabriel de Dietrich2013-04-301-19/+69
| | | | | | | | | | Most of the logic was still following the 10.6 UI guidelines, and had not yet been upgraded to the 10.7 new button look. We tried to keep 10.6 compatibility were possible, and improve 'small' and 'mini' Aqua sizes support. Change-Id: I64139f24cccd095e9349b27a987395210b55c586 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* qdoc: Config class uses current path for each path varMartin Smith2013-04-305-25/+10
| | | | | | | | | | The Config class is further modified to make use of the current directory information it stores with each configuration variable. Task-number: QTBUG-30725 Change-Id: I34c845e6c05d7868266324f1d54e56f94d709f95 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Config class keeps track of current pathMartin Smith2013-04-306-180/+221
| | | | | | | | | | | | | | | The Config class is modified to build a single multimap containing a record for each variable found in each .qdocconf file. Each reacord contains not only the name and value of the variable, but also its location in the qdocconf file it was read from and the path to that file. This single multimap replaces 3 maps in the Config class. Task-number: QTBUG-30725 Change-Id: I049a69790f943b24c014a24b55b2b39725a1b56f Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* don't customize dialog buttons if GTK version is too oldShawn Rutledge2013-04-301-0/+2
| | | | | | | | gtk_dialog_get_widget_for_response was introduced in GTK 2.20 Task-number: QTBUG-30610 Change-Id: I30510f132c1d81c5d44863b3efddbc5e50771362 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix possible segfault when setting up window's transient parentShawn Rutledge2013-04-301-1/+1
| | | | | | | | tp->handle() can be null. Task-number: QTBUG-30919 Change-Id: Ie18b70d4cc6916d2e821a71d00d1bf99956b0632 Reviewed-by: Liang Qi <liang.qi@digia.com>
* QPlainTextEdit: add missing feature zoom on Ctrl+WheelCaroline Chao2013-04-302-0/+49
| | | | | | | | | | | When the control is read only. This is documented but not implemented. Add functions to zoomIn and zoomOut. Task-number: QTBUG-30845 Change-Id: I692b5f8cc5791498d34d35ea3dafa18b6e5d3e65 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Doc: Zooming inside QTextEditCaroline Chao2013-04-301-0/+2
| | | | | | | | | | | | | One can zoom in/out text inside a QTextEdit when the widget is read-only or when using the zoomIn/zoomOut functions. Zooming inside a HTML document only works if the font-style is not set to a fixed size inside the document though. Adding this information to the documentation. Change-Id: I66a62da53827e1ce3241ba16b91e86926b97c297 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Doc: Give C++ class lists consistent titlesSze Howe Koh2013-04-297-8/+8
| | | | | | | | | | | | | The majority format is "<Qt Module> C++ Classes" (see http://qt-project.org/doc/qt-5.0/qtdoc/modules-cpp.html) Also, fix a broken link (Qt Network C++ Classes) "<Qt Module> C++ API" is perhaps the more correct format, but that's part of a much bigger cleanup: QTBUG-30556 Change-Id: I753365e2bec8d85d9a5f686b4aa35c9eeeaf0871 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add some extra tests for QString::argThiago Macieira2013-04-291-0/+22
| | | | | | | | | | Test locale-based formatting of numbers when we pass field width, base and fill characters. This now tests the fact that we replace a '0' for the locale's zero character. Change-Id: Ib872a592fd9a754e3ef11495a9497a6947056631 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* iOS: Don't resize backing store twice in beginPaint()Tor Arne Vestbø2013-04-291-1/+0
| | | | | | | The first call to resize() was a left-over from before we had retina-support. Change-Id: I637e8d40f443f81fe7cfc367650bb28b917da2bc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* fix quoting issues in vcxproj generatorJoerg Bornemann2013-04-291-2/+2
| | | | | | | | | | | | | Fix passing of preprocessor definitions with double quotes to the resource compiler and to MIDL. Both have a different escaping mechanism then the C/C++ compiler tool. This fixes a regression introduced in 9e9911715c37511ece018aa9d36491b77872501b. Task-number: QTBUG-30859 Change-Id: Ifa041df407030320847373a5964a547c39dd5439 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* test: Mark tst_menubar::task256322_highlight as XFAILSergio Ahumada2013-04-291-1/+6
| | | | | | | | | | This test is unstable on Mac OS 10.7 with developer builds, so marking it as XFAIL if it happens to fail. Task-number: QTBUG-30565 Change-Id: If7094c3b19299f0dbe57cb82a8614032a75573d8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Make sure window is updated on resize eventEskil Abrahamsen Blomfeldt2013-04-291-0/+1
| | | | | | | | | | | After 475d1ed4f6a21686828fbd018542b469a8b2dbcd in qtdeclarative, orientation changes on Android were broken, because the resize event no longer implicitly causes an expose event. So we need to post both when doing the resize. Task-number: QTBUG-30909 Change-Id: I87c8c38e14d96a03b3409ef6439c3ac6ef432005 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* uclibc/pcre: Fix the linking of libQtCore for mips/uclibcHolger Hans Peter Freyther2013-04-291-4/+4
| | | | | | | | | | | | The mips/uclibc features.h of the toolchain used by a former key account of PSO is defining both __USE_XOPEN2K and __USE_BSD this will lead to POSIX_MADV_* and MADV_* being defined while only the symbols for madvise are present. Change the order to make it link. Change-Id: If324b978d72ad2b37b8cd624562e81503c9465d4 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix possible race in QMutexOlivier Goffart2013-04-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in the QTBUG-30872, there may be a race condition involving 3 threads fighting for a mutex. I am surprised it was not caught before despite all the Q_ASSERT and the stress test in tst_qmutex. We do not need to call store(0) because the unlocking thread will eventually remove the BigNumber flag. And perhaps it even did it already, and another thread has incremented waiters (hence the Q_ASSERT is wrong) Here is a paste of part of the description from the bug report: --- many threads, one of them is ready to release mutex, while at least two other trying to acquire it d->waiters is 0 Thread 1 release mutex in unlockInternal: if (d->waiters.fetchAndAddRelease(-QMutexPrivate::BigNumber) == 0) d->waiters is now -QMutexPrivate::BigNumber Thread 2 try to acquire mutex in lockInternal: old_waiters = d->waiters.load(); if (old_waiters == -QMutexPrivate::BigNumber) { if (d_ptr.testAndSetAcquire(d, dummyLocked())) { It acquire 'about to release mutex' by changing d to dummyLocked Thread 1 continue release procedure: d->derefWaiters(0); d->waiters is now back to 0 Thread 3 try to acquire mutex in lockInternal: while (!d->waiters.testAndSetRelaxed(old_waiters, old_waiters + 1)); d->waiters is now 1 Thread 2 continue its dummy lock: d->waiters.store(0); d->waiters is force to 0 Thread 3 continue wait procedure but it realize that mutex was already unlocked so decrease back waiters if (d != d_ptr.loadAcquire()) { if (old_waiters != QMutexPrivate::BigNumber) { d->waiters.deref(); d->waiters became negative value of -1 Neither thread need internal data so it is released back to pool The waiters counter in released internal structure is still -1 --- Change-Id: I1b22555db764482775db6e64a8c9ffa9e1ab0cf6 Task-number: QTBUG-30872 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QKeySequence matchingGatis Paeglis2013-04-291-3/+5
| | | | | | | | | | | QKeySequence failed to find a match in the shortcut table when QKeyEvent contained Qt::GroupSwitchModifier modifier. It's not a part of the shortcut, it simply shifts character group in a keyboard mapping table. Task-number: QTBUG-26302 Change-Id: Id91cd4999777f7085068e9dba5cb22b40653e23d Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Prevent crash due to giving QWidget::update() a large rect.Samuel Rødal2013-04-291-4/+9
| | | | | | | | | | | We can simply clip the update rect against the widget's rect and return if it's empty. Otherwise we risk ending up with update rects that are larger than INT_MAX due to multiple update rects being merged. Task-number: QTBUG-30876 Change-Id: I23bd0149fbe8d1a007a60b228e6bddb45dc4fc32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>