summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qdesktopwidget_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Add screen() accessor to QWidgetFriedemann Kleint2019-08-211-1/+1
| | | | | | | | | | | | | Base it on QWidgetPrivate::associatedScreen(), but make a larger effort to find a screen in case the widget is not shown yet. Rename QDesktopScreenWidget::screen() to something else to avoid clashes. Task-number: QTBUG-62094 Task-number: QTBUG-53022 Change-Id: I36ba5ef5f0645a4ac89da0b38a391f7057b2f49c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Deprecate QDesktopWidget in favor of QScreenTor Arne Vestbø2017-11-081-0/+2
| | | | | | | | | [ChangeLog][QtWidgets] QDesktopWidget has been deprecated. Use the corresponding QScreen functions instead. Task-number: QTBUG-62094 Change-Id: I0941d2aa27a06ec650ca52d6467e5bfb0ad43459 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Reduce usage of QDesktopWidget to resolve screen properties in QtWidgetsTor Arne Vestbø2017-08-181-0/+23
| | | | | | | | | | | Removes the need to initialize QDesktopWidget, just to look up which screen a widget would map to, the geometry of a screen, number of screens, etc. Change-Id: Ieb153b9ff6d3fba645fc528d6e430e8392f990bf Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add needed includes to qdesktopwidget_p.h and qwidgetwindow_p.hKimmo Ollila2017-01-021-0/+1
| | | | | | | | The template definitions are required here as we are using an object of type QPointer below when doing static cast of QPointer::data() Change-Id: I41e2b6f59667574ca3c5d75c5dddb203790adbce Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add qtwidgetsglobal.h and qtwidgetsglobal_p.hLars Knoll2016-07-141-0/+1
| | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. That header will later on #include the configuration file for Qt Widgets. For now it defines the Q_WIDGETS_EXPORT macro for this library. Change-Id: I6698989b952b9bac94d086d9f219e03c000f7d53 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-4/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| * QDesktopWidget: fix tracking QScreens.Ralf Jung2016-05-191-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code failed to reliably detect new QScreens and connect their signals to its own slots. For example, if the QApplication added a new screen at the beginning of the screen list (which happens if the new screen is primary), the signal-connecting loop would actually instead add the now second screen to QDesktopWidget's list *again*, and connect its signals, but not connect any signal to the new, first screen. Furthermore, QDesktopWidget would miss geometry changes because QWidget (and hence QDesktopScreenWidget) automatically shrinks when the screen it is on gets smaller. To fix all of this, QDesktopScreenWidget now keeps its own record of the screen and its geometry, and it always scans over the entire screen list without relying on any ordering guarantees on behalf of QApplication. Change-Id: I2ee8361adf643849f43b7dd9a95966920fd13528 Task-number: QTBUG-52101 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-101-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| * Improve handling of screens in QWidgets.Friedemann Kleint2015-02-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, the screen number of a QWidget was stored in QTLWExtra::screenIndex which came in via the Q_WS_QWS platform. The variable contained the screen number of the QDesktopScreenWidget and the desired screen number for widget creation (from parent widget or desktop parent widgets) and was not updated according to widget geometry or when the associated QWindow moved to another screen. Storing the screen number is problematic in Qt 5 since it may change when the list of QScreens in QGuiApplication is rearranged. This change renames it to initialScreen and changes its usage to only contain a screen number when a screen is requested by parenting on a desktop widget or reparenting. A value of -1 indicates no screen is requested and the number should be deduced from the geometry. For the usage in QDesktopScreenWidget, add a method to determine the number via index in the list of QDesktopWidget. Task-number: QTBUG-44070 Task-number: QTBUG-44213 Change-Id: I153d19073ad4b0fd14ef3d24caa6d3e76f350e82 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Streamline code in QDesktopWidget.Friedemann Kleint2015-02-041-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-44070 Task-number: QTBUG-44213 Change-Id: Icbf0547eb521b9f3fcc725066ee4903226ecc630 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | QDesktopWidget: use qDeleteAll()Marc Mutz2014-10-061-1/+3
|/ | | | | Change-Id: Icfbf47309e425deabcef81c8f11b8e42fcc9cdcc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix emission of QDesktopWidget::workAreaResized().Friedemann Kleint2014-09-221-0/+1
| | | | | | | | Connect to QScreen::availableGeometryChanged(). Task-number: QTBUG-32567 Change-Id: I2097d80faa83ae062f7e149122fba26d23432e95 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* qpa: Merge qdesktopwidget_qpa.cpp into qdesktopwidget.cppTor Arne Vestbø2014-05-151-0/+84
Change-Id: I39316744b87d1fd588a99ab71edbd711ee8fae47 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>