summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Fix return value of WM_QUERYENDSESSION.Friedemann Kleint2014-02-101-1/+2
| | | | | | | | | | LRESULT should be non-zero if the application can quit, and it is always handled. Task-number: QTBUG-35986 Change-Id: Ic8b0ecc731d3efaf94e2a62491918d379fe59f5c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Print qCDebugs in arbitrary categories by defaultGiorgos Tsiapaliokas2014-02-103-25/+31
| | | | | | | | | | | The debug output of all categories will be visible by default, except from the "qt.*" categories. "qt.*" categories are private and their default debug output will be hidden. [ChangeLog][QtCore][Logging] Enable qCDebug's for all categories except qt one's Change-Id: Ibe147c8bbe0835a63b3de782288b9c3251321d8f Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Cocoa: Add setNSToolbar(QWindow *, NSToolBar *)Morten Johan Sørvig2014-02-106-0/+70
| | | | | | | | | | Calling this function associates the given native toolbar with the QWindow. QWindow will then set it on the native NSWindow at the appropriate time during window creation. Change-Id: I2a50f79b2a0453cc739f8d68e965e37b95998083 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Neuter -[QNSView cancelOperation:] for normal windowsGabriel de Dietrich2014-02-101-0/+6
| | | | | | | | | | QNSWindow inherits QNSPanel regardless of the kind of QWindow. With NSPanels, pressing escape is equivalent to dismissing the panel. That is not the behavior we aim at for normal toplevel QWindows. Task-number: QTBUG-36694 Change-Id: I1a1c138183cc43c968249442021f334cd37f7ce0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Export optimized premultiply and unpremultiply methodsAllan Sandfeld Jensen2014-02-1013-98/+168
| | | | | | | | | | | | | | | | This patch optimizes the unpremultiply method further by using a lookup table to avoid any divisions at all. The opportunity is taken to export both premultiply and unpremultiply since they are commonly used methods relevant to the exported QRgb type that can be both premultiplied and unpremultipled ARGB. [ChangeLog][QtGui][QColor] Exported highly optimized methods for premultiply and unpremultiply of QRgb values. Change-Id: I658bcf57b0bc73c34c1765b64617d43b63ae820b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* WinRT: Fix use of std::thread in QThreadAndrew Knight2014-02-101-4/+4
| | | | | | | | Don't delete the thread object without detaching it, use detach() instead of CloseHandle(), and avoid a double-delete. Change-Id: Ia169a96fb32805e06abe099c3c35e97ce485f088 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* QOpenGLTextureBlitterJorgen Lind2014-02-108-2/+787
| | | | | | | | | | | | | | | | private api, but useful for 2d gui code that suddenly finds itself needing to get a set of textures onto some fbo I didn't want to include ARB_copy_image since it looks like its from texture/renderbuffer -> texture/renderbuffer while this class implies texture -> write fbo. We could wrap ARB_copy_image in QOpenGLTexture or some other class or we can add it later. I have not added any QOpenGLTexture functions since this class opperates on the GLuint identifier. We can add overloads later. Change-Id: I3e565b33466c1c183a249a33c3e82c6786debd55 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* EGL convenience: Guard Linux-specific code with Q_OS_LINUX.Raphael Kubo da Costa2014-02-101-3/+3
| | | | | | | | | | | Instead of "blacklisting" Unix platforms that don't have Linux headers, do the opposite and check for Q_OS_LINUX in the framebuffer code that has Linux-specific code. This should help fix the build on other Unices, such as the BSDs. Change-Id: Icb6edf34bb20c9a98843b6dc0e2a87ee71fcd046 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Improve the code generation for the Latin1 codecThiago Macieira2014-02-101-59/+74
| | | | | | | | | | | | | | This change does not modify the actual algorithm implemented. It only updates the source code so that the code generation is more optimal: - change only one variable per loop (the "offset" variable) - unroll the tail expansion of the last 15 characters The Neon code for the toLatin1 codec most likely benefits from the unrolling of the tail too, but I can't verify that I haven't broken anything. Change-Id: I8a92fd3c1aa700e6f8b0c8ebdb1978ade394757f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Do not set input focus if WM supports _NET_ACTIVE_WINDOWMartin Gräßlin2014-02-091-2/+3
| | | | | | | | | | | | | | | | In case the window manager supports _NET_ACTIVE_WINDOW a client message is sent to the root window and the window manager is expected to either activate the window or mark it with demands attention. In addition the code unconditionally also called xcb_set_input_focus which breaks the intention of sending the client message. Thus it is now only done if the WM doesn't support the protocol. This was also the logic in Qt 4.x in QWidget::activateWindow (qwidget_x11.cpp). In addition set_input_focus is only called if the window is a toplevel. Change-Id: Iec4c02f0ea62db30a4b347d474fdfd2f05b8895b Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Make xcb compile with X-less EGL implementationsLaszlo Agocs2014-02-094-1/+93
| | | | | | | | | | | | On platforms like the Raspberry Pi the EGL implementation is not compatible with X. This means that while EGL and Open GL ES can be enabled, and will work fine with platform plugins like eglfs, EGL (and thus GL) should be automatically disabled in xcb, otherwise a compilation error will occur since xcb assumes the native handle types are the corresponding Xlib types. Task-number: QTBUG-36551 Change-Id: I2cc4c558abb4b25d422a2c01da9b75b865ace402 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* QFontEngineBox: Fix assertion for code points beyond BMPKonstantin Ritt2014-02-091-6/+5
| | | | | | | | | ...due to a typo introduced in d8225fab8fb8b21fb5d and stricter checks introduced in 4e319ca4c47a99295c1. This uses recently added QStringIterator to decrease the code duplication. Change-Id: Ib1c2519db1c4d65f3ac14e6f9ae3fa272860b1dd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cocoa: Simplify native view access.Morten Johan Sørvig2014-02-084-7/+20
| | | | | | | | Use NSWindow and NSView accessors on QCocoaWindow instead of QGuiApplication and nativeResourceForWindow. Change-Id: Iabee1e42dd119726d932f89c66a90810463d70db Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Remove duplicate enum.Morten Johan Sørvig2014-02-081-5/+1
| | | | | Change-Id: I8a3b700710a1c47a31ddeed59ef73f1032ee7d09 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix checking of category for printf-style qCDebugKai Koehne2014-02-081-0/+2
| | | | | | | | | | | Fixes an issue introduced in b8a38a6737a. We forgot to check for category validness, and printed qCDebug(c, ""...) unconditionally for compilers not supporting variadic macros. Change-Id: I779a97dacd7ea559f0d91473aad2c29e73ea2f89 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* eglfs: Put Linux-specific includes within Q_OS_LINUX guards.Raphael Kubo da Costa2014-02-081-0/+2
| | | | | | | | This should fix the build on platforms like the BSDs, where linux/fb.h does not exist. Change-Id: Ia06403d71c3aaa0e177c85dcefa7986647777ae0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Automatically link printsupport plugins to static applications.Friedemann Kleint2014-02-085-3/+28
| | | | | | | | | | | | Add the required printsupport plugins to the QTPLUGIN variable as is done for the QPA plugin. [ChangeLog][QtPrintSupport] Made the Qt buildsystem automatically include the necessary plugins so that static applications can print. Task-number: QTBUG-29663 Change-Id: I0e2e3b0f25dd5714bd187711c85893926b0c4e85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Post drag events for the window on which the drop site was registered.Friedemann Kleint2014-02-082-18/+6
| | | | | | | | | | | | | Remove findDragOverWindow(); no longer try to find the window under cursor since that would require synthesizing drag leave events. This is left to the DnD handling of QWidgetWindow, which searches the child which accepts drops. Task-number: QTBUG-33635 Change-Id: I844041bb862bb0382147be4e28f880a26843c453 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows: Refactor code registering/unregistering drop sites.Friedemann Kleint2014-02-082-36/+43
| | | | | | | | | | | | | | Only top level windows of certain types should be drop sites. Add code to update drop site registration to setParent(). This ensures the drop site is unregistered for example when winId() is invoked on a parentless widgets which is later inserted into a layout. Task-number: QTBUG-33635 Change-Id: Ia3161ecd59753f3f39d2a5967e9cb922cf0b9203 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QWindow: reduce a bit of code duplication.David Faure2014-02-082-7/+12
| | | | | | | | Makes it easier to add code in the future too. No-op change. Change-Id: I228c36813ccf8ee95ed4b6cbbc20af3178d1b84a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Support --option in addition to -option for all builtin Qt commandline options.David Faure2014-02-084-13/+17
| | | | | | | | | | | | | | In addition to being more common and consistent with QCommandLineParser, this will make it possible to add the documentation for these options in the QCommandLineParser-generated help output. [ChangeLog][General] Builtin command-line options such as -reverse, -session, -style etc. now all support double dash, e.g. --reverse, --session, --style... Change-Id: Ia2e22c854ccc6a9d7b863b1234317005bc822191 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Compile.Morten Johan Sørvig2014-02-081-0/+1
| | | | | Change-Id: Ib0e7e7aa2964835afda4055a5fe76abbd5db84e3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Option handling.Morten Johan Sørvig2014-02-083-2/+47
| | | | | | | | | | | | | | | | | | | | Add qt_mac_resolveOption(). Support setting options using either an environment variable or a QWindow property, with a default fallback value. The options are resolved with precedence in the mentioned order. Adds options for the following: NSView setWantsBestResolutionOPenGLSurface NSVIew setWantsLayer NSOpenGLContext NSOpenGLCPSurfaceOrder The window properties use the _q_mac_camelCase format. The environment variables use the QT_MAC_ALL_CAPS format. Change-Id: I1978a02d62e107a2120d81ffdd0f7b32f7731644 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Make QStringBuilder use our qt_from_latin1 code (out-of-line)Thiago Macieira2014-02-082-5/+14
| | | | | | | | | Disassembly shows that the compiler does not perform the zero-expansion by itself. It always opts to copy byte-by-byte, which is not very performant. Change-Id: I08780902461d9e3e6b7b54298f41d1eca61339c4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fallback to QWidget::grab() if QScreen::grabWindow() fails.Jan Arve Saether2014-02-071-62/+57
| | | | | | | | | | | | | | | | | | | QScreen::grabWindow() is not always reliable because it grabs from the framebuffer. (The window might then be covered by other windows, e.g. "Stays on top"-Windows, popups etc). If QScreen::grabWindow() fails we therefore fallback to QWidget::grab(). This will not grab from the frame buffer, but it will ask the widget to render itself (with its current state) to a pixmap and return it. QWidget::grab() should usually return the expected pixmap, and the pixmap it gives is not subject to the state of the window manager. This means that both QScreen::grabWindow() *and* QWidget::grab() must produce an unexpected pixmap in order for the test to fail. Change-Id: I276554155bb1e5b510d2a2d43628d91669464fe2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Windows file dialog: Clean up thread manually.Friedemann Kleint2014-02-072-4/+29
| | | | | | | | | | Do not use deleteLater() to delete the thread. Task-number: QTBUG-36357 Change-Id: Ie7c87b92a7c73d5fbac01d4951d387ee2facd05c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* widgets/mainwindows/mainwindow example: Use mouse release event for dock title.Friedemann Kleint2014-02-072-2/+2
| | | | | | | Task-number: QTBUG-36364 Change-Id: Ie3352c8e72a636aee2099ca3138eb0ac77425e7e Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fixed initialization of QPrintPreviewDialog's image resources for static builds.Friedemann Kleint2014-02-071-0/+11
| | | | | | | | | [ChangeLog][QtPrintSupport][QPrintPreviewDialog] Fixed initialization of QPrintPreviewDialog's image resources for static builds. Task-number: QTBUG-36561 Change-Id: Ibb725e7d0cd647b904371db2601161c756b99f53 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Windows: Fix broken debug statement in qwindowsglcontext.cpp.Friedemann Kleint2014-02-071-1/+1
| | | | | Change-Id: Ifb26a7bb4461a88831459a17092944b068842d3e Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Correctly manipulate tm_gmtoff the way qt_timezone() needs.Raphael Kubo da Costa2014-02-071-1/+11
| | | | | | | | | | | | | Follow-up to 91d3298: qt_timezone() expects the number of seconds west of UTC, whereas tm_gmtoff returns the number of seconds east of UTC, and contrary to the timezone variable it is not oblivious to DST. We have to account for those two facts and make sure we return a value compatible with what timezone would have. Change-Id: Iacb9077f50d4c847ac09e5a7e952d0e4cd22da1b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOpenGLTextureHelper: explain why we use GetProcAddress on Windows / DesktopGLGiuseppe D'Angelo2014-02-071-0/+3
| | | | | | | | | | | | In the future, we might want to refactor this code to inconditionally use the common Desktop / ES2 subset (like the rest of Qt does), and then resolve only the functions actually available at runtime. For now, state why we're doing that on Windows. Change-Id: Ic21035bcd88ddc1d9274fd90a146c2824d783b25 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTexture: fix support for 1D texturesGiuseppe D'Angelo2014-02-072-12/+30
| | | | | | | | | OpenGL ES 2 doesn't support 1D textures. So introduce a proper feature flag and warn if we try to allocate one there. Change-Id: I73cf58c1f257d2472564f45bff222231e39aca52 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTextureHelper: fix 3D texture support on ES2Giuseppe D'Angelo2014-02-071-14/+17
| | | | | | | | | | | | | | | | | | The code first tried to check for the GL_OES_texture_3D extension, and if present it resolved the pointers to the gl*Tex*3DOES functions. But then it overwrote those pointers by attempting to resolve the Desktop GL gl*Tex*3D functions, thus making them unusable. So, if the extension is found, don't overwrite the pointers. If the extension is NOT found, keep the general behavior of still trying to resolve those functions. (That is going to fail, but refactoring the general behavior belongs to a separate commit.) Change-Id: Idaba122cf9500f136e3f79284d3c82284257036d Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTextureHelper: add a clarifying commentGiuseppe D'Angelo2014-02-071-1/+3
| | | | | | Change-Id: Ia27fd6616b2259b3fbe71ea8737b270c323a1256 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* glxconvenience: Add a QT_XCB_FORCE_SOFTWARE_OPENGL environment variable.Kevin Kofler2014-02-071-0/+29
| | | | | | | | | | | | | | | | | | | | | The QT_XCB_FORCE_SOFTWARE_OPENGL environment variable is equivalent to LIBGL_ALWAYS_SOFTWARE for Qt 5 applications only. This is most useful with drivers that only support OpenGL 1. We need OpenGL 2, but the user probably doesn't want LIBGL_ALWAYS_SOFTWARE in OpenGL 1 apps. Together with http://pkgs.fedoraproject.org/cgit/qt5-qtbase.git/tree/10-qt5-check-opengl2.sh which goes into /etc/X11/xinit/xinitrc.d, it makes QML 2 just work on old hardware that supports only OpenGL 1.x in hardware. The scriptlet checks the glxinfo output for the OpenGL version and sets QT_XCB_FORCE_SOFTWARE_OPENGL if the major version is < 2. (The scriptlet requires xorg-x11-xinit and glx-utils.) Tested on a Radeon 9200 SE (RV280) that supports only OpenGL 1.3 in hardware. Change-Id: Ief80d283820d6336052b8f390a0030ba9b687492 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Optimize stringToCMap() usageKonstantin Ritt2014-02-0710-136/+246
| | | | | | | | | | | | CMAP guarantees there is 1:1 mapping between the Unicode code points array and the glyph indexes array, which means the QString length always greater than or equal to a sufficient glyph indexes array length. Simply add some asserts and improve the memory consumption and the performance where possible. Change-Id: I0bc8cdba5f86c1c0ba9e79c8d5f96cbe56ec463e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* WinRT: Use correct architecture values in manifests and vsOliver Wolff2014-02-077-3/+9
| | | | | | | | | | | | | | | Using the same architecture value in VC Project and manifest files only makes sense for x64. Instead of doing magic we just set the correct values inside the mkspecs. VCPROJ_ARCH is used for Visual Studio, while the manifests use WINRT_MANIFEST.architecture. WINRT_MANIFEST.architecture was added to x64 mkspecs for consistency and phone mkspecs do not use WINRT_MANIFEST.architecture so it does not have to be set there. Change-Id: I009473104875b4add8c0530dc6f51177919e997b Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* qmake WinRT: Default to x86 for lib pathAndrew Knight2014-02-071-0/+2
| | | | | | | | | If VCPROJ_ARCH is not recognized or unset, make "arch" default to x86, or link won't find the libs. Change-Id: If2cbda37a80c0fa43e1464775c036cebf10f931a Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QUtfCodec: don't encode invalid UCS-4 codepointsGiuseppe D'Angelo2014-02-071-8/+9
| | | | | | | | | | | | | | | | | | | The code didn't check for malformed surrogate pairs. That means that - high surrogates followed by *anything* were decoded as they formed a valid surrogate pair; - stray low surrogates were returned as-is. We can't return surrogate values in UCS-4, so properly detect these cases and return U+FFFD instead. [ChangeLog][QtCore][QTextCodec] Encoding a QString in UTF-32 will now replace malformed UTF-16 subsequences in the string with the Unicode replacement character (U+FFFD). Change-Id: I5cd771d6aa21ffeff4dd9d9e5a7961cf692dc457 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix QString::toUcs4 returning invalid data when encountering stray surrogatesGiuseppe D'Angelo2014-02-072-24/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code units 0xD800 .. 0xDFFF are not UCS-4, so we can't happily return them. Instead, if we encounter a stray surrogate, replace it with 0xFFFD, which is what Unicode recommends anyhow. References: §3.9 Unicode Encoding Forms D76: Unicode scalar value: Any Unicode code point except high-surrogate and low surrogate code points. As a result of this definition, the set of Unicode scalar values consists of the ranges 0 to D7FF_16 and E000_16 to 10FFFF_16, inclusive. [...] UTF-32 encoding form: The Unicode encoding form that assigns each Unicode scalar value to a single unsigned 32-bit code unit with the same numeric value as the Unicode scalar value. § C.2 Encoding Forms in ISO/IEC 10646 UCS-4. UCS-4 stands for “Universal Character Set coded in 4 octets.” It is now treated simply as a synonym for UTF-32, and is considered the canonical form for representation of characters in 10646. § 3.9 Unicode Encoding Forms (Best Practices for Using U+FFFD) and § 5.22 Best Practice for U+FFFD Substitution Whenever an unconvertible offset is reached during conversion of a code unit sequence: 1. The maximal subpart at that offset should be replaced by a single U+FFFD. 2. The conversion should proceed at the offset immediately after the maximal subpart. [...] Whenever an unconvertible offset is reached during conversion of a code unit sequence to Unicode: 1. Find the longest code unit sequence that is the initial subsequence of some sequence that could be converted. If there is such a sequence, replace it with a single U+FFFD; otherwise replace a single code unit with a single U+FFFD. 2. The conversion should proceed at the offset immediately after the subsequence which has been replaced. [ChangeLog][QtCore][QString] QString::toUcs4 now does not return invalid UCS-4 code units belonging to the surrogate range (U+D800 to U+DFFF) when the QString contains malformed UTF-16 data. Instead, U+FFFD is returned in place of the malformed subsequence. Change-Id: I19d7af03e749fea680fd5d9635439bc9d56558a9 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor and remove dead code, add property caching.Lorn Potter2014-02-077-2013/+606
| | | | | | | This helps with a flood of dbus messages due to properties. Change-Id: I7aa9d36a077d84a88dab561d007d597b0780e096 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Fix compilation after b0afad8f0b6a3be7ab3a23e063b0201cd68ada95Thiago Macieira2014-02-071-0/+4
| | | | | | | | | That commit made QString::toXxx (8-bit) functions use C++11 ref qualifiers, so we need to match it here. Change-Id: I45b50464d36f858d012b12e0cb511aae347ddb6f Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Long live QStringIterator!Giuseppe D'Angelo2014-02-077-0/+1315
| | | | | | | | | UCS-4 iterator over a QString. Kept private for now so we can still work on the API. Done-with: Thiago Change-Id: I377f8bb1921e591ee3292c08c3e097fb6bc7f0c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPA: Introduce QPlatformWindow::normalGeometry().Friedemann Kleint2014-02-076-12/+61
| | | | | | | | | | | | | QWidgetWindow stores the normal geometry obtained from the widget when transiting to other states. This does not work reliably on Windows, where this geometry is already that of the new state. Instead, introduce QPlatformWindow::normalGeometry(), add implementation for Windows and use that in QWidgetWindow. Task-number: QTBUG-21371 Change-Id: I3819ebaf55b4e7d2f7eef1affe6c20712ba45d7c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add QString::fromUtf16 with char16_t and fromUcs4 with char32_tThiago Macieira2014-02-072-3/+47
| | | | | | | | Because they make sense. I'm even thinking that the char16_t version should get a QString implicit constructor. Maybe both encodings. Change-Id: Ifffc61dd890795fbbbd5f7cb5efb3e6287d1270e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Force surface repaint after is (re)created.BogDan Vatra2014-02-071-0/+1
| | | | | | | | | Every time when a surface is (re)created we must paint something in it otherwise it will appear black. Task-number: QTBUG-36594 Change-Id: Ib4baaef189f59a83a251cf89db30b0a3aec16d92 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Cocoa: Handle gracefully closing a window without event dispatcherGabriel de Dietrich2014-02-061-4/+7
| | | | | | | | Task-number: QTBUG-36696 Change-Id: I799eb351ee8ac1529cfbf009df3e7d57ec3a24ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* iOS: return correct uiview for IM rectanglesRichard Moe Gustavsen2014-02-061-0/+12
| | | | | | | | | | | UITextView has a property for specifying which UIView the CGRects you return should be aligned with. This makes a difference for widgets when not using alien, since then the view that draws the text will usually not be the same as the view that backs the top level QWindow. Change-Id: I240d63c98544c39308cd91465ee84351e7d7d1f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: be more specific about IM callbacks to iOSRichard Moe Gustavsen2014-02-061-11/+16
| | | | | | | | | No need to call textWillChange all the time if the text is really not changing. And report that selectionWillChange when Qt reports that it has changed. Change-Id: I7bd9f540cd9302c37888926a6152b803cc871ccb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: return styling hints for text correction pop-upsRichard Moe Gustavsen2014-02-061-0/+18
| | | | | | | | | | By returning the font used at the cursor position, the correction pop-up will be resized to match the point size, and the text marking will get correct height. Change-Id: I362579b793794835323bb9ceb5ddb4655526f392 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>