summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix compilation on ARM with C++11: narrowing conversionThiago Macieira2012-03-223-3/+3
| | | | | | | Cannot have double-to-float conversions inside { } in C++11. Change-Id: I13c27307efd703420b6667d919bb42c2ee82e6cc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix the build of -qt-freetypeThiago Macieira2012-03-221-0/+1
| | | | | | | | | | | The symbol must be exported from QtGui for the plugins to be able to see it. Also, fix the build in namespaced case: cannot use extern in QtPlatformSupport because it's not compiled into the Qt namespace. Change-Id: I029533f3524e3cbf6c87aed79c1f2e7b55aebb9b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add a non-implicit virtual destructor for QDashStrokerThiago Macieira2012-03-222-0/+5
| | | | | | | | | The base class has a virtual destructor, so the destructor is already virtual. Make it non-implicit so that the virtual table and other virtual inline methods don't get emitted everywhere. Change-Id: I15296c1114086ff0b1da701ccd51525bec99d76b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* MIPS DSP configure detection and initial blend optimizations.Damir Tatalovic2012-03-228-1/+931
| | | | | | | | | | | | | | | | | | | | Adds new MIPS configure test and -no-mips_dsp and -no-mips_dspr2 configure options. List of optimized implementations: - comp_func_SourceOver - comp_func_Source - qt_memfill32 - qt_destFetchARGB32 - qt_destStoreARGB32 - blend [RGB32][RGB32] - blend [ARGB32_Pre][RGB32] - blend [RGB32][ARGB32_Pre] - blend [ARGB32_Pre][ARGB32_Pre] Change-Id: I35411858295b7b3f4895eb56e3b93397528903cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed QInputMethod API to use isVisible() instead of visible().Samuel Rødal2012-03-222-3/+7
| | | | | | | | Deprecate the old API for now as not to break existing usages. Change-Id: I7abbbbe8a34951282537a9d74cded03743f44df7 Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* FocusAboutToChange event to be send before focus changesPekka Vuorela2012-03-221-2/+9
| | | | | | | | | | | | | | Focus change happen as: FocusAboutToChange event -> focus change -> FocusOut event -> FocusIn event. Input method need to have focus when calling commit(). Notification on focus about to be lost allows QWindow implementations to commit in time. Also changes QWidget documentation to match code reality. Change-Id: I17a8a374a33dd700909f79e370b42348869261a6 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove redundant \since 5.0Debao Zhang2012-03-223-14/+0
| | | | | | | | | | \since 5.0 has been add to the class section, so member functions and properties donot need this any more. see SHA: 5728c8a8e7c994b931d340315c241350d646f62a Change-Id: I4e67461373dda99ee1fbfdeb6477fde1dcfec116 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove hardcoded font names in QFont::defaultFamily()Jiang Jiang2012-03-211-10/+11
| | | | | | | | | | | QFont::defaultFamily() should not use any hardcoded font names like "Helvetica" or "Times" as they might not be present in certain systems, it should rather use abstract names like "sans-serif", "serif" and "monospace" then let the platform plugin to decide which font map to them. Change-Id: I5aafb103a5238c17b10773711ad504806c6fc3ce Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* EGLFS: Integrate building into configure.Donald Carr2012-03-211-0/+2
| | | | | | | | | | With the move to the QPA architecture EGL is now only required by individual platform plugins and the configure script has been adjusted to reflect this. Change-Id: Ieadacef0b970f29752d9e3e36a007e5cbb005b0d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Set the default QPA plugin for QNX builds to "qnx"Sean Harmer2012-03-201-0/+2
| | | | | | Change-Id: I630c3631d480929c1e3a618d0f0b084fd2cc6ad0 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix KDE palette.Olivier Goffart2012-03-201-0/+1
| | | | | | | | | | | | | | | | | | | | In QKdeTheme We want to load every color. Else, only the first color is loaded, and the rest of the palette is just black making the applications basicaly not usable. But KDE only put in its config files the colors that are different from the default colors. This is the reason why we need to resolve against the style's default palette. We need to make sure the resolve_mask is 0 for an empty palette, even before the application palette is set. This was not required in Qt4 because the system palette was initialized differently. I realize this will only work with QApplication (and not with a single QGuiApplication) but it was not working before either. Change-Id: Ifb3c2c1358ef6d83a1ca5aa8fac3d2d4ea712b94 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove QAccessibleEvent child parameter.Frederik Gladhorn2012-03-192-17/+20
| | | | | | | | | This makes the api cleaner and generally the child should not be there. It is only sometimes more convenient not to create a QAccessibleInterface instance, so the functionallity is kept. Change-Id: I26018a6d3e0549f4d79856775b4167c5660e229d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>