The attribute can be set to suppress native dialogs for example
for testing purposes.
Task-number: QTBUG-51074
Change-Id: I35611e07e00b7a060f22b49d6ab6f3b8627f8aca
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
This is a simplistic patch to make it easier to debug touch input when
using multiple physical or virtual devices.
Change-Id: I996237cdce5e0ff0c4a0660dabb0d190679ab585
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Some drivers don't support GL_NUM_EXTENSIONS, so we may be reading
random bits from numExtensions.
Change-Id: Ibe61fa6d7c379f3f1428458edd3e0ddba0eb04d7
Task-number: QTBUG-48943
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Native implementation was missing and so far it only used the Qt
internal fallback mode.
Unfortunately this does not apply to Windows Phone 8.1.
Task-number: QTBUG-49766
Change-Id: I8cbbb0c843d077d7df1396d673fedeab2799b5a6
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Some entries were not updated and tests failed to succeed on platforms
which need to deploy content/testdata.
Change-Id: Ieb2b44c375b04cbaaecc1fb2303cc2478b86a100
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
testdata needs to be deployed to temp and current directory
needs to be set to that directory for the test to succeed.
Change-Id: I2dd023af9073d90afbb4ad60fcfb50bb1af4e159
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Change-Id: I2e95456146b6ce646e244e962082f2967bcaed42
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
So far we've been dependent on the focus behavior setting in OS X
system preferences. This change allows us to start testing both
behaviors on any platform.
Change-Id: I9ce004f8b9479f8e722a387b795de16edb166a07
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
These tests are not required to build qmake, so move them
together with the other tests.
Change-Id: I191e7552e819e8d68a27da3ac1b5258d57145155
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
WinRT does not allow do connect to the localhost due to security
constraints and sandboxing. Hence we need to disable those
currently.
Change-Id: Idb8c71397a41e5fa5bad9d618dba1bb389e71b9c
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
- Use splitRef() instead of split(), avoiding small temporary
QStrings.
- Don't remove all spaces before splitting, trim strings at
the QStringRef level later, where needed. This will reject
nonsense strings like QSQL_ LITE _BUSY_ TI MEOUT= 1 2 3 that
were previously (wrongly) accepted.
- Use C++11 range-for loop.
Change-Id: I875c4cf47b7a283ba55783f70c903bb9947e1cd7
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
That feature is a poor man's session management for applications
that do not implement any specific session management features.
It badly interferes with proper session management support, so
applications must be able to disable it.
This enables fixing applications with
QGuiApplication::quitOnLastWindowClosed() true - the default -
dying too early, before they are enumerated for the list of
applications to restart on session restore, thus preventing them
from being restored. See
https://bugs.kde.org/show_bug.cgi?id=354724
[ChangeLog][QtGui] Qt asking to close windows on session exit as
a fallback session management mechanism has been made optional.
Disabling it fixes session management for applications that
implement full session management. See
QGuiApplication::isFallbackSessionManagementEnabled().
Task-number: QTBUG-49667
Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Instead show LGPLv3 and GPLv2 as valid options for the
open source edition.
Change-Id: Id7a203226428031ec873cbaf106dca14a854f155
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Instead of casting the function in the calls to EnumFontFamiliesEx(),
use the correct signature and cast inside the callbacks. Also
avoid unconditionally casting the TEXTMETRIC parameter to
NEWTEXTMETRICEX since according to documentation
NEWTEXTMETRICEX is passed for TrueType fonts only.
Task-number: QTBUG-50804
Change-Id: I0393474ac06000fc3f12d2dbc2a5aa37a6b44849
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
They prevent move special member functions from
being synthesized by the compiler.
Change-Id: I90c4a6e286734ef3906ee833826bd3bfbdad3874
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Up to now, the download folder display name was queried using
FSFindFolder and kDesktopFolderType. Now that NSFileManager can be used
unconditionnaly, the query has been replaced to use NSFileManager.
[ChangeLog][QtCore][OS X] QStandardPaths now returns the correct
display name for the download folder.
Task-number: QTBUG-50262
Change-Id: Ie16c8daea3261a4dd5ca051956fc08d51656e0fa
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
I had intermittent failures with this kind of code in my unittests,
not sure why yet. This test seems to pass reliably, apart from
helgrind saying it triggers the known race in QFuture::isFinished,
for which Marc is working on a fix.
Change-Id: I4aabe77566dc1af859a016ffe8a4cce19ddf25c8
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This allows methods that return an icon name, to sometimes also
return an icon full path (e.g. because the icon was dynamically generated
and stored into a local cache on disk)
Change-Id: Ib01c3955f4b64236463846241d9814b2d0686634
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
I had a doubt about what it would be, turns out it's ReadWrite.
Turns out it's documented, too :-)
Change-Id: I87c2ffc81aa240ffa88c495fe250b022d7fb3c21
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
systemd >= 209 merged the individual libraries libsystemd-journal,
libsystemd-login, libsystemd-id128 and libsystemd-daemon into
a single library, libsystemd. To ease the transition one could pass
an option to its build to generate stub libraries and matching
pkg-config files. With systemd >= 229 this option has now been
removed, causing the build to fail when the journald option is
enabled.
Change-Id: I26670f207f1a9e79c16be5ce8c8a49353143c5ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
m_activity.getActionBar() returns null when a .NoActionBar theme is
declared in AndroidManifest.xml file
Change-Id: I671891d03913209c3f9f34a6f4dd8894c20de5c2
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
... and loops.
Every QNetworkConfiguration::bearerType() call produces lock/unlock of mutex.
Fix: cache result.
Every QHttpNetworkRequest::contentLength() call contains internal loop.
Fix: cache result.
Also cache results of QNonContiguousByteDevice::size() and
QHostAddress::protocol().
Change-Id: I01124648b1972f480905433d9b3551c2246e1bde
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Profiling shows that the call to glGetIntegerv() in this function that
queries for the currently bound framebuffer is very expensive. It's
the top hit on the CPU when profiling a Qt3D application using a
Scene3D Qt Quick 2 item. The reason it is so expensive is that this
call forces the OpenGL driver to propagate the OpenGL state through
all of the queued commands in order to answer the query. It may
also induce a pipeline stall depending upon the driver implementation.
As this function gets called on the hot path every frame whenever using
a Scene3D item and may also be called in plain Qt Quick when using
ShaderEffect items; the layer property of QQuickItem; or when updating
the Qt Quick glyph cache texture on Core profile contexts, it is very
much worthy of optimization.
This commit adds an overload of the blitFramebuffer() call that allows
the caller to provide a policy that can either:
* keep the existing behavior of restoring the previous framebuffer
binding,
* restore the default framebuffer, or
* don't restore anything and let the caller be responsible for it.
This will allow consumers such as Qt Quick and Qt 3D to use the
optimised code path. The existing overloads of blitFramebuffer()
retain the current behavior by calling with the policy to restore the
previous framebuffer binding.
Upon making this change, the cost of blitFramebuffer() is massively
reduced. A follow up commit will optimize this further.
Change-Id: I417abb7da916ae5088f6817e4eff8ea02c8c5803
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
caught with static analyzer which only warns for trivial cases:
- Container must be local
- Container isn't passed to any function, assigned to another
container or assigned to.
Change-Id: I3f3aa73c128a56f067fa8745990977445a495ac4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Similar to QMap::equal_range().
Will allow to easily fix inefficient code such as:
foreach (auto value, hash.values(key)) { ... }
[ChangeLog][QtCore][QHash] Added QHash::equal_range()
Change-Id: I6e19e25de632e897ad83d3141d9d07f0313f7200
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
I didn't add a transpose(), because r = r.transposed() is
perfectly capable of filling that role, and just as
efficient. Existing API mistakes are no excuse to create
more of them.
[ChangeLog][QtCore][QRect/QRectF] Added transposed().
Change-Id: Ic38721e9028496fc9b50f4d4cef2e7a60532eed8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
After this change, this was the distribution of calls in
QtGui and QtWidgets when the patch was developed for 5.4:
QtGui QtWidgets
move 23 63
copy 23 36
Change-Id: If3f536e52fc242c585e7fa0662049c0657efcc9c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Prevent potential detaching by using constBits()/constScanLine() instead
of bits()/scanLine().
Change-Id: If03f8d4d3b8ed4c07aed5eff7f580e57ca771919
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QFlags::setFlag is most useful to replace explicit constructs like
if (condition) {
someFlags |= TheConditionFlag;
} else {
someFlags &= ~TheConditionFlag;
}
with
someFlags.setFlag(TheConditionFlag, condition);
Change-Id: Ie4586681c83e0af812d5bbf14965aad51941a960
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This patch makes sure that all events posted using Qt on top of the
GLib event loop have the loopLevel counter incremented.
This is done since Qt depends on the fact that all deleteLater() calls
are issued within the scope of some signal handler (in other words,
triggered by the chain sendEvent() -> notifyInternal2()).
There is a side effect though: in the conditions affected by this
patch, that is deleteLater()s issued within a glib event handler for
example, manually calling processEvents() or sendPostedEvents() with
or without the QEvent::DeferredDelete flag has the same effect, and
deferred deleted events are always processed.
While this is not a currently working feature which the patch breaks,
this side effect seems to be difficult to avoid without separating
sendPostedEvents() and processEvents() into a public and a private
method, in order to detect when they are manually called.
Such change could perhaps be done for Qt6.
An autotest for QTBUG-36434 is also included.
Autotesting for QTBUG-32859 seems to be more challenging in this
respect, due to its dependency on GLib.
Task-number: QTBUG-18434
Task-number: QTBUG-32859
Task-number: QTBUG-36434
Change-Id: Ib89175aa27c9e38bca68ae254d182b2cd21cf7e9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QPlatformWindow::mapToGlobal() should be used to obtain global coordinates
for foreign/embedded windows. They do not have a parent QWindow, but the
geometry passed in might be local to their native parent window.
For normal top-level windows, this is a no-op.
Task-number: QTBUG-50206
Task-number: QTBUG-41186
Change-Id: I00889b28db69ae65057f48b9e74bd4d8cfffa136
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Ensure no detaching occurs by using Container::constFirst()
and QImage::constScanLine().
Change-Id: Ie197d795d9329de8be76ed388ba2c71ccf201f5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Preparation for Apple tvOS support, which shares a lot with the iOS
platform.
Change-Id: I543d936b9973a60139889da2a3d4948914e9c2b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The user-defined copy assignment and copy constructors
inhibit the move special member functions.
We cannot do something about it in Qt 5, because the
class is exported (which it shouldn't be), and because
making it trivially-copyable might change how it is
passed to functions by value, so we need to supply all
the missing member functions manually.
Change-Id: Ic710b449f6abd386449fa6df71e8bc9bd0f98d2b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Unfortunately, we cannot rely on Q_DECL_EQ_DEFAULT, so I
needed to code the special member functions by hand.
The 'reserved' field is pretty useless, since the
existing ctors didn't initialize it, but just in
case someone finds a way how to store information
in there, deal with the field in the usual way:
set to nullptr in the move ctor and swap in the
move assignment operator.
Also schedule all this for removal again come Qt 6
(then without the reserved field).
This amends a83be780ae,
which only dealt with QXmlStreamAttribute.
Change-Id: I6898e5d0423c9519f7c07d23e2c6d2700508151e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The user-defined dtor inhibits the move special member
functions.
We cannot do something about it in Qt 5, because the
class is exported (which it shouldn't be), and because
it's polymorphic (which it also shouldn't be), so we
need to supply all the missing member functions manually.
Add a note to remove the inheritance from QPixmap in Qt 6.
Change-Id: I86a1a3fe7b84247b3e604cb008aa17bb673c8468
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>