summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Q*GlyphCache: de-inline dtor and export vtableMarc Mutz2015-05-265-3/+59
| | | | | | | | | | | | | | | | | | | The destructor is the first virtual method. By not defining it out-of-line, we provoke multiple copies of vtables, not all of which can be merged by the linker. If the linker fails, RTTI such as dynamic_cast and catch-blocks involving the type will not work. Additionally, QFontEngineGlyphCache was not exported, and therefore also not its vtable, making it impossible for users outside of QtGui to get a unique RTTI for the class. Change-Id: Ib265945934216bb609629431eb4c71996d4fd39d Reported-by: Volker Krause <volker.krause@kdab.com> Task-number: QTBUG-45582 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Add qHash(QKeySequence)Marc Mutz2015-05-262-1/+16
| | | | | | | | | | Key sequences can be compared for equality, so qHash should be overloaded, too. [ChangeLog][QtGui][QKeySequence] Added qHash(QKeySequence). Change-Id: I3cf896292459897d66198d96dfcdba1a39bdafce Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Make event delivery from testlib synchronousLars Knoll2015-05-231-27/+43
| | | | | | | | | | Directly process events delivered from testlib in QGuiApplication. The old code put these events into the QPA event queue leading to race conditions with plugins delivering native events from a secondary thread. Change-Id: I5646b1014f681593d487c9d1e65053ba06206411 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add environment variable support for testability library use.Timo Jyrinki2015-05-151-0/+3
| | | | | | | | | | | | | Add the option to load the testability library based on whether an environment variable QT_LOAD_TESTABILITY is set, in addition to the current "-testability" flag. This improves the use of testability library together with the autopilot functional testing tool. Task-number: QTBUG-32974 Change-Id: I6abf2c004cbff2ce0aff44e24a99bcc8188a52ae Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QMouseEvent: add constructor which takes the source as a parameterAlexander Volkov2015-05-123-4/+35
| | | | | | | | | Simplify the code by passing the source of a mouse event directly to the constructor instead of setting it by QGuiApplicationPrivate::setMouseEventSource(). Change-Id: I1774cf39a211d36d3adf0ff30f3bd2fb7c5fb429 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Add a way to filter window system eventsGiulio Camuffo2015-05-122-2/+45
| | | | | | | | | | | | | This change introduces the class QWindowSystemEventHandler which can be used to hook into QWindowSystemInterfacePrivate to filter and dispatch window system events. One use case is to intercept key events from the underlying system in QtCompositor and feed them into the xkbcommon state, and to modify the events based on the resulting state. Change-Id: I829eb7d960420135990fb0f6db54c14eea3e8e48 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QStandardItem: add user-tristate and auto-tristate getters/settersDavid Faure2015-05-072-13/+76
| | | | | | | | | and deprecate isTristate()/setTristate() which isn't specific enough. This matches the changes to the flags themselves. Change-Id: I0ba592af340cb81fc9f4d483569844fe8d7510c3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Deprecate ItemIsTristate in favor of ItemIsAutoTristate.David Faure2015-05-072-2/+2
| | | | | | | | | | | This makes the behavior much more clear. You can get a tristate checkbox just by setting the CheckStateRole to PartiallyChecked, no tristate flag needed. The flag, on the other hand, enables the automatic-tristate behavior in QTreeViews (and only there), hence the new name for it. Change-Id: I18d292a8b8294c863eab806f3874d15dfb72556c Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-05-048-148/+227
|\ | | | | | | Change-Id: I487a4b7c05687a10c498ac219c31367d4db6fbc0
| * Fix undefined behavior in left-shifting into negativeThiago Macieira2015-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's undefined behavior to left or right-shift a signed integer such that the sign changes. Since SymbolCsbBit is 31, make sure we use unsigned numbers. Found by ICC qplatformfontdatabase.cpp(614): error #68: integer conversion resulted in a change of sign Change-Id: Idf715b895bac4d56b4afffff13da78d294b1248e Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Use stdint.h in qopengl headers on MSVC toov5.5.0-beta1Laszlo Agocs2015-05-022-2/+2
| | | | | | | | | | | | | | Task-number: QTBUG-45774 Change-Id: I1505b4ebeb99371ec2099657c9ce05418dd54224 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * [QFontDatabase] Get rid of QtFontEncodingKonstantin Ritt2015-05-011-30/+8
| | | | | | | | | | | | | | | | This one has not been unsed for ages (since Qt3?). Change-Id: Iaf514db1b698b34a303f34c150b72db989eb176c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * [QFontDatabase] Drop QtFontDesc's familyIndex memberKonstantin Ritt2015-05-011-4/+1
| | | | | | | | | | | | | | | | Many times set but never used. Change-Id: I297f21d4b9878e5f9559a2dfdb2d3de34107bb7d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * [QFontDatabase] Get rid of some dead codeKonstantin Ritt2015-05-011-3/+0
| | | | | | | | | | | | | | | | | | 1. Checking if `db->count == 0` inside the `for (int x = 0; x < db->count; ++x)` loop makes absolutely no sense; 2. The family gets loaded just a line above (ensurePopulated()). Change-Id: I72dbd42565c4f5a5d9ff8879f10ee0ece7298fa7 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Optimize QFont::resolve(const QFont &other)Konstantin Ritt2015-05-011-4/+2
| | | | | | | | | | | | | | | | | | When resolve_mask is 0, the font inherits just everything, and there is no need in checking for any resolved attributes; the resolved font always inherits dpi, so do not check it either. Change-Id: Ie5d7ced0859d46a9237447e29051a22569480a51 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Add missing RGB32 <-> RGB30 convertionsAllan Sandfeld Jensen2015-04-301-34/+86
| | | | | | | | | | | | | | | | Completes the inplace converters so that we can rely on inplace conversions to succede as long as the image depth is the same. Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Fix QImage format after inplace conversionAllan Sandfeld Jensen2015-04-301-34/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | Some inplace conversions would not set the requested image format in the returned image, due to the same conversion being used for several destination formats. This patch ensures all inplace conversions return the right format, and adds testing infrastructure to easily test iterate over all formats so that they all can be tested. Change-Id: I68ab17a713ddb2aa8ed6aaf0a0a1ec8bbcb56090 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Fix two errors in RGB30 conversionsAllan Sandfeld Jensen2015-04-301-2/+2
| | | | | | | | | | | | | | | | | | The one converters from RGB30 was misplaced in the method table, and the unpremultiplication from A2RGB30 to RGB30 had an underflow mistake when alpha was 2. Change-Id: I92c11ede28611a3dbdce72aca1898845c120c209 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Convert opaque indexed images over RGB32Allan Sandfeld Jensen2015-04-281-5/+7
| | | | | | | | | | | | | | | | There is no reason to use the more expensive ARGB32 conversions when there is no alpha channel involved. Change-Id: Ifcb325352b8c806ef755db385121a2939c5825b2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Preserve QImage metadata in image transformsAllan Sandfeld Jensen2015-04-282-31/+28
| | | | | | | | | | | | | | | | | | Some QImage methods were not preserving image metadata, or only preserving some of it. This adds the missing parts and adds a test for metadata. Change-Id: Ib5892a23e49dfde5ea26074d3deaa887fa930c6b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-279-67/+60
|\| | | | | | | | | | | | | | | Conflicts: src/tools/qdoc/tree.cpp tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: Iaa78f601a63191fa643aabf853520f913f2f0fdc
| * QGenericMatrix: remove one of two non-initializing ctorsMarc Mutz2015-04-261-10/+8
| | | | | | | | | | | | | | | | | | ...and port to the remaining one. Can't do the same for QMatrix4x4, because that class is exported. Change-Id: I5448921af9e9194532be1b9f8d739b5c418a5e0b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * QGenericMatrix: remove copy ctorMarc Mutz2015-04-261-9/+0
| | | | | | | | | | | | | | | | The compiler-generated one is just fine. Change-Id: Iaacc56d4224c69b66823cc64640a00117c44d3cc Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Short-cut SSE4 unpremultiplyAllan Sandfeld Jensen2015-04-251-2/+4
| | | | | | | | | | | | | | | | Even with SSE4 optimized unpremultiply it is still significantly faster to skip the calculation on alpha values 0 and 255. Change-Id: Iafe658fea8eacf35a857f292952b0c1ee056139c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Simplify QQuaternion::operator!=()Marc Mutz2015-04-241-1/+1
| | | | | | | | | | Change-Id: I5043c86362f5126c52d768b51774086869429e08 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Fix inplace double mirroring on odd sized imagesAllan Sandfeld Jensen2015-04-231-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QImage inplace mirroring method, failed to handle the middle line when mirroring both ways (rotate 180). In both other mirroring cases the middle can be left untouched, but in this case it needs to be mirrored half way. To make the logic simpler, double mirroring will now mirror half the lines instead of half of every line. Change-Id: Iaa1f1e1c3f7dedfb78891fc93207f6d0c64bcafe Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Revert "Remove separate SSE4 unpremultiply function"Allan Sandfeld Jensen2015-04-236-45/+39
| | | | | | | | | | | | | | | | | | | | | | Could causedSSE4 instructions to be used on non SSE4 machines in cases when qUnpremultiplywas not inlined. This reverts commit 964ccc58534aac436529007000d1c38d76c88834. Change-Id: Ic676ade8f75129e8d37c4d96cbfb2bdb5b794919 Task-number: QTBUG-45741 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Mark QRGba64 as Q_PRIMITIVE_TYPEMarc Mutz2015-04-271-0/+2
| | | | | | | | | | Change-Id: I1ab25a7b880b47f616ae152400c1e2116688ec4c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Fix synchronousWindowsSystemEvents spelling.Morten Johan Sørvig2015-04-243-9/+9
| | | | | | | | | | | | | | | | | | | | "WindowsSystem" -> "WindowSystem". Strictly a QPA API break; there are no users of the function in QtBase. Change-Id: If2151b57587c68a7b5cbf261c54634aa930f2792 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Don't use anonymous types declared in an anonymous unionLiang Qi2015-04-221-6/+8
| | | | | | | | | | | | | | At least clang is unhappy with them when -Wnested-anon-types is enabled. Change-Id: Ia9869fecb836b27be69f7b9715fd614f384bb912 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-2237-3132/+1334
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/gui/painting/qdrawhelper.cpp src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/testlib/qtestblacklist.cpp src/tools/qdoc/node.cpp src/tools/qdoc/node.h tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
| * Enhance QWindow::devicePixelRatio() docsLaszlo Agocs2015-04-211-0/+4
| | | | | | | | | | | | | | | | | | | | Document that fact that for non-create()'ed windows this is the same as QGuiApplication::devicePixelRatio() which is the highest dpr in the system. This has consequences when running with multiple displays so application developer's have to be aware of this. Change-Id: Ic05a18732ff021659da04428cb49421ac3453870 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Enable checking for whether the system palette was explicitly setHarald Hvaal2015-04-201-0/+1
| | | | | | | | | | | | | | | | | | | | In order to obey a palette set globally on QApplication, an application attribute for checking if it's set at all is added. Task-number: QTBUG-39800 Change-Id: I26b965e6e18e0e1ca4df03cf343b3527df3636b2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Remove separate SSE4 unpremultiply functionAllan Sandfeld Jensen2015-04-166-39/+45
| | | | | | | | | | | | | | | | | | | | | | Merges the SSE4 specific unpremultiply with the normal version, and adds a SSE2 fallback. There was no reason to split the two since compile time options will ensure the right version is inlined. Also adds short-cut for 0 and 255 values. Change-Id: Ie5aa262f6964219fd3062d4a498f697cf79a4595 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Add matching by GL_VENDOR to QOpenGLConfigLaszlo Agocs2015-04-162-11/+55
| | | | | | | | | | | | | | | | This will be essential on Linux, especially Embedded where PCI IDs are not that useful. Change-Id: I2fa8ca07236e8aae203e21fe629d12aab092c7fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * The default wrap mode is REPEATLaszlo Agocs2015-04-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | As per spec, both for OpenGL and OpenGL ES. No wrap mode is applied unless setWrapMode() is called so the default values should be initialized to match OpenGL's default. Correct the copy-paste mistake in the warning messages. Change-Id: I094cc511dc7de4a214da61faadb1fc362270b2d4 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Optimize non-native bilinear transformsAllan Sandfeld Jensen2015-04-161-12/+33
| | | | | | | | | | | | | | | | Reading directly from an array instead of calling a function pointer is much faster. Change-Id: I833b33448bad064d6f38d2f9ff44138d90206822 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Liang Qi2015-04-152-3/+3
| |\
| | * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-152-3/+3
| | |\ | | | | | | | | | | | | Change-Id: I004854a25ebbf12b1fda88900162fe7878716c58
| | | * Add a cast to glTexImage2D to keep QNX happyLaszlo Agocs2015-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internalformat parameter seems to be GLenum (unsigned int) on QNX based on the error message in the linked bug report. The standard is GLint, though. To keep everyone happy, add a cast. Task-number: QTBUG-45346 Change-Id: I57fece7b381e0d02acc842a21b1edc5451ea0224 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| | | * Fix QNX and Blackberry -qtnamespace buildSérgio Martins2015-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-43569 Change-Id: I81a560d1508de4d808a807f1febdc17619cf4dda Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| * | | Cleanup and optimization of qimage smoothscaleAllan Sandfeld Jensen2015-04-157-729/+769
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up smoothscale code. Upscaling is improved using existing optimized interpolation methods, and downscale is given SSE4.1 optimized versions. Change-Id: I7cdc256c26850948aef7dae26fda1622be6b8179 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | | [QTextCursor] Better use of the cached whiteSpace attributeKonstantin Ritt2015-04-154-24/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In compare to QTextEngine::atSpace(), this also handles the less-common "white spaces" and the exceptional control codes. Change-Id: I52878932926b7f9fe36c9dd01007963b9691fbf0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | | Fix trivial copy-paste typo in QTextBlock::previous() docuKonstantin Ritt2015-04-151-1/+1
| |/ / | | | | | | | | | | | | Change-Id: Ia5d260af00aecf40400653e41248b5dd5f074b74 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Defer Q(OpenGL|Raster)Window updates when non-exposedLaszlo Agocs2015-04-141-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to how widgets work. On platforms like OS X this becomes essential since in non-exposed state SwapBuffers does not block so continuing to update continuously leads to undesirable effects. Task-number: QTBUG-45524 Change-Id: I80f4c00b218561b9e62c3cad1e66f61f4debd4af Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * | Improve QTextDocument::toPlainText doc related to inline imagesAlessandro Portale2015-04-102-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Embedded objects, such as images, are represented by a Unicode value U+FFFC (OBJECT REPLACEMENT CHARACTER)." Also updated the QTextImageFormat docs with the same wording. Task-number: QTBUG-44538 Change-Id: I64dd5f5be4a0ecc64b30758a72f8b4281c17924b Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * | Expose ItemViewActivateItemOnSingleClick in QStyleHintsEike Hein2015-04-105-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This completes support for ItemViewActivateItemOnSingleClick in QPlatformIntegration and exposes the setting in QStyleHints. Based on the review process, the public name used is 'singleClickActivation' for brevity, as well as to avoid con- fusion over alluding to "item views" in the Qt Quick context. KDE Plasma intends to use this via Qt.styleHints to have Qt Quick-based UI correctly implement the global single vs. double click user preference for item activation. [ChangeLog][QtGui] Added QStyleHints::singleClickActivation to access whether the platform expects item activation to occur on single clicks rather than double clicks. Change-Id: I0916e9e68c3a157f95053da8227b2612803653f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * | Add a means to set the application icon where supportedAndy Shaw2015-04-103-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On OS X the application icon can be changed at runtime, so this adds a way to set this via the QPlatformIntegration. [ChangeLog][OS X] QApplication::setWindowIcon now changes the icon for the application in the dock. Task-number: QTBUG-43999 Change-Id: Ice298c0bd52f10f4866f37c6d3f20cf5419b7a1b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
| * | Add FIXME comments to make Q[]Validator::setRange() non-virtual.Friedemann Kleint2015-04-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no apparent reason why these functions should be virtual. The virtual keyword originates from the CVS import. Change-Id: I4f8051cd4e89ca3037a78d12f17c93265c755b8e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
| * | Support gradients natively in the PDF generatorLars Knoll2015-04-092-233/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add native support for linear and radial gradients to our PDF generator. This fixes a couple of issues with both the quality of the generated PDFs as well as sizes of the files. Task-number: QTBUG-42758 Change-Id: Ib905457e11e4dc52443c76b3761bca8d1fbe9bfc Reviewed-by: Stephen Chu <stephen@ju-ju.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>