summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add "make docs" targets for libraries.Casper van Donderen2012-05-091-0/+3
| | | | | Change-Id: I249c238f4986f443f84aaa6a3ac4ce102abff4db Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Doc: Modularize QtGui documentation.Casper van Donderen2012-05-09221-156/+6157
| | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: I5f86f598fbe7c47d632c613b85d94ced89ba2c29 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Implement QWindow::resize(int, int) by calling to resize(QSize).Friedemann Kleint2012-05-041-1/+1
| | | | | | | | | The old implementation called setGeometry() clearing the positioning policy flag. Change-Id: If8226f86481318e772fba37c2c195037c3d955b0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Avoid glyph rendering with FT when not neededJiang Jiang2012-05-042-7/+25
| | | | | | | | | | | | | | | | If we only need to access the font metrics (like in scenegraph) for layout, we don't need to render glyphs with FreeType at all. Increase cached linearAdvance to 22 bits so that no overflow will happen: FreeType returns 16.16 fixed point linearHoriAdvance, but QFixed is 26.6, we store glyph->linearAdvance = linearHoriAdvance >> 10 Apparently 'short' is not enough since it's only 16 bits. Change-Id: Id14eafa19f01a687de11997526281f9e7e860482 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Load resources in in QTextDocument correctlyLars Knoll2012-05-042-20/+14
| | | | | | | | | | | | | | | In Qt 4, we loaded resources through the QTextEdit or QTextControl if they were the parent of the document. Modularization for Qt 5 broke this, as we can't cast the parent to a QTextEdit anymore. The fix is to make the loadResource() methods in QTextControl and QTextEdit invokable and discover and invoke them at runtime on the parent object. Task-number: QTBUG-25116 Change-Id: Iba04bc16849b0c5ddcd275f12d1a386a8fe591bf Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* removed unneccessary wince ifdefBjoern Breitmeyer2012-05-041-2/+0
| | | | | | Change-Id: I4b057c0ae266baae3e8c3675656abb361bfcacf4 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Allow the QPA plugin arguments to contain non-ASCII.Thiago Macieira2012-05-042-2/+2
| | | | | | | Who knows what we might need them for in the future? Change-Id: Ic68e04aea6cb26afb0ed98684bbb37a62c111638 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Add setCursor API to QWindowLaszlo Agocs2012-05-043-0/+81
| | | | | | Change-Id: Id430ea9c94475356c9367a135f678f5f9ef795fc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change QString::toAscii to toUtf8 in the embedded filename in XBM.Thiago Macieira2012-05-041-3/+3
| | | | | Change-Id: Iea32f30ac71b35c2792e2523400811fa54c804dc Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtGui]Thiago Macieira2012-05-042-9/+9
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I2850033159508ebb1ff7564e15b99a146dbee94c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Compile.Morten Johan Sorvig2012-05-041-2/+2
| | | | | | | | | | Clang is picky about the missing QT_FASTCALL and cant't find the base fetchPixel/storePixel template function. Change-Id: I7c0c14835b3d428f8f95961dc603d809511d7165 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make cupsTempFile member unconditianol.Christoph Schleifenbaum2012-05-041-2/+0
| | | | | | | | | | | | QPdfEngine has to have the same member everywhere. Otherwise QPdfEngine and QPdfPrintEngine are compiled with different flags (-DQT_NO_CUPS) -> QString cupsTempFile is only in QPdfEnginePrivate in one lib -> crash. Task-number: QTBUG-25553 Change-Id: I1d23bd14b8e68c212225ac773675a3b1bd2ca6cb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove some remnants of Symbian code in src/gui/paintingThiago Macieira2012-05-031-9/+1
| | | | | | | | | Those files don't exist anymore. They were removed in d1a2b53aaf76f48e195260a415ca406fa1ef01a2. Change-Id: Id20203c5671eec8bff74fb76b8baf6b2fecb7c5b Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-038-189/+49
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/gui/kernel/qguiapplication.h src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow.h tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
| * Stop using QEventPrivate::d in QWindowStateChangeEventThiago Macieira2012-04-202-13/+4
| | | | | | | | | | | | | | | | We can add a boolean and avoid using the d pointer (which QEvent now checks to be unused). Change-Id: I7367d5410d10ed06441fe9037cac0e3473d62498 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Remove private classes in QEvent-derived classes.Thiago Macieira2012-04-193-150/+30
| | | | | | | | | | | | | | | | | | | | | | QEventPrivate doesn't exist, so these classes were technically abusing the d pointer. Move the contents of the private classes into the main event classes. Change-Id: If2e894c1fa05f468221a0b43f3ebdf90769298eb Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Remove QVariant constructor taking Qt::GlobalColor.Jędrzej Nowacki2012-04-191-9/+0
| | | | | | | | | | | | | | | | The constructor is wrong, it creates instance of QVariant encapsulating a QColor instance. QVariant should not implicitly convert data, never. Change-Id: Idc794ecdecb42d8b53fee3f993bf51ddd43f595d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * api: remove QWindow::visible()Girish Ramakrishnan2012-04-182-11/+0
| | | | | | | | | | | | | | | | | | | | | | The correct api is QWindow::isVisible(). Removing the api is safe since QWindow is not even released yet. Only qtdeclarative needed to be fixed with 71c8fe296fe5aa7e79033dd8f5b539852d4276e0. Change-Id: Ie571ed4802fe89132419e402acdb854446f4578f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * api: QGuiApplication::inputMethod should be staticGirish Ramakrishnan2012-04-182-6/+14
| | | | | | | | | | | | | | | | | | Pretty much all methods in QGuiApplication are static. Also adds documentation. Change-Id: I96808dd266922432b92fe3962292e4d5b6a8ab46 Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
| * Hide QTypeModuleInfo in a private namespace.Jędrzej Nowacki2012-04-181-1/+1
| | | | | | | | | | | | | | The class is private and shouldn't pollute global namespace. Change-Id: Ib44473fd72e5a70096eeff1662e88b29263d19c6 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | fix documentation for QKeySequence::StandardKey "What's This"stockton2012-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | add apostrophe and double-quotes. Task-number: QTBUG-25545 Change-Id: Ib79953731953166ff7d8b999fee6571e62d86d01 Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | Allow creation of QOpenGLShaderProgram without a current contextSean Harmer2012-05-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change prevents the qWarning() in QOpenGLFunctions from being triggered when creating a QOpenGLShaderProgram object without a current QOpenGLContext. This is a common case especially when the shader program is a member variable of a class. It now relies upon the QOpenGLShaderProgram::init() function to resolve the GL function pointers when the shader program is first used which of course should be done with an active context. Change-Id: Ib7dc345593f2a70d72ef8f650151cc90001058ca Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Initialize QOpenGLFunctions before using it in QOpenGLShaderProgramSean Harmer2012-05-021-0/+1
| | | | | | | | | | Change-Id: I472e97092b05f1721b7df5759d674c213d6018c6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Fix compilation of public headers with QT_NO_DEPRECATED definedOlivier Goffart2012-05-029-29/+36
| | | | | | | | | | | | | | | | | | | | Put the functions in QT_DEPRECATED_SINCE if possible QPluginLoader::staticInstances is not documented as deprecated, and do not reference any alternative use. So I unmarked it as deprecated. Change-Id: I556c3f3657fb0490dd5543fcc56718fe9bd394e7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* | Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | qVariantValue and qVariantCanConvert are Compatibility members, while in Qt4.8 they are marked as Qt 3 Support Members. qVariantFromValue and qVariantSetValue are Obsolete members. Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Fixed QtGui and QtPrintSupport with -qtnamespace and MSVCRohan McGovern2012-05-021-1/+1
| | | | | | | | | | | | | | | | With this compiler, external functions declared inside other functions will end up in the wrong namespace. Change-Id: Ia37283d632dbc2ee0c269aeffa1f045b3e60148e Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* | Fix warning about narrowing inside {}Olivier Goffart2012-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | Such as qdialogbuttonbox.cpp:259:1: warning: narrowing conversion of ‘2147483650u’ from ‘unsigned int’ to ‘const int’ inside { } [-Wnarrowing] Change-Id: I00d66d96ef3af1a46935a58119668a20f8fd58c7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Reset pointer to 0 after freeingLars Knoll2012-05-011-1/+3
| | | | | | | | | | | | | | | | | | | | set m_textureResource to 0 after freeing it, to ensure we allocate a new one two lines below before using it again 5 lines below. Change-Id: Ib9c4de94aefed91f15d0fab0cd3c774a64f2f891 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Fix compiler warning in qdrawhelper.cppOlivier Goffart2012-05-011-12/+8
| | | | | | | | | | | | | | | | | | | | warning: always_inline function might not be inlinable [-Wattributes] Those function are only used in array of function pointers. They cannot be inlined. Change-Id: I82b10d82ac8915129dc8921b1a74d42d8547bc40 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Support all modality types in QPlatformDialogHelperBradley T. Hughes2012-04-301-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modality is not a boolean property in Qt. There are 2 types: window modality and application modality. Native dialogs can support both of these types as well (e.g. on Cocoa, a window modal file dialog should be displayed as a Sheet). Remove the QPlatformDialogHelper::ShowFlags enum and instead pass a Qt::WindowModality parameter to QPlatformDialogHelper::show_sys(). The Windows implementation has been updated to check for Qt::ApplicationModal instead of the ShowModal flag (since only Qt::ApplicationModal dialogs are blocking). The Cocoa implementation has been updated to only use non-modal and application modal native color and font dialogs (which restores Qt 4 behavior). These are shared Cocoa panels that cannot be shown as sheets, however. If the programmer asks for window modal color/font dialogs, we use the Qt versions, not the native ones. The file dialog can be shown either as a Sheet (but we need to pass an NSWindow parent for it to work properly) or as an application modal dialog. This change has been tested on Mac OS X with tests/manual/windowmodality. Change-Id: I9064987433895c55f68aac979ef8e8207fb24bbe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Remove unused private and protected members from QClipboardLaszlo Agocs2012-04-303-30/+0
| | | | | | | | | | | | Change-Id: I1d5ce0db4a9a6582629e2c0b74e9ab998b405788 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Get rid of most warnings related to QInputMethodLars Knoll2012-04-292-9/+14
| | | | | | | | | | Change-Id: Id0b1235a5dc209c5c06e0a64613364c89e733005 Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
* | Don't generate compiler warnings for using deprecated methodsLars Knoll2012-04-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | We need to construct QImageTextKeyLang objects for the deprecated method in QImage. That's impossible to do if we don't have a constructor for the class that's non deprecated. So add a private constructor and make QImage a fried of the class so it can use that constructor. Change-Id: I6359e9943fe031ed3dca85479ee9ec47ceaf776b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Get rid of some deprecation warningsLars Knoll2012-04-281-3/+3
| | | | | | | | | | Change-Id: I05e6f9479789652cc1536cb5bced2bc8fa664c84 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace QGuiApplication::activeWindow by focusWindow().Friedemann Kleint2012-04-273-3/+3
| | | | | | | | | | | | | | Fix deprecation warnings. Change-Id: I8d33aa8c035df6f5ef3fff6a402e980e43e03406 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Remove deprecation tags from QWheelEvent.Morten Johan Sorvig2012-04-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | 0df1c9f1 enabled deprecation warnings from Qt, causing warnings from QWheelEvent use. Using delta() and orientation() in new code is still not advised, but since QtWidgets uses them the "deprecated" tag is not suitable. Change-Id: I597e8ddf9fd2dc911d0e30044e96df744982ff81 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Fix workaround for image readers that can scale but not clipaavit2012-04-271-5/+1
| | | | | | | | | | | | | | | | | | | | | | If both scaling and clipping was requested from an image reader that only supports scaling, the code failed to apply the intended workaround (i.e. read normal and do clipping and scaling afterwards). Ref. the comment just above about "Only enable the ScaledSize option if ..." Change-Id: I273edba60bf9f785f2082aa8f236505ec3ce0776 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* | Implement inline downscaling in png reader, to save memoryaavit2012-04-271-60/+153
| | | | | | | | | | | | | | | | | | Instead of allocating and reading the entire image and then scaling it down, this code reads only one line at a time and scales it on the fly. Change-Id: I61fde307146c11dcd90ca617cc2e7f85dd3b66c4 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | get rid of Q_*_EXPORT_INLINE macrosKonstantin Ritt2012-04-263-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | > Girish: > We should be able to remove the macro completely today, > just mark all those functions as plain inline. > With Qt5, we don't have to worry about bc yet. this fixes "import attribute ignored" warnings on mingw with -fno-keep-inline-dllexport Change-Id: I616e5de7c8d59953ce03a316b941a439fae56298 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Do not map LayeredPane and Terminal to the wrong MSAA roleJan-Arve Saether2012-04-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microsoft did at some point extend the roles in MSAA with two extra roles (ROLE_SYSTEM_IPADDRESS and ROLE_SYSTEM_OUTLINEBUTTON). These are defined in oleacc.h as: #define ROLE_SYSTEM_IPADDRESS ( 0x3f ) #define ROLE_SYSTEM_OUTLINEBUTTON ( 0x40 ) This means that LayeredPane will map to ROLE_SYSTEM_IPADDRESS and Terminal will map to ROLE_SYSTEM_OUTLINEBUTTON, which is obviously wrong. We now reserve some valuespace for more roles to reduce the likelyness of any collisions in the future. Having the reserved area also serves as a way of indicating the boundary between the "MSAA" enums and other enums. Change-Id: Ic67a1a7200382fed3040e69b3e8856376ba642ac Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* | get rid of QT_NO_IMAGE_TEXT switcherKonstantin Ritt2012-04-254-41/+7
| | | | | | | | | | Change-Id: Ie72f907ffb959f629af6a414959348a992c4c941 Reviewed-by: aavit <qt_aavit@ovi.com>
* | support UTF-8 encoded file names in QZip*Konstantin Ritt2012-04-251-2/+9
| | | | | | | | | | | | Change-Id: Iba0457b55ef9fa3673f78b4d30d018a146e8fb1c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* | Using QLatin1String instead of QLatin1LiteralDebao Zhang2012-04-253-3/+3
| | | | | | | | | | | | | | | | QLatin1Literal is just a typedef of QLatin1String. Change-Id: If20ca225e57a7fb45a7775f0fc81aedb6da88c96 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add QDebug operator<< for QAccessibleEventJan-Arve Saether2012-04-242-0/+17
| | | | | | | | | | | | | | (Keep it internal) Change-Id: I9e99ccbd16cc595d2aff97a26181e8d8c3d9d7ae Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* | Don't use the QRegExp methods that modify the object [QtGui]Thiago Macieira2012-04-242-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp matching methods modify the object, which we don't want to. In particular, when we receive a QRegExp from the user or we store in a context that might require thread-safety, make sure we make a copy before using it. QRegularExpression has no such shortcoming. Task-number: QTBUG-25064 Change-Id: If119e06221ca99e57c5ad1a1d4cc6468e9f68c7b Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | Use the C99 keyword "restrict" in compilers that support itThiago Macieira2012-04-242-59/+61
| | | | | | | | | | | | | | | | | | | | This allows the compiler to produce better / smaller code due to not being required to deal with two pointers possibly aliasing each other. This also enables vectorisation where otherwise the compiler wouldn't be able to do. Change-Id: Ie7db3a54a1ba22f87ac5283d5c43905707957549 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Mark some functions as always_inline with GCC and ICC.Thiago Macieira2012-04-241-0/+3
| | | | | | | | | | | | | | | | These functions are too critical to be called. They should always be inlined. Change-Id: I698dc6d83e02c323759c6d066f17993340bd53a5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | QLocale: Clean up QLocalePrivate implementationJohn Layt2012-04-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt4 QLocalePrivate is a struct returned by a d() method. This will be unsuitable for the planned change to use ICU and may cause BIC issues. This change makes QLocalePrivate a class and creates a new struct QLocaleData to hold the data index. Further clean-ups are possible but are left for later. Change-Id: Ie316a07790f74674a3b520b735dff72695cc4060 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix compilation of QDesktopServices without deprecatedOlivier Goffart2012-04-232-5/+6
| | | | | | | | | | Change-Id: I9e225d32b3f7db403cf3eea6a277580b4b7410a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Retain bidirectional marks when eliding textEskil Abrahamsen Blomfeldt2012-04-201-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | When the text contains unicode markers for bidirectional text, these will not affect the width of the text, but they might affects its layout. Thus, we need to retain these markers in the elided text to avoid the layout of the string changing when its allocated width changes. Task-number: QTBUG-3768 Change-Id: I3866c32cd1dcd5fff2b8fa5b25ae89e551531a97 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>