summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QShortCut: Check whether the menu is QPA-disabledGabriel de Dietrich2015-03-114-3/+15
| | | | | | | | | | | | When climbing the menu hierarchy, it's sounder to check whether the actual QPA menu is enabled. This way we can trigger modifier-less shortcuts even in submenus. Task-number: QTBUG-38256 Task-number: QTBUG-42584 Change-Id: I13a27027306bce0f0732b05bf9469f3b77028f73 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Use own QIconEngine in QFileIconProviderGabriel de Dietrich2015-03-113-50/+90
| | | | | | | | | | | | | | | | | | This allows us to lazily load icons from the platform theme by reimplementing the pixmap(). Otherwise, we would instantiate pixmaps in several sizes even though we would not need them right away. Since, at least on OS X, icon sizes can go up to 128x128 pixels, we can end up saving an order of magnitude of memory on icon pixmaps alone if we only use the smallest sizes in our application. Two side modifications are included. The first allows sub- classing QPixmapIconEngine by exporting this class. The second fixes the q_ptr in QFileIconProviderPrivate which was never set. Change-Id: I91af322ded2823e475703871e607773177ae25d3 Task-number: QTBUG-41796 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Doc: Json classes added to list of implic.shared classesNico Vertriest2015-03-115-0/+5
| | | | | | Task-number: QTBUG-44053 Change-Id: I52a1b6c413aaa594bfee9bf7484c3d0ce7e9c9fa Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Clarify limitations of QCoreApplication::libraryPaths()Ulf Hermann2015-03-111-5/+16
| | | | | | | | | If you call libraryPaths() before constructing a QCoreApplication, intersting things may happen. Task-number: QTBUG-38598 Change-Id: I2861746277e391ede9e921e4a8ad825007e25fa0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* QScreen availableGeometryChanged signal: emit correct valueShawn Rutledge2015-03-111-1/+1
| | | | | | | | | Need to emit availableGeometry not geometry Task-number: QTBUG-44916 Change-Id: I6eb7eb0b8e46d6d8249fa67f57374b25e21f2ade Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Enhance EGL_CONTEXT_LOST checksLaszlo Agocs2015-03-115-13/+30
| | | | | | | | | Apparently failures can occur not just when doing eglMakeCurrent() but also when creating window surfaces. Change-Id: Ife1210293d5120fd41352164d9c89e83fb5ce468 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Gui: Fix compilation with QT_NO_OPENGLKai Koehne2015-03-111-0/+7
| | | | | Change-Id: I96674b39fd4176cf9d93b7ce00efa2b035128b61 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Clean up QLibraryInfoPrivate::findConfiguration()Ulf Hermann2015-03-111-22/+22
| | | | | | | | | | | | | | The QFile::exists() check in the end was redundant if one of the !QFile::exists() had returned false before. By always doing the positive check we can get rid of it and also avoid excessive nesting. Also, on OSX the isEmpty() clause probably never evaluated to true, with the effect that qt.conf in an applicationDirPath was never found. Change-Id: I750735741b707d3e98c4bf6c6b9558618e1fcc59 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Doc: corrected snippet issue in Defining Plugins docNico Vertriest2015-03-112-2/+3
| | | | | | Task-number: QTBUG-44629 Change-Id: I70e20209b6b33f7adcbcafc6b7d959660cdc2e87 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: QDataStream Serializing doc errorNico Vertriest2015-03-111-2/+12
| | | | | | Task-number: QTBUG-44707 Change-Id: I0ccfb47fe0b2464c5b7331040ea658ace3442366 Reviewed-by: Martin Smith <martin.smith@digia.com>
* QGtkStyle: identify QtQuick.Controls.GroupBox as QAccessible::GroupingJ-P Nurmi2015-03-111-0/+7
| | | | | | | | | This allows QGtkStyle to check the role and do appropriate styling (bold font) for the label. Task-number: QTBUG-43736 Change-Id: I735f5f7ffadd7a435fa9e28fab45b202eec0252e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* xcb: another QXcbScreen null pointer checkShawn Rutledge2015-03-111-0/+2
| | | | | | | | | | In QXcbWindow::setParent(), the window may not have a screen, and in that case we cannot get the root window in this way. Task-number: QTBUG-44719 Change-Id: I719e5e2f8cad13b1460b4d9df6ffd6c4a48e0d37 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* CMake: Fix regression with quoted OPTIONS parameterAndré Klitzing2015-03-111-1/+1
| | | | | | | If a parameter contains quotes the check for "-binary" fails. Change-Id: I27148b590d85291a93f1992dfd277fb857bec6e2 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* Windows: Only set the touch flags if the window is not already registeredAndy Shaw2015-03-113-2/+11
| | | | | | | | | It is possible for there to be a HCBT_CREATEWND hook which can set the touch window flags already while the window is being created. Therefore we want to defer to those settings instead as they should take precedence. Change-Id: If8dcbd34db2b3bbbfb1bc36731665fb17fb87c24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Improve handling of XRandR events in XCB backendDaniel Vrátil2015-03-114-136/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | Querying X server for data can be very expensive, especially when there are multiple processes querying it at the same time (which is exactly what happens when screen configuration changes and all Qt applications receive XRandR change notifications). This patch is aiming to reduce the number of queries to X server as much as possible by making use of detailed information available in the RRCrtcChangeNotify and RROutputChangeNotify events. Firstly, the backend now does not rebuild all QXcbScreens on any change (which involved the very expensive xcb_randr_get_screen_resources() call), but only builds the full set of QXcbScreens once in initializeScreens(), and then just incrementally updates it. Secondly, it avoids querying X server for all screens geometry as much as possible, and only does so when CRTC/Output change notification for a particular screen is delivered. As a result, handling of all XRandR events on screen change is reduced from tens of seconds to less then a seconds and applications are better responsive after that, because we don't block the event loop for long. The X server is also more responsive after the screen change, since we are not overloading it with requests. Change-Id: I9b8308341cada71dfc9590030909b1e68a335a1f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QDateTime: ensure we always use the daylight status if knownThiago Macieira2015-03-111-19/+28
| | | | | | | | | Refactor the code so that the localMSecsToEpochMSecs function always gets the daylight status as input. The calculation can be very wrong if we forget to set it. Change-Id: I39e2a3fa6dc7c4a417f23288f10b303e450b8b98 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* QTest: Print hex instead of octal for QByteArray QCOMPARE failuresThiago Macieira2015-03-111-6/+25
| | | | | Change-Id: Ia0aac2f09e9245339951ffff13c65b2234d01ad0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix const correctness in HarfbuzzThiago Macieira2015-03-111-2/+2
| | | | | | | | to_tis620 modifies cstr, so it mustn't be const. Change-Id: Ia0aac2f09e9245339951ffff13c8d77c886f767d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QtSql: Fix const correctness in old style castsThiago Macieira2015-03-112-22/+22
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c94688f5b6ed76 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* qdoc: Fix const correctness in old style castsThiago Macieira2015-03-115-29/+29
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c94687a79b3f40 Reviewed-by: Martin Smith <martin.smith@digia.com>
* QtXml: Fix const correctness in old style castsThiago Macieira2015-03-111-2/+2
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c94686ec193958 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* QtDBus: Fix const correctness in old style castsThiago Macieira2015-03-111-2/+2
| | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c9468642b2db83 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix regression in time zone handlingFrederik Gladhorn2015-03-111-0/+1
| | | | | | | | | | | | In QtScript we use the msecs since epoch conversion (JS date is based on the concept). After a8c74ddcf78604c9038ba2a2bea81e445e4b3c58 the date conversion test in qtscript started to fail. Instead of relying on the code working by chance, simply update the date when setting it with setMSecsSinceEpoch. Task-number: QTBUG-44885 Change-Id: I9f95c9cdccea52e7d1f808f3cb9e18570ef0df13 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify calculation of week numberLars Knoll2015-03-101-50/+17
| | | | | | | This also removes a dependency to 3rd party licensed code. Change-Id: Ia4818a5cf306501bdb7192265edc4bcba8e597d8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* CF event dispatcher: Decide if eventsProcessed before breaking out of loopTor Arne Vestbø2015-03-101-4/+4
| | | | | | | | | | | | | | In the case of calling processEvents with WaitForMoreEvents and ending up processing a Qt timer, we explicitly interrupt the runloop, as CF doesn't normally treat handling timers as having handled a source. That way we can re-evaluate whether processEvents should return. But, we need to compute eventsProcessed before breaking out of the Q_FOREVER loop, otherwise processEvents will return false when waiting for events and processing a timer. Change-Id: Ie5f8905228cce1508b5b2e040cf1186820855191 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* iOS: Only use root level native runloop if at first level of processEventsTor Arne Vestbø2015-03-102-13/+9
| | | | | | | | | | | | | | | We used to support calling QEventLoop::exec() from within a processEvent recursion and still jump down to the root native runloop, but this does not work as intended due to how QEventDispatcherCoreFoundation uses flags in its ProcessEventsState for e.g. deferred wake up or timer updates. The logic in QEventDispatcherCoreFoundation assumes that the next recursion to processEvents will be handled by itself, so that it can interpret the flags in ProcessEventsState. The iOS event dispatcher subclass, QIOSEventDispatcher, does neither of these things, and should only be used from a 'clean' state. Change-Id: I44fa156feecc45772806002465c35bef0797ead2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* iOS: Handle an QIOSViewController outliving its related QIOSScreenTor Arne Vestbø2015-03-101-1/+1
| | | | | | | | | | | We release the UIWindow that retains QIOSViewController in the QIOSScreen destructor, but other parts of the OS may have retained the view controller, so the dealloc may not happen until later. In the meantime we may receive calls to shouldAutorotate, so we need to guard this code for the situation that m_screen has been deleted. Change-Id: Iefeb75f4fc698b5e80417ffd3a971b7de625bcd5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* Add AVX2 autovectorized versions of premultiplyAllan Sandfeld Jensen2015-03-109-90/+321
| | | | | | | | | | | | Following up on using GCC's autovectorizing for faster SSE4.1 premultiply, this patch adds specialized autovectorized versions of premultiply for AVX2, giving another almost doubling in speed. To make the speed up for AVX2 and also SSE4_1 available to non-GCC compilers, the target-specific methods have been moved to separate files. Change-Id: I97ce05be67f4adeeb9a096eef80fd5fb662099f3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Detect qt.conf in bundle on OSX without QCoreApplicationUlf Hermann2015-03-101-2/+4
| | | | | | | | | | On OSX we don't need the applicationDirPath to find a qt.conf located in the application bundle. Let's take advantage of this and allow findConfiguration to use it. Task-number: QTBUG-24541 Change-Id: I38c349a3bcd140fcf91352c88c24ca662e6e6f2e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Reload QLibraryInfo's settings when QCoreApplication becomes availableUlf Hermann2015-03-101-2/+21
| | | | | | | | | | | | Some of the paths may only be resolvable if the application path is known. On some platforms we can only figure out the application path if argv[0] is known. Thus, if the paths have been queried before the QCoreApplication is created, the cached settings may be wrong. We have to reload them after creating the QCoreApplication. Task-number: QTBUG-38598 Change-Id: Idf5822be87aa0872b099480040acd7b49939a22c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QIODevice: Fix some 64-bit issuesAlex Trotsenko2015-03-101-38/+38
| | | | | Change-Id: I77354a3069b256135c5792975a1445bcbe816e20 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QAbstractButton: emit released on focus out or disableFrederik Gladhorn2015-03-101-3/+7
| | | | | | | | | | | | | When pressing a button with the mouse and then moving the focus away, the internal and visual state of the button would get updated, but the released signal would not be emitted. The same goes for disabling the button, although in 99% of the cases, disabling the button will also move the focus, so the first case already takes care of emitting the signal. Task-number: QTBUG-42775 Change-Id: Ib6ba8e0a75f0349b66d1e799b02bd8498db85022 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Avoid detaching pixmaps when it has not changedDavid Edmundson2015-03-092-0/+7
| | | | | | | | | | setDevicePixelRatio is often called unconditionally even when the devicePixelRatio matches the pixmap or image. This causes a lot of unncessary detaches wasting some memory. Change-Id: I27535b2b22312ec0edc9bdc00c99d322afb727c1 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Add missing flush for multisampled QOpenGLWidgetLaszlo Agocs2015-03-091-0/+1
| | | | | | | | QOpenGLWidget exhibits the same issue as QQuickWidget in the linked bug. Task-number: QTBUG-39917 Change-Id: Ib231fb88f73c6ef68f12cc3fecf462679e8184a7 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix design metrics for text on WindowsEskil Abrahamsen Blomfeldt2015-03-091-3/+3
| | | | | | | | | | | | | | | The trick to get design metrics on Windows is to request the font with the design size, however we were passing the em square size in as the cell height instead of the em square size (aka character height in Windows docs). This would give us hinted metrics and thus the design metrics would differ from other platforms. [ChangeLog][Windows][Text] Fixed design metrics for text Task-number: QTBUG-44501 Change-Id: I4cffc3b86359cfdaf2ece07e1259f6fa862132bc Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPA plugins: Fix const correctness in old style castsThiago Macieira2015-03-096-7/+7
| | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946899b4ba15b Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* [QFontEngineFT] Use FT_Library associated with a given faceKonstantin Ritt2015-03-091-5/+3
| | | | | | Change-Id: I4f9927e2c5cb014523bebbe9c719aca89bb86019 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* (Re)introduce loopLevel into QThreadAndy Shaw2015-03-092-0/+14
| | | | | | | | | | | This function used to reside in QEventLoop in Qt 3 and was deprecated in Qt 4. However this is useful for those who want to know how many event loops are running within the thread so we just make it possible to get at the already available variable. Change-Id: Ia6a7d94ff443a1d1577633363694bc2fa8eca7e4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Add joystick/gamepad recognition to device discoveryLaszlo Agocs2015-03-093-55/+37
| | | | | | | And to keep things readable, migrate to categorized logging. Change-Id: Ie9d82bb4e93d3b96f1a7bf54a37cfde4a941bc7d Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* eglfs_kms: remove deprecated QString usesAndrew Knight2015-03-091-9/+9
| | | | | | | | | Fixes "warning: ‘QString::QString(const char*)’ is deprecated" While we're here, make the locals const. Change-Id: Iee70253a46f91937b93e06cc08cd361716cd669d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Doc: removed invalid warning about Qt stylesheetsNico Vertriest2015-03-091-2/+0
| | | | | | Task-number: QTBUG-44549 Change-Id: I386e75ae5c931f49a0198ae1f24706899bdedd94 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: added doc QProgressBar about undeterm. stateNico Vertriest2015-03-091-0/+2
| | | | | | Task-number: QTBUG-43345 Change-Id: Ie8bda9dbe0ca2f713451f3ec2f68467a064f7f2c Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: corrected doc QString::operator[]Nico Vertriest2015-03-091-2/+2
| | | | | | | Task-number: QTBUG-43337 Change-Id: I379dfe3f6909de5a63a67261834ea0edff875f9d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Android: don't assume a stationary touchpoint unless all history agreesShawn Rutledge2015-03-091-5/+7
| | | | | | | | | | | We need to compare each historical location (not just one of them) against the present location to prove that the touchpoint didn't move. We still don't actually send events for every historical touchpoint location though, because that would multiply the event traffic. Task-number: QTBUG-38379 Change-Id: I4b968ef6877031a157493d0a248564c78195c033 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Windows printing: Add more error reporting.Friedemann Kleint2015-03-092-11/+36
| | | | | | Task-number: QTCREATORBUG-13742 Change-Id: Ic234c7e86531c0924ddc03c63cd50b442bdcc9e9 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Fix NTLM possible data corruptionThiago Macieira2015-03-071-1/+1
| | | | | | | | | A mistake in const correctness resulted in the incoming QByteArray getting modified when it shouldn't. I have no ldea if this could result in user-visible effects. Change-Id: Ia0aac2f09e9245339951ffff13c8d8c6b4f909bd Reviewed-by: Richard J. Moore <rich@kde.org>
* QStringAlgorithms::simplified_helper: add missing check for detachedThiago Macieira2015-03-071-1/+1
| | | | | | | | Otherwise, we modify shared strings that happened to be rvalues. Task-number: QTBUG-44706 Change-Id: Ia0aac2f09e9245339951ffff13c85bfc912f03d1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix race condition in QDateTime::timeZone() and other methodsThiago Macieira2015-03-073-35/+36
| | | | | | | | | | | | | | | | | | | | When timezone support for QDateTime was added, we decided it was a good idea to delay creating the QTimeZone object and checking that the time is valid in that timezone (including for local time) until the user requested that information. Unfortunately, QExplicitlySharedDataPointer returns a non-const T* in operator->(), which meant we were accidentally modifying the d pointer's contents in const methods, which in turn means those const methods were not thread-safe when operating on the same object. This commit changes the d pointer to QSharedDataPointer, which is safer in this regard and pointed out where the issues with constness were located. Since we can't lazily calculate QTimeZone anymore, we need to do it whenever the date, time or offset changes. Task-number: QTBUG-43703 Change-Id: Ic5d393bfd36e48a193fcffff13b9686ef4ef1454 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Silence bogus MSVC warning about variable not usedThiago Macieira2015-03-071-0/+1
| | | | | | | | | | | | The compiler is wrong: the variable was used in the previous line. However, the line had no effect for a type T that has a trivial destructor, so the optimizer must have discarded the line and the reference to the variable before the checker for used variables. qsharedpointer_impl.h(247) : warning C4189: 'that' : local variable is initialized but not referenced Change-Id: Ia0aac2f09e9245339951ffff13c8bde02bb46816 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* qdoc: Fix regression in Node type testingMartin Smith2015-03-071-6/+18
| | | | | | | | | | | | | When support for documenting JavaScript was added to qdoc, some tests qdoc uses to determine whether an entity is a QML signal or a QML method were modified incorrectly, a case of premature optimization. This caused QML methods to be listed as QML signals in the documentation. This update corrects those tests. Change-Id: Ie6d5b43a03a6f3ae39982292cb9ad92952de0bff Task-number: QTBUG-44825 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>