The protocol was originally developed by Canonical, currently supported
by Unity and Plasma.
Adjust some tests to use the non-native menu bar when they require it.
[ChangeLog][XCB / X11] QMenuBar uses the unified D-Bus AppMenu menubar
when the desktop environment supports it.
Change-Id: Iea74b40522573bcc4f70168fe7fa2a49b4f3fc21
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
The auto.pro file would bail out or skip based on the availability of
the session bus at qmake time. That does not make sense for cross
compilation: the session bus may be available on the target even if it
is not on the compilation host.
Change-Id: I459a518f3411acb39e8dcdad9d32ded1f9b57029
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move the bool QFileDialogPrivate::defaultFileTypes to QFileDialogOptions
as defaultNameFilters and add a static function returning the
translated default filter string. Let QFileDialogOptions::nameFilters()
return the default filter until a value has been set.
This removes the need for special handling for empty filter lists
in the QPA plugins. As a side effect, Qt Quick Controls's FileDialog
will then also default to "All files" if no filters have been set.
Task-number: QTBUG-50644
Change-Id: I9ba271a472d4fa03767b540ef6f1399f5ca4408e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
QListWidget uses a set of slots for its selection model that are
connected only at creation time. This patch adds the missing
connections cleanup and setup when a user changes the selection
model.
Task-number: QTBUG-50891
Change-Id: I942bae6c471ea1ae22637d09b96d6fbd422f653f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I075932cfb9fdd38fb8d54da19e7d72b8cdec49f3
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Change-Id: I83df0d0bbac66957dc06e2805acf2c47d172fed8
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
std::vector is all that the Array original author dreamed about,
and more: never shrinks capacity, non CoWed, ...
Appart from append(), the Array API was modeled after std::vector
(size_t size_type, etc) already, so the port to std::vector is
minimal. The only change besides append() -> push_back() was not
assuming const_iterator being const T*.
Remove now-unused Array.
Change-Id: I02bc71441d01e554e320746d82dbc00f74c5466d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Fix warnings in file qwindowswindow.cpp. Remaining part of a refactoring
done in the 5.6 branch.
Task-number: QTBUG-50804
Change-Id: I4d7b423e0802ac39109c30c0de615664d3ee9216
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This also reverts commit 018e670a26.
The change was introduced in 5.6. After the refactoring, 14960f52,
in 5.7 branch and a merge, it is not needed any more.
Conflicts:
.qmake.conf
src/corelib/io/qstandardpaths_mac.mm
src/corelib/tools/qsharedpointer_impl.h
tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
The old code called insert for each item, leading to constant
reallocation of the data structure. Instead rely on the fact
that a QVariantMap (as well as the variant list) is sorted, so
we can convert to the QJson data structure in one go without
lots of reallocations.
Task-number: QTBUG-44737
Change-Id: Id2d38d278fb9afa5e062c7353b4d4215bdfb993c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QJson has a size limitation for arrays and objects. Make sure we
don't go over that size limit and create corrupt objects when
inserting data.
Change-Id: I45be3caefc282d8041f38acd120b985ed4389b8c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I62b55dde4a21a46470cafcc0e0b46bc70c097052
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Change-Id: Ica66ab2b48266590b14d16a323b572f63168a580
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
If the deployment target is OS X >= 10.10 or iOS >= 8.0, we always have
the NSProcessInfo API available and do not need to compile-in this code
at all.
Change-Id: I8470a5be475a82e7b88d62f4558925f62527b6f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This fixes a regression introduced in
9daeb6fe9d.
Change-Id: I3100b307bb65c90bdc023be4993afaea666e409d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
If the WHERE clause is used in a query involving multiple tables,
such as generated by QSqlRelationalTableModel, the table prefix
may be necessary to disambiguate column references. It is harmless
if not needed.
Task-number: QTBUG-43320
Change-Id: I39e1ab7359bf748afa8bcd8578220e3abb3ee24a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
SavedPersistent is larger than a void*, so holding it in QLists
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.
Fix by marking it movable and holding it in a QVector instead.
Take advantage of rvalue-enabled QVector::push_back(); optimize
element construction by using aggregate initialization.
Change-Id: I4fd88879aa13e6536d59d164b3c33fbc2fead77f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
These types are larger than a void*, so holding them in QLists
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.
Fix by marking them movable, and holding in a QVector instead.
Change-Id: I78774fc78d787241aaadc4f819b6d229e6200f46
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Also reserve a QList in QPrinter::supportedPaperSources().
Change-Id: I94d24b81d7adcad2b28d36efdbef5a8726412f1a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
A QList<QPair<int,int>> is one of the most dangerous ones, because
it fundamentally changes memory layout, and therefore performance
and invariants, when going from 32-bit platforms (array list) to
64-bit (vector-like).
Port to QVector instead, which has a consistent design across all
platforms.
Also port from QPair to a simple struct { code, depth }, because
member names such as 'first' and 'second' have no semantic value
and make code using them very hard to understand.
Change-Id: I86c95d78dbb2e82ec222d6eae8ba11568e3ff0af
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Change-Id: I86afe7104d506b840130517ae8066588fab2d745
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
- Instead of a QStringList, use a const char 2D array
to hold the system user names. Don't remove the
current user from that list, skip it duing processing.
- Extract Method make_where_clause, optimize it and
cache its result. Instead of creating a QStringList
and join()ing it at the end (sometimes twice), append
to the result QString directly. Reserve the max size
of the result string, which is statically known.
- Keep the query select statements in QLatin1String.
They are only used in QStringBuilder expressions.
Change-Id: I0593d2812da671a541d49a6136f3ff3d784c63d5
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
It's private API, so we can.
As a consequence, had to add nothrow member-swap and, in
QMimeGlobPattern, remove the user-defined empty destructor
to un-inhibit the (nothrow) move special member functions.
Change-Id: If5bb72db3c823c7b0e372f9bec99c7242d11839b
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
It didn't make the class implicitly shared, but required an
additional heap allocation on construction and copy, as it
used 'only' QScopedPointer. As it's private API the pimpl
is also not needed for BC reasons.
So inline the data members, and some trivial accessors.
As a by-product of removing the copy special member functions,
we gain nothrow move special member functions.
Interestingly, the memory layout of a QList<QMimeMagicRule>
(replacing which is the topic of a future patch) doesn't
change due to this change, because the type that formerly
fit QList very well now is too large. But copying the type
outside QList now no longer allocates memory.
Saves more than 2.5KiB in text size on optimized GCC 5.3
Linux AMD64 builds.
Change-Id: Ie3588cb5693227da6f1bfa196db924e075a750b3
Reviewed-by: David Faure <david.faure@kdab.com>
... instead of re-evaluating its expression. More readable.
Change-Id: I18c6ab3bbc4c5a14328f9910fab991f6cad5549d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
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>