summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Minor clean up in QTextOption APIEskil Abrahamsen Blomfeldt2012-04-112-4/+4
| | | | | | | | Source compatible, but binary incompatible, change to QTextOption API to make it consistent with Qt's coding style. Change-Id: I368f13925339fa41025a570f684f4b944844a022 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Removed Qt5 todo comment in qpaintengineex_p.hSamuel Rødal2012-04-101-1/+0
| | | | | | | | This won't get done for Qt 5, and QtOpenGL still implements this API. Task-number: QTBUG-25069 Change-Id: Ia8437d2a4a5a0e750afdf67764c53d75ee8065f6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Qt5 to-do comments in qtextformat.cpp.Jason McDonald2012-04-101-2/+0
| | | | | | | | | These won't be done for Qt 5.0 and to-do tasks really belong in a bug-tracker not in the code. Task-number: QTBUG-25072 Change-Id: Ife4ff148167e0f0c66a58233548f4011b0b10784 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Make it possible to enable non-scalable font scalingMiikka Heikkinen2012-04-104-12/+47
| | | | | | | | | | | | | | | | | | | Windows native font engine supports scaling of non-scalalble fonts, so make it possible to do so. Added two functions to QPlatformFontDatabase: fontsAlwaysScalable() and standardSizes(), and made fontsAlwaysScalable() to return true for Windows native font database. Windows Freetype font engine doesn't seem to support scaling of non-scalable fonts, so didn't enable it in there. Added implementation of standardSizes() for Mac OS. Task-number: QTBUG-24970 Change-Id: I41c9356ede8a37b7c61db94340dbeb5b629f34b9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Don't hardcode the default families in qfont_qpa.cppPierre Rossi2012-04-102-34/+6
| | | | | | | | | Since different platforms come with different fonts, we should probably leave it up to the platform to decide which family to use. Change-Id: I18bb81c0ce87cc7e9ac7f3abaeae1b41c0ce8410 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix crash with invalid pre-edit position.Andrew den Exter2012-04-101-1/+1
| | | | | | | | Ensure the script item position is within the bounds of the text block when adjusted to compensate for pre-edit text. Change-Id: I2c745bf08afc0d9bc3aba27c24c2a123af017dc6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Remove unused signal QWindow::backBufferReadyGirish Ramakrishnan2012-04-101-1/+0
| | | | | | | | | backBufferReady is not used anywhere Change-Id: Ic5c8f6a89e031b3bd757b03f60737d55be969ee5 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed build issue when using GLEW with MSVCAndy Nichols2012-04-102-0/+4
| | | | | | | | | MSVC does not support the #warning precompiler command and is considered an error when used. This change checks for GCC before issuing the warning. Change-Id: Iee1e27841fe77b0289e88b7b4ccaa176ab56a39d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix header inclusion guardsGirish Ramakrishnan2012-04-101-3/+3
| | | | | | | The inclusion guards refer to the old graphics system code Change-Id: Ifa72e3030c83797e471735a9a696bf12c0f75b08 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix constness of QPlatformCursorImage::hostpot()Girish Ramakrishnan2012-04-101-1/+1
| | | | | | | QPlatformCursorImage::hotspot() should be const. Change-Id: I2b517098e75b013947386a5a620a15dc48e76cec Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fixed an exit crash that could occur in QQuickPixmap.Charles Yin2012-04-051-2/+8
| | | | | | | | | | | | The global destructor for the clean up hooks might be called before the global destructor for QQuickPixmapCache objects. This is an additional fix for QTBUG-8681 Task-number: QTBUG-8681 Change-Id: I8694a7a246980f488aef78071c613e3a908c7db3 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Specify generic QPA plugins via env variablesDonald Carr2012-04-041-0/+4
| | | | | | | | | | | Introduce a mechanism to load comma separated generic QPA plugins via exported environment variables. (Drastically simplifies QPA usage in custom environments where a variety of plugins could be used and heuristics are consequently a poor fit) Change-Id: I292f3fbfc8b8ad2b4f416984ef0a10b9b59de531 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Removed Qt 5 todo comments from qpalette.hSamuel Rødal2012-04-041-3/+3
| | | | | | | | | The removal won't happen in Qt 5, and there's no great value in making NoRole have the value 0 at the potential risk of breaking existing code. Task-number: QTBUG-25068 Change-Id: I57238f55a23e77a783ebac47b96b4a5e62480add Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix warnings about unused variables.Friedemann Kleint2012-04-032-6/+3
| | | | | | | | Fix MSVC warnings about unused q, d where only static functions are used. Change-Id: I239d6fc3c851b0a62434cb09fc0e1967f2e6d031 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warnings about truncations in constants.Friedemann Kleint2012-04-032-2/+2
| | | | | Change-Id: I46872c5b2866454112092c1ec5efbfe15db5af33 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWindow: add windowModality as a Q_PROPERTY()Bradley T. Hughes2012-04-032-8/+23
| | | | | | | | This also adds the QWindow::windowModalityChanged() signal. Change-Id: I6e3bc3155d72811d173857c39d36dcb264928334 Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make API in QPlatformSharedGraphicsCache a little more genericEskil Abrahamsen Blomfeldt2012-04-031-3/+4
| | | | | | | | Use EGL extensions for some things to allow serialization instead of the somewhat specialized serializeBuffer() function. Change-Id: I8d15e85bfb80d12fa953ba094564ddfca1aa6d6a Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix release mode warnings about unused variables.Friedemann Kleint2012-04-032-0/+2
| | | | | | | Variables that are only used in asserts. Change-Id: I0984b676ad9b67f5ae72266b8540e8054163918f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Rename clip() to clipData() to avoid confusion and warningJiang Jiang2012-04-031-2/+2
| | | | | | | | | | There are already a bunch of clip() functions in this class. Rename the one for returning clip data to clipData() to make it clearer. It also eliminate a warning when compiling with clang. Change-Id: I1f890ad6bf1c0274a0b38b3116a3ec3d2957d44a Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Return early in QRawFont::setPixelSize.Pierre Rossi2012-04-031-1/+1
| | | | | | | | We would otherwise end up cloning the font engine for absolutely no reason when the pixel size is already right. Change-Id: I8c34d2b53b596ad49d00031a3fb8e79f3b30d591 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Change fatal exit in QPlatformFontDatabase to a warning.Friedemann Kleint2012-04-021-3/+3
| | | | | | | | | Only warn if the folder containing the qpf2 files is not found. The code path is triggered by the QPA 'minimal' plugin. Change-Id: I12a32001ce867096627033b1d5fb894cab163853 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Calculate correct bounding rect for glyph runs in QTextLayoutEskil Abrahamsen Blomfeldt2012-04-021-1/+2
| | | | | | | | | | The positions returned by getGlyphPositions() in QFontEngine are for the base line of the glyphs. We offset this by -ascent to get the top of the actual bounding rect. Task-number: QTBUG-22919 Change-Id: Id82c66ecfbdf58064f5ad26f4193fa55ac26bc7c Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* QTBUG-24936: Ensure alpha cache is cleared when printing to PDF.Tarja Sundqvist2012-04-021-0/+1
| | | | | | | | | Added 'd->alphaCache.clear();' to qtbase/src/gui/painting/qpdf.cpp since also the alpha cache needs to cleared when printing to PDF. Task-number: QTBUG-24936 Change-Id: I12c41a98f4bd54c154fa47acebe0421e9a38a3ec Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix a crash in cursorToX() when new block is addedJiang Jiang2012-04-021-0/+4
| | | | | | | | | | | | When an empty new block is being added, the layoutData->memory data will be 0, thus QTextEngine::attributes() will return 0. We should only access the attributes pointer when some text actually exist. Task-number: QTBUG-24718 (cherry picked from commit cac12f4592477d99ef6fffaad40345bf85ef53b5) Change-Id: I203b283dd28653d4b57ba8bfffb259c773f67f19 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Document preedit details on QTextLayoutPekka Vuorela2012-04-021-0/+2
| | | | | Change-Id: Ic73f6d2c748b2ac02b1a8b8c0b00721793557cfd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Added some convenience API for platform input contextsPekka Vuorela2012-04-019-12/+153
| | | | | | | | | | | | | QPlatformInputContext now gets notified on changed focus and has inputMethodAccepted() telling whether current focus object accepts input method events. Also adapted IBus plugin to use this. Key event filtering for focused objects without input method support got fixed by the change. Change-Id: I6910aa6af2459d752a5763f0ae88fa8c34e5b165 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Change documentation to refer to up to date property name in QtQuickPekka Vuorela2012-03-291-1/+1
| | | | | Change-Id: I78550862a2b1eb14f89c5ad01cc3718cf83606d2 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Determine font smoothing gamma in initialization.Friedemann Kleint2012-03-291-2/+5
| | | | | | | | Avoid calls to QStyleHint and QPlatformIntegration from threads. Change-Id: I851ef029ea348f182e0b42536d0a994960aa9187 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* The scaling should not effect the width of a cosmetic penAndy Shaw2012-03-291-1/+1
| | | | | | | | | | | When the scaling effects the pen width so that it is less than 1 pixel in width then it would use the QCosmeticStroker to draw, however this should not be the case for cosmetic pens that are not less than 1 pixel in width as the scaling does not change their width. Task-number: QTBUG-25006 Change-Id: I142db0f3a7ee02aa87171495d5a7a7011100814e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Ensure that qdrawhelper.cpp is compiled with vectorisation activeThiago Macieira2012-03-281-0/+9
| | | | | | | | | | | | | | The GCC option -ftree-vectorize is enabled only at level -O3, so force -O3 if this is an optimised build. Also, ensure that we're using SSE for floating point math if we're in x86 (32-bit) builds. No change is necessary for the Intel compiler, since it enables vectorisation by default at any non-zero -O level. These options are not possible with MSVC. Change-Id: If1169a73cd8a3e8b34d9e21f281b78897b9aec3e Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* irrelevant qDebugs from QGuiApplication removed.Simjees Abraham2012-03-281-2/+0
| | | | | | | | removed the qDebugs that are not relevant for the user and were printed when the app was started from QtCreator. Change-Id: Iae49d6c780a4d3cfd55b3e149555294e150f3f52 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add missing accessible child id.Frederik Gladhorn2012-03-281-0/+1
| | | | | | | In the deprecated function the child parameter got lost. Change-Id: Ieeef19100bffaaa6079185dae6ae5bf82dcd7a60 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Use "qt-project.org" instead of "trolltech" in the resource systemhjk2012-03-281-2/+2
| | | | | | | Task-number: QTBUG-23272 Change-Id: Idcdb9620910577b3c0fc9a792a0446665bd2eab6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make QCoreApplication::applicationName() default to argv[0]David Faure2012-03-281-9/+18
| | | | | | | | | | | | This makes it more useful in all the Qt apps that don't set it, given that it's used internally by QTemporaryFile, QTemporaryDir, QStandardPaths, QDBus, QAccessibleApplication, etc. Qt4 compatibility in the deprecated QDesktopServices is preserved, no fallback there. Change-Id: I584463507cf917a3720793c6bd45d07c60f8356c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Protect QAbstractTextDocumentLayout::anchorAt() from preeditPekka Vuorela2012-03-271-0/+15
| | | | | | | | | | Previously the method didn't take into account that hitTest() returns visual index, i.e. containing the preedit, and thus was easily hitting assertion. Need to compensate for that before checking for actual link. Change-Id: I119e7f91088b4db9d347a3da338f6df915ce9719 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Add QPA notes to QCursor pos() and setPos()Laszlo Agocs2012-03-271-0/+17
| | | | | Change-Id: I7173816e0d792d6d26497b4fd59a57a50e512afd Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Introduce FontSmoothingGamma as a platform style hint.Friedemann Kleint2012-03-2711-54/+118
| | | | | | | | | | - Allocate gamma tables on the heap in a thread-safe way, use font smoothing returned by the style hints of the platform to calculate them. - Improve font rendering on Windows. Change-Id: I8cd39b51cf03cbd642474c02b9076814baecd597 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix annoying deprecation warning about QImageTextKeyLangThiago Macieira2012-03-261-3/+18
| | | | | | | | | | | | | | | | | | | If we deprecate the entire class, then we get the warning for every use of it with GCC, including the three operators defined inside the class. So instead, mark as only the constructors as deprecated, which should reduce the warnings to the places where the class was instantiated. That should be enough to poison the code enough: to fix the warning, you need to stop using the class there and/or stop calling one of the deprecated functions that deal with it. Unfortunately, we still get one more warning inside the inline code, in QImage::textList. To remove that warning, we disable all deprecation warnings around that code block. Change-Id: If3c11647a9d2cab055e15810d7cfe0d8f5e7042f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Password editor mask delay stylable by platform pluginPekka Vuorela2012-03-264-1/+11
| | | | | | | | | Replaced hard coding as QT_GUI_PASSWORD_ECHO_DELAY with a style hint. Change-Id: I0b78ebad723dbe19d9b9496583203e31545874e2 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix QGuiApplication::keyboardModifiers()Bradley T. Hughes2012-03-262-0/+8
| | | | | | | | | Make sure that the keybaord modifiers are maintained properly when handling window system events. Change-Id: Ie75cbe5eb509c29e3d2291694f2de509fbf3098a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove the Q_STATIC_TEMPLATE_SPECIALIZATION macroThiago Macieira2012-03-263-9/+0
| | | | | | | | This was necessary only for older MS Visual Studio versions, which are no longer supported anyway. Change-Id: I6c96fb2340296c34b480716303c93b892419229b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Restore Qt4 compat in QDesktopServices::DataLocationDavid Faure2012-03-242-1/+21
| | | | | | | "/data/" was appended to the base directory. Change-Id: I220f2ce74c36b795bc49c7c84106feb0709d1547 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make sure windows send accessibility activated updates.Frederik Gladhorn2012-03-241-4/+17
| | | | | | | | Both QWindow and QWidgetWindow should update with the active state signal. Change-Id: I0219f803aa0fb109765f0faa0aedb120c2a439f0 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Silence a warning about a change of sign.Thiago Macieira2012-03-241-1/+1
| | | | | | | | | GLuint is, like the name says, unsigned. To store -1 in it, a change of sign happens. Silence the warning by casting the -1 to GLuint first. Change-Id: I165a32c486358a60f7c5fd0c439204ed2f9f7f16 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix warnings about commas at the end of enumsThiago Macieira2012-03-243-3/+3
| | | | | | | | It's non-standard to accept them, so remove them and silence the warnings. Change-Id: I51c5afe99eac408f326ab9fcf40435b60e953b54 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix deprecation warning about QPlatformWindow::visibleThiago Macieira2012-03-241-1/+1
| | | | | | | The proper getter name of a boolean property is prefixed with is-. Change-Id: Id1fae9ccd11db3e92903c51012bbe75d52726a5a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* API cleanup: remove CoordinateType enumJan-Arve Saether2012-03-241-9/+3
| | | | | | | | The bridge can do the mapping to and from screen position. This is now done in the windows bridge. Change-Id: I5ca5df0fbeeb58202539f55a0f62717fb1685092 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix warnings in qtbase.Friedemann Kleint2012-03-241-3/+0
| | | | | Change-Id: I981e08872440e35eb9bfad32b20543cfce8439c9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Deprecate QInputMethodEvent::setTentativeCommitString()Pekka Vuorela2012-03-232-2/+4
| | | | | | | | Free form tentative commit proved to require too much fiddling on rendered text vs. logical content. Needs simpler mechanism. Change-Id: Ia4e341abf342d25675fd1129efb11094dde410b2 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Remove the workaround for GCC 3.3 on IRIXThiago Macieira2012-03-221-12/+0
| | | | | | | GCC 3.3 is no longer supported. IRIX is no longer supported. Change-Id: I1656a6fdcf2b244f0f6c812e71b0e793d37fb98b Reviewed-by: Robin Burchell <robin+qt@viroteck.net>