summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix saving handle width in QSplitter::saveState()Alexander Volkov2014-09-162-1/+38
| | | | | | | | | | | QSplitter::handleWidth() returns either a style dependent value if d->handleWidth is negative or the value of d->handleWidth itself. So to preserve this choice after calling saveState()/restoreState() we should save and restore the value of d->handleWidth rather than a result of handleWidth() which is non-negative. Change-Id: Idc11f8063d34b6c4a5f9b0a0032868679766dfb9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Allow overriding standardIcon() in a proxy styleAlexander Volkov2014-09-165-22/+22
| | | | | | | [ChangeLog][QtWidgets][Styles] Allow overriding standardIcon() in a proxy style Change-Id: I3c7983a7e51a8b220a0ca8ead2b4d7b87a77d71b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix QT_LINUX_ACCESSIBILITY_ALWAYS_ONJocelyn Turcotte2014-09-161-1/+1
| | | | | | | | | | | The current behavior was that accessibility is enabled if the variable is _not_ set, which causes accessibility to be enabled all the time even if a screen reader isn't present. Change-Id: I73286622fb5abe1cedce420e760306ab7f200e69 Reviewed-by: Adam Majer <adamm@zombino.com> Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Respect Qt::FontRole for QComboBox items.Mitch Curtis2014-09-161-3/+8
| | | | | | Change-Id: I810ae2d77109a36b457f07e4a7b0489c954279e8 Task-number: QTBUG-41131 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix Windows ICU build break in QCollator after commit c17563ec.Michael Brüning2014-09-161-1/+1
| | | | | | | | It used LCID without including qt_windows.h while QT_USE_ICU was defined. Change-Id: I3d4cf0e6bd0e299729d23d9a36c5a87adde774c9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change the state of only the left mouse button when sending fake mouse eventsAlexander Volkov2014-09-161-2/+3
| | | | | | | | Mouse events synthesized from touch events affect only the left mouse button. So preserve the state of other buttons. Change-Id: I628d41089db39f0c983aa95f311a842111b8c39c Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Rephrase sentence in QIntValidator documentation.Mitch Curtis2014-09-161-1/+1
| | | | | Change-Id: I53b4e4615ad23a603bc724b896de5fd1644cdab0 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QRegion: Reorganise members to reduce padding in QRegionPrivateMaks Naumov2014-09-161-3/+3
| | | | | | | | On 64-bit platforms: 56 -> 48 bytes. On 32-bit platforms it's still the same size (44 bytes). Change-Id: Ia4831753258ef12aa983757523bb76979e6fc4b0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix high dpi support in QOpenGLWindowLaszlo Agocs2014-09-151-3/+4
| | | | | Change-Id: I0be29fb25d854e09ae961cade0c8490586788394 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Do not drop the context when sharing globallyLaszlo Agocs2014-09-151-0/+6
| | | | | | | | | There is no point in recreating the QOpenGLWidget's context when it shares with all top-levels' shareContext(). Change-Id: I659a8ef6563de0cc1e833198af4dfb8c705e40d8 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix drag and drop with createWindowContainerLaszlo Agocs2014-09-151-0/+11
| | | | | | | | | Forward dnd events to the QWindow, exactly like QQuickWidget would do. This of course requires setting setAcceptDrops(true) on the container widget. Task-number: QTBUG-39213 Change-Id: I8ea49e630b071dc0aacd53f798d9b46b03502365 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Speed up QStringList::removeDuplicates by ~2xDaniel Teske2014-09-151-2/+4
| | | | | | | | | QSet::contains needs to hash the string, which is unnecessary, since we can just check if the size of the set changed. Change-Id: I2c7a42bae6cdf351533d5a582a42079658fa7729 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* add missing DefaultLanguage property for WinRT projectsJoerg Bornemann2014-09-151-1/+2
| | | | | | | Task-number: QTBUG-37628 Change-Id: I7cce0641b8958fe1d97ace21cb5392e32a067649 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Make the default value of QTreeView::indentation() be style dependentAlexander Volkov2014-09-157-6/+82
| | | | | | | | | | | | | Add a new PM_TreeViewIndentaion enum value to QStyle and get the corresponding pixel metric in QTreeView. [ChangeLog][QtWidgets][QTreeView] Indentation is now style-dependent by default. [ChangeLog][QtWidgets][QTreeView] Added resetIndentation(). Change-Id: Ifad7987b8f3c6cd32987b89d95390f33043d8f19 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Adam Majer <adamm@zombino.com>
* Fix 64 bit issues in QIODevicePrivateLinearBufferLars Knoll2014-09-152-9/+13
| | | | | | | | | The API was using int, not qint64 leading to implicit truncation of numbers in a few places Task-number: QTBUG-40974 Change-Id: I13aedc84557a19b6f74fe6825764e7b5827f27b0 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Use default surface format in QOffscreenSurfaceLaszlo Agocs2014-09-141-0/+1
| | | | | Change-Id: I3b2f790089e6d1bcfe92f2f732489c08afa766cd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QNetworkDiskCache: fix expiration calculation heuristic with Last-Modified timeDong-Heon Jung2014-09-122-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Heuristic with last-modified time in Qt has some problems. 1) Remove redundant expirationDate.isInvalid() check expirationDate.isInvalid is already checked. So I removed. 2) Add dateHeader.isInvalid() check The dateHeader is used in expiration calculation. I add invalid check for the dateHeader. *. The dateHeader is the origin server's Date 3) Change diff time calculation. The expirationDate is calculated with time diff. Previous calculation is // The lastModified is earlier than the currentDateTime. // The diff has negative value. int diff = currentDateTime.secsTo(lastModified); // The expirationDate is earlier than lastModified // , currentDateTime and dateHeader. expirationDate = lastModified.addSecs(diff / 10); *. currentDateTime: current time *. lastModified: last modified date in server It means that files are not cached with the heuristic. I changed diff calculation. int diff = lastModified.secsTo(dateHeader); freshness_lifetime = diff / 10; // RFC 2616 13.2.4 4) httpRequest.headerField setting If current_age is larger than 1 day, the cache MUST attach Warning 113. *. The current_age is value of age in header or elapsed time from dateHeader in Qt source code. Previous code does not check current_age is larger than 1 day correctly. // dt = 1970-01-01T00:00:00 + current_age dt.setTime_t(current_age); // currentDateTime is much bigger than 1970-01-01T00:00:00 if (dt.daysTo(currentDateTime) > 1) Task-number: QTBUG-40836 Change-Id: I4b00c3b287e6fafeea6b02681533fe75a198247e Reviewed-by: Jung Dong-Heon <dongheon.jung@lge.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Fix typos in Widgets Tutorial.Mitch Curtis2014-09-121-3/+3
| | | | | Change-Id: Id4a0bef3b00f3869582e76ee45f230120189a268 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Force a full layout on the frame if it's vertical geometry changesLars Knoll2014-09-121-5/+22
| | | | | | | | | | When the frame's vertical geometry changes because top/bottom margins, border or padding changes we need to do a full relayout of the frame to position it correctly. Task-number: QTBUG-2975 Change-Id: Ia0f063cc2057b6d7a469977d258ec1608feff9bf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Set WINDOWPLACEMENT::length as required by the documentation.Andreas Hartmetz2014-09-111-0/+2
| | | | | | | Found this while debugging something else in Dr. Memory. Change-Id: Id295ddf4e07088684ecf91e3c2e0a156bf6054cb Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* QVariant::compare shouldn't return match when QVariant::cmp does notAllan Sandfeld Jensen2014-09-112-2/+42
| | | | | | | | | | | | | | If the types doesn't match in QVariant::compare we do a comparison based on QString, this may end up indicating a full match, though the we don't match according to cmp. In this case it would be better if we preserved the non-matching to avoid breaking ordering. [ChangeLog][QtCore][QVariant] Fixed ordered comparison between QVariants that do not match but produce identical toString output. Task-number: QTBUG-40363 Change-Id: I84a8eca11e8875dba9948bde2906ae7c5aa35704 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QIOSPasteboard: handle zero-pointer argument to setMimeDataRichard Moe Gustavsen2014-09-111-0/+4
| | | | | | | | | QClipboard sends QPlatformClipboard a zero pointer to QMimeData when it's told to clear. So we need to check for this to avoid a crash. Change-Id: I570ed727029ca699673d7b2e989bdff44df8e161 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Doc: Fixed broken links introduced by "OS X" doc change.Jerome Pasion2014-09-113-32/+32
| | | | | | | | | | | | | -qtdoc repo uses "OS X" instead of "Mac OS X" and this caused broken links. -more comprehensive change still needs to be done but the new name is used in the page to maintain consistency. At least within the page or class. Change-Id: I8a5650046fc0413cbb18359b743ecd30fd62e417 Task-number: QTBUG-40759 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qdoc: Add an \externalpage for Qt Account Sign-upMartin Smith2014-09-111-0/+5
| | | | | | | | | Currently it is used by the Enginio module, but it will be useful in other modules as well. Change-Id: If8b458bfedb0da0d4b8c14484710c1a2ade502dc Task-number: QTBUG-41254 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: corrected link/autolink errors in corelib/doc/srcNico Vertriest2014-09-113-12/+14
| | | | | | Task-number: QTBUG-40362 Change-Id: I0ff1523c76724e0662bafed08515ea06bbdd8381 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Use a dedicated timer for the animation driver.Gunnar Sletta2014-09-112-3/+4
| | | | | | | | | | | | | | | | | QUnifiedTimer::elapsed() was implemented using driverStartTime + time.elapsed() while the driver was running, but time.elapsed already contains driverStartTime so that was counted twice. This caused repeating timers to fire immediately once they first had fired, if the animation driver was started while it was running. Separate the two timers. Animation driver time restarts from 0 every time it starts. Change-Id: Icf5cd0381b121b2355d7c6ec3edd0997721cbcdf Task-number: QTBUG-41198 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Doc: Sync qtcreator.qdoc.Christian Kandeler2014-09-111-1/+1
| | | | | | | A topic URL has changed in the Qt Creator documentation. Change-Id: I3c6b5fbcb670d7a637a309b7a77a3da815a795ca Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Revert "Reading QJsonObject property should not modify the object itself."Jędrzej Nowacki2014-09-115-134/+11
| | | | | | | | | | This reverts commit 20cf632ad5f3ffe7b0fd231724c971f4e07304eb. The commit produced to many problems during statics destruction. For example causing QtCreator crash (QTBUG-40987). Change-Id: Ib52f6a449c2d84deab2de792559a6a065ca45e8d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QLockFile: on Windows, retry deleting the lock file if it is being read.David Faure2014-09-113-2/+35
| | | | | | | | | | | | | | | | A "sharing violation" happens when trying to delete the lock file and another thread/process is reading it at that very moment. Detect the error and try again, up to 10000 times - to avoid an infinite loop if QFile::remove fails for another reason such as a sudden change of permissions preventing us from deleting our own lock file. On Unix the deletion can't fail because of readers, but it doesn't hurt to check the return value there too, to catch other reasons for failures such as a sudden permission change. Task-number: QTBUG-38853 Change-Id: Icf12a74faed4a4916e3427abc09d9c33aa141476 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mark the remaining QGL classes as obsoleteLaszlo Agocs2014-09-101-0/+3
| | | | | | | Many of them are already marked. Do it for the rest (QGLWidget et al). Change-Id: I506d72ad20f8ef39981dbeee0df49229bcf748a7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix several issues in QCollatorLars Knoll2014-09-108-235/+233
| | | | | | | | | | | | | Refactor the code and move more things into the cross platform code path. Make sure the flags survive changing the locale of QCollator. Use the correct locale on Windows, WinRT and OS X. We now pass all QCollator autotests on these platforms. Task-number: QTBUG-40778 Change-Id: Ic2d3334b5018c323a35a3ea8fc1d7ab5f99b4e62 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix user defined conversions to numeric typesLars Knoll2014-09-102-2/+94
| | | | | | | | | The old code was completely broken. It did dereference val for user types, but val does in this case only contain garbage. Instead use the pointer to the correct data. Change-Id: I20ccf0bfa3dd3774c787d08c51cc8dd7b1ec9a1a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Don't accept json strings with trailing garbageLars Knoll2014-09-103-1/+28
| | | | | | | | | | A well formed JSON document is not allowed to contain trailing garbage at the end. Don't accept this in the parser. Task-number: QTBUG-40062 Change-Id: I0a09dbd099a8c643f58023342546c4e67d026fec Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix bugs in internal comparison operatorsLars Knoll2014-09-102-3/+44
| | | | | | | | | | | The comparison operators between QJsonPrivate::String and QJsonPrivate::Latin1String weren't all correct, leading to wrong sorting of keys in QJsonObjects when the keys were outside of the latin1 range and resulting lookup errors. Task-number: QTBUG-41100 Change-Id: Idceff615f85d7ab874ad2a8e4a6c1ce8c2aa0f65 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Android: fix inputmethod race conditionsPaul Olav Tvete2014-09-102-63/+62
| | | | | | | | | | | focusObjectInputMethodQuery() and sendInputMethodEvent() were not thread safe. Remove them, and replace with thread safe versions based on the same principle as queryFocusObjectThreadSafe(). Task-number: QTBUG-40995 Change-Id: Idb6f0c6d3963b7e8e73e029e83d0367088146ca8 Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* QRegion: remove some toplevel const from return typesMarc Mutz2014-09-102-8/+39
| | | | | | | | | | | | | It has no effect and inhibits move semantics. After this change, two and five more copies are moves in QtGui and QtWidgets, resp. Keep the old form for compilers that mangle the return type. Change-Id: I6257683144110230079fe9095303907ecc858c94 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update QOpenGLWidget paintDevice devicePixelRatio when recreating fboDyami Caliri2014-09-101-0/+1
| | | | | | | | The QOpenGLWidget's paintDevice needs to update devicePixelRatio when changing screens. Change-Id: Iec6e7157f22ff99e04f81347cbbf70f3fc3ff424 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Expose screen change event to widgets so that they can check the dprLaszlo Agocs2014-09-105-4/+30
| | | | | | | | | | Unlike ordinary widgets, the ones that have OpenGL framebuffers must know about screen changes because the device pixel ratio may be different on the new screen. Add an internal event, ScreenChangeInternal, as the counterpart to WindowChangeInternal. Change-Id: I5e55999838e4c0284e7d9832299f7cc6b541ee3f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* OSX: Properly detect language support in fontsEskil Abrahamsen Blomfeldt2014-09-103-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | The language support detection in Cocoa does not report the correct set of languages for all fonts. One consequence of this is that e.g. Mkhedruli (Georgian) was not supported on Mac because the 'ka' language code was not reported for e.g. the Arial Unicode MS font. This was never detected in Qt 4, because the writing system support we set for each font was never used for font matching, since we let CoreText do the matching in Qt 4. To remedy this, we also detect writing system support based on the OS/2 table in the font. We add this in addition to the current test in case the language list has information about fonts with incomplete OS/2 tables, to avoid regressing. [ChangeLog][OS X] Fixed detection of writing system support in fonts for some scripts such as Mkhedruli. Change-Id: I26c2a42ef45112e17d6794d8798a57c8d8aaaafa Task-number: QTBUG-41208 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* qpa: Make screen geometry updates (full and available geometry) atomicTor Arne Vestbø2014-09-1014-89/+54
| | | | | | | | | | | | | | | | | Updating the geometry and available geometry in two steps means that QScreen will be in an inconsistent state when emitting the geometry change signal, as the available geometry has not been updated yet. Piggy-backing changes to the availableGeometry based on the virtual geometry changing does not make sense, so we now tie geometry and availableGeometry (and their size variants) to their own separate geometryChanged and availableGeometryChanged signals. Change-Id: Iee0ced642cbb91c470cb54bc507d2c0512482c13 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* iOS: Move accessibility/textinput includes in quiview.mmTor Arne Vestbø2014-09-101-4/+5
| | | | | Change-Id: Id982afb06f164bd398a6e642a48a85f277075e74 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Use Qt's major version in the library prefixJocelyn Turcotte2014-09-102-7/+5
| | | | | | | | | | | | | | | | | | | | | | | This follows the discussion at: http://lists.qt-project.org/pipermail/development/2014-June/017225.html Qt WebEngine will have a version of 1.0 when released with Qt 5.4. The library name is currently libQt1WebEngine.so.1.0.0 but it should rather be libQt5WebEngine.so.1.0.0 to represent Qt's major version releases as a whole and not the major version of the module. This prefix essentially expresses the module's dynamic linking compatibility with other Qt modules. This only makes sense if each major module release will be compatible with a single Qt major version only. All published modules currently already have 5 as their major version, except qtenginio which doesn't use a Qt prefix, so this change has no effect except for qtwebengine. Task-number: QTBUG-30910 Change-Id: I894e7a367624c7fc263cf08104173a82eafd1439 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Destroy the QOpenGLTextureBlitter in the destructorJørgen Lind2014-09-101-0/+3
| | | | | | | if it has not already been destroyed Change-Id: If9a29da25eb23d5d65204eecabe095df215737ee Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add an option to share between TLWsLaszlo Agocs2014-09-107-9/+78
| | | | | | Task-number: QTBUG-41191 Change-Id: I510d1631926ed0d9e371703d22229aed92432aa6 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* qdoc: Resolve .qhp table of contents sections correctlyTopi Reinio2014-09-102-5/+16
| | | | | | | | | | | | | | | | | | | | | With the recent changes in QDoc, we can no longer assume that pages listed in the TOC are of type DocNode. For example, all Qt modules want to list C++/QML type index pages in the TOC, and those are now of type CollectionNode. This change fixes the issue by using a more generic search function when generating the .qhp TOC, one that doesn't restrict the results to any specific node type. As an exception, the main index page for a project must still be a DocNode, i.e. a page declared using the \page command. However, we do want to restrict the search to the pages in this documentation module only - for that purpose, a function for setting a local search order is introduced. Task-number: QTBUG-40241 Change-Id: Ibaa5af9c5de6436f34b7ae67e56733817fc090b9 Reviewed-by: Martin Smith <martin.smith@digia.com>
* examples: fix build without OpenGLRolf Eike Beer2014-09-101-1/+2
| | | | | | | Task-number: QTBUG-41200 Change-Id: I18df5a3c6f38d6b9a66b84a71777f1e4daa3ba3a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix garbled resize with QOpenGLWidget when using multi-sampling.Dyami Caliri2014-09-101-0/+1
| | | | | | | | If you configure QOpenGLWidget to use sampling, the 'resolvedFbo' isn't updated during resizing. This leads to garbled views. Change-Id: I9f9265520134bcf12436778773507df936c5fbb6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* xcb: fix getting a XdndAware property if a proxy window existsAlexander Volkov2014-09-091-1/+1
| | | | | | | | | | | | According to the XDND standard (http://www.newplanetsoftware.com/xdnd/) if the proxy window exists then it should be checked for the XdndAware property rather than the target window directly. c3f9de62966d32d8e33d62eb374fe2657a4cfebe introduced the mistake. In the old code the proxy window was used. Change-Id: I83b66d4b1f08a1f44d5c1451d0f1735c084bcf09 Spotted-by: Alexander Smirnov Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QNetworkReply: move "State" enum declaration into QNetworkReplyPrivateMaks Naumov2014-09-095-45/+35
| | | | | Change-Id: If63a029a7a7ef84fc1b4b73f5bab495992ea7e02 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Fix typo in QMetaType documentation.Mitch Curtis2014-09-091-1/+1
| | | | | Change-Id: I934b68978fb32a518ed7cf9b47f1600982f58f66 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>