Commit Graph

20 Commits

Author SHA1 Message Date
Shawn Rutledge
3e12951c0b Remove QScreen::orientationUpdateMask
It simplifies the API and reduces surprise to have rotation working by default.
On Android, the manifest specifies which orientations the application has
been designed to support; on iOS, it is controlled via the
UISupportedInterfaceOrientations property list key.
In addition, QWindow::contentOrientation() is another way to give
a hint to the window manager, or on iOS to directly control whether
the window's rotation is locked or not.

Task-number: QTBUG-35427
Task-number: QTBUG-38576
Task-number: QTBUG-44569
Task-number: QTBUG-51012
Task-number: QTBUG-83055
Change-Id: Ieed818497f686399db23813269af322bfdd237af
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-05-07 13:48:08 +00:00
Leander Beernaert
ce187c4f0e Fix compile errors related to missing Qt:: namespace
Change-Id: I092a26ef38b08c52d84adb027a1b1bdee8cc7f6b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-11 14:08:52 +01:00
Sona Kurazyan
66a9c4b0b2 Remove usages of deprecated APIs of QDesktopWidget
- Replaced the usages of the following deprecated APIs:
  * QDesktopWidget::screenCount() -> QGuiApplication::screens().size()
  * QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at()
  * QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint)

- Added notes for the QWidget *QDesktopWidget::screen(int), which
currently has no replacement.

- Fixed the tests to build conditionally, only when these APIs are
enabled.

Task-number: QTBUG-76491
Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-13 13:08:42 +02:00
Kevin Funk
58c14c4a7e Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
  (definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:55 +00:00
Kevin Funk
47c92fbb0b Replace Q_DECL_OVERRIDE with override where possible
Remaining uses of Q_DECL_OVERRIDE are in:

src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.cpp
doc/global/qt-cpp-defines.qdocconf
  (definition and documentation of Q_DECL_OVERRIDE)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:42 +00:00
Liang Qi
b94773c9c8 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	config.tests/unix/compile.test
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/testlib/qtestcase.cpp
	src/testlib/qtestcase.qdoc

Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
2016-04-13 06:55:37 +02:00
Shawn Rutledge
3c08035b7b QScreen manual test: add MouseMonitor to test multi-screen scenarios
- QMouseEvent::screenPos() should be global desktop position
- QDesktopWidget::screenNumber() should tell the correct screen
- QGuiApplication::topLevelAt(screenPos) should find the window where
  the mouse is clicked

Change-Id: I9a63ab3ee1944b7246551d0f3d5e37f0d2aa5457
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-04-08 14:49:59 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 18:55:18 +00:00
Shawn Rutledge
61b608dfb5 QScreen manual test: don't crash when a QScreen is null
Need to survive having screens detached/reattached on X11.

Task-number: QTBUG-42985
Change-Id: I81cf9721f0cb61a29180c60d44d588063266e651
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-24 20:15:35 +00:00
Simon Hausmann
e2f66f9215 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qwindowspipereader.cpp
	src/corelib/io/qwindowspipereader_p.h
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/plugins/platforms/xcb/qxcbconnection.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/tools/qmake/tst_qmake.cpp
	tests/manual/touch/main.cpp

Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
2015-06-03 10:23:56 +02:00
Laszlo Agocs
d33edcfe37 Fix the qscreen manual test for separate X screens
It is fully possible to show a window on all the connected screens
even when the screens are not virtual siblings, i.e. they do not
form one big desktop. When X is configured to use a separate screen
for each physical screen, it becomes essential to do setScreen()
either directly or via QDesktopWidget in case of widgets. The original
code attempting to call QWindow::setScreen() cannot succeed since there
is no QWindow available before the widget is shown. This is easy to
work around.

The app now works identically in all cases.

Change-Id: I519ca0c0109c68aac2f2d4e6972d14b55767b403
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-05-12 08:58:52 +00:00
Friedemann Kleint
82c3e9edc2 Manual QScreen test: capture screen changes.
- Make the subject of the Property watcher settable.
- Embed it into a QMainWindow with menu and
  listen to the screen changed event, setting
  the new screen with a message about the position.
- Remove hash, close obsolete windows by iterating
  over the top levels looking for the screen.

Change-Id: I4ed1122bab7c0cd9676d63995ce85a44719f4ba6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-05-07 13:04:41 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
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>
2015-02-11 06:49:51 +00:00
Shawn Rutledge
e0981a0d9e QScreen manual test: use sizeHint; don't override QLineEdit text color
The window size was too small on high-DPI screens.
Save the default text color instead of setting it to black.

Change-Id: I78b50624110be0cb1d077d3782d421eb323f4fb0
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-01-09 16:21:04 +01:00
Matti Paaso
974c210835 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3
- Removed LICENSE.GPL

Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-24 12:26:19 +02:00
Aleix Pol
5f50416620 Make it possible to know when a screen is being removed
So far, we had to listen to the QObject::destroyed signal from the QScreen
class to figure out whether a screen was removed. Often, this is already
too late, given that most of the QWindows have been moved by then and we
don't get to react before the windows are being set to the primary screen.

This patch introduces a new signal that will notify about a screen removal
before the screen is started to be destroyed, so that the application gets
to decide what to do with the screens before Qt decides to move things around.

[ChangeLog][QtGui][QGuiApplication] Added QGuiApplication::screenRemoved
signal to inform that a screen has been removed, before Qt reacts to it.

Change-Id: I99304179f4d345cae581a87baac6cff7b8773dea
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-07-02 23:14:19 +02:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Shawn Rutledge
78f946f6dc QScreen manual test improvements: fields resize, better formatting
It's necessary to set the fieldGrowthPolicy on the QFormLayout in order
to have expanding fields on the Mac.  Geometry formatting with
negative x and y values looks better.  Display fewer
decimal digits for double fields.

Change-Id: Icb252c0c3fb7b605253e04c3361beba124570840
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-16 17:31:31 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 19:20:11 +02:00
Shawn Rutledge
f4c1ae6726 Added manual test for QScreen properties
Shows property values in fields which auto-update when the properties
change.

Change-Id: Ib97566a74cb8d0fff5f85bf97783e89dfb07481f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-09-21 22:03:53 +02:00