summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix documentation for devicePixelRatio() functionsTopi Reinio2013-01-173-9/+6
| | | | | | | | Fix Incorrect use of \sa, missing markup for comment block and typos. Change-Id: I1b7e477b7429ace30ca3ab25c4814c8cba659a65 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix warning about missing enumeration value.Friedemann Kleint2013-01-151-0/+2
| | | | | Change-Id: If97a325d056282a033cdb4c6e5bdc79eb400c525 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fix crash when trying to create paths for color-glyphs (Emoji) on MacTor Arne Vestbø2013-01-141-1/+2
| | | | | | | | | | | | | | CoreText segfaults when creating paths for color-glyphs: 0 0x00007fff8fd41e69 in TFont::FindColourBitmapForGlyph () 1 0x00007fff8fd417ac in TFont::CreatePathForGlyph () 2 0x000000010567d1af in QCoreTextFontEngine::addGlyphsToPath (...) So we shortcut the code-path, since we don't support Emoji yet anyways. Task-number: QTBUG-28615 Change-Id: Ife16ae4959077d9eaaf6ea5cd1f27a4e2e01e7f5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix QOpenGLContextGroup object leakJian Liang2013-01-141-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-29056 QOpenGLContextGroup object is designed to be destroyed by deleteLater(), but this method will not always work due to the fact that in many cases event loop will exit before the deferred deletion of the QOpenGLContextGroup object is queued. Think about the following case: int main(int argc, char *argv[]) { QApplication a(argc, argv); QGLWidget w; w.show(); return a.exec(); } In the above program, the event loop will exit before QGLWidget object's destruction. This will cause the QOpenGLContextGroup object hold by QGLWidget object never been deleted. This patch will delete QOpenGLContextGroup object directly with delete operator if the current thread is the same as the thread which the QOpenGLContextGroup lives in. Change-Id: If835d7482474f4a668763fc7c21b293a27f075fd Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Don't assume QSurfaceFormat's stencil buffer size is >= 0Tor Arne Vestbø2013-01-101-1/+1
| | | | | | | | | | | | | | The value -1 is used to indicate no stencil buffer, so we have to check for sizes <= 0 when deciding whether or not to triangulate the path in QOpenGL2PaintEngineExPrivate::fill(). This fixes an issue where filling a path would end up filling the whole outline of the path, which was very visible with fonts over a certain size (when we go from using the glyph cache to drawing filled paths for each glyph). Change-Id: Iafa96124481936db1e5109bba6166a6038c7ca83 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Rename qt_mips_asm_dsp.h to a "_p.h" headerThiago Macieira2013-01-095-3/+25
| | | | | | | | | | | It mustn't be installed and it mustn't be available in the master include. It's an assembler header anyway. Also, take the opportunity to add the "We mean it". Change-Id: Id4233e5bda458714a0d329549afe499d861acc56 Reviewed-by: Adrian Perez de Castro <aperez@igalia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Replace macro qdoc with Q_QDOCDebao Zhang2013-01-083-4/+4
| | | | | | | | Both qdoc and Q_QDOC are used in source code, which looks not good. Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix warnings about unused functionsThiago Macieira2013-01-071-1/+2
| | | | | | | | | | | | | | | | | The operator<= and operator>= overloads for QPoint are used only with Q_ASSERT. Clang was correct that they are not used. Even though they are inline, Clang reports the functions as unused because they were inside an anonymous namespace. So take the off the namespace. They are correct for external use, should they be exported by accident (which they aren't now). painting/qpathsimplifier.cpp:76:13: error: unused function 'operator<=' [-Werror,-Wunused-function] inline bool operator <= (const QPoint &a, const QPoint &b) Change-Id: I67415621e777fd0d59cbdede26c34d8bb13f7346 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fixed wrong emits of x/y/width/height changed signals in QWindowSamuel Rødal2013-01-041-9/+9
| | | | | | | | | | We should only emit these when the corresponding property value changes. Since these are changed asynchronously in the case of a platform window, we should not emit them in the setter, as they are already properly emitted in QGuiApplicationPrivate::processGeometryChangeEvent(). Change-Id: I5ac00601ddb4e7a8ff02376e5f5135d427913119 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fix QGuiApplication::keyboardModifiers() and QGuiApplication::mouseButtons()Jon Severinsson2013-01-042-5/+7
| | | | | | | | | | | | | | | | | Previous commit b2363a935c8dac fixed keyboardModifiers() after QPA event processing, but broke QTestLib, which expects spontaneous input events sent to qApp->notify() to update keyboardModifiers() and mouseButtons(). The commit also did not fix mouseButtons() after QPA event processing, and missed keyboardModifiers() after QPA Tablet event processing. This commit fixes all these shortcommings in b2363a935c8dac. Includes test case by David Faure <faure@kde.org> Task-Number: QTBUG-26887 Change-Id: I8518b06c4ce86ea7b35120e3353a45ea2a81d356 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Revert "Enable module build with QT_NO_ACCESSIBILITY"aavit2013-01-042-7/+10
| | | | | | | | | | This reverts commit b7f63c6bf74a0eb62bb49c1085584da1b3714a06. It made compilation fail in qstylehelper_p.h if QT_NO_ACCESSIBILITY was defined - which it is by default on linux without dbus. Change-Id: I313f5138460d28c44dad128d175df0e53a99287d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix possible crash in QTextDocumentEskil Abrahamsen Blomfeldt2013-01-031-1/+3
| | | | | | | | | | | | | | | | With trailing spaces in some cases, we would not get the "no justification at end of paragraph" special case, and continue in the code, getting the unexpected case where line_length becomes < 0 which would lead to memory corruption because we were writing outside our buffers. I added an assert to catch this type of bug earlier, and I added the trailing spaces to the test for the end of the paragraph. The test case added is one example which would crash. Task-number: QTBUG-27354 Change-Id: Id720a6fa55dbc709ce04dd5321e55687bf960d75 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove some dead code from qtriangulator.cppThiago Macieira2013-01-031-39/+0
| | | | | | | | | | | | | The CompareEdges functor class is never used anywhere. Clang saw it through to the static function that never got used: qtriangulator.cpp:227:12: error: unused function 'comparePoints' [-Werror,-Wunused-function] static int comparePoints(const QPodPoint &u, const QPodPoint &v) ^ Change-Id: I67d821e454daf82bd8107bf20f787aff9496e878 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Make QImage::mirrored() propagate devicePixelRatioMorten Johan Sorvig2013-01-021-0/+1
| | | | | Change-Id: I2dfeacc941cb411a7ec6752f745fed9d6345ed8a Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Bump Qt version to 5.0.1Sergio Ahumada2012-12-211-5/+5
| | | | | Change-Id: Ie8f437b8dfe8a67c7b34321439dd988a02612437 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Generalize the check for gui in static plugin import generationMiikka Heikkinen2012-12-201-1/+3
| | | | | | | | | Generalize the check for gui by checking for needs_qpa_plugin CONFIG value instead, which gui adds to MODULE_CONFIG. Task-number: QTBUG-28215 Change-Id: I5834a3f81e5c3868ee1a3fa405ebc6410db1f900 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Enable module build with QT_NO_ACCESSIBILITYTasuku Suzuki2012-12-202-10/+7
| | | | | | Change-Id: I330c3ddd70232d94eae5543cb0282b962e67eae5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Qt Gui Examples: Fixed QDoc filesChristiaan Janssen2012-12-181-2/+3
| | | | | Change-Id: I160d8d186a1078f20f2b779bfbdae90459c27641 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Correcting qhp link to Qt GUI C++ API.Jerome Pasion2012-12-171-1/+1
| | | | | | Task-number: QTBUG-28579 Change-Id: I224d55adc1be77138237da4efcac01641964c06b Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Accessibility: Activate in QGuiApp instead of QApp.Frederik Gladhorn2012-12-161-0/+4
| | | | | | | | This makes it possible to use accessibility with QQuickWindow. Change-Id: I5fccd5f25021c4953b03e146705f48a198dbaaa7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Mark the QDesktopServices::StorageLocation enum as obsolete in the docsAndy Shaw2012-12-141-0/+2
| | | | | | | | The enum was already deprecated but the documentation still listed it so now it is correctly obsoleted. Change-Id: I9d64fe58a5e70de7161928da2d09b4532d450274 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Fixed invalid memory read in SSSE3 image blending code.Samuel Rødal2012-12-141-1/+1
| | | | | | | | | | We need to do bounds comparison on the actual offset we're going to use with _mm_load_si128 to read 16 bytes from memory (even though we won't use the trailing bytes in the end). Task-number: QTBUG-28324 Change-Id: Id0d6094da796ca67338d8ad225fa6b2f309bbe6e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Implicit conversion of shortcuts to string is gone.Frederik Gladhorn2012-12-141-1/+1
| | | | | | | | This only effects compilation with DEBUG_QSHORTCUTMAP. Change-Id: I184e644f2165049336cee8a6ac63a3301cf4c849 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix memory leak in childAtMorten Johan Sorvig2012-12-141-0/+2
| | | | | | | Delete the interface if it's not returned. Change-Id: Ia1e1f94d14584ab3af1b89a0baac5d343ffdd1f4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Entered hardcoded url for Gnu EmacsNico Vertriest2012-12-141-1/+1
| | | | | | | | | | Corrected in qkeysequence.cpp Link from external-sites not working So, entered hardcoded url. Task-number: QTBUG-27512 Change-Id: I5b8d25d2b1f4f4fb0d57d2306de7f1b7c3dc40e3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix styleName support in QPA font databaseJiang Jiang2012-12-144-26/+17
| | | | | | | | | Font styleName support was disconnected since Qt switched to QPA fontdatabase. Now add the code from Qt 4.8 back to enable this in QPA. Change-Id: Iab2cbfd5468f87542183348c2123ca4b2c270692 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Mac: fix bugs for font selection in QFontDialogLiang Qi2012-12-141-1/+1
| | | | | | | | | Use localized family name and style name when selecting font with non-English locale Task-number: QTBUG-27415 Change-Id: Ie81507ed011fc096e0f5edad146e97c392e86494 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* XCB: add support for getting and setting appTime and appUserTime.David Faure2012-12-142-0/+8
| | | | | | | | | | | | The QX11Info class needs this. This required adding the missing nativeResourceFunctionForScreen in QPlatformNativeInterface. Change-Id: I2c6e91c7f122f3ecdf769a177deafd2aa3896e2f Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix empty window title regression, add application display name to window titleDavid Faure2012-12-141-1/+6
| | | | | | | | | | | | | | | This increases consistency a lot: all windows and dialogs from a Qt application will show the app display name in the caption, on Windows and X11. This helps identifying which app a dialog belongs to, which is especially useful when the dialog is very generic and shows up unexpectedly. For compatibility reasons, the app name is added to the caption only if setApplicationDisplayName() was called -- or if the caption would be completely empty. The standard Qt4 case (setWindowTitle + no display name) is unchanged. Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix QWidget::setWindowOpacity() when called before show().Friedemann Kleint2012-12-122-2/+6
| | | | | | | | | Pass opacity from the QWidget to QWindow and to the platform windows. Task-number: QTBUG-28477 Change-Id: If5a85d9183bd1ca33dac2052936ecd1e6c0b5f6c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Accessible: Improve value interfacev5.0.0-rc2Frederik Gladhorn2012-12-122-0/+14
| | | | | | | | | The stepSize property was missing in Qt 4 and is a sensible addition to the value interface. Change-Id: I7571800d50ee7e4194c09c4db40300809a1ce45a Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* De-inline all setters in QWindowShawn Rutledge2012-12-122-77/+84
| | | | | | | | | | | | | | | | If we don't do this, we can have binary compatibility issues later. For example https://codereview.qt-project.org/#change,41700 will change the behavior of setWidth and setHeight to call setSize instead of setGeometry, because we don't want changing the height to also set the position of a window; if x and y are left uninitialized it needs to remember that fact. But if setWidth is left as an inline method, calling setGeometry, then an application which was built with 5.0 would behave differently than an application built with 5.1, even if Qt is upgraded after the application was built. To generalize, setters should never be inlined. Change-Id: I1ec42cb61a45fe541b3f3bb99d1b1ca24ad2a517 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QSpanData: use isAffine() instead of rolling your own testVitaliy Kharin2012-12-121-1/+1
| | | | | | | | | QSpanData did not properly check that whether the matrix is an affine transformation or not. Therefore, qt paint engine chose the wrong algorithm for drawing in case of a perpective matrix. Change-Id: If0523bd45e86679a08874713da3fbe33a9852551 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Some fixes to the OpenGL docs in GUIGunnar Sletta2012-12-122-5/+41
| | | | | Change-Id: I6415ff16b1765a5814d50a4cd39db00495d43073 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* FreeType bitmaps interpreted in wrong formatFlorian Hänel2012-12-121-1/+13
| | | | | | | | | | | | We ask grayscale or mono bitmaps from FreeType but in some cases treat the output as ARGB without conversion. This surfaces using QGLWidget as a viewport to QDeclarative content. The offending glyphs are then generated through QTextureGlyphCache::textureMapForGlyph. This adds a fix for converting to the expected ARGB32 data. Change-Id: Ia219582ebd76b7e4e9379111a42312b4d97718de Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove incorrect and confusing documentation from qplatformwindow.cppSamuel Rødal2012-12-111-3/+0
| | | | | Change-Id: If3fd383bf7ff08a04df2e11c727c11aeef05a6de Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Added url for SVG Color Keyword Names QTBUG-28500Nico Vertriest2012-12-111-1/+1
| | | | | Change-Id: I7aaf2cbd9b4bf4e6ff35fa39c5340e3dbc4225ff Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Added hardcoded url QTBUG-28500Nico Vertriest2012-12-111-2/+2
| | | | | Change-Id: Ida2bcd8e470cc336db69dcec6130ad942e14d3a0 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Compile with QT_NO_CURSOR.Volker Krause2012-12-071-0/+2
| | | | | | | | | | | | | Mostly straightforward, the a11y changes might look a bit drastic, but the base class QAccessibleTextWidget was already disabled in this case, so we have to obviously take out its sub-classes as well. Change-Id: I682ace20d6938688ddb1da23c3463f3c025fab8e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Make the documentation more explicit an talkativeLaszlo Papp2012-12-072-8/+10
| | | | | | Change-Id: Ifa4b7c3c5f8ec384addbb80a9436d55b32d8bc51 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Removed requestOrientation() API from QWindow.Samuel Rødal2012-12-065-90/+10
| | | | | | | | | | | There are no proper implementations of this API, and as it stands it only acts to confuse anyone who stumbles across it. It will be better to revisit the full cross platform orientation API story for 5.1. Change-Id: Iff7054a32c6e5e4ad0cc0493a5e4ecc35a6ec4f3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* doc: Add changes to dnd docs from qtdoc repositoryEskil Abrahamsen Blomfeldt2012-12-061-13/+24
| | | | | | | | | | Change da54c5e7c9bf7647664a3529a6db487dee94d331 in the qdoc repository was made to the wrong version of this documentation. This change just adds them in qtbase and fixes some of the snippets which were still broken. Change-Id: Ie9ba57b5a2d20a629aa5f0a492daa207d35b2053 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix: Do not require GL library if configured with -no-openglaavit2012-12-061-1/+1
| | | | | | | | qt_lib_gui.pri would add an unneeded -lGL, causing the build to fail on systems with no GL libraries. Change-Id: I3a49418e1393642e9d97999b79741cc2144a99af Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Make qtbase compile with QT_NO_IMAGEFORMATPLUGINv5.0.0-rc1Tasuku Suzuki2012-12-054-24/+33
| | | | | | Change-Id: I1fef96481fa902cfd9de63fa814f70412eee4d15 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Fixed crash in tst_qguiapplication with QT_QPA_PLATFORM=minimalSamuel Rødal2012-12-051-1/+2
| | | | | | | | | | | The tst_qguiapplication creates and destroys multiple instances of QGuiApplication. Since the minimal platform plugin doesn't report any theme names, the platform_theme never gets set to 0 in init_platform, and we end up trying to use or at least delete an already deleted QPlatformTheme. Change-Id: I1a41d55b0705c5531c019e60a7a96dac144bacb7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* properly syncqt-ize harfbuzz headersOswald Buddenhagen2012-12-042-4/+0
| | | | | | | | | we were already installing them into QtCore/private, so turn them into proper private headers to start with. this cleans up our project files. Change-Id: I0795f79e03b60b5854de9e4dc339e9b5a5e6fd87 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix warning about cast from ASCII.Friedemann Kleint2012-12-041-1/+1
| | | | | Change-Id: Icc251a8d26db022077c84ff2d0911868b56c9fd6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Merge branch 'master' into stableOswald Buddenhagen2012-12-032-0/+4
|\ | | | | | | Change-Id: I5c0c9a131cca64fea3bc784339d14d84076edc1a
| * WINCE: Fix missing cosfAndreas Holzammer2012-12-032-0/+4
| | | | | | | | | | | | | | | | | | cosf seems to be defined in the cmath header for Windows CE, so include it to fix the issue of not finding the symbol cosf. Change-Id: I7317668838912325d45be0d4087ae3055940d3cd Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | xcb: notify when the logical DPI changes; add Q_MM_PER_INCH constantShawn Rutledge2012-12-031-0/+1
| | | | | | | | | | Change-Id: I15696bf45ae99cc5b0fd95dab4884fc85cbfc6da Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>