summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Remove warnings from qtbase.Mitch Curtis2012-11-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | geometryengine.cpp: In member function 'void GeometryEngine::drawCubeGeometry(QGLShaderProgram*)': geometryengine.cpp:159:93: warning: cast to pointer from integer of different sie [-Wint-to-pointer-cast] geometryengine.cpp:167:95: warning: cast to pointer f rom integer ofdifferent size [-Wint-to-pointer-cast] benchmarking.cpp: In member function 'void TestBenchmark::multiple()': benchmarking.cpp:85:9: warning: variable 'result' set but not used [-Wunused-but-set-variable] benchmarking.cpp: In member function 'void TestBenchmark::series()': benchmarking.cpp:120:9: warning: variable 'result' set but not used [-Wunused-but-set-variable] qstandarditemmodel.cpp:2717:45: warning: unused variable 'd' [-Wunused-variable] qxcbconnection.cpp: In member function 'xcb_timestamp_t QXcbConnection::getTimestamp()': qxcbconnection.cpp:930:40: warning: suggest parentheses around assignment used as truth value [-Wparentheses] tst_qguiapplication.cpp: In constructor 'BlockableWindow::BlockableWindow()': tst_qguiapplication.cpp:340:9: warning:'BlockableWindow::enters' will be initialized after [-Wreorder] tst_qguia pplication.cpp:339:9: warning 'int BlockableWindow::leaves' [-Wreorder] tst_qguiapplication.cpp:342:12: waring: when initialized here [-Wreorder] tst_qsqltablemodel.cpp:570:10: warning: unused parameter 'value' [-Wunused-parameter] tst_qabstractitemview.cpp:1546:8: warning: unused parameter 'index' [-Wunused-parameter] Change-Id: I49c88547182e4669cfde2c2536403fc5573ca2da Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable gui build with QT_NO_SYSTEMTRAYICONTasuku Suzuki2012-11-211-2/+2
| | | | | | Task-number: QTBUG-24816 Change-Id: I5b53392bee3990ec5c7235cc615b4a477fb62089 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Handle QEventLoop::ExcludeUserInputEvents in QWindowSystemInterface.Friedemann Kleint2012-11-212-36/+45
| | | | | | | | | | | Add a flag indicating user input events to the event type and leave those events in the queue if QEventLoop::ExcludeUserInputEvents is set. Task-number: QTBUG-27595 Change-Id: Ib41b826ef3be19253cd582d9894dd7c87953711f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix possible crash/assertion in qt_fontHasNarrowOutlines()Konstantin Ritt2012-11-211-4/+10
| | | | | | | | | 1. cloneWithSize() may return 0 1bis. QRawFont::setPixelSize() may ivalidate the font (due to 1.) 2. using the data obtained from a temporary QString is never safe! Change-Id: I0cd5f807d8077ef5112704e475f1904bd6fc4b1b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QJpegHandler: err should be set before jpeg_create_decompress()Elvis Lee2012-11-211-2/+3
| | | | | | | | | | If ERREXIT2 is called in jpeg_create_decompress(), SIGSEGV occurs with no error message. ERREXIT2 macro uses jpeg_compress_struct.err to handle error case. Change-Id: I8517a4d6f6e6aa4c1c59cd1aaea435554cca7ac3 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fixed rendering artifacts when drawing cursor.Samuel Rødal2012-11-201-1/+1
| | | | | | | | Get rid of the + 1 in addition to the ascent and descent. Task-number: QTBUG-27658 Change-Id: I8721226a034099ebe348cad3c49ac711c7fe44b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Merge branch 'newdocs'Eskil Abrahamsen Blomfeldt2012-11-2066-14/+4819
|\ | | | | | | | | | | | | | | | | | | | | Added prepare_docs to qt_build_config.prf (it was added directly in configure in the source branch) Conflicts: configure tools/configure/configureapp.cpp Change-Id: I1337c69fc62b1c934e3e39b4409e4857440c9db8
| * Doc: Cleaning up QHP information in module configuration files.Jerome Pasion2012-11-071-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a common standard among all Qt modules. These changes affect the final .qch file for each module. Changes: 1)URL in qt-project.org is confirmed by DevNet maintainer url = http://qt-project.org/doc/<module> 2)Landing page title mapping indexTitle = landing page 3)"C++ Classes" as a child node. The list of C++ classes and the titles are specified in the wiki. 4)Removed extra subprojects. They are not needed for now. Each module may need additional nodes. Change-Id: I1825476c21fe9aaddc9d6b512ff74229f17271a0 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Merge branch 'master' of ssh://codereview.qt-project.org/qt/qtbase into newdocsJerome Pasion2012-11-0219-73/+127
| |\ | | | | | | | | | Change-Id: I7e6cee190a341901dfbf8effb54ebccb91bf7a17
| * | Qt GUI: Adding Rich Text Processing documentation from qtdocJerome Pasion2012-10-2965-0/+4803
| | | | | | | | | | | | | | | | | | | | | | | | | | | -included the snippets -editing for technical accuracy still to be done. -ported missing files from Qt 4 Change-Id: I0b2d27630b762c6518c08973a40b476d7852001d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * | Doc: Removed the HTML template from the .qdocconf filesJerome Pasion2012-10-261-1/+0
| | | | | | | | | | | | | | | | | | | | | -qt-module-defaults.qdocconf already contains the HTML template. Change-Id: I5757741166f0f688ce0e8a4e77ed45fd4d72f1c7 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * | Merge remote-tracking branch 'gerrit/master' into newdocsTor Arne Vestbø2012-10-2666-166/+2831
| |\ \ | | | | | | | | | | | | Change-Id: I10cf9f915c602c8e5a0e7d7c9e17b7bc5ca00640
| * \ \ Merge remote-tracking branch 'gerrit/master' into newdocsTor Arne Vestbø2012-10-1918-57/+220
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: If7f46d56cf0b0b79f7fc8955a01964121b900d07
| * \ \ \ Merge remote-tracking branch 'gerrit/master' into newdocsTor Arne Vestbø2012-10-1623-238/+357
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: If2168c519daf45390af04af9ef9722770453a493
| * | | | | doc: Add a bunch of missing dependsTor Arne Vestbø2012-10-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I32c3730f8181d73a7c8e36ef382c74b8da754269
* | | | | | Fixed memory leak in assign operator of QOpenGLBufferVadim Zakondyrin2012-11-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I47f9128b54770bae7a63f82bf66ca16144b67c55 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | | | | Add QPlatformNativeInterface::nativeResourceForScreen().Friedemann Kleint2012-11-192-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-5416 Change-Id: Ic163a5ff1c7a06869d324acb9aa7c257a0262e72 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | | Missing break in case QEvent::WindowStateChange.Miikka Heikkinen2012-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The missing break causes state change event handling to fall through to tablet event handling, which is clearly wrong. Change-Id: If19d7b3f794b3614961b9e79952331b0ede1fba1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | | | Accessibility: Add documentationFrederik Gladhorn2012-11-151-10/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This keeps the docs as internal, but add information about the events. Change-Id: I9b961a946a6d799232a756a9ac874c0caf91ecbc Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | | | | | Bring back -nograb/-dograb for debugging.Friedemann Kleint2012-11-153-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-27632 Change-Id: I4b59df01519af4684d9dbe6e4b6c18a5ebd9aeae Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* | | | | | Change to enter/leave policy while grabbing.Miikka Heikkinen2012-11-151-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sending enter and leave events to other windows than the grabbing window is not logical. The policy should be that only the grabbing window receives enter and leave events. Changed the documentation accordingly and provided the necessary changes to Windows implementation. Also removed explicit leave event generation for widgets when popup is opened as that is now redundant. tst_QWidget::underMouse() test was changed to behave according to new logic. Task-number: QTBUG-27871 Change-Id: I127fb8685b4a4206d1a319f42cba491ec02bc8ca Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | | | Add a QEnterEvent containing the mouse position.Friedemann Kleint2012-11-106-9/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enter handling requires knowledge of the mouse position. Extend the enter handling of QWindowSystemInterface to receive the position (implemented for Windows, XCB and Mac), passing it on to QEnterEvent. Dispatch QEnterEvent from widgets code. Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | | Added private header warnings in src/gui/kernelSamuel Rødal2012-11-098-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If3ad9d1e18543639f9e6abb8899b72772bc70c83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | | | Fix GIF image decoding: do not zero transparent pixelsaavit2012-11-091-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the special transparent color index, the decoder would skip writing anything out (thus leaving the pixels at 0 rgba value). Although correct for later frames, for the initial frame this would loose the color information for such pixels (which one otherwise could have made visible e.g. by converting then image to an alpha-less image format). Change-Id: I316cefce8f21797feedebfbf98296ad84eaa4b99 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> (cherry picked from qt/c309d424f45dc0e7b62fbbbabf20dbfe355f48a7) Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | | | | | Save grayscale palleted images to grayscale pngSergey Borovkov2012-11-091-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While Qt does not support grayscale images explicitly it makes sense to save palleted images to grayscale png when possible for better compression and compatibility as opening and saving grayscale images now converts them to palleted Change-Id: Iab7c5a5a9d24b9352f5a7bafe04824a97d2463d9 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | | | | | Simplify and speed up OpenGL framebuffer grabbing.aavit2012-11-091-54/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If possible, let glReadPixels() itself provide the pixel format that QImage requires, so we can drop the pixel manipulation afterwards. Change-Id: I6c9226003c15d49548fa00696f31d0b2e26c0783 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | | Return appropriate currentContext() in platform's makeCurrent().Samuel Rødal2012-11-082-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way the platform plugin can use convenience classes such as QOpenGLFramebufferObject in the makeCurrent() implementation. Change-Id: I1fb5f6b8ec094ff39454adbeca9eb0d1a8f43ee6 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | | | | Relax QOpenGLContext::swapBuffers() conditions.Samuel Rødal2012-11-081-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to force the context to be current and the correct FBO to be bound when swapBuffers() is called, as this can easily be handled on a per-platform basis. Change-Id: I7af5a082d6a2b03dfa2cdc874c27617139a781a9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | | | | | Accessibility: Make accessibleInterface() in event virtual.Frederik Gladhorn2012-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function can then be used by webkit in a different way. Change-Id: I2e4c0570b5fc446114f63b3dc43e3c4505bcad79 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | | | | | Accessibility: Warn if an event cannot create an interface for some reason.Frederik Gladhorn2012-11-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I87d0290286243f8ead114e238798c9a7b882d978 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | | | | | Temporary backwards-compatible QWindow::setPos accessorsShawn Rutledge2012-11-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be reverted after I19c00b54b1d2712f9418e8bcf56e35a8008b89ef and and Ibd5cd10814c8cbd2b1f6e49b70782c7768d2366d are both integrated Change-Id: I2e14d732cc7fc4168e8b4507a050f43f1e4c9e49 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | | Remove QWindow pos, geometry and size as properties; pos->positionShawn Rutledge2012-11-083-25/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Abbreviated properties are to be avoided. But all 3 of these properties are redundant from the QML perspective; and because QRect, QPoint and QSize are (wisely) not QObjects, it's not possible to bind to _their_ properties, which make these QWindow properties less useful than users might assume that they are. Change-Id: I19c00b54b1d2712f9418e8bcf56e35a8008b89ef Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | | Temporary backwards-compatibility window propertiesShawn Rutledge2012-11-071-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are intended to exist only during the integration of patch Ie4424ec15fbdef6b29b137f90a2ae33f173edd21, so that it will be possible to build the other modules. Then it will be reverted after the property renaming is propagated to all the other modules. Change-Id: I8d0c0774e685a728a98e8c866d95c606c927ff46 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | | Rename all QWindow properties that have "window" in themShawn Rutledge2012-11-074-100/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | windowTitle, windowModality, windowIcon and so on are named that way to be similar to the ones in QWidget. However QQuickWindow inherits all of the declared properties, and we would like to have shorter property names in QML. If you are working with a Window then it's obvious the title property is the window title. Unfortunately, there must be patches in many other modules which depend on this one. In order to avoid the need to merge them all at the same time, there is also patch https://codereview.qt-project.org/#change,39001 which temporarily adds backwards-compatible accessors, which can be removed after the other modules are able to build without them. We should not rename windowState to state, because in QML, state usually drives the state machine for animation transitions etc. (although QWindow is not an Item, a user might get confused about it). Related patches are https://codereview.qt-project.org/#change,39001 https://codereview.qt-project.org/#change,37764 https://codereview.qt-project.org/#change,37765 https://codereview.qt-project.org/#change,37766 https://codereview.qt-project.org/#change,37762 Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | | qpa: Fix rendering issue in blitter engine (negative scaling factors)Julien Brianceau2012-11-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A 180° rotation results in a TxScale QTransform with negative scaling factors (x=-1.0 y=-1.0). This is not properly handled by blitter paint engine yet, so use software rendering fallback in this case. This rendering issue can be seen when using "-webkit-transform" CSS property in WebKit with DirectFB QPA platform. Change-Id: Iee496b6bf0c90ffe36c4235ceaa2c80f296b2ca4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | | Don't include qaccessible.h on QT_NO_ACCESSIBILITYKevin Funk2012-11-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1da4036c211172a72b73440648f4ff9ede761a69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | | | Fix native RGB text on OpenGL ES 2 without BGRA extensionEskil Abrahamsen Blomfeldt2012-11-062-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Angle, for instance, which is now the default on Windows, does not support the GL_BGRA_EXT format as input for glTexSubImage2D(). In the case where it's not detected, we therefore need to flip the bytes in the input. Change-Id: Ibe78d0223e3c2c39cb1943cdcf67103044d00aa7 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | | Fix QAccessible to build when QT_NO_ACCESSIBILITY is definedJ-P Nurmi2012-11-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6104633cdc80425b8f4697acd28c9a156cd0d76f Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | | | | | Fix conditional jump based on an uninitialized variable.Jędrzej Nowacki2012-11-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Valgrind warns about the jump in qfontconfigdatabase.cpp:522 based on uint QFondDef::hintingPreference:2 property. Surprising thing is that the property is initialized in the default constructor, so there should not be an issue. The warning disappear if the property is _not_ placed on a boundary of a two words, or if bit field is fully initialized. So I suspect that only one bit of the two was initialized properly. I decide to implement both solutions because of a potential minor performance improvement, during reading the property. I still fail to say why the value was uninitialized, I believe that this patch simply workarounds gcc bug or valgrind bug. Change-Id: I2e87738f66a435ef6e30b3d2db6baa73da025426 Reviewed-by: Jiang Jiang <gzjjgod@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | | | | Add implementations of QAIM::sibling in public APIs.Stephen Kelly2012-11-022-0/+10
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2248641f2ed8735c28bd9572470520995a4a5b62 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | | Added MultipleWindows platform capability.Samuel Rødal2012-11-022-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several platform plugins, like eglfs, kms, etc don't support multiple windows as there's no system compositor, they're rendering directly to a single back buffer. By adding a platform capability we'll be able to provide better error reporting when an application tries to create multiple QWindows on a single-window platform. Also, QML apps can use this capability to figure out whether they should create a QWindow for dialogs / popups / menus, or whether to just create items in the same scene, that are shown on top of the rest of the content. Change-Id: I15b8d21ee2bc4568e9d705dbf32f872c2c25742b Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* | | | | Introduced QWindow properties {min/max}imum{Width/Height}Samuel Rødal2012-11-023-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are useful when QWindow is exposed to QML. Change-Id: I7ec49ef365183e2c784605889e8ea22c2ef34781 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | | | | Remove a couple of unused variables.Miikka Heikkinen2012-11-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I33528cdb27801317d311d39e4499d2db6a291377 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | | Strip trailing whitespace in itemviews.Stephen Kelly2012-11-011-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using git ls-files -z | xargs -0 sed -i 's/ \+$//' in the relevant directories. Change-Id: I861ef9952fb32ed2db9ec8b67864ec7d0d61f0f2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | | | Remove #ifndef QT_NO_ACCESSIBILITY around qaccessible.{h,cpp}Jan Arve Saether2012-11-012-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jens has an use-case for using accessibility from styles. By making the enums always available regardless of QT_NO_ACCESSIBILITY, it makes the style code less littered with ifndefs. It should (ahem) also solve the problem where Qt Desktop components does not compile if QT_NO_ACCESSIBILITY is not defined. This happens on some linux distros, since atspi-2-dev is not installed by default, which again causes grief for those affected. Change-Id: I15d65df8c752a0c4af37cc7b4d908a757cb6a9c4 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | | | | Pixel-align vertical metrics in QTextLayout againEskil Abrahamsen Blomfeldt2012-10-302-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid regressing due to de58eb64bc564fcb8af61a45576783e432d2380c, we need to return a pixel aligned height in QTextLine::height() and also use pixel aligned heights when calculating the position of lines as well as the bounding rect of the layout. Later, we can add a QTextLine::naturalHeight() or something like that which gives the fractional value, but until then, we need to access private API in QPainter to get the correct alignment, since we still don't want to align the height of the last line in the layout, we only want to align the origin of each line. Task-number: QTBUG-27740 Change-Id: I12325f07d33aaf1a1b967e0a11492759d0f565d9 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | Send leave to most recently entered window when modal dialog is shown.Miikka Heikkinen2012-10-303-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a modal dialog was shown as a response to button click, the button retained its hover highlight, because it didn't get leave event. Fixed by tracking the most recently entered window and sending a leave to it when modal dialog is shown that blocks it. Also modified tst_QGuiApplication::modalWindow() autotest to check for enters and leaves. Task-number: QTBUG-27644 Change-Id: I387647e18a762a39d523e3df31221b9583a39f9d Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | | | QSyntaxHighlighter: minor code de-duplicationKonstantin Ritt2012-10-291-25/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The (r.start != -1) case is equal to (i == formatChanges.count()) case in the loop; no need to exit the loop just to do exactly what it did. Change-Id: I4129d8012399895c2fce70b26716ca5aeadee79c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | | | QFontEngineMulti: Fix possible crash in stringToCMap()Konstantin Ritt2012-10-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in case when the layout is partially initialized. We shouldn't access any data except of indices if GlyphIndicesOnly flag has been passed in. Change-Id: I264689b498e0f9de8b5c040d47dbae4f6ef391c4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | | | Remove some dead code in switch statementsSergio Ahumada2012-10-293-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the Code Style described in http://qt-project.org/wiki/Qt_Coding_Style#e289ee44592e9c32d4212069f0806daf There is no need for a 'break' after a 'return'. Change-Id: I1eca350391a7e4e14e504d60b24b69982cc5ac47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>