summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Adapt the Vista-style wizard for device pixel ratio scaling.Friedemann Kleint2014-08-282-28/+57
| | | | | | | Task-number: QTBUG-38993 Task-number: QTBUG-388583 Change-Id: I1e3f1b5c82b9751e7f2aa6aed3d89d4388ecf1ce Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* QWidget::save/restoreGeometry(): Check screen size.Friedemann Kleint2014-08-281-4/+27
| | | | | | | | | | | Bump minor version of the saved geometry and append the screen width in version 1.1. Use that to check and bail out should large differences occur due to scaling or different levels of DPI awareness. Task-number: QTBUG-38858 Change-Id: Iad8ae0705297118b4237c9a41469cb97d7eab549 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Code cleaning in qt_gl_resolve_extensionsAllan Sandfeld Jensen2014-08-281-34/+42
| | | | | | | | | Moves feature checks so OpenGL vs OpenGLES is only tested one way and extensions so they are not tested if already required by their version. Change-Id: Ia77f6ea924559fa7a428beb6316ae392063dfc4f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Let ANGLE use multithreaded devices if necessary.Michael Brüning2014-08-284-0/+90
| | | | | | | | | | | This is needed to prevent lock-ups in application that use ANGLE from multiple threads, as e.g. QtWebEngine based applications do. The environment variable QT_D3DCREATE_MULTITHREADED is used to communicate this from the QtWebEngine module. Change-Id: Ibd5a5c75eb68af567d420d9a35efb3490c93b27c Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Mark QByteArrayList as metatype built-in type.Jędrzej Nowacki2014-08-285-3/+25
| | | | | | | As a side effects it also adds core templates types to the tests Change-Id: I0e3338e0bffdf21982aa83d404c83288e54411f4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QWindowsNativeInterface: don't allocate memory just to compare stringsMarc Mutz2014-08-281-3/+3
| | | | | Change-Id: I691d2629a78aaaee3d1741b9ab4c55b16c95bde9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Micro-optimize QVector::count()Marc Mutz2014-08-281-1/+3
| | | | | | | | | | | ...by instantiating std::count() not with QVector::const_iterator, which is a class, but with const T*, thus increasing the chance that the instantiation can be shared with other instantiations in the executable. It might also enable STL implementations to choose a hand-optimized version of the algorithm for C++ builtin types. Change-Id: I93df4e58f76838d98b565f229c19e317774b7b4c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QList: check d for equality before d->size for inequalityMarc Mutz2014-08-281-2/+2
| | | | | | | Same change as was already applied to QVector::operator==(). Change-Id: Ic2e140a52ee95f2e215668077951de0b4450d194 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QVector: check d for equality before d->size for inequalityMarc Mutz2014-08-281-2/+2
| | | | | | | | | | | | | | | | Assuming the CPU has already loaded 'this', the value of 'd' is just an indirect load away. The value of d->size, however, is two indirect loads away, one of which is the load of 'd'. So it makes more sense to check for d-pointer equality first, as that can proceed in parallel with the fetch for d->size, which the CPU may speculatively trigger. In addition, at least GCC in release mode after this change doesn't set up the stack frame if the d-pointer check succeeds. Change-Id: I61f9b245070dd1742fca6ccb8d4936a0b1aa7c07 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* winrt: Refactor internal socket bufferAndrew Knight2014-08-282-121/+70
| | | | | | | | Simplify the temporary buffer usage by using the built-in WinRT Buffer class. This also allows one use of the local event loop to be removed. Change-Id: Ice552910227ffbe31c6e8716ff7896af7c4532ef Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* winrt: Fix socket descriptor storage in native socket engineAndrew Knight2014-08-282-79/+126
| | | | | | | | | | | | | This stores the socket pointer in the descriptor, rather than an abitrary handle, so that it is easier to access from e.g. SSL socket. To further support SSL sockets, a special case for SSL sockets is made so that the the socket reader installation can be delayed until after the socket is encrypted (as this is the only supported mode of operation with StreamSocket). Change-Id: I693229189722dc43b221b167e8256f5497a50346 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* network: Add pending close on disconnect for non-empty write bufferAndrew Knight2014-08-281-1/+3
| | | | | | | | | | Similarly to 1b19f660 (which added socket flushing before close), the socket should have a chance to disconnect if the write buffer is not empty. Instead of flushing, the pendingClose is added so that the backend may disconnect the socket once these bytes have been written. Change-Id: I2d85b6356c3e158bade3d5d86161d3e33649cad6 Reviewed-by: Richard J. Moore <rich@kde.org>
* ssl: Share the host name matching utilitiesAndrew Knight2014-08-274-61/+61
| | | | | | | | | This moves the socket backend's host name matching functions up to QSslSocketPrivate so that they can be shared between backends. This works, as there is no OpenSSL-specific code here. Change-Id: I73c2081fdc2e60a44c90e90800d1e1877391a626 Reviewed-by: Richard J. Moore <rich@kde.org>
* Doc: language corrections QStorageInfo classNico Vertriest2014-08-271-55/+55
| | | | | | | Task-number: QTBUG-40984 Change-Id: Idf8c6ecedb25f6c55b3fe8db69e6de9d9f2eaf74 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Enables remap of NumpadKeys when Numlock is on and using evkeyboard.Risto Avila2014-08-271-0/+70
| | | | | | Task-number: QTBUG-32823 Change-Id: I80841a965c61a117e8b50a2775431bb723ca8eca Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Use ctor-init-list in QRegionPrivate(QRect) ctorMarc Mutz2014-08-261-5/+6
| | | | | | Change-Id: I531b862db7bdec0a504c6022c1a15635aaf3fc8d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QRegionPrivate: remove copy ctor and assignment operatorMarc Mutz2014-08-261-17/+0
| | | | | | | | They're identical to the compiler-generated ones, and probably inhibit move operators here and there. Change-Id: I918f2946f6b6aa49aa883420dc87df44013938a5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* qdoc: Enable listing of example files with .html extensionTopi Reinio2014-08-262-2/+6
| | | | | | | | | | | | | If a (non-external) link string ends in '.html', qdoc assumed it is a direct link to a generated html page. However, it could also refer to an example file with .html extension. This commit fixes a corner case where links to an example file page were broken for such files. Task-number: QTBUG-40831 Change-Id: I31acc141970b6768f0a93964723be82611d37a3d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Restore navigation bar title for module pages and groupsTopi Reinio2014-08-261-5/+4
| | | | | | | | | | | | | Adapt the code that generates the navigation bar to the recent changes in node hierarchy - Module pages, QML module pages and groups are no longer DocNodes. This change will ensure that if a page has a title, it will be visible in the navigation bar regardless of the the page (node) type. Change-Id: I697a12d5904d88f91771764ab7ed607b79e4eab1 Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Write all generated files to .qhpTopi Reinio2014-08-264-41/+19
| | | | | | | | | | | | | | | | | | | | | When writing the Qt Help Project XML file, QDoc traverses the documentation nodes recursively, adding html filenames for each node to the XML. The logic that QDoc uses for this process is not perfect, and needs to be kept up to date whenever the internal structure of the node tree changes. This often leads to problems where some pages are generated but not added to the .qhp, resulting in missing pages in the offline documentation. This change fixes this problem by having the generator keep track of the created filenames, and passing that to the help project writer. Task-number: QTBUG-40572 Change-Id: Ife60a30724183a2b6dcd2397ea79bfbdc2addd04 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Fix output of \br commandTopi Reinio2014-08-261-1/+1
| | | | | | | | | | | | | | | | Since the \br was promoted from a macro to a QDoc command, its output has been enclosed in extra paragraph end/start tags, adding to the visible vertical space. This change fixes the issue by not closing the paragraph when QDoc encounters a \br command. Also removes the now-obsolete \br and \hr macros, as they are both proper commands. \BR and \HR substitute macros are kept. Task-number: QTBUG-37361 Change-Id: Iabbefb6e79268419792ccba42386f6342ccd175d Reviewed-by: Martin Smith <martin.smith@digia.com>
* Close popup widgets when wheel events are receivedFriedemann Kleint2014-08-261-0/+9
| | | | | | Task-number: QTBUG-40656 Change-Id: I134b07705744c23af9718dee486ab5e9ad4352cf Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Added qsslcertificate_qt.cppOliver Wolff2014-08-262-43/+116
| | | | | | | | | | Having QAsn1Element in place, we can have a common foundation for the ssl certificate class for upcoming ports like WinRT and SecureTransport. The only thing that has to be added to the existing class is the handle() functionality. Change-Id: I560a8e412b26f350855c7bc456fcdb8e9b750939 Reviewed-by: Richard J. Moore <rich@kde.org>
* iOS: Use dispatch_async instead of performSelectorOnMainThread for IMETor Arne Vestbø2014-08-261-10/+12
| | | | | | | | Gets rid of awkward wrapping of Qt::InputMethodQueries as integer in a NSObject. Change-Id: Ia7e368fc12ec7957ca8ab602d8cec1e0a071af1d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Add UIResponder helper to get current first responderTor Arne Vestbø2014-08-262-0/+29
| | | | | Change-Id: I422d45860a52861893d963fabbecd4ac30477272 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* QCoreTextFontDatabase: Remove number type asserts.Morten Johan Sørvig2014-08-261-2/+0
| | | | | | | | | On iOS 8, the value 0 is returned as a kCFNumberIntType. The code still works - CFNumberGetValue converts it to a 0.0 double. Change-Id: Ic50900b22e4fa19ad1481e8e0e293559bbfd8cd2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Send QWindow::focusObjectChanged when clearing widget focusTor Arne Vestbø2014-08-261-0/+5
| | | | | | | | | | We do this for QWidget::setFocus(), but were missing a call on clearing the focus widget. Since QWidgetWindow::focusObject() will fall back to returning itself if there is no focus widget, we need to pass the result of window->focusObject() to the change signal instead of 0. Change-Id: I52a5519a19bb20e74b4a7c2a1abc9d47e2ea1315 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Document loading of high resolution versions of images.Friedemann Kleint2014-08-265-14/+55
| | | | | | Task-number: QTBUG-38858 Change-Id: I87ee18b66e137f5f5c01d77910f1a7f256b85e18 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Mention supportedMimeTypes() in QImageReader documentation.Friedemann Kleint2014-08-261-2/+3
| | | | | Change-Id: Iaa07a463e07982352fe2c7dd77d691a390a65f35 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Accessibility iOS: Fix crash after deleting a viewFrederik Gladhorn2014-08-262-3/+6
| | | | | Change-Id: I64e8357fcbf7f312308490351b7c692d31db5a43 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Clean up QAccessibleTabBarFrederik Gladhorn2014-08-261-9/+24
| | | | | Change-Id: Ic0949e4d76a7332ef1a42c93a06a0e4515c1192d Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Remove QAccessibleToolButton::textFrederik Gladhorn2014-08-262-25/+0
| | | | | | | | | This function actually is worse than just calling QAccessibleButton::text which it already does. It would mess up the shortcut handling in addition to that. Change-Id: I56cb95a44624da4c5fccb43e6835f6012a083337 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Remove unused variableFrederik Gladhorn2014-08-261-1/+0
| | | | | Change-Id: I0414d7bab89371f330d5b0cfa88758e3f1668f32 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* QDataWidgetMapper: micro-optimize clearMapping()Marc Mutz2014-08-261-4/+5
| | | | | | | | | | | | | | | | | | | | | | | QList<WidgetMapper>::takeLast() is a needlessly expensive operation (involves copying a QPersistentModelIndex and a QPointer). Instead of looping over takeLast() until empty, reverse-iterate over the list and call removeEventFilter(), then clear the whole list. We reverse-iterate to preserve existing behavior. Also, since the original code popped the WidgetMapper instance before calling removeEventFilter(), we move the whole list into a local copy before iterating. There's little chance that a removeEventFilter() call will cause reentrancy into QDataWidgetMapper, but better safe than sorry. This and the previous change together save 448 bytes of text size in libQt5Widgets. Change-Id: I1bfe907751659f31e618aa05bbb7b840f0aa61f4 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QDataWidgetMapper: micro-optimize handling of the widget mapMarc Mutz2014-08-261-17/+17
| | | | | | | Don't use index-based iteration, but use iterators. Change-Id: I57c9582aed644fc58ced1a1af940dcd20d11d970 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* fix a camel case include guard macroTasuku Suzuki2014-08-261-3/+3
| | | | | Change-Id: I502ecf6c862f101e426536e11f5c466ed3419946 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add devicePixelRatio support to the Windows QPA plugin.Friedemann Kleint2014-08-2517-120/+420
| | | | | | | | | | | This adds support for the environment variable QT_DEVICE_PIXEL_RATIO for the Windows platform plugin. Task-number: QTBUG-38993 Task-number: QTBUG-38858 Change-Id: I6831eb6d3a09a80be7bbef46395e91531b61cc50 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QEvent check for QT_NO_GESTURES in new debug code.Dyami Caliri2014-08-251-0/+4
| | | | | | | | Latest changes to QEvent break compiling with -no-feature-gestures. Change-Id: Ibbddd73a4f567051c3793a7aaf438240add6583a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Avoid crash if querying device that has gone awayAllan Sandfeld Jensen2014-08-251-2/+4
| | | | | | | | | | | A device removed very fast after being inserted might disappear while we are still seting it up. We must therefore check if we indeed still get a matching device Task-number: QTBUG-40820 Change-Id: I4372fb1932264e5799f37cea0d016795e28ebed6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QOpenGLTextureBlitter: Do not call vao functions if it failed to createLaszlo Agocs2014-08-251-7/+7
| | | | | | | | Follow the good practice of checking for isCreated() before calling VAO functions like bind(). Use also the vao binder where applicable. Change-Id: Ib827f3bce838396bf2e08f9480fa63801d4d3a50 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Support QOpenGLWidget and QQuickWidget on AndroidLaszlo Agocs2014-08-2511-171/+77
| | | | | | | | | | | | | | | | | | | | | | | | It gets somewhat complicated due to the fact that a RasterGLSurface window (i.e. any widget window since 5.3) may behave either like an OpenGLSurface or a RasterSurface, and the expected behavior may change on each backingstore sync. This does not fit designs where the platform window implementation is separated and there is different behavior for raster and GL windows. Therefore QAndroidPlatformOpenGLWindow is now made capable of behaving like the raster one, based on a flag communicated from the widget stack via QWindowPrivate (since the plugin knows nothing about widgets). This means that widget windows that do not have renderToTexture children (QOpenGLWidget, QQuickWidget) will go through the raster path, while the ones that have will behave like an OpenGL window with the actual rendering happening in QPlatformBackingStore::composeAndFlush(). The surface type is RasterGLSurface in both cases nonetheless. Task-number: QTBUG-37907 Change-Id: I6f9261fc0fd993afcda7f30d379c5410069033d3 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* OS X QColorDialog: emit reject() when closed by the titlebar buttonShawn Rutledge2014-08-251-0/+19
| | | | | | | | | | but only if there is a Cancel button. A color dialog without a cancel button might be kept open and apply to various selections, so it doesn't make sense to reject such a dialog, only to close it. Task-number: QTBUG-40855 Change-Id: Ifffb4ae81307c72259ed388a4776ba09543603e7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Initialize textureId in platform backing storeLaszlo Agocs2014-08-251-0/+1
| | | | | | | | | | | | | Setting it initially to 0 is very important, otherwise we will do a glDeleteTextures with the undefined value. The result sometimes goes unnoticed and sometimes causes bizarre issues: For example in the 'textures' example one face of one cube out of the six did go blank from time to time since the corresponding texture was deleted by the backingstore. Change-Id: Id19eb2164471b542b08a277a65edfcb5d0f8248d Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* DirectFB Fix issue with showing dialogsAndy Nichols2014-08-251-15/+3
| | | | | | | | If the window was not visible when the geometry was set, then the DirectFB window would not be resized. Change-Id: I7790c90ed0fb755aebee0e32c877ebd9e48417cd Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* DirectFB Unbreak mouse input for child windowsAndy Nichols2014-08-252-13/+3
| | | | | | | | The local and global coordinates for mouse events were being translated incorrectly from the native DirectFB events. Change-Id: Id904a4335459b87c92f4b8b46d535c78fb7dad8c Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* DirectFB Make usable again with QWidgetAndy Nichols2014-08-251-36/+52
| | | | | | | | | | | Previously when we created any QWidget based application a QDesktopWidget would be created as a physical window like any other, but this window would steal input from the application. We now create a DirectFB window for the Qt::Desktop type of widget now, but it does not receive input events and can not be painted to or displayed. Change-Id: I6a090c5384b1f83383e40680dbede5d0edc41983 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* DirectFB Provide a native interfaceAndy Nichols2014-08-252-2/+8
| | | | | | | | Using the same multiple inheiritance that is used in the EGLFS platform plugin. Change-Id: I016f904bfc365bec6266c3f5d638ab15ecefe63b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* DirectFB Add QGenericUnixServices and inputContextAndy Nichols2014-08-252-0/+14
| | | | | | | | The DirectFB platform plugin was missing support for services and inputContext. Change-Id: I010fdcbed5e172b019b4dce79f3beea0f9c5025d Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* OS X: Fix pan gestures.Morten Johan Sørvig2014-08-252-5/+21
| | | | | | | | | | | | | | | | | | The QPanGesture recognizer requires single-point touch events. The touch implementation in Qt 4 would test Qt::WA_TouchPadAcceptSingleTouchEvents and forward single touch events if set. Making this work in Qt 5 is a little bit more involved since the platform plugins don't know about widgets. Change the Cocoa touch implementation to send single-point touch events to QWidgetWindow windows only. Make QApplication forward single-point touch events only if the target widget has the Qt::WA_TouchPadAcceptSingleTouchEvents attribute set. Task-number: QTBUG-35893 Change-Id: I68712a5e3efb4ece7a81ca42f49c412e525eeb3a Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Add operator-> to QJson iteratorsAllan Sandfeld Jensen2014-08-255-7/+67
| | | | | | | | | | | | | The iterators for QJsonArray and QJsonObject are currently lacking an operator-> definition. Unfortunately it is not possible to do in clean way without redefining either the iterators or QJsonValueRef class. This patch instead adds two fake pointer classes that are only used to handle the operator-> return value. Task-number: QTBUG-29573 Change-Id: Ief785a6afbbedc9e89cf3b6f3958c2c755997a66 Reviewed-by: Lars Knoll <lars.knoll@digia.com>