Change-Id: I97821ffa0c485815c781dc4f98012b0b490da90a
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
While this wouldn't have any consequences in practice, it was
perceived as confusing to users that Directwrite 2 was listed
as enabled in the summary when Qt was configured with -no-directwrite.
To give a better presentation of what will actually be compiled,
we force disable Directwrite 2 when Directwrite is disabled.
Task-number: QTBUG-52952
Change-Id: I779772ecc4d47b20854588cedde2b097ae22ded4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Qt Creator uses e.g. CONFIG+=iphoneos to make the default build target
be device. Now that the exclusive build is named simulator_and_device
to support e.g. tvOS, we need to handle the old CONFIG names for
backwards compatibility.
Task-number: QTBUG-52970
Change-Id: I0f864bebf11e657eb4225a182753037205f450b8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Previously, the test succeeded for MinGW 64 5.3, which is still missing
IDWriteFontFace2. Amends change 33044b83c2.
Task-number: QTBUG-52952
Change-Id: I959f604d6bb9aa0efc765f2e26ec58d852ab92de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Coverity, CIDs 10917, 10918. This fix looks like purely cosmetic
and unneeded: we check f->error() after f->open(). Unfortunately,
f->open() can fail without setting an error (if you provided an invalid mode).
Change-Id: Idbfcb9305b3f004e5e425cb6076b41e193b8d473
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Coverity, CIDs: 10724, 10725. Data member _iterator is not initialized.
Change-Id: I0c94f5cef031e208aab1687209282fae0317f0ab
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Andre reported issues to me which seem to arise from this patch.
Most notably, he showed me a backtrace containing the following
assertions. Note how the dtor of ConnectionListsRef is
accessing shared data which used to be guarded by the connection
lock, which got broken by my patch that is now reverted hereby.
A future patch can potentially reintroduce my performance
optimization but that will require more evaluation and better
checks with TSan or helgrind. Sorry for this.
Thread 7 (Thread 0x7fffc7fff700 (LWP 32705)):
.0 0x00007ffff55ef267 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
.1 0x00007ffff55f0eca in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
.2 0x00007ffff62286d7 in qt_message_fatal (context=..., message=...) at
global/qlogging.cpp:1647
No locals.
.3 0x00007ffff622472a in QMessageLogger::fatal (this=0x7fffc7ff8650,
msg=0x7ffff658c9d0 "ASSERT: \"%s\" in file %s, line %d") at global/
qlogging.cpp:792
message = {static null = {<No data fields>}, d = 0x7fffc14f5050}
ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area =
0x7fffc7ff8630, reg_save_area = 0x7fffc7ff8570}}
.4 0x00007ffff621cf43 in qt_assert (assertion=0x7ffff6657ba8
"connectionLists->inUse >= 0", file=0x7ffff6656fa7 "kernel/qobject.cpp",
line=3646) at global/qglobal.cpp:3036
__PRETTY_FUNCTION__ = "void qt_assert(const char*, const char*,
int)"
.5 0x00007ffff64db388 in
QMetaObject::ConnectionListsRef::~ConnectionListsRef
(this=0x7fffc7ff8710, __in_chrg=<optimized out>) at kernel/qobject.cpp:3646
No locals.
.6 0x00007ffff64dbe71 in QMetaObject::activate (sender=0x9d2110,
signalOffset=3, local_signal_index=1, argv=0x7fffc7ff8850) at kernel/
qobject.cpp:3685
locker = {val = 140737328754040}
connectionLists = {connectionLists = 0xa9c460}
lists = {0xa9c4e8, 0x7ffff64a0ceb
<QMetaObjectPrivate::signalOffset(QMetaObject const*)+89>}
numLists = 1
currentThreadId = 0x7fffc7fff700
signal_index = 4
empty_argv = {0x0}
__PRETTY_FUNCTION__ = "static void
QMetaObject::activate(QObject*, int, int, void**)"
.7 0x00007ffff64db300 in QMetaObject::activate (sender=0x9d2110,
m=0x7fffe2d66a80 <CppTools::CppModelManager::staticMetaObject>,
local_signal_index=1, argv=0x7fffc7ff8850) at kernel/qobject.cpp:3602
No locals.
<snip>
Thread 4 (Thread 0x7fffc77fe700 (LWP 32712)):
.0 <function called from gdb>
No symbol table info available.
.1 0x00007ffff55ef267 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
.2 0x00007ffff55f0eca in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
.3 0x00007ffff62286d7 in qt_message_fatal (context=..., message=...) at
global/qlogging.cpp:1647
No locals.
.4 0x00007ffff622472a in QMessageLogger::fatal (this=0x7fffc77f7500,
msg=0x7ffff658c9d0 "ASSERT: \"%s\" in file %s, line %d") at global/
qlogging.cpp:792
message = {static null = {<No data fields>}, d = 0x7fffb94f14b0}
ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area =
0x7fffc77f74e0, reg_save_area = 0x7fffc77f7420}}
.5 0x00007ffff621cf43 in qt_assert (assertion=0x7ffff6657ba8
"connectionLists->inUse >= 0", file=0x7ffff6656fa7 "kernel/qobject.cpp",
line=3646) at global/qglobal.cpp:3036
__PRETTY_FUNCTION__ = "void qt_assert(const char*, const char*,
int)"
.6 0x00007ffff64db388 in
QMetaObject::ConnectionListsRef::~ConnectionListsRef
(this=0x7fffc77f75c0, __in_chrg=<optimized out>) at kernel/qobject.cpp:3646
No locals.
.7 0x00007ffff64dbe71 in QMetaObject::activate (sender=0x9d2110,
signalOffset=3, local_signal_index=1, argv=0x7fffc77f7700) at kernel/
qobject.cpp:3685
locker = {val = 140737328754040}
connectionLists = {connectionLists = 0xa9c460}
lists = {0xa9c4e8, 0x7ffff64a0ceb
<QMetaObjectPrivate::signalOffset(QMetaObject const*)+89>}
numLists = 1
currentThreadId = 0x7fffc77fe700
signal_index = 4
empty_argv = {0x0}
__PRETTY_FUNCTION__ = "static void
QMetaObject::activate(QObject*, int, int, void**)"
.8 0x00007ffff64db300 in QMetaObject::activate (sender=0x9d2110,
m=0x7fffe2d66a80 <CppTools::CppModelManager::staticMetaObject>,
local_signal_index=1, argv=0x7fffc77f7700) at kernel/qobject.cpp:3602
No locals.
.9 0x00007fffe2a7aa0a in CppTools::CppModelManager::documentUpdated
(this=0x9d2110, _t1=...) at .moc/debug-shared/moc_cppmodelmanager.cpp:299
_a = {0x0, 0x7fffc77f7740}
This reverts commit 8619214c5e.
Change-Id: I13df84012e74a01db750a99a8e5e4bf5357c7f78
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Saves reading two lines and allocating storage for them.
Change-Id: I71f6c7019f4c097897945eea52851e4623b75dc2
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
qIsEffectiveTLD() and containsTLDEntry() now
have overloaded versions with QStringRef arg.
Change-Id: Ic2b7fd56c8ea1579d3e4bdf4ed0e10405515d417
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
These types are held in QVarLengthArrays, so benefit
from being trivially relocatable. They are also part
of the private API, so there's no BC issues with
potential uses of these types in QList, except for
QPainter::PixmapFragment, which consequently has been
marked as relocatable only.
Change-Id: I90fb9a19231c6f5c71c593602fc997ffafe8f047
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... by replacing them with C++11 range-for loops.
This is the simplest of the patch series: Q_FOREACH took a
copy, so we do, too. Except we don't, since we're just
catching the return value that comes out of the function
(RVO). We can't feed the rvalues into range-for, because
they are non-const and would thus detach.
Change-Id: Ia086b1f3d072dd56c3545780490be03346df2880
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
To allow reusing the logic which detects the appropriate
Android SDK version to use for building the Java code,
this is now separated into its own .prf file. This is
required by Qt Purchasing to avoid duplicating the logic
there.
Change-Id: Ief5f5e70dab79751ef9e5a9c4a019bfda686cd09
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Instead of checking for the presence of a NUL,
then splitting the QByteArray at NUL separators
just to join the parts with different binders,
simply use replace('\0', ...).
Change-Id: I0e0453b80f63cffce4a0ff152120ece754211166
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... by replacing them with C++11 range-for loops.
The function QObject::children() returns by const-reference,
so its result can be passed to range-for without further changes.
Change-Id: Ic330a8e110d6dd5624b9e328ece2a614d5c71e4f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().
Change-Id: I47c5308a6ad220b4c5495e55a3b0d38547bfa8d9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... (or trivially marked const) local variables or
parameters, by replacing them with C++11 range-for
loops.
Also ported one indexed loop.
Change-Id: Idddcac48ce7527b1ea674671ceb9aaf4d31fb42e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The flag causes context validation to be skipped by ANGLE. If validation
is active nothing is rendered on Windows Phone (just a black screen) for
widget applications.
Everything works as expected without validation so we do without it.
Change-Id: I6f9ea249b653ba5a602bc33e75105c57b686b92d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
cursorFlashTime will now change dynamically from QPA while platform
controlled text selection (on mobile) is ongoing. This patch
will therefore update QWidgetTextControl so that it listens to the
cursorFlashTimeChanged signal and changes the blinking rate when
triggered.
Change-Id: I89bdfaab0e93d1d055baba6b132a7911d2ae84f6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
When text is selected on e.g iOS or OS X, the cursor should not
blink (or be visible), regardless of style.
Note that SH_BlinkCursorWhenTextSelected is actually
implemented to mean "hide cursor when text selected"
in e.g QWidgetTextControl. If this is a bug or not
is hard to say, but it is anyway the desired behavior
on Apple platforms.
Change-Id: I541dabbe1945c266107ba39e3adb006bec0258bf
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
cursorFlashTime will now change dynamically from QPA while platform
controlled text selection (on mobile) is ongoing. This patch
will therefore update QWidgetLineControl so that it listens to the
cursorFlashTimeChanged signal and changes the blinking rate when
triggered.
The previous code had a function setBlinkingRate, which is now
changed to setBlinkingCursorEnabled (like in QWidgetTextControl).
This is because all callers of the function did either pass
"QApplication::cursorFlashTime" or "0", which basically means enable
or disable blinking. This moves the control of the blinking rate
fully to QWidgetLineControl, which simplifies the code a bit, especially
when cursorFlashTime can change.
Note that when setting a blink period to 0, it means "show the
cursor without blinking". AFAICS, the current implementation did
not guarantee that. This is now made more explicit in the code. If
hiding the cursor is needed, a separate function "setCursorVisible"
is already available for controlling that.
Change-Id: I7d39882de192a23e6e7ba370749892c7702c3d3b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Drops without matching time stamp do not work. I have fixed the issue by
reanimating the findXdndAwareParent() function (adapted to XCB) and
using it to find a matching transaction if all else fails.
Task-number: QTBUG-45812
Change-Id: Ibca15bbab02ccf2f25280418e9edf36972ebf9a0
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Use size_t as index type for C array.
Change-Id: I0980f47ef881108c9639a2a73fbb878b7d8161d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The synthesis of mouse events for unhandled tablet events is now in
cross-platform code, so the platform plugins don't need to do it.
Task-number: QTBUG-47007
Change-Id: I948be398e4b1ab627a8dc97ca20c08dba4390238
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
... iterate over the container itself instead. Avoids
temporary QList creation as well as the lookup cost
when actually calling value(key).
Change-Id: I63a11e6f8f19919145ea142309ddbacd99c3bfc3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().
Change-Id: I9158c507f9249a7322b11c982bfcab1e6ed4a38a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
... (or trivially marked const) local variables,
parameters, or data members with trivial loop bodies,
by replacing them with C++11 range-for loops.
Change-Id: I25e9e2148abd7676305ebd18754dc647f217e48b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
These types are held in QVarLengthArrays, so benefit
from being trivially relocatable. They are also part
of the private API, so there's no BC issues with
potential uses of these types in QList.
Change-Id: I8adc0c801885f8fffa05eb1f173d7e4bb085ba7b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The rationale is to be consistent with other operating systems, all of which
print a version number following their name (possibly in parenthesis if the
version is typically non-numeric as is always the case with OS X so far and
has been with Windows).
The version number printed here is only two digits, both for consistency with
OS X and because the first two digits of an operating systems's version are
typically the limit in marketing materials and general presentation.
This also fixes a bug where the returned string would be "Windows " (note the
space) in the case where the name of a future Windows version was not known.
[ChangeLog][QtCore][QSysInfo] The output of QSysInfo::prettyProductName
now includes the Windows OS/kernel version number. In case of future versions
of Windows, a valid string is now returned.
Change-Id: I588c2e0aaae19337eb69b4645f8bccf8270c75bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QAtomicPointer is CopyConstructible, but std::atomic<T*> is not,
for a reason. So avoid putting them in a QVarLengthArray, using
a dynamic heap allocation instead. This sounds wasteful until
you realize that virtually all users of QMutexPool (and we know
them all) use the global instance(), and that each QMutex (131,
by default) is heap-allocated, too.
Change-Id: Ie9c95671ec42a1f51919c18631b623aad2c0d6ba
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We can deselect the item in single selection mode.
It was introduced in
28a21d98ef
The motivation was QTBUG-8836 - and furthermore it was in
many situations already possible to deselect the item by
clicking in the viewport.
A restore of selection by reacting on the signal
QItemSelectionModel::selectionChanged is easily possible
If the behavior was changed to follow the documentation,
such a similar simply work-around to allow deselect would not be
possible.
Task-number: QTBUG-49217
Change-Id: I5466337dc547414d3e0c045ab35d618dba56c508
Reviewed-by: David Faure <david.faure@kdab.com>
This is relevant if the custom filter passes through some categories to
the previous one (which might be the default one). In this case changes
to the filter rules never took effect.
Change-Id: I1a3ab569857d43621ce5df4e690c6e64e6bc7a66
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Currently, a tab's text is used as its accessibleName.
When a tab's text is empty, there is no API to set
the tab's accessibleName. The two APIs are added to
set and return the accessibleName property of a tab.
Task-number: QTBUG-46530
Change-Id: Idf88b5f905fe66c6365ea0eeb650e74211db90e1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Do not paint over CE_MenuBarItem when the palette is set
to transparent by QStyleSheetStyle.
Task-number: QTBUG-49115
Change-Id: Ib364017179d0852490daad094361eae0ead4fd5f
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
struct BacktraceParams is too big (more than one pointer), so using it
with QList is inefficient. Let's use QVector instead.
Change-Id: Id75834dab9ed466e94c7ffff144572c1eb3fb0e5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
With this, the operations usually called when inspecting
a QRegion are now all nothrow (when using begin()/end()
instead of rects()).
Change-Id: I7012be2ac2350ab7d14dae58df3b8fe4956233db
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The "path" of a mailto URL isn't a file, so we shouldn't try to do
glob-based matching. I was getting application/x-ms-dos-executable
for a .com domain and application/x-perl for a .pl domain...
Change-Id: Ifc346c3bba83ba1a8476db3202492f4c2e4d52bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously the user only got informed about the application getting
inactive or hidden, but not when the application was reactivated again.
This can cause problems with applications using for instance a camera as
that gets disabled when not being active and never return to a active
state again.
Change-Id: I5c1d8750db8e75043ecf261616a0bc98434a3863
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When running a process that requires elevated privileges (such as
regedt32 or an installer), the Win32 API CreateProcess fails
with error ERROR_ELEVATION_REQUIRED.
Fall back to ShellExecuteEx() using the verb "runas" in that case,
bringing up the UAC prompt.
Task-number: QTBUG-7645
Change-Id: Iee82a86a30f78c5a49246d2c0d4566306f3afc71
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Add command line options to be able to set the QCoreApplication attributes
that influence Open GL context creation and add a status label at the
bottom that displays it besides the QT_OPENGL environment variable.
Task-number: QTBUG-52693
Change-Id: Id9793292596e0feb3da5220fde2e5b2e495f87ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Suppress message dialog of the test helper as does QTestlib.
Task-number: QTBUG-52714
Change-Id: I5efd7d72f77c7689500ecaccf46f1f9dfb312140
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Allow sockets in bound state to wait for notifications.
Task-number: QTBUG-52449
Change-Id: I5c02bd61db68abca652312d4d59023963b05b3c5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Make the destructor of QDBusArgumentPrivate virtual as it may store
other types (QDBusDemarshaller). Suggested by Thiago.
Fixes a "new-delete-type-mismatch" error reported by AddressSanitizer.
Task-number: QTBUG-52176
Change-Id: I9ac19050840530ca9cae893b10093185d31e0448
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
a != A || a != B looks suspiciously wrong.
Found, unfortunately, only by Coverity (CIDs 152247, 152249).
Change-Id: Ia7ec810dde2a3a33ae6fc5644a4eebf279dcffe8
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Use the correct parent path for the renamed file when creating
QFileInfo. It must be a path to the parent directory, not to the
root directory of the model.
Modify tst_QFileSystemModel::setData() to test renames in subdirs
of the root directory of the model.
Change-Id: I69d9e3a937616857a81617791ed118af3f6eea05
Task-number: QTBUG-52561
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>