summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Windows/Windows CE: Do not dynamically load shell32/coredll.Friedemann Kleint2014-01-073-33/+5
| | | | | | | | | Those libraries are contained in QMAKE_LIBS_CORE and GetSpecialFolderPath() is present in all supported versions. Change-Id: Iae40714e0f234625b063aeb50e29fc79c4aaa6ea Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QNX: Add some more properties to a touch pointFabian Bumberger2014-01-071-2/+24
| | | | | | Change-Id: Ic1c889557148f112e357c3ee34199ff6d19b4a6e Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Add takeTexture() to QOpenGLFramebufferObjectLaszlo Agocs2014-01-073-41/+97
| | | | | | | | | | | | | Add an API that allows to retrieve and detach the texture from the framebuffer object. The next bind() call will then create and attach a new texture. [ChangeLog][QtGui][QOpenGLFramebufferObject] Added takeTexture() for retrieving and detaching the texture from the framebuffer object. Task-number: QTBUG-35881 Change-Id: I2cca37f5872c1685b1238047f8b912e6534ab781 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Prevent foolish use of setuid when using Qt.Richard J. Moore2014-01-073-0/+50
| | | | | | | | | | | | | | | | In order to prevent people from shooting themselves in the foot, abort if we're running setuid. This behavior can be disabled by calling QCoreApplication::setSetuidAllowed(true) in order to support legacy code. [ChangeLog][QtCore][Important Behavior Changes] Running Qt applications that are setuid has been prevented. If you really need to do this then you can call QCoreApplication::setSetuidAllowed(true) before creating the QCoreApplication instance. Change-Id: I992a9a0cd8420693d438852a05666e3dbb2c9d6a Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* WinRT: Clean up core event dispatcherAndrew Knight2014-01-073-139/+88
| | | | | | | | | | | | | | | | - Move private classes in the .cpp file (they aren't needed outside) - Conform to Qt style, such as includes and braces - Use ComPtr where appropriate - Use foreach where appropriate - Remove non-functional wake/interrupt leftovers - Remove redundant timer list - Make the timer callback a static method, so it won't crash if it gets called on shutdown Task-number: QTBUG-35945 Change-Id: I5426fba2735e908a04ea60287f9936f5abde6644 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Properly return exit codeAndrew Knight2014-01-071-2/+6
| | | | | | | | | Instead of returning the HRESULT of the Run method, return the actual exit code of the application. Change-Id: I1e3d654ecdb4c319d4a08fe8a11e8699d186f66b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* WinRT: Improve event dispatcherAndrew Knight2014-01-072-8/+35
| | | | | | | | | | | | | | - Sleep when there are no events to process. Otherwise, CPU usage remains high all the time. - Reorder processing so window events are processed after being collected by the native event loop. - Provide basic interrupt and WaitForMoreEvents flag support. Task-number: QTBUG-35327 Change-Id: I8a5545cba5f3e65eafd0bb40695bf6ffde68bb04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* xcb: Remove useless flushesUli Schlachter2014-01-062-7/+2
| | | | | | | | | | | | | | | | | | | | | | Calling xcb_flush() right before QXcbConnection::sync() is pointless. The flush sends all requests that were already queued to the server and the call to sync() then just sends another request, flushes it and waits for its reply. Having just sync() implicitly flush for us means less overhead and has the same effect. Another useless flush is in QXcbShmImage::put(). The only caller is QXcbBackingStore::flush() and this calls put() in a loop. If we just call xcb_flush() from flush(), then xcb can send more requests in a single write() call again. Finally, calling Q_XCB_NOOP() twice in a row without doing any interaction with xcb in between doesn't help much, so remove one of the two calls from QXcbShmImage::put() Change-Id: Ia3d6945b8d961e2844fc3e31fdf8189c47b534d1 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Change entry point for WinRT apps to WinMainMaurice Kalinowski2014-01-062-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | Using wmain causes the problem that the linker seems to create some code around it, which calls ExitProcess. That function however is forbidden by the Windows Store Certification process and hence you cannot publish an application currently. This does not apply to Windows Phone, which links in such a way that this problem does not occur there. With WinMain as the entry point this does not happen and also is the default entry point. Testing locally shows that certification goes fine. Since it does not pass the full command line string, the C-runtime method __getmainargs is used instead. This also gives access to any environment strings which may be passed. Note that MSDN states that this function should only be used for desktop applications. For XAML/C++ scenarios there is no entry function at all, but rather the App object gets instantiated in the default template. But this only works for XAML itself and not for plain C++ applications, probably some other entry wrapper is created on the fly here. Done-with: Andrew Knight <andrew.knight@digia.com> Change-Id: I8a118eddf6cfeddeca7d676267e979af17123e02 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* OSX: support fake fullscreen and etcLiang Qi2014-01-032-4/+40
| | | | | | | | | | | | * Fix QCocoaWindow::setGeometry() to respect WindowFrameInclusive * Support fake fullscreen on 10.6 or WindowFullscreenButtonHint was not set on 10.7 and later * Fix tst_qwindow on 10.6 and later Task-number: QTBUG-23059 Task-number: QTBUG-34629 Change-Id: I6e032ca55b45674388b00506a424d3bd7ece429f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-0333-143/+343
|\ | | | | | | Change-Id: Id13badc270db98806048753fd7fb658aa17f1ede
| * Make texture glyph cache more robust against missing glyphsSimon Hausmann2014-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes failing assertions in the CI system. All the callers of lockedAlphaMapForGlyph always check the return value for being null as well as the image itself, so we need to do the same here as well before calling unlockAlphaMapForGlyph. This is proposed to stable because commit f9399d69add411adf757e3390488ff57655833b7 also landed in stable. Change-Id: I0a4f4fbb1727e5b4ad497b08177d14c81abd2dd0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * REG: Fix support for strings spanning multiple font enginesEskil Abrahamsen Blomfeldt2014-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | E.g. in the case where the first char in a font got a font engine index != 0, and the second character got font engine index == 0, we would not count the second character as a separate glyph run. The result would be that its glyph indexes would refer to font #0, but the font used to render them would be the same as for the first character, i.e. random. Task-number: QTBUG-35740 [ChangeLog][Text][QTBUG-35740] Fixed regression when shaping some strings containing characters from multiple fonts. Change-Id: I668804045c8b276787c7b256bc87916c467f3f59 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Accessibility Linux: Fix atspi getActions to return action nameFrederik Gladhorn2014-01-031-0/+1
| | | | | | | | | | | | | | | | [ChangeLog][Accessibility] On Linux action names were returned as empty strings in AT-SPI getActions, now returns the proper names. Change-Id: I75a469a0b8a5789cd54ce1b489ed5012654bb265 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Cocoa: fix single punctuation input via CJK input methodLiang Qi2014-01-031-5/+0
| | | | | | | | | | | | | | | | | | | | | | 2d05d3bd2815c220474b3c07bf3f2ef7417d3070 was not correct. On OS X, when user uses CJK input method, only types single punctuation, it was converted to CJK ones, and not showed in composing text. Task-number: QTBUG-35700 Change-Id: I919edb3f5165bf943c0d90d06a788a2f335bb1ba Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Add missed header to qfileselector.cpp.Ivan Komissarov2014-01-031-0/+4
| | | | | | | | | | Change-Id: I2fd6fb2ae1663730a008221f6beeef19a5307246 Reviewed-by: David Faure <david.faure@kdab.com>
| * Android: let fullscreen use entire screenPaul Olav Tvete2014-01-031-0/+38
| | | | | | | | | | | | | | | | API level 19 (Android 4.4) introduces "immersive" mode which lets the app use the entire screen. Change-Id: I12f6aebaf1303cdc5b6bfb51944e895351fa2406 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Android: Overwrite plugin cache when APK is updatedEskil Abrahamsen Blomfeldt2014-01-031-10/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To allow updating APKs with new versions of Qt, we need to delete the old cache when the APK is updated. This patch does two things: 1. Move the plugins (and imports/qml) into a directory called qt-reserved-files/ to better separate the cache from the rest of the application. The first time the files are put here, we will delete the old cache in <datadir>/plugins, <datadir>/imports and <datadir>/qml if they exist to avoid leaving old files around forever. 2. Add versioning to the cache and flush it every time the APK is reinstalled. Potentially, the libraries in the APK can change for every reinstall, so this is the safest approach. Task-number: QTBUG-35129 [ChangeLog][Android][QTBUG-35129] Update deployed plugins and imports when APK is updated on the device. Change-Id: Ie38b639db2cfba8a521acc875c4afd5e07df3efd Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Android: Don't show ActionBar at startup.BogDan Vatra2014-01-022-5/+3
| | | | | | | | | | | | | | Task-number: QTBUG-35151 Change-Id: Ie62e50032aaa647a86c4f03b1a3363e5ef6a1bbb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Fix some typos in documentation.Jeff Tranter2014-01-027-10/+10
| | | | | | | | | | | | | | | | Fix some spelling and grammatical errors in comments that show up in Qt documentation. No changes to code. Change-Id: I2e946fda0bd9a2117f8e9b2fb300df9bf0a98a6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * Accessibility: Do not assert when a widget doesn't have a QAIFrederik Gladhorn2014-01-021-0/+2
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtGui] Fixed crash when sending accessibility updates when the corresponding widget does not have a corresponding QAccessibleInterface. This showed on Mac for example with QStatusBar. Task-number: QTBUG-35421 Change-Id: I94174e98e858b7a0122532ee5fcc8458a263bccd Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * qdoc: Fix Q_PROPERTY parsingTopi Reinio2013-12-311-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing Q_PROPERTY declarations, qdoc tries to always read an associated value for each matched keyword. This fails for property declarations including a CONSTANT or FINAL, as they have no associated values. This change fixes the above problem and makes the parsing more robust by checking the return value of matchProperty() and skipping to closing parenthesis in case of failure. Task-number: QTBUG-35722 Change-Id: Ia483b8e74aeef19b2e761b21473cd4f765cdca19 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| * xcb platform: Fix build when both EGL and xcb-Xlib are usedAndrew Knight2013-12-311-2/+6
| | | | | | | | | | | | | | | | Fix a multiple define when Qt is configured to use both EGL and xcb-Xlib. Change-Id: I6fdb282f575842711b3b5d377bbdf3bc9909bf0c Reviewed-by: Christoph Cullmann <cullmann@kde.org> Reviewed-by: David Faure <david.faure@kdab.com>
| * Don't leak pending call objects when peer disconnectsRobin Burchell2013-12-302-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Unlike in regular connection to DBus server, we don't get pending call notifies when a peer drops the connection in peer-to-peer mode. Thus, we need to keep track of pending calls in such cases and get rid of them in ~QDBusConnectionPrivate(). Change-Id: I83e20db0bc7b2ebf509c7fdb1382ffc7d0ede9d3 Done-with: Kalle Vahlman <kalle.vahlman@movial.com> Reviewed-by: Daniele E. Domenichelli <daniele.domenichelli@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Improve QFileSelector docAlan Alpert2013-12-301-27/+36
| | | | | | | | | | | | | | | | | | Mostly just adding proper tags and sections, as well as a few grammatical fixes. Change-Id: I219517d740fa7385e923a9e09cb7e241378fcbdd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Windows platform plugin: Add missing case statementKurt Pattyn2013-12-301-0/+6
| | | | | | | | | | | | Change-Id: I9b9fc6cf000b262277711374e0a2fe119328849e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * mtdev: Change to use configure detection instead of requiring source hacking.Robin Burchell2013-12-304-12/+15
| | | | | | | | | | | | | | | | | | | | This coincidentally fixes a case of accidental BIC in qevdevtouch_p.h, where not all users would necessarily define USE_MTDEV: having it centralized inside Qt makes this now, blessedly, impossible. Change-Id: I196a8f21742830705759aa917a823afdc94ba2b5 Done-with: Michael Brasser <michael.brasser@jollamobile.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * linuxfb: Make mouse cursor behavior match eglfsLaszlo Agocs2013-12-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | On non-Android systems hideCursor should default to false, just like it is done in eglfs. This is especially useful on udev-less systems where currently one has to resort to setting QT_QPA_FB_HIDECURSOR to "0" to enable the mouse cursor. This is not ideal. Defaulting to showing the cursor unless disabled by the environment variable or, in absence of that, the lack of a mouse reported by udev is a better choice. Change-Id: I7362ac47046179d5eb8ed8b44cf2c36c0fc23432 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Doc: Polish Qt::ConnectionType descriptionsSze Howe Koh2013-12-301-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Shorten Qt::AutoConnection description, rearrange to match the order of the subsequent rows. - Note the thread used in Qt::DirectConnection - "Emitter's thread" is ambiguous -- a signal is not necessarily emitted from the thread that the emitter lives in. - Misusing Qt::BlockingQueuedConnection WILL (not "can") cause a deadlock. Qt even issues an error message before it freezes. - Remove the \note command -- it breaks the table and displays the note in a new paragraph. Change-Id: Ib60cb665e0cd23e1e072402ec5d8be344b8454f7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * fix compile of qt without egl availableChristoph Cullmann2013-12-301-1/+1
| | | | | | | | | | | | | | | | move the dpy to the place where it is used inside the egl ifdef guard fixes compilation on old distros not having egl Change-Id: I7eebe5305f3a584c0c5da2ea7b9099fdd994249d Reviewed-by: David Faure <david.faure@kdab.com>
| * xcb: added env variables to show input devices and eventsShawn Rutledge2013-12-303-45/+56
| | | | | | | | | | | | | | | | | | | | export QT_XCB_DEBUG_XINPUT_DEVICES=anything to show detected input devices at startup export QT_XCB_DEBUG_XINPUT=anything to log mouse, touch and tablet events Change-Id: Id14844b68ad376740f82a36aab2c59c84d2017ab Task-number: QTBUG-35583 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * XCB: Don't recalculate the DPI if we have a forced DPI settingThiago Macieira2013-12-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | logicalDpi() already has the logic to check m_forcedDpi, so let's reuse it. I hope it's not a problem that we send a signal that it changed when nothing changed. [ChangeLog][Platform Specific Changes][X11 / XCB]Fixed a bug that caused Qt applications to think the screen DPI had changed when it had not, after connecting or disconnecting monitors. Task-number: QTBUG-32683 Change-Id: I45dd27de5109e65e7599915f11cfdb633a65a67c Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Fix ‘looses precision’ warning in public APIKurt Pattyn2013-12-272-4/+4
| | | | | | | | | | Change-Id: I935e6f278e539f8e6aaca0bc381371ec85aa5c67 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Avoid crash due to accessing deleted QWidgetWindow objectJian Liang2013-12-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change childWidget->windowHandle() to childWidget->internalWinId() in q_createNativeChildrenAndSetParent() to determine whether should we call childWidget->winId(). This is because in some circumstances Qt will crash due to accessing deleted QWidgetWindow object if we use windowHandle(). Think about the following scenario: 1) create a widget A without parent and add two child widgets B and C to A 2) create a native widget D as the child of B, note that when we set Qt::WA_NativeWindow attribute to it, its QWidgetWindow will be created which means its windowHandle() is not null. 3) create a top level widget E as the child of C and show it. This will make Qt call createWinId() to A and then q_createNativeChildrenAndSetParent() will be called to create A's native children recursively and finally make D's QWidgetWindow object become a child of A's QWidgetWindow object. Please note here that B will not become a native widget just because at that moment windowHandle() of D is not null and Qt will not call winId() to its parent B 4) Set A's parent to another widget which has been shown, setParent_sys() will be called to A and then Qt will call destroy() to A. in destroy() Qt will try to call destroy() to its children recursively with a condition that the child has Qt::WA_NativeWindow been set. But D's parent B is not a native widget right now so B and D is not destroyed. Qt will then deleted the QWidgetWindow object of A, since E's QWidgetWindow object is a child of A's QWidgetWindow object, it will also be deleted. Now E hold a deleted pointer of QWidgetWindow object. This is the source of crash later. Task-number: QTBUG-35600 Change-Id: I97a20a68e626ee62b15bb4eae580e26f8948923b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Apply the fix stated in PCRE bug #1423Giuseppe D'Angelo2014-01-022-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | There is JIT misoptimization found during code refactoring that affects PCRE 8.34 (the version currently bundled with Qt). The upstream might not release a specific bugfix release before 8.35, hence the patch has been manually applied. Upstream issue: http://bugs.exim.org/show_bug.cgi?id=1423 Change-Id: I8dbbb2981bc037d39b30fcaded6894ee9820b8df Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | RValue ref version of QPixmap::fromImage()Allan Sandfeld Jensen2014-01-025-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | When converting from a temporary image we can use inplace conversion since we don't have to worry about changes made to the original. This should give a speedup in several places where QPixmaps are made from the return values of methods returning QImages. Change-Id: I1835bcf3fc061c4dbbb3d0507ec84178dc49b29b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix crashes when calling into qdbus interfaces from QMLSimon Hausmann2014-01-022-24/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meta-call convention for reading properties differs between Qml and QDBus. QML expects only to provide a pointer to the return value in args[0]. That is also how the metacall was originally introduced in Qt 4. QDBus also expects that the caller allocates a QVariant and provides a pointer to it in a[2], in addition to a[1] being a pointer to an int that is used to report where the return value can be found (in where a[0] points to or the variant in a[1]) - this is useful to report errors when reading the property by clearing the variant. For performance reasons, QML avoids the creation of a QVariant when reading properties. As however QDBus expects it, a crash occurs. This patch changes the QDBus metacall implementation to not rely on the caller to provide a QVariant. Task-number: QTBUG-15052 Change-Id: I2f2c5b3ef2c1d93cc72eee1fa32a95d299a104c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Extend multimedia keysAllan Sandfeld Jensen2014-01-024-0/+22
| | | | | | | | | | | | | | | | | | Extends the Qt keycodes with four missing keys, common on remote controls: Guide, Info, Settings and Exit. Change-Id: I6789f13dbb662da4261a3c947757644e12306dd9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Move struct declaration out of the union to avoid a compiler warning.Marcel Krems2013-12-311-4/+5
| | | | | | | | | | | | | | | | Clang 3.3+ warns about this being an extension: qsqlerror.h:101: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] Change-Id: I0350b977ff85558338b3b9db53d3fce7facb7635 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Remove additional spaces from indentation.Marcel Krems2013-12-311-6/+6
| | | | | | | | | | Change-Id: I1f76ed4e2eff64dc133a1fd30a8dc5fd5eb4710e Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Add SO_SNDBUF and SO_RCVBUF to socket optionsKurt Pattyn2013-12-302-3/+34
| | | | | | | | | | | | | | | | | | | | Added functionality to set SO_SNDBUF and SO_RCVBUF socket options on QAbstractSocket. Task-number: QTBUG-34934 Change-Id: I2134fb462d43b9111c039cd7e7d36bd78eafd8bc Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | Make QKdeTheme constructor public, allowing for custom inheritanceŁukasz 'sil2100' Zemczak2013-12-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QKdeTheme constructor public, allowing for custom inheritance by other classes. The danger of making it public and not going through the factory method are close to none, while other developers might want to slightly enhance KDE-themed platform themes by themselves. Right now the only choice is to copy-paste the whole code. QKdeTheme might be a private class, but still it makes no sense to restrict derivation if someone finds it necessary to do so. Task-number: QTBUG-35566 Change-Id: Ia3488da71e7c06fe4b7dc6e275605970b435b00e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Don't translate a null rect.Jan Arve Saether2013-12-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | This was probably because of some forgotten braces, since the indentation seems to indicate that. The current behavior might cause a null rect to become not null, which might cause for QRect::isNull() to give a false positive. Worst case it might case a program to crash (i.e. div by 0) Change-Id: Iba49699880250e605b427ff4c1228c68a3471a2f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | QImageReader: simplify _qt_BuiltInFormatsMarc Mutz2013-12-251-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By construction of the _qt_BuiltInFormatType enum, the .type in _qt_BuiltInFormats exactly equals its position. So there's no need to store it explicitly. Effects on Linux AMD64 GCC 4.9-trunk release stripped: text: -16B data: -64B relocs: +-0 (of course) Change-Id: Ib68c32de42d264f27bbd8a863538dd78b1ba4507 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QNX: Add support for BB10 text highlighting and spell checkingRoger Maclean2013-12-244-54/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the QPA side of the support for text highlighting during text entry and for spell checking. The changes are compatible with existing Qt text controls though require more advanced ones to have any effect. QQnxInputContext has three colors it can now use for highlighting text during composition to represent the active region, auto corrected text and reverted text. If any of these colors is invalid, that form of highlighting is not used. By default, only the active region color has a valid default which corresponds to the highlighting capabilities of classes such as QQuickTextInput. The QNX QPA native interface has been augmented with the ability to get a function pointer that can be used to set any or all of the three colors. The set of colors is reset to the default at any time that focus changes to ensure appropriate behavior if there is a mix of controls. It's worth noting that while the colors can be changed even when used with one of the standard Qt text controls, the auto-correct color will not show up since it is applied immediately before committing the text. Appropriate display of this highlighting requires that the control maintain the highlighting for a period after committing the text. Spell checking is provided via another function accessible through the QNX QPA native interface. This takes a string and a callback function to be called once spell checking is complete. As a slightly unrelated change, toSpannableString now uses toWCharArray to convert the QString to UTF-32 as required by IMF, the previous code was invalid in the case of strings containing UTF-16 surrogate pairs. Removed some extraneous includes. Change-Id: Ifdf3744d1990e0560d1923bca5db30953dea0192 Reviewed-by: Roger Maclean <rmaclean@qnx.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* | QWizard: Replace another pointer table with char arraysMarc Mutz2013-12-241-15/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like in I53284066, the result of the SIGNALS() macro is handled in a switch statement, while the other two character pointers in the struct are replaced by character arrays of 'maximum occurring size'. If this looks wasteful, it really isn't: Linux AMD64 GCC 4.9-pre stripped -O2 effects: text size: -280B data size: -160B relocs: -21 When adding longer strings, compilers will warn, so this doesn't hurt maintainability, either. Change-Id: I5ac1cdffd8ac0ea0a1ede1ea4edcc6d3e22dcaa2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QWizard: Replace a static char* table with a switch statement.Marc Mutz2013-12-241-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usual way of concatenating the strings with NUL bytes and recording the relative offset of each in a separate offset table doesn't work here, because the entries are the results of SLOT() and SIGNAL() macros, which might, in debug mode, inject a runtime function call (to qFlagLocation()). Linux AMD64 GCC 4.9-pre stripped -O2 effects: text size: +16B data size: -64B relocs: -6 Change-Id: I532840668bb57ab72ef3fecb01a450c4c46516e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Retain space settingKurt Pattyn2013-12-241-6/+22
| | | | | | | | | | Change-Id: I4584de9ba51610907c917a0e0ddf5f6f28d304a0 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-12-24103-1240/+4195
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-24103-1240/+4195
| |\| | | | | | | | | | Change-Id: I2defae1904154283446b069d151c3ef57302ec7b