summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* qstandardpaths_ios: add system path for PicturesLocationRichard Moe Gustavsen2015-02-151-2/+10
| | | | | | | | | | | For PicturesLocation we add a second path pointing to system assets. This url is understood by both QFile (using a dedicated file engine), and QFileDialog, such that if you point the dialog to the url, it will show a native image picker dialog. Change-Id: Ic79393440ab399ed4802cc6d84ec7ad36cbb9369 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: add native file dialog for selecing photos/assetsRichard Moe Gustavsen2015-02-155-2/+252
| | | | | | | | | | | This will add a file dialog backend on iOS. The implementation will check if a dialogs initial directory points to the system picture location, and if so, present a UIImagePickerController. Otherwise it will return false upon show, which causes QFileDialog to use the widget based version as fallback. Change-Id: I276b630911652b6d28f60763decc7ec38f00c817 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: add a file engine to support loading assets/photosRichard Moe Gustavsen2015-02-155-1/+399
| | | | | | | | | | | | | | | | | | | | | | | | This patch will add a new file engine that lets the app load images from the asset library using QFile. The engine will recognize file names with the scheme 'assets-library', which is the same scheme returned by UIImagePickerController. This patch will be the first of a set of patches that lets the user open a native image picker dialog by using a QFileDialog with directory set to QStandardPaths::PictureLocation. This patch will ensure that the url returned from the dialog can be loaded using QFile. AssetsLibrary, which is used in this patch, is actually deprecated in favor of the new Photos framework. But since the latter is only supported from iOS8, we choose to use the former framework for now. Change-Id: If2a6eb394ae4df55fb4e9e1dc245a1574d38618a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add conversion between Q_ENUMs and strings in QVariantOlivier Goffart2015-02-151-3/+71
| | | | | Change-Id: I9264a68d162cf20db0167dd3f976a007477786d1 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-15476-1415/+1415
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Make the printing of complex byte arrays prettierThiago Macieira2015-02-153-1/+68
| | | | | | | | | | | | Similar to what we've done to QString, only we print each byte that is not ASCII as \OOO (octal representation). [ChangeLog][QtTest] QtTest now prints an escaped version of QByteArrays that failed to compare with QCOMPARE, instead of the hex dump. Change-Id: I6a8c43f138c66c998280998a242b43cd579666a0 Reviewed-by: Richard J. Moore <rich@kde.org>
* Optimize the Latin1 conversion code in the JSON parser with SSE2Thiago Macieira2015-02-151-5/+28
| | | | | | | | | This also reduces the number of variables modified in each loop from two (l and i) to one (just i) and avoids calling str.length() all the time. Those should be no-op changes, but why not help the optimizer? Change-Id: I8895c35f84d545dba45bffff13bc4147ae53eaab Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QTextLayout: Reserve space ahead of time.Robin Burchell2015-02-151-0/+2
| | | | | | | We know the size, so use it instead of allowing QVector to reallocate. Change-Id: I2d18c30ef0d050326bb03c54da61459c40eb7af6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QFontDatabase: Move style key near usage to avoid heap allocsRobin Burchell2015-02-151-8/+4
| | | | | | | Raises delegates_text.qml to 233 ops/frame Change-Id: I88a26d2a9e4dc12ebbbc07329141976c194555ec Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QFontDatabase: Optimize QtFontStyle::Key::Key().Robin Burchell2015-02-151-6/+13
| | | | | | | | | | | Similar to 46b2c74eaf95fc607518988c7958574c7f70f5ae, skip the translations at all costs. They allocate, and are very expensive. To ensure we try harder to skip them, also avoid checking styles at all unless one has been provided. This increases delegates_text from 209 items to 221 items for me. Change-Id: Ia18b07de7b48cee356e9506a0c5d7129621d79d2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix indentation and move some variables aroundKonstantin Ritt2015-02-151-63/+52
| | | | | Change-Id: Ice1987242d288b0b18e77c647153e6d133135896 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QDBusConnection::registorObject with interfaceKevron Rees2015-02-155-3/+31
| | | | | | | | | | | | Currently QDBus relies on a key in QMetaClassInfo to understand the DBus interface name. This patch allows QDBus to also use a specified interface name in the registerObject call instead of relying on QMetaClassInfo that might not be there (if the QObject was created in QML or Javascript for example). Change-Id: Ie02b2c67e7deb07f43e35eb166c11833fcbf38f3 Task-number: QTBUG-44074 Reviewed-by: Kevron Rees <kevron.m.rees@intel.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not mark non-existent touch points as stationaryMikko Harju2015-02-141-0/+4
| | | | | | | | | | | | Make sure touches that were already released on an earlier SYN_REPORT are not re-marked as TouchPointStationary. This change has no effect on type A event processing since there the contact state is never zeroed. Change-Id: I2d4d705d2b3fae424b6245a75d4015dc2d86ad35 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Animation classes: micro-optimize loops.Friedemann Kleint2015-02-143-39/+40
| | | | | | | | Don't use index-based iteration, but use iterators assigning end() to a variable. Change-Id: Ia87532349855fa3baa748b62224fc8adf3395dc0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add support for GPU bug list reading.Friedemann Kleint2015-02-143-0/+455
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add support for reading out feature lists from GPU bug lists in Chromium format (supporting OS + version, exceptions lists, device ids and vendor ids). Add a overloads allowing for passing file name, data or JSON documents. - Test reading in tst_qopenglconfig - Prototypically have the Windows plugin read the file from the environment variable "QT_OPENGL_BUGLIST" and turn off renderers depending on the standard keyword "disable_d3d11" and newly introduced keywords "disable_d3d9", "disable_desktopgl". - QT_OPENGL_BUGLIST can point to an absolute or relative path, in which case it is resolved via QLibraryInfo::SettingsPath and QStandardPaths::ConfigLocation. [ChangeLog][QtGui][Windows] Introduce experimental feature allowing the user to specify a GPU driver buglist with some additional keywords to chooose the GL renderer backend depending on GPU. Task-number: QTBUG-43263 Change-Id: I8c20b0e8ee3cf575b91d0672bf405c42d3e9fb64 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows: Use QVersionNumber in GPU driver version.Friedemann Kleint2015-02-142-76/+14
| | | | | | | | Remove custom class. Task-number: QTBUG-43263 Change-Id: I3399f86bbbe287560917ccda00334e348ac7da4c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QDateTime: make qt_monthNumberFromShortName() staticMarc Mutz2015-02-141-1/+1
| | | | | | | | | | | | It wasn't Q_DECL_EXPORT'ed, and there is no other user in QtCore. Effects on Linux GCC 4.9 stripped release builds: text -344B data +-0B relocs +-0 Change-Id: Iea0577d58057a145f87a00ec33995d03bacd4f88 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QDateTime: use existing functions for short month name parsingMarc Mutz2015-02-141-35/+21
| | | | | | | | | | | | ...instead of rolling a new one on each use. Effects on Linux GCC 4.9 stripped release builds: text -156B data +-0B relocs +-0 Change-Id: I49e20ea859928d010990fc7a22545dbc1ef106ec Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QDateTimePrivate: enable read caching on m_status in setDateTime()Marc Mutz2015-02-141-6/+6
| | | | | | | | | | | | | | | Help the compiler by building the new status flags in a local instead of a member variable. Enables value tracking for that piece of data across several non-inline function calls, leading to less redundant reads through this->. Effects on Linux GCC 4.9 stripped release builds: text -248B data +-0B relocs +-0 Change-Id: I2db21439464ad0fff8163a908de3b15df7c4ab6d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QDateTime: pass explicit length to QLatin1String ctorMarc Mutz2015-02-141-1/+1
| | | | | | | | | | | | | Apparently, determining that constant at compile time is a bit too much work for GCC. Effects on Linux GCC 4.9 stripped release builds: text -276B data +-0B relocs +-0 Change-Id: I23144e64d57e3a2e1061e69b20f2b72575c273d8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QDateTime: avoid relocationsMarc Mutz2015-02-141-1/+1
| | | | | | | | | | | | | The short month names all have length 3, so store them in a multi- dimensional const char array instead of as a pointer table. Effects on Linux GCC 4.9 stripped release builds: text -196B data -64B relocs -12 (est., somehow relinfo.pl reports nonsense on QtCore) Change-Id: If5f83e4f1eb5ba0b0f54b4144abec8b88fb8529f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Haiku: Implement QStorageInfo for HaikuTobias Koenig2015-02-141-0/+60
| | | | | | | | | Use Haiku's BVolumeRoster API to provide information about available mount points in QStorageInfo. Change-Id: I058bbb5f3f33372edc55d3e51079d3e16815f29f Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QScreen: add devicePixelRatio propertyShawn Rutledge2015-02-142-1/+7
| | | | | | | | | It has been only an accessor until now. [ChangeLog][QtGui][QScreen] added devicePixelRatio property Change-Id: I3b9d0aed437cc11a8ddb5b601dd8db6ed5ca9748 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* [QQuaternion] Introduce to/from euler angles conversion routinesKonstantin Ritt2015-02-142-0/+144
| | | | | Change-Id: I26c0a9d1ce9258048cf44eed5b5238920c2317b1 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* [QQuaternion] Introduce toAxisAndAngle()Konstantin Ritt2015-02-142-0/+59
| | | | | | | | | This operation is the exact opposite to QQuaternion::fromAxisAndAngle() (so that it is a way to extract the axis and angle values suitable to create the same quaternion via QQuaternion::fromAxisAndAngle()). Change-Id: I41fda58f5fb2b867cccd6b2faf58ab671fa070da Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows: Remove "experimental" sticker for DirectWrite engineEskil Abrahamsen Blomfeldt2015-02-141-4/+0
| | | | | | | | | | | | This engine has been regarded "experimental" for a long time, but it is in active use by some applications and rather stable. While if may be replaced by FreeType at some point, if support for Microsoft's colored fonts is introduced there, at this point it really doesn't make sense to call it "experimental" anymore. Change-Id: I038d71b121e90bd7b4dbc6d0afa7b14c9b824b08 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* [HarfBuzz/CoreText] Re-apply fix for QTBUG-38113Konstantin Ritt2015-02-141-2/+23
| | | | | | Task-number: QTBUG-38113 Change-Id: Icdedfdb240a2888e0a084a156db5598c033495de Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Apply CoreText shaper changes from HarfBuzz upstreamKonstantin Ritt2015-02-141-249/+471
| | | | | | | Task-number: QTBUG-38363 Task-number: QTBUG-39504 Change-Id: I754c19c131645d6e6e40092c1b820ccf896c74e7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* FreeType: Support RGB rendering when not using FontConfigSérgio Martins2015-02-148-2/+96
| | | | | | | | | | | | | | | | | Windows+FreeType, Linux with -no-fontconfig and the forthcoming OSX FreeType engine can now use sub pixel rendering. The function to get the subpixel type is in QPlatformScreen because we're moving to per screen font settings in the future. This patch is safe, as no functionality is changed for existing users, if one wants sub pixel rendering they'll still have to pass -DFT_CONFIG_OPTION_SUBPIXEL_RENDERING to configure. Task-number: QTBUG-44269 Change-Id: Ib6c22d48a1b7c7b85ee316d5d9e3b6eae0c1ecc0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Improve readability of QFlags testSérgio Martins2015-02-141-2/+2
| | | | | | | | It's moot to compare something with boolean semantics against 0. Furthermore, it might even fail to compile, as seen in change request 105258 Change-Id: I8e491a67080b2d5a666858e8655e9f549fa6be4d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMetaType: improve docs and commentsOlivier Goffart2015-02-142-3/+6
| | | | | Change-Id: I7bcc8cec95eb5abda75d936732b1113b943622dc Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Secure Transport - enable client authenticationTimur Pocheptsov2015-02-131-35/+45
| | | | | | | | | Enable certificate/trust validation when socket is in server mode. Change-Id: I8fbba587a9484084495722219d83cca57973a3e6 Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Make QAccessibleTextWidget::attributes respect default document fontBoris Dušek2015-02-131-3/+3
| | | | | | | | | | | | | QTextFormat::font{Weight,PointSize}() etc. return the font trait explicitly set on the QTextFormat, while QTextFormat::font() returns font which also uses the QTextDocument::defaultFont() as a default for any font traits not explicitly set on the QTextFormat. Accessibility support for text attributes used the former, which was wrong; this commit fixes it to use the latter. Also includes tests to verify the fix. Change-Id: Iab7f2be1b68adaad847d1f29c9e5af2195416035 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix xcb plugin compilation without D-BusAlex Trotsenko2015-02-131-0/+3
| | | | | Change-Id: I84afaa5668ac0f2c3954af50d123cfe469cbf255 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* OSX: Avoid !strcmp() anti patternMathias Hasselmann2015-02-131-1/+1
| | | | | | | | | | | People often complain that strcmp() like functions are confusing because they return false on equality and true on difference. Rightfully, because strcmp() like functions return three distinct values, not a boolean value. But I guess dear reviewer, you already know that story... Change-Id: Ie69093f61b55448010dc324d14c62faa27214238 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Document Q_GADGETOlivier Goffart2015-02-131-5/+18
| | | | | | | | | | [ChangeLog][QtCore] Classes with the Q_GADGET function can now have properties and invokable methods. QMetaMethod and QMetaProperty have new overloads that can be used with a pointer to a gadget. The QMetaType system also gained knowledge of types with the Q_GADGET macro Change-Id: I017475f3809181c64fdd66f899e461ad27f5ae47 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QSsl: add TlsV1_0OrLater, TlsV1_1OrLater, TlsV1_2OrLaterMikkel Krautz2015-02-135-0/+44
| | | | | Change-Id: I90b99fb515dcf559824f673d2304081238541c4c Reviewed-by: Richard J. Moore <rich@kde.org>
* Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-1316-1/+69
| | | | | | | | | | | Instead of leaving a note for Qt6 and then forget to do the actual change once again, change APIs now inside QT_VERSION >= QT_VERSION_CHECK(6,0,0) blocks. Change-Id: Ifa769904e304358a9c2accfd6c9f86eeb342f9dc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-1357-82/+82
| | | | | | | | ...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Optimize generic conversion and remove now obsolete direct conversionsAllan Sandfeld Jensen2015-02-134-423/+187
| | | | | | | | | | There are many direct QImage conversions that doesn't need to be direct but only are because they are faster than the generic conversion. This patch optimizes the generic conversions and then removes all the direct conversions that are now no faster than the generic. Change-Id: I3dc5f44cc7f6358fd66420e9974eebaf2c7ca59c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QUrl effective TLDs: update tablePeter Hartmann2015-02-132-9565/+11345
| | | | | | | | | | There are more than 1000 new entries since the table has been generated the last time. Some auto tests needed to be adjusted, because some entries in the TLD table were removed while others were added. Change-Id: I4ceec392836d2031dfef49a0c5a857c31b36bb4c Reviewed-by: Richard J. Moore <rich@kde.org>
* OS X Accessibility: fix role descriptionBoris Dušek2015-02-131-1/+1
| | | | | | | Now we take into account also the subrole of the element. Change-Id: I471e7c6620e704780cef48266ef302ec8b56466d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* OS X Accessibility: implement AXStyleRangeForIndex in QTextEditBoris Dušek2015-02-131-1/+6
| | | | | | | | Not tested as I have no idea what VoiceOver uses it for (it seems to never query this attribute during any operation I tested). Change-Id: Ie5e2b765a9956bcf2be9b659b8914e393ed1ea90 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* OS X accessibility: implement AXRangeForPositionBoris Dušek2015-02-131-0/+5
| | | | | | | | | | | | | | | | This enables users with "Speak text under mouse after delay" set in VoiceOver Utility > Verbosity > Announcements to hover mouse over text in QTextEdit and have it spoken by VoiceOver. It also allows users with Trackpad Commander on to interact with the text area (VO-Shift-arrow down) and "touch-explore" the text while holding their finger on the trackpad and moving it around. [ChangeLog][QtWidgets][Accessibility][OS X] VoiceOver users of QTextEdit can now use mouse and touch exploration on trackpad to point at text to have spoken to them. Change-Id: I6cfaa8b1ff2179cce027b22539ba9ee4f3ee7f3f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix text-align justify in accessibility supportBoris Dušek2015-02-131-1/+1
| | | | | Change-Id: If43be193d64d7df29eb3f89b6c528ee1e8de310f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix AXBoundsForRange in OS X accessibilityBoris Dušek2015-02-131-2/+11
| | | | | | | | | | | | | | | | | | | | | | When returning a rect for AXBoundsForRange, we always incorporated one more character. Along with this one more character being often either a newline or the first character of new softline, visual bounds often got wrongly and unnecessarily multiline when in fact only single line was correct. Also noticeable when moving character by character (VO-Shift-arrow left/right) - now only one character is being shown (as opposed to two before). Still due to VoiceOver bug, for bounds of width less than 8 points, it will draw bounds width with of 8 points (reported as <rdar://problem/19370707>). But still this is an improvement for cases with bounds of width more or equal to 8 points. [ChangeLog][QtGui][Accessibility][OS X] Visual bounds returned by QTextEdit were singificantly improved, this enables VoiceOver to draw properly positioned VoiceOver cursor. Change-Id: Idc50310f8016fbcc01b061d27b655c72922a4807 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Cocoa: Improve QT_MAC_WANTS_LAYER for GL windowsMorten Johan Sørvig2015-02-121-0/+9
| | | | | | | | | | | | | | | | | Add the NSOpenGLPFANoRecovery pixel format attribute. This disables the software rendering fallback and makes compositing OpenGL and raster NSViews using Core Animation layers possible. With QT_MAC_WANTS_LAYER enabled, native NSViews now stack correctly with QWindows with OpenGL content. One known limitation is that this mode currently supports main-thread rendering only. Change-Id: I2060cceda846b305b33b47f2eba3cb7cb838039c Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Fix crash-on-exit when embedding QNViewMorten Johan Sørvig2015-02-123-0/+17
| | | | | | | | | | | | The QWindow and QCocoaWindow may be deleted before the QNSView (which Cocoa keeps a reference to). Clear pointers to the Qt windows on QCocoaWindow destruction and add null-pointer check to QNView::isOpaque. Change-Id: I71764886c27bf1d14fb4e684c15e7c72e1c0a17c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Improve conversion of QVariants with QJsonValuesAllan Sandfeld Jensen2015-02-121-6/+56
| | | | | | | | Adds conversion from QJsonArray and QJsonObject, and report missing conversion failures for other QJsonValues. Change-Id: Ic0c3a952657912401db877b068f7fcc3c08c94c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOpenGLContext: expose the shared global contextGiuseppe D'Angelo2015-02-122-0/+26
| | | | | | | | | | | | We're documenting that this context exists, therefore applications are allowed to assume that it exists. For the same reason, we should expose it as public API -- an application should be allowed to upload GL objects before creating or showing QOpenGLWidgets that use them. Change-Id: Iedbba7cd393018d93833fd2a6b02cce0639a89b4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>