summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-083-18/+40
|\ | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * doc: correct documentation of QT_AUTO_SCREEN_SCALE_FACTOR env varShawn Rutledge2016-01-071-1/+1
| | | | | | | | | | Change-Id: I4fa57279b23911893a615fe8a3ce9854d0fec971 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * QtGui: Don't set screen to a child window when processing screen eventsBłażej Szczygieł2016-01-071-4/+6
| | | | | | | | | | | | | | | | | | Setting a screen to a child window causes a warning message. This patch prevents the debug message by catching incorrect behavior made by QPA earlier. Change-Id: Idf3ac02290a18afc134f19c2b91348dc009ca4ca Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QtGui: Fix obtaining the top level window at a pointBłażej Szczygieł2016-01-071-10/+30
| | | | | | | | | | | | | | | | | | | | Find the top level window on the primary virtual desktop first to avoid obtaining a window which doesn't belong to the primary virtual desktop when screen geometry is similar. Change-Id: I78fdfa0b5146d0ba9b912338adeb612c102c4ac3 Reviewed-by: Adam Majer <adamm@zombino.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QtGui: Don't set a screen to a child windowBłażej Szczygieł2016-01-061-7/+9
| | | | | | | | | | | | | | | | This is a partial revert of eaa3a9d0108cdf692f1686cafefb7b834f0e5af6 Task-number: QTBUG-50081 Change-Id: Ic3dc4daa90d7a968a4ebf45d3029c99a12985686 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * Avoid unnecessary detaching of the pending deletions list.Volker Krause2016-01-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | This code seems to be hit three times per frame in a hybrid QQ2/Qt3D app, quickly generating thousands of allocations here via the detach in begin(). Heaptrack confirms they are all gone now. Change-Id: I7d09f3f5c2b24a2590b701216715055751306e82 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Fix crash because of NULL screen in QXcbWindowBłażej Szczygieł2016-01-041-8/+6
| | | | | | | | | | | | Change-Id: If7bbe3ad1656dadcb098bcd3ece2e7b064eeb44d Task-number: QTBUG-50081 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | QFactoryLoader: generalize qLoadPlugin()Marc Mutz2016-01-054-20/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use perfect forwarding for the additional argument. - Provide a variadic template version - Deprecate qLoadPlugin1() — there's no reason for a different name — and fix all callers in qtbase. - Provide non-variadic overloads for up to three additional args (QPlatformIntegration rolled its own function because it needs three args). Change-Id: I72fb2dd9a021de704cbf5e4b6ea31c80447fb3b1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QPlatformTheme: Resync StandardPixmap with QStyle::StandardPixmapFrank Richter2015-12-311-0/+1
| | | | | | | | | | Change-Id: I17a91c378175dbbe8066bccb94cc93f0a1fd3d71 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | QGraphicsScene: prevent lots of detaching d/t editing of copiesMarc Mutz2015-12-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTouchEvent::touchPoints() returns a const-&, but the old code took a copy, over which it then iterated, modifying the touch points, causing (necessary) detaches of both the list and the touch points. Befriend QTouchEvent and modify the list in-place, avoiding all detaches in the likely case that QTouchPoint contains the only copy of the touch point list. This is all the more important as the function is called once for every item-under-mouse in sendTouchBeginEvent(). Port to C++11 range-for as a drive-by. Change-Id: I2f74d19845711d97e3566886123b5d18d55db74c Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-186-2/+27
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * xcb: Use a placeholder QScreen when there are no outputs connectedBłażej Szczygieł2015-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If no screens are available, windows could disappear, could stop rendering graphics, or the application could crash. This is a real use case in several scenarios: with x11vnc, when all monitors are physically disconnected from a desktop machine, or in some cases even when the monitor sleeps. Now when the last screen is disconnected, it is transformed into a fake screen. When a physical screen appears, the fake QScreen is transformed into a representation of the physical screen. Every virtual desktop has its own fake screen, and primary screens must belong to the primary virtual desktop. It fixes updating screen geometry on temporarily disabled screens in the middle of the mode switch. Expected results: Windows don't disappear, the application doesn't crash, and QMenu is displayed on the appropriate screen. This reverts patch 51ada7734ad780178ecced11e0dff454dfc2e5f2 Change-Id: I6e8eb682b0c8425d08ffdaecbd4c6c7700c914b4 Task-number: QTBUG-42985 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QPlatformTheme: added TabButtonFont and GroupBoxTitleFontLiang Qi2015-12-101-0/+2
| | | | | | | | | | | | | | Which is needed by Qt Labs Controls. Change-Id: I2f91a1cbe8218170f894189b56f3fef77207eaec Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Register QPA Menu, Dialog & SysTray enums & flagsJ-P Nurmi2015-12-093-0/+21
| | | | | | | | | | | | | | | | | | | | This allows QML Menu, Dialog & SystemTrayIcon to use the same enums without having to duplicate them. Change-Id: I1401583d3ae2ef07cdc795d2765fba07c9b30f2f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * Reduce flushes with repaint() when GL-based compositing is activeLaszlo Agocs2015-12-091-0/+2
| | | | | | | | | | | | Task-number: QTBUG-49655 Change-Id: I7a5d08f681a7d87709aac745154730764040e922 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-172-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Vibrates the device or plays an alert sound on devices that do not support vibration. The other implementations of beep() have been moved to QPlatformIntegration as a proper API instead of having them as invokables in QPlatformNativeInterface. Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* | Make native cursor handles accessible.Friedemann Kleint2015-12-142-0/+12
| | | | | | | | | | | | | | | | | | | | Add QWindowsNativeInterface::nativeResourceForCursor() and implement for Windows (returning the HCURSOR) and XCB (returning the xcb_cursor). Task-number: QTBUG-49386 Change-Id: I963869f6e8741449822ecbe6489f9c42a786c7a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-12-085-26/+38
|\| | | | | | | Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
| * QPlatformWindow::initialGeometry(): Pass screen when scaling.Friedemann Kleint2015-12-071-15/+16
| | | | | | | | | | | | | | | | | | Otherwise, the window may up outside the display area when centering on a secondary screen and the primary screen has a different scale factor. Task-number: QTBUG-49803 Change-Id: I91ec7c5348722a90012f80a247e662e96bcbb391 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
| * Add QStyleHints::showIsMaximized().Friedemann Kleint2015-12-072-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Expose QPlatformIntegration::ShowIsMaximized similarly to QPlatformIntegration::ShowIsFullScreen. This allows for applications to adapt their UI to mobile/desktop accordingly. Change-Id: Ic14d16fde11d7d2740b2f4092ae12e88a2f522fd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Android: Implement QInputMethod::keyboardRectangleOlivier Goffart2015-12-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use getWindowVisibleDisplayFrame to know the height on the keyboard, and we can use getLocationOnScreen to find out how much the view is scrolled. Since onPreDraw is always called when the view is scrolled or when the keyboard appears or disapear, we can call the native functions from there. This is not working for floating keyboards. [ChangeLog][Android] Implemented QInputMethod::keyboardRectangle Task-number: QTBUG-40731 Change-Id: I7848eb34fece410b29a06bf0bbb2313112fffa68 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * Initialize function tables without QGuiApplicationAllan Sandfeld Jensen2015-12-071-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | QImage can be used without QGuiApplication, but wihout QGuiApplication the accelerated methods would not be used. This patch changes the initialization of the QtGui function tables to happen in static object constructors on QtGui load, instead of in the QGuiApplication init. Change-Id: Ib58982fbc50fd79122352d021d93a3c99aca5043 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Give names to enum used in templates.Rolland Dudemaine2015-12-041-1/+1
| | | | | | | | | | | | | | | | The GHS toolchain needs names for enumerations that are used for template instantiation. Change-Id: I4e184cd77074fd7ece89f21317536e6006ab257d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-028-42/+140
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * Update QHighDpiScaling internal documentationMorten Johan Sørvig2015-12-021-24/+113
| | | | | | | | | | | | | | | | | | | | | | Expand section on coordinate systems. Document the AA_EnableHighDpiScaling / AA_DisableHighDpiScaling flags added in commit add58ed. Add some notes for platform plugin work. Change-Id: Ie6fe2d818a88ba784c0ee675fabbd3fc04d64bf1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Avoid dynamic switching between backingstore composition pathsLaszlo Agocs2015-12-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it opt-in because doing a normal backingstore flush does not seem to work on Cocoa once we use OpenGL on the window. Windows and Linux should be able to cope with this. This means that platforms outside Windows and Linux will continue to have the problem of having GL-based compositing enabled for ever after having a QOpenGL/QuickWidget shown in the window once, but the issue is most prevalent on Windows anyway, OS X machines can deal with OpenGL better in general. Task-number: QTBUG-49172 Change-Id: I30fd2efa95cc4f6eed9cf7f7613d0750355c775c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * Call setLayoutDirection() in QGuiApplicationPrivate::init() if not called beforeAlbert Astals Cid2015-11-301-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, setLayoutDirection() is called only by LanguageChange event handling, which triggers only upon installing, removing, or clearing QTranslators. This caused two problems: * If the QTranslators are installed in a Q_COREAPP_STARTUP_FUNCTION the event is lost since the QGuiApplication is still not there. * If the application doesn't use QTranslators at all, i.e., uses gettext, some other translation system, or because it has no messages at all, setLayoutDirection() is never called and the layout direction is wrong. The initialization of layout_direction has been changed from Qt::LeftToRight to Qt::LayoutDirectionAuto but that has no impact since QGuiApplication::layoutDirection will make sure Qt::LeftToRight is returned if layout_direction has still not been set. Change-Id: Ic60fe9a318c8afe1c503e3796ec54cfc687e7164 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Fix conversion QVariant(QColor) to QString.Jędrzej Nowacki2015-11-301-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | QVariant was using QColor::name() to convert a color to string, which by default loses alpha value. The patch is fixing the problem by always including the alpha value in the string when required. [ChangeLog][Core][Variant] QVariant(QColor)::toString() uses QColor::HexArgb format when the alpha component is different from 1. Task-number: QTBUG-37851 Change-Id: I887460c1ea151180ba99d64dd873ba9d6e2268f2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-285-11/+11
| | | | | | | | | | | | | | | | | | | | | | This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-293-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-11-271-0/+15
|\| | | | | | | Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
| * Doc: added sample to QFileOpenEvent class detailsSamuel Gaist2015-11-241-0/+15
| | | | | | | | | | | | | | | | This sample will help user needing to react on QFileOpenEvent get started faster. Change-Id: I7def292894fc39d803f70cbf0453f6791b7aea15 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Accept concurrent input from multiple tablet devices in QGuiApplicationRomain Pokrzywka2015-11-263-15/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a follow-up to 352c357e6f0785c0775a85151d6716b47aea1006 enabling support for multiple evdevtablet plugins at runtime (one per device), we also need to adjust the way QGuiApplication handles the events received from those plugins, in particular when multiple devices are sending tablet events concurrently. Replace the static members in QGuiApplication by a vector storing the same data per-device, so tablet press/release events can be recognized independently. Change-Id: Ie0975cdb03a8f6d05903e2e2e57ceb9de73a74a4 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-232-4/+11
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/thread/qthread_unix.cpp Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
| * topLevelAt(): convert to native coordinates.Morten Johan Sørvig2015-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | QPlatformScreen works in native pixels and the (device independent) coordinates from QWindow needs to be converted. Change-Id: I85ff45d66dc501e8c3c1c7a18f87448c92d79b9d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Call QPlatformCursor::pointerEvent with native coordinates.Morten Johan Sørvig2015-11-181-3/+10
| | | | | | | | | | | | | | | | | | | | It's a QPlatform* class and works in the native (platform) coordinate system. Change-Id: Ibf36bc68d84ecd668b35e0c22e1fa35cfc456a5d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-183-1/+14
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/network/kernel/qnetworkinterface_winrt.cpp tools/configure/configureapp.cpp Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
| * Fix screenForGeometry on a corner caseAleix Pol2015-11-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | QRect only deals with integers, and I had a window set on the corner and without a size. When this screen was created, it was reported to be on the wrong screen, thus created there wrong. The reason for this is that ::center is not prepared for this use. QRect(QPoint(500,500), QSize()).center() is QRect(499, 499) Change-Id: I24e57182f84873306f180749e96368d6da1147a9 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * move styleOverride from QApplicationPrivate to QGuiApplicationPrivateLiang Qi2015-11-132-0/+11
| | | | | | | | | | | | | | * -style option is also used in other cases than widget world Change-Id: I8555d309a7b9df0d26ad7a7b930411260537180e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Add QStyleHints::setMousePressAndHoldInterval()J-P Nurmi2015-11-132-2/+24
| | | | | | | | | | | | | | Allows speeding up press & hold auto tests in qtquick core & controls. Change-Id: I66717b581996977e894e3c386880ab90379abaef Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-045-18/+41
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/ptrsize.test configure src/corelib/global/qnamespace.h src/network/socket/qabstractsocket.cpp tests/auto/other/networkselftest/networkselftest.pro Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
| * Update high-DPI scaling enablers.Morten Johan Sørvig2015-11-041-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to enable and disable both at the environment variable level and at the source code level. This applies to scaling done by Qt using display density information provided by the operating system. Disabling is done with a 'veto' system: both the environment and source code my prevent the other for enabling scaling. This covers use cases of 'my system does not provide correct display metrics' and 'my application needs access to display pixels', respectively. On the environment, scaling is now enabled with QT_AUTO_SCREEN_SCALE_FACTOR=1 and disabled with QT_AUTO_SCREEN_SCALE_FACTOR=0. In source code the corresponding application attributes are AA_EnableHighDpiScaling and AA_DisapleHighDpiScaling. Not setting any of these indicates 'no preference'. The global scale factor set by QT_SCALE_FACTOR is not affected by any if the disablers. Task-number: QTBUG-46615 Change-Id: If18607d4b56ace1914a710e5aa60b2f0968e0010 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * Modify QPA handleExtendedKeyEvent.Samuel Nevala2015-11-032-3/+3
| | | | | | | | | | | | | | | | | | Allow setting tryShortcutOverride for handleExtendedKeyEvent with no timestamps. Change-Id: I469b144cfcaf063861debe86195e1f96ac94cc37 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * Fix QHighDPiScaling initialization issuesMorten Johan Sørvig2015-10-262-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Call QHighDpiScaling::updateHighDpiScaling() in init_plaform(), after the platform integration has been created and most platforms have populated the screen list. Keep the existing udpate call for the platforms that don't, but guard against calling it twice. Task-number: QTBUG-47947 Change-Id: Ib73bea7c4ab42e7acf6532f3a3100e1fc29acc2c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | iOS: refactor removeMnemonics(const QString &) to QPlatformThemeRichard Moe Gustavsen2015-11-042-0/+36
| | | | | | | | | | | | | | | | This function is needed across several OS', so refactor it out to a common place. Change-Id: I35b957029c965672739d03cd2db3e87f5bd0acdf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Update QPlatformIntegration::createPlatformWindow() documentationTor Arne Vestbø2015-10-281-6/+4
| | | | | | | | | | | | | | The function is not limited to creating top level windows. Change-Id: Iedeeba0093f251c852e9b7c9ba23c567a79a53f8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Defer QPlatformWindow creation on setVisible(true) if parent hasn't been createdTor Arne Vestbø2015-10-261-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a child QWindow is shown by calling setVisible(true), we don't need to create the platform window immediately if the parent window hasn't been created yet. We defer creation until the parent is created, or we're re-parented into a created parent or made top level. This optimization is more important now that we create the full parent hierarchy once we decide that we need to create a child QWindow. Change-Id: Ia4f0430f0d3709a12f41f6473c1cea6b0ef3c9cd Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Ensure QWindow::setParent() creates parent hierarchy if neededTor Arne Vestbø2015-10-261-7/+6
| | | | | | | | | | | | | | | | | | | | If the QWindow has been created and has a platform window, we need to ensure that the windows in the parent hierarchy also are created before we set a new parent on the platform window, otherwise the platform window will think that it's a top level window. Change-Id: Icb2c3cd5411cd1eb595e8673e144095feda31df9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Ensure QWindow::create() creates parent hierarchy before creating selfTor Arne Vestbø2015-10-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | To be able to create a platform window for a given QWindow we need to sync up the parent hierarchy first, so that the newly created window can be placed into that hierarchy. Without creating the parent hierarchy first, the QPlatformWindow will end up thinking it's a top level window, when in reality is represents the platform backing of a child QWindow. Change-Id: I2cad7759fbc118b04718e7a27ec7570ce1238757 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-239-33/+60
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure src/corelib/global/qglobal.h src/tools/qdoc/node.cpp src/tools/qdoc/qdocdatabase.cpp tests/auto/corelib/io/qsettings/tst_qsettings.cpp tools/configure/configureapp.cpp Change-Id: I66028ae5e441a06b73ee85ba72a03a3af3e8593f