Saves around 0.5KiB in text size on optimized GCC 5.3
Linux AMD 64 builds.
Change-Id: Iaf2664e670a96136031bac67e4012d4f7324eb47
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Simplifies the code and is also more efficient, because
it copies less data.
Change-Id: I9ad0c372fb4fa6f5818d9d6cb7b7cf35935f8565
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This changeset enables running a QCoreApplication from within an Android
Service. The Android Application running can now have a QtActivity or a
QtService, but having both in the same process is not supported.
This patch was based on Cory Slep's patch
[ChangeLog][Android] Qt can now be used to easily create Android Services.
Task-number: QTBUG-37221
Change-Id: I0fd693daaa85b991940ffe9cc41c483022677199
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
In recent Xcode versions it doesn't work as expected, and caused build
failures in downstream modules, so we disable it until the cause can
be investigated further.
Change-Id: Ie54c7256a10d73610ec7e481b9d665b75e396365
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This reverts commit c4ecb81d6d.
Hard-coding the library suffix into the linker flags was wrong. The
library suffix is handled at runtime with DYLD_IMAGE_SUFFIX, set
as part of the Xcode scheme or during debugging in .lldbinit.
Change-Id: I11907b2755f7f187fb6fa18202813fde9ada4354
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Pass modeltest after clear(). Otherwise it fails because more flags
than Qt::ItemIsDropEnabled get returned for the QModelIndex().
Change-Id: I8f11515cc7dc9383f528f785312ffb77b3c2699d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This method does not modify the object.
Can't change the API, so overload and mark the old function
for removal in Qt 6.
Change-Id: I4aee2bc19209646adc21388375aedd20a09129d0
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
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>