Remove remaining handling of missing support for rvalue refs.
Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It does not depend on QtGui.
Change-Id: If7b01d1a6d2ce3945562f4480177ce883abfdbf4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Mimicking what we currently have for QSharedPointer, but also adding
* snake_case version (matching the ones in std)
* rvalue-overloaded versions (matching the C++2a overloads).
[ChangeLog][QtCore][QSharedPointer] Overloads of
qSharedPointerObjectCast have been added to work on std::shared_ptr.
Change-Id: I26ddffd82b000bf876e7c141fdce86a7b8c1d75a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A QTextDocument can now be written out in Markdown format.
- Add the QTextMarkdownWriter as a private class for now
- Add QTextDocument::toMarkdown()
- QTextDocumentWriter uses QTextMarkdownWriter if setFormat("markdown")
is called or if the file suffix is .md or .mkd
- Add QTextEdit::toMarkdown() and the markdown property
[ChangeLog][QtGui][Text] Markdown (CommonMark or GitHub dialect) is now
a supported format for reading into and writing from QTextDocument.
Change-Id: I663a77017fac7ae1b3f9a400f5cd357bb40750af
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Requires a screen with working context permission parsing. Currently,
all context permission requests fail because the parsing is incorrect.
A context permission is added temporarily to prevent CLOSE/CREATE
events when Qt reparents foreign windows. Qt does this temporarily
when a foreign window is wrapped in a widget.
Change-Id: I84c18e70d43239286fcd53715332d7015cf1a826
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
The old code in QtActivityDelegate.updateHandles() and
EditPopupMenu.setPosition() could use size of EditPopupMenu.m_view to
calculate position of context menu before that size was calculated
during an asynchronous layout pass. In particular m_view reports size
0x0 when context menu is opened for the first time after start of the
application. In this case the context menu was displayed on top of the
text editor instead of being displayed above it.
This patch fixes that problem by moving all positioning code from
QtActivityDelegate.updateHandles() to EditPopupMenu.setPosition() and
adding an OnLayoutChangeListener which calls setPosition() again each
time the size of m_view changes, including when it changes for the first
time from 0x0 to a real value.
Change-Id: I670fef811a4dcba5524f7520ea41a47978dd10f1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The old code used size of m_cursorView to calculate position of the
cursor handle popup. But since on Android layout process is
asynchronous, both width and height of m_cursorView was 0 upon first
call to setPosition(). This resulted in selection handles being
initially displayed at a wrong position for a fraction of second and
then quickly moving to the correct position. In some cases handles
stayed at the wrong position until touched by user.
This patch replaces use of m_cursorView's size with use of m_popup's
size. Width and height of m_popup may be used immediately because they
are explicitly assigned in initOverlay(). The size of m_popup should be
always equal to the would-be size of m_cursorView because of how it is
calculated.
Change-Id: I9868c9a5ce0103d8328b2478cf82feaceba7f404
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Implicit copy constructors or methods are considered deprecated for
classes that has one of the two or a destructor.
The warning is enabled with -Wextra in gcc 9
Change-Id: Ic9be654f2a142fb186a4d5a7d6b4f7d6f4e611d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The file system appears to cache too aggressively, so if the reported
storage size doesn't change after flushing to disk, ignore the failure.
Change-Id: Iba7dce79591447fac296bfe92c2dc993d36d0c2a
Fixes: QTBUG-69868
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The implementations were practically identical, so we can just move the
code into qhostinfo.cpp, cleaning up things along the way.
Since QHostInfoAgent is an internal class, add the shared code as
additional static helper functions. And since half the code already used
QCoreApplication::translate anyway, we can remove the QObject
inheritance which was only added for getting a tr().
Change-Id: I58eafbdc3e7d06d2e898486a1add63cd63d98c96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When we trace a scope, then we pass the scope args to the _entry trace
point. There is no need to do that also for the _exit trace points, it
just blows up the trace data for no obvious gain. Any decent tracing
consumer can easily find the args for the _exit call by matching it to
its _entry call.
Note that this is standard practice in trace points, and also done like
this in the Linux Kernel trace points for example.
Change-Id: I273293b0c7e799767acc1960b50ab675fc765a36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use Q_TRACE_SCOPE and the corresponding naming scheme. Additionally,
don't change the behavior of the code when tracing is enabled, i.e.
continue to return early if possible.
Change-Id: I9ba9679869db1541a19bc832beede902224c52f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Don't reimplement the protected functions in the base class just
override the access with the using keyword.
Change-Id: I323487d9ddb1d458d5faca020c3eb4d931a9b226
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Fixes warning: 'BrushInterface' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit
Change-Id: I2e693ac60e9eba1976665546e1c9c4a92e6ff63b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Ignores errors produced by the HELP command. It will continue
executing the commands sent to QFtp when a server does not have a
HELP command implemented. Commands SIZE, MDTM, and PWD are not going
to be used if the HELP command failed.
[ChangeLog][QtNetwork][QNetworkAccessManager] Don't fail when FTP does
not implement the HELP command.
Task-number: QTBUG-69477
Change-Id: I0ebd51b134535730c6bef83de1abf1a427b8d2ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The remaining diff to clean 1.6.37 is archived in the qtpatches.diff file.
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.37
Change-Id: I589bff09beec1977be8c6ca2a60aadf05f337f38
Reviewed-by: Liang Qi <liang.qi@qt.io>
It's what's returned when calling request() on a QNetworkReply, but for
QNetworkReplyImpl (the implementation used for e.g. FTP) it was not set,
so it returned a default object.
Change-Id: Id82f7920e4268c1a7743e681fc503bcd28889b6e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Added a sentence to explain how a .qmake.cache file influences the project root.
Task-number: QTBUG-21411
Change-Id: I97766edd96851f1c988ab07f842fb81a339e4ecd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Change mentions of parameter value being "zero" to nullptr.
Clarify that when nullptr is passed to moveToThread() event processing
is stopped because the object is no longer associated with any thread.
Also, reitarete this fact in the paragraph about processing of new
events.
There's an exception to the rule that QObjects cannot be "pulled" by
moveToThread that is buried in the implementation and not mentioned
in the doc. This information is worth noting explicitly.
Change-Id: I816ff737c48d8057b39e36b566079710aeb8e690
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
There was a bug when handling situations like
1. first
1) subfirst
2. second
It was always inserting items into the list where the cursor already
was, but it needs to insert the "second" list item into the list
which is currently the top of m_listStack.
Change-Id: Id0899032efafb2e2b9e7c45a6fb9f2c5221fc4df
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
The helper in QOpenGLDebugLogger did not account for the extra "KHR"
suffix in the function names and results in a crash when ANGLE is being
used. This commit fixes this issue.
Change-Id: I439d8bfc53b010be5410286b86c090aff171aaef
Fixes: QTBUG-62070
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
CreateCursor only works with standard sizes (32, ...) depending on the
display hardware. No longer apply the scale factor for the blank cursor, because
it might lead to unsupported cursor sizes resulting in random pixels.
Change-Id: I48d84bd913d2dd8f62129126c9a41e58ee2cbcae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The sysrootification of QMAKE_INCDIR_OPENGL on macOS must happen only
once. Commit 49ef3773 addressed this but stored the sysrootified
QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri. For installer packages,
these paths are the paths of the build machine and most likely wrong
on the user's machine.
This reverts commit 4949ef377349ba4dae840c2d5caa36e2d516707baa and
restores the sysrootification in sdk.prf. The original include paths
are assigned to QMAKE_EXPORT_INCDIR_OPENGL and stored as
QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri.
Fixes: QTBUG-75374
Task-number: QTBUG-73736
Change-Id: I4c0f65866d60660c632363dba3adc7ea2e344bfc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QFile::copy() didn't have the syncToDisk() call that QSaveFile::commit()
has. So add it.
[ChangeLog][QtCore][QFile] Made QFile::copy() issue a filesystem-
synchronization system call, which would make it less likely to result
in incomplete or corrupt files if the system reboots or uncleanly shuts
down soon after the function returns. New code is advised to use
QSaveFile instead, which also allows to display a progress report while
copying.
Fixes: QTBUG-75407
Change-Id: I95ecabe2f50e450c991afffd1598d09ec73f6482
Reviewed-by: Henrik Hartz <hhartz@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
If this plugin is loaded at some later point during application
run-time, the focus object might be nullptr. We can avoid that by
using qApp->focusObject(), when m_focusObject==nullptr;
Task-number: QTBUG-74465
Change-Id: I0d82410ed557ea1a8fde28a1807f790854951cda
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Don't go into an infinite loop breaking pages, when an image is about
as large as the page. Correctly take top and bottom margins into account
when calculating whether the image could fit on one page.
Amends change 416b4cf685.
Fixes: QTBUG-73730
Change-Id: Id311ddf05510be3b1d131702f4e17025a9861e58
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Fix warnings
qtbase/src/corelib/io/qprocess.cpp:776: (qdoc) warning: Class CreateProcessArguments has no \inmodule command; using project name by default: QtCore
qtbase/src/corelib/serialization/qcborstream.cpp:1441: (qdoc) warning: Class StringResult has no \inmodule command; using project name by default: QtCore
Change-Id: I1c85ca32aff1f89f70898af7b11cfead96c80349
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
...and other slight modernizations and minor fixes.
Change-Id: Ide587d9fe59ca9113ae775882c99a50debaf9000
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Using getaddrinfo, which implements RFC 6724, implies that addresses
that are not needed will be trimmed. In particular, IPv6 addresses are
often not returned.
Also move the implementation detail documentation down in the text, it's
a detail with little relevance for the usage of the class, but makes for
a good opener regarding this behavior.
Change-Id: I516a64f0b39a6a06621a63c1d5236544b7758049
Fixes: QTBUG-31865
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QLineF::intersect() does not follow the naming rules for functions.
Therefore add a replacement function intersects() instead and also
rename the return type from IntersectType to IntersectionType
[ChangeLog][QtCore][QLineF] added QLineF::intersects() as a replacement
for QLineF::intersect()
Change-Id: I744b960ea339cb817facb12f296f78cca3e7d938
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
QT_DEPRECATED_VERSION(major, minor) and
QT_DEPRECATED_VERSION_X(major, minor, text) outputs a deprecation
warning if QT_DEPRECATED_WARNINGS_SINCE is equal or greater than the
version specified as major, minor.
This allows the user to hide deprecation warnings which can't yet be
fixed for their codebase because the minimum required Qt version does
not provide the replacement function.
If QT_DEPRECATED_WARNINGS_SINCE is not set by the user, it's set to
QT_DISABLE_DEPRECATED_BEFORE if available, otherwise to QT_VERSION.
[ChangeLog][QtCore][QtGlobal] Add new macros QT_DEPRECATED_VERSION
and QT_DEPRECATED_VERSION_X to conditionally display deprecation
warnings
Change-Id: I61b1a7624c9b870695c9e3274313de636f804b5d
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Before testserver becomes a stable feature, let's keep testserver.prf in
"mkspecs/features/unsupported". The test server's shared files will be
stored in "mkspecs/features/data/testserver".
Because the path of testserver has been changed, all the tests relying
on the docker servers should be updated as well.
Change-Id: Id2494d2b58ee2a9522d99ae61c6236021506b876
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
In order to reuse the test server to the external modules, it is much
easier to share the common configurations (scripts) and test data via
Dockerfile. In addition, the external module can create more layers
depending on their needs. Therefore, supporting multi-stage builds is
needed. The disadvantage is that the docker-compose needs to re-build
the images every time. However, it is just a one-time effort. If the
Dockerfile doesn't get changed, the extra build time can be ignored.
Because of multi-stage builds, the test server will keep a Dockerfile at
least. Therefore, the volume sharing is no more needed. The test data of
a service can be added into the images by using COPY/ADD commands.
NOTE:
This patch relies on docker-compose v1.21.0 (docker-compose build now
supports the use of Dockerfile from outside the build context).
Change-Id: Ib3f6a5fcf6979732ae8a40a494a1360fca4ac7bf
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The docker-compose files were trying to use volume sharing, which is not
supported on Windows in conjunction with docker-machine.
Hence create a separate layer on Windows, which copies the configuration
files to the target.
Change-Id: Ifeacc56198ffc8fb2eb31c14ab91334e22e916f5
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Otherwise, AppKit, while rendering 'detached' (not in any view hierarchy)
controls and cells will use NSAppearance.currentAppearance, which is not
guaranteed to be the same as NSApplication.effectiveAppearance.
Task-number: QTBUG-74515
Change-Id: I82dcebf2230932ecfcbf33c422a3b7bd0aed61d7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Keep spinning the main event loop if we can't acquire the semaphore,
this way the Android UI thread can post events on it.
Fixes: QTBUG-74076
Change-Id: Ia87e0535f94c67728176918ab928ff5ce8b00f8e
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
There is an effort to make KDE software accessible, which exposed the
missing roles. Check that they are complete with an assert.
Change-Id: Ibaff0a90e1cee316983569ecee7759a13212e3c3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
When building in a unix style build system (i.e. msys), QMAKE_DIRLIST_SEP
is a colon, not a semicolon. Thus, always split the incoming string
(after the fixup regex) using semicolons on windows.
This matches the code for gcc, further up, which does:
equals(QMAKE_HOST.os, Windows): \
paths = $$split(line, ;)
else: \
paths = $$split(line, $$QMAKE_DIRLIST_SEP)
Change-Id: I6a0175f9d14ae9ca188553483b7868f0549c784a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
stdcpp-path is needed to set the correct stdc++ library in libs.xml file.
This reverts commit 1366c4f046.
Change-Id: I79b398c5d97c1e98bf503ef7b95b2e9f0f18bc11
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Images in an ico file contains transparency information stored as a 1
bit mask. However, when the depth is 32 bit, it means there is an
alpha channel present, and the mask should be ignored. The Qt ico
handler failed to do that. This has gone unnoticed, since the mask in
such images is typically set to all 0s, and so makes no difference to
the result. But ico files exist that contain junk mask data, so fix
the reader to ignore it properly.
Fixes: QTBUG-75214
Change-Id: I1b4456d71689ec783076a582f2fb215e7dc56e62
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>