Commit Graph

1744 Commits

Author SHA1 Message Date
Oliver Wolff
45b0f1be68 Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.

Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-06 20:25:49 +02:00
Liang Qi
ee8ba0e0ca Revert "Disable tests with qemu-arm & developer-build configurations in the CI"
We don't want to have untested qtbase.

This reverts commit 3598ffcc26.

This change also skips two network tests on b2qt.

Change-Id: I5c6f5e19487775f0a1c0feafa5e085208cbf7e9a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-06-05 12:10:07 +02:00
Alexandru Croitor
6f8ecc2497 CMake: Fix tst_qclipboard test on macOS
The helper processes were not in the correct location.

Change-Id: I0a80a22a931625ea0c9370db38ff29c881b964cb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-04 23:21:13 +02:00
Jonas Karlsson
1b33ee95e5 Use QByteArray instead of QString
Since the variable names in QShaderDescription are later compared to
QByteArrays we can gain some performance from not having to convert them
to QByteArrays later.

Task-Id: QTBUG-83706
Change-Id: Iaf80d0966f45cbb09e7c1000b7854bc488e57bb3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-03 18:56:21 +02:00
Alex Trotsenko
33e6e5fac3 QEventDispatcherWin32: retrieve PM_REMOVE value as a bit flag
Windows unexpectedly passes PM_NOYIELD flag in wParam parameter to the
hook procedure, if ::PeekMessage(..., PM_REMOVE | PM_NOYIELD) is called
from the event loop. So, to ignore undocumented flag, we should
interpret wParam as a bit field.

Thanks to Robin Lobel for research.

Pick-to: 5.15
Fixes: QTBUG-84562
Change-Id: Ib16d7d747aebc9a3628e4ee67478c4d3edeb96f1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-03 19:36:34 +03:00
Eskil Abrahamsen Blomfeldt
4e5d686a87 Make tst_QTextLayout::textWidthVsWIdth() more robust
Some fonts misreport the minimum right bearing, and in those cases
we may not be able to do a perfect text layout inside the bounds
set. This is a limitation we have chosen to accept.

To avoid random failure when testing this, we detect the case and
skip the test if we see that it may fail.

Fixes: QTBUG-84415
Pick-to: 5.15
Change-Id: I6b53ea2631c5c6e476e2902b5514829a2141796f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-29 07:28:10 +02:00
Allan Sandfeld Jensen
d80a98d525 Fix ExtendedRgb and Rgb encoding comparisons
ExtendedRgb should be treated as Rgb as it can be an automatic upgrade.

Pick-to: 5.15
Change-Id: I2942a1067ed5cacb2f60f303f467887cb44c36dd
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-28 21:15:55 +02:00
Laszlo Agocs
56977990e0 rhi: Harmonize create-destroy API pattern with the rest of Qt
For historical reasons we use build and release instead of create and
destroy. This becomes confusing now that more modules in Qt start taking
QRhi into use. Migrate to the more familiar naming, so those who have
used QWindow or QOpenGLContext before will find it natural.

Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-28 17:53:32 +02:00
Shawn Rutledge
3373aa8b35 QTextMarkdownImporter: allow nesting text span formatting
The bold+italic combination indicated by ***triple stars*** requires
this; but it enables combinations of italics, bold, strikeout, anchor
text (and associated link formatting), image alternate text, and inline
code formatting (monospace). A code span overrides the formatting from
surrounding spans (which might be a bug to fix in another patch, if we
compare to how md2html formats code nested in bold-italics for example),
but the format stack restores state when any char format span ends.

Task-number: QTBUG-81306
Pick-to: 5.15
Change-Id: I289556fa53de400eb50a4d159b9b344eafc517da
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-27 11:55:02 +02:00
Heikki Halmet
fc8c011450 Blacklist imageAtRightAlignedTab in CentOS
Task-number: QTBUG-46206
Change-Id: I98add304d052f3fc5c0ab80077ba66e8e159748e
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-05-25 08:16:14 +03:00
Tony Sarajärvi
778b8265b7 Blacklist tst_qfont tests on new platforms
Task-number: QTBUG-84248
Change-Id: I5285a12a9f1feaf748fc1734f122473c02d115e5
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-25 05:15:53 +00:00
Eskil Abrahamsen Blomfeldt
3ec0df4b5f RHI: Store texture handle as 64-bit int
When storing a void* pointer to the texture handle, we had
to ensure that the variable would exist until the build phase,
which is error prone and caused errors in QQuickWidget because
we copied the texture ID from the FBO into a local variable
before passing it into QQuickWindow::setRenderTarget().

The reason for using a void* was that we cannot know the width
of the handles in the different backends, but we do know that
they are 64-bit at maximum, so instead of storing potentially
dangling pointers, we just make it a 64-bit integer and cast
it back and forth in the backends.

Task-number: QTBUG-78638
Change-Id: I7951e24351ddb209045ab6197d81eb1290b4da67
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-22 10:32:10 +02:00
Liang Qi
2cd6d76d68 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/text/qbytearray.cpp

Change-Id: I63706409464d31391012bacdadfd1f6300509787
2020-05-18 08:52:33 +02:00
Volker Hilsheimer
2b10a192a1 Remove deprecated method from QFont, QFontMetrics, and QFontInfo
Change-Id: Ifc8fb5c5d53359b33b8abab3bbee3de61bfef539
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-05-15 18:56:20 +02:00
Lars Knoll
8a84eb6c4a Remove autotest for codecForHtml
The test was rather bogus anyway...

Change-Id: I81b4f87bb811b2894ce88b1fdbb3183fc7259057
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-14 07:50:54 +02:00
Volker Hilsheimer
082eebe6a4 Remove deprecated QDesktopServices APIs
Change-Id: Ic21ad2938b20c1aa3ae499a921c9cff92f615816
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-13 14:38:23 +02:00
Tony Sarajärvi
1736746228 Blacklist imageAtRightAlignedTab in SLES
Task-number: QTBUG-46206
Change-Id: I8da530eedcef937f5dea6c7507be74cbe26186a1
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2020-05-13 09:34:56 +00:00
Laszlo Agocs
8cdc9ac5b2 rhi: vulkan: Fix calling finish() twice with some copy commands in-between
The native command buffer handle was not updated, so the subsequent
finish() call attempted to record an invalid VkCommandBuffer. The
problem was not present with offscreen frames, only when finish() is
called with a swapchain-based frame active.

Task-number: QTBUG-84066
Change-Id: I9c4cb701c3dbbc28f237d6ae1cbf65aafd1fa95f
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2020-05-07 21:15:52 +02:00
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
Volker Hilsheimer
660b38bb2c Remove a bunch of deprecated members from src/gui/painting classes
Also remove dead code that isn't compiled anymore in Qt 6 builds.

Change-Id: I7a7ae35e61fb2ad9cc21180fb7224357ade1505f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-06 09:54:17 +02:00
Jan Arve Sæther
8d6d1d6fea Fix bug in QTextLayout::min/maxWidth for WrapAtWordBoundaryOrAnywhere
In that specific wrapping mode, it will first try a normal word wrap. If
it doesn't fit within the specified line width it will discard the
result of that and try WrapAnywhere by calling layout_helper()
recursively. The problem was that at the point it called itself again it
had already adjusted eng->maxWidth:

        eng->maxWidth += line.textWidth;

This was not restored, but carried on to the recursive call to
layout_helper(), so the end result was that the maximumWidth would
accumulate text widths from parts of the same line twice.

Due to the same recursive behavior the minimumWidth also had a problem:
It always returned the width of the widest word because it took the
qMax() of the minimum widths of the two passes, (WordWrap and then
WrapAnywhere) effectively making the minimum width always be the width
of the widest word (even though it could wrap at finer granularity).

Pick-to: 5.15
Task-number: QTBUG-77337
Change-Id: Ie7e9c17b157506352c2da38cc7f4a8dfa1283966
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-05-05 19:17:35 +02:00
Laszlo Agocs
a206f52acd Hotfix for int->qsizetype fallout in QShader
The proper solution is to use qint32 everywhere, but that is left as
a separate exercise.

Change-Id: Id0c06b102b56a1b3b48dd67c6c29c28da7d1f22d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-05 11:34:39 +02:00
Eskil Abrahamsen Blomfeldt
8231614661 Fix QTextDocumentLayout test with certain fonts
If there is a negative right bearing on the last character of the string,
it will stretch past the tab position (which aligns the advance position,
and not the right edge of the glyph). For certain fonts, this would cause
the actual ideal width to be calculated as 301 instead of 300 (which is
the right alignment edge set in the code).

Pick-to: 5.15
Fixes: QTBUG-46206
Change-Id: I03e8b8fb86e9ebe5337d3ba3384ade73d2ccdd69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-04 08:00:37 +02:00
Volker Hilsheimer
0fda43cf33 Remove deprecated members from QtGui/image classes
Cleaning up those that are trivial to remove because they have direct
replacements.

Change-Id: I4f5c25884a01474fa2db8b369f0d883bd21edd5b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-04-29 06:20:07 +02:00
Sona Kurazyan
469e044f06 Port qtbase/tests/auto/gui/painting to CMake
Task-number: QTBUG-78225
Change-Id: Idc1333b119939e65da8f47d8de5333a38701bcb4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-27 14:34:56 +02:00
Volker Hilsheimer
dccf28b7c3 Remove deprecated members from several QtGui classes
Those can be trivially removed as they have direct replacements, or
are completely unused.

The migration path for QCursor::bitmap and QCursor::mask is

QBitmap *pb = c.bitmap(); // up to 5.15, warns in 5.15
QBitmap vb = c.bitmap(Qt::ReturnByValue); // from 5.15, works in 6
QBitmap b = c.bitmap(); // from 6.0 on

Change-Id: I3b3acd1c7f09c4c8414e98b3ce11986f1ecd5eda
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-04-27 12:21:29 +02:00
Laszlo Agocs
3ef7a760ff rhi: Take mip size into account for render target size
Also extend autotesting, both for rendering into a given mip level
and for rendering into a given cubemap face.

Change-Id: Ida94b71150477ceb50a3b5616d8b7be13174558b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-04-23 10:19:53 +02:00
Qt Forward Merge Bot
efd7757154 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/widgets/widgets/qabstractbutton.cpp
	src/widgets/widgets/qbuttongroup.cpp
	src/widgets/widgets/qbuttongroup.h
	src/widgets/widgets/qsplashscreen.cpp
	tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
        tests/benchmarks/opengl/main.cpp

  Needed update:
	src/plugins/platforms/cocoa/CMakeLists.txt

Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
2020-04-22 15:28:01 +02:00
Lars Knoll
50916edd9d Always encode HTML as utf-8
When converting a text document to HTML, always convert it to utf-8,
as required by the HTML standard. This also means that we remove
the optional encoding parameter.

Change-Id: I0bd2fc9df2d06734e1c5b8053b964fbfbb6881e1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-21 15:46:36 +02:00
Shawn Rutledge
51a348b2e2 Markdown writer: omit space after opening code block fence
The CommonMark spec shows that it's not necessary to have a space
between the code fence and the language string:
https://spec.commonmark.org/0.29/#example-112
This also avoids a needless trailing space after a code fence that
does not include a language string.

Change-Id: I2addd38a196045a7442150760b73269bfe4ffb22
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-20 21:08:32 +02:00
Shawn Rutledge
0fcd782bd3 Markdown writer: don't wrap code block, and detect its end
The end of a code block nested in a list item is now detected;
and if the text of the list item continues after the code block,
it continues to be indented.

Code blocks should never be word-wrapped.

Fixes: QTBUG-80603
Change-Id: I4427f8b1d4807d819616f5cb971e2d006170d9be
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-20 21:08:23 +02:00
Eskil Abrahamsen Blomfeldt
ad5aee2e34 Get rid of QT_OPENGL_ES*
The QT_OPENGL_ES* macros are leftovers from an earlier,
ad hoc configuration system, which has since been
replaced by QT_CONFIG. To clean things up in Qt 6,
we use the new way instead.

Task-number: QTBUG-83467
Change-Id: I578dc7695bff9d5ee303b22e44f60fee22fe0c28
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-04-17 11:50:24 +02:00
Johan Klokkhammer Helsing
73f3f501f3 Move versioned OpenGL functions from QtGui to QtOpenGL
The context—which lives in QtGui—now knows nothing about versioned functions.

This changes the public API for getting version functions for a context.

[ChangeLog][QtGui][OpenGL] QOpenGLContext::versionFunctions() has been removed.
QOpenGLVersionFunctionsFactory::get() from the QtOpenGL module should be used
instead.

Previously one would call

    context->versionFunctions<QOpenGLFunctions_4_0_Core>();

Which now becomes

    QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_0_Core>(context);

The rest of the API should be identical.

Since glgen no longer compiles, and the links to its input (gl.spec and gl.tm)
are dead, I've edited the previously generated files manually. If glgen is
fixed, it should be quite easy to make it generate the new way.

Task-number: QTBUG-74409
Change-Id: I800527e0af16a79005b276eeb74417770193c62f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-04-16 07:14:51 +02:00
Lars Knoll
ca635c659c Run those autotests with cmake
They seem to work just fine.

Change-Id: I8cf3e682e158c67367d76fe68f5829df67d1e449
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-15 18:55:52 +01:00
Qt Forward Merge Bot
58a4289800 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/network/socket/platformsocketengine/platformsocketengine.pri

Change-Id: I22daf269a8f28f80630b5f521b91637531156404
2020-04-11 14:59:13 +02:00
Shawn Rutledge
1ec350e35f Stop using obsolete TouchPoint rect accessors in tests and examples
Followup to cf4a8b12fa
68916fede4 and
3c159957f8.

Task-number: QTBUG-83403
Change-Id: Ieaf418860c565dbe883384e7f296a829fbfa1e33
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-10 13:54:43 +00:00
Lars Knoll
c6cdf38e75 Change qHash() to work with size_t instead of uint
This is required, so that QHash and QSet can hold more
than 2^32 items on 64 bit platforms.

The actual hashing functions for strings are still 32bit, this will
be changed in a follow-up commit.

Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 20:03:25 +02:00
Szabolcs David
926a0886d1 Support multiple page ranges in QPrinter
Add a new QRangeCollection type to store and manage
multiple page ranges. This moves out the parser and validator
logic from the platform dependent (UNIX) dialog and makes it
publicly available from QPrinter.

This improves the usability of QPrinter in those applications
which doesn't use print dialog to configure printer.
(e.g.: QTextDocument, QWebEnginePage)

Change-Id: I0be5a8a64781c411f83b96a24f216605a84958e5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-04-09 16:45:32 +02:00
Qt Forward Merge Bot
8823bb8d30 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/opengl/doc/src/cube.qdoc
	src/corelib/global/qlibraryinfo.cpp
	src/corelib/text/qbytearray_p.h
	src/corelib/text/qlocale_data_p.h
	src/corelib/time/qhijricalendar_data_p.h
	src/corelib/time/qjalalicalendar_data_p.h
	src/corelib/time/qromancalendar_data_p.h
	src/network/ssl/qsslcertificate.h
	src/widgets/doc/src/graphicsview.qdoc
	src/widgets/widgets/qcombobox.cpp
	src/widgets/widgets/qcombobox.h
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
	tests/manual/diaglib/debugproxystyle.cpp
	tests/manual/diaglib/qwidgetdump.cpp
	tests/manual/diaglib/qwindowdump.cpp
	tests/manual/diaglib/textdump.cpp
	util/locale_database/cldr2qlocalexml.py
	util/locale_database/qlocalexml.py
	util/locale_database/qlocalexml2cpp.py

Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.

Updated CMakeLists.txt in each of
	tests/auto/corelib/serialization/qcborstreamreader/
	tests/auto/corelib/serialization/qcborvalue/
	tests/auto/gui/kernel/
and generated new ones in each of
	tests/auto/gui/kernel/qaddpostroutine/
	tests/auto/gui/kernel/qhighdpiscaling/
	tests/libfuzzer/corelib/text/qregularexpression/optimize/
	tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
	tests/libfuzzer/gui/text/qtextdocument/sethtml/
	tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
	tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.

Changed target name in
	tests/auto/gui/kernel/qaction/qaction.pro
	tests/auto/gui/kernel/qaction/qactiongroup.pro
	tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake

Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.

Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
2020-04-08 20:11:39 +02:00
Tor Arne Vestbø
ab4c22d47d macOS: Remove all use of deprecated Q_OS_OSX define
Change-Id: I49c285604694c93d37c9d1c7cd6d3b1509858319
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-03 13:44:37 +02:00
Lars Knoll
ef0f1429ae Remove QRegExp based API and QRegExp usage from QTextDocument
Change-Id: Ib5cc2d747f215a483585b703f9b4f6415e0d59f7
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-04-01 10:29:26 +02:00
Mitch Curtis
3f73995a03 Move undo framework out of Qt Widgets
- Moves QUndo* classes (except QUndoView) from src/widgets/utils to src/gui/utils
- Moves related auto tests from widgets to gui
- Replaces QUndoAction with lambdas that do text prefixing

[ChangeLog][Undo Framework] QUndo* classes (except QUndoView) were moved from Qt
Widgets to Qt GUI.

Done-with: volker.hilsheimer@qt.io
Fixes: QTBUG-40040
Change-Id: I3bd8d4d32c64f8dee548f62159a1df2126da89d8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-30 12:36:29 +02:00
Volker Hilsheimer
d975ad4ed7 Merge QGuiShortcut and QShortcut again in QtGui
QShortcut has only one widget specific feature, which is whatsThis; that
is just a QString, so the setters and getters can just as well be in
QtGui.

The widgets specific implementation of shortcut matching and of showing
the whatsThis balloon stays in QtWidgets, in the private implementation.
Using virtual functions in the private we can override the empty default
in QtGui, and by adding a virtual factory function in QGuiApplication,
the correct private is instantiated depending on the kind of application
running.

Change-Id: I09ae4a5482f9fb70940c5e2bfe76d3d7fd710afc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-29 19:31:14 +01:00
Volker Hilsheimer
bcaff2b06f Remove QGuiAction again and split QAction implementation up instead
Duplicating the number of classes is a high price to pay to be able to
have some QAction functionality behave differently, or be only available
in widgets applications.

Instead, declare the entire API in QtGui in QAction* classes, and
delegate the implementation of QtWidgets specific functionality to
the private. The creation of the private is then delegated to the
Q(Gui)ApplicationPrivate instance through a virtual factory function.

Change some public APIs that are primarily useful for specialized tools
such as Designer to operate on QObject* rather than QWidget*. APIs that
depend on QtWidgets types have been turned into inline template
functions, so that they are instantiated only at the caller side, where
we can expect the respective types to be fully defined. This way, we
only need to forward declare a few classes in the header, and don't
need to generate any additional code for e.g. language bindings.

Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-29 11:18:57 +01:00
Michal Klocek
b1e3f33a28 Call post routines from ~QGuiApplication
Currently depending if user uses QApplication
or QGuiApplication we end up in different behavior
when running post routines. For example QApplication
destructor calls post routines before stopping event dispatcher,
In case of QGuiApplication post routines are called
from QCoreApplication destructor, so no more event dispatcher.
This behavior is not consistent and creates troubles
when releasing resources of web engine.

Attached test will hang on windows with QGuiApplication,
however works fine with QApplication.

Task-number: QTBUG-79864
Change-Id: Ice05e66a467feaf3ad6addfbc14973649da8065e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-25 14:40:32 +00:00
Lars Knoll
dee55af0a5 Remove QRegExpValidator
As QRegExp will be moved to a compat library in Qt 6.

Change-Id: I181aec45bd798f49d2c50a0e7fb64782e004b854
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-03-17 08:35:50 +01:00
Simon Hausmann
c2f167b412 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-16 20:43:50 +01:00
Simon Hausmann
ff922e7b87 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/kernel/qmetatype.cpp

Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
2020-03-16 18:41:27 +01:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Tor Arne Vestbø
db745fdd2d cmake: Fix naming when referring to Apple macOS
Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:52 +01:00