Task-number: QTBUG-35743
[ChangeLog][QtTest][Windows] Use correct UTF-8 encoding for XML test results on platforms with different console encoding.
Change-Id: Ice9d03192098f931e5dac358928e0c4421ab715e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Any cipher that is < 128 bits is excluded from the default SSL
configuration. These ciphers are still included in the list
of availableCiphers() and can be used by applications if required.
Calling QSslSocket::setDefaultCiphers(QSslSocket::availableCiphers())
will restore the old behavior.
Note that in doing so I spotted that calling defaultCiphers() before
doing other actions with SSL had an existing bug that I've addressed
as part of the change.
[ChangeLog][Important Behavior Changes] The default set of
ciphers used by QSslSocket has been changed to exclude ciphers that are
using key lengths smaller than 128 bits. These ciphers are still available
and can be enabled by applications if required.
Change-Id: If2241dda67b624e5febf788efa1369f38c6b1dba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
That way we can avoid name conflict with a namespace defined in
a different moc test
Change-Id: Id631d7c5556c9d6940e16dc53eb438dbcd0095eb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Values from different enums were compared.
Change-Id: I2faf73976e4b24abbdc915e8445256fe7a5be5bd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
The documentation implies that cd() and cdUp() functions return false if
the new directory is not readable, but that is not the case. It is an
obvious mistake in the documentation, because cd'ing into a nonreadable
directory is perfectly valid.
Provided also with a test to verify that cd() actually returns true with
nonreadable directories.
Change-Id: I4aa3e859b35c64266df510a203574e3701aea77c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Data::allocate(0) returns a pointer to read-only memory, updating d->size
will segfault. The safety check for this exists in all other QVector ctors
already.
Change-Id: Ida0fe4182de56ee62c7f91e8652cfafbfd7b8410
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Do not apply additional encoding when reading process output.
Fixes errors when encountering UTF-8:
Traceback (most recent call last):
File "./generate_expected_output.py", line 117, in <module>
generateTestData(path)
File "./generate_expected_output.py", line 106, in generateTestData
out.write(data.decode('utf-8'))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdc' in position 5485: ordinal not in range(128)
Change-Id: Ib827787a59a18b4d3d0601645856517f43c01fc3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Evaluate command line arguments and use directories only when empty.
Change-Id: I818ec13c686018a3f607e91174e57d8f8bbf15f7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
The compiler service needs to know what options to pass to the compiler,
and these options can affect the outcome of the shader blob. Runtime
compiled shader output must match this file name in the binary directory.
Pre-compiled shader blobs (e.g. those placed in a resource file) are
permitted to drop options from the file name if the implementor can
ensure the blob is compatible with the target.
Defines are not written out as options, but written into the shader
source, and therefore affect the cache key.
Change-Id: I11e4a43fcf6818ddb29aca5eba3d8647ba4021a1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
The actual code in testlib now indents the duration tag when it is for a
function.
Change-Id: Iee62db9c81f11dc54e57f166bf9fb2b7012b7e03
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Commit 773dd01 introduced a general mingw platform scope, which
is cleaner and more flexible than matching the spec name.
Change-Id: Ie3a9cb791a83f7c8a51bc4e23069190c452ab521
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For example, QObject is non copyable (its copy constructor is deleted or
private via Q_DISABLE_COPY). It should still be allowed to pass a reference
to a QObject as an argument to as signal (or slot).
This fixes a compilation failure.
Task-number: QTBUG-36119
Change-Id: I9bcf477e347d69fdae2543c99781b6421883be78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The tests themselves may not actually pass, but it's a start, and allows
us to sanity-build a few things in the CI that actually produces a final
binary.
Change-Id: I02643b6ffa1522de1a7d17d737c8ab45ffac6a93
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Since now in Qt5 the moc does full macro substitution, it needs to handle
the defines passed is command argument, even if they span over multiple
tokens, or if they do not have any token.
Example:
moc '-DCOMPLEX=QVector<int>' '-DEMPTY=' foo.h
[ChangeLog][moc] Fixed passing -D of a macro defined to something more
complex than a single identifier.
Task-number: QTBUG-33668
Change-Id: Ie8131de215f1659a24af4778d52ee40cda19759f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Qt since approximately 4.4 has set the verify callback on both the SSL
store and the SSL context. Only the latter is actually needed. This is
normally not a problem, but openssl prior to 1.0.2 uses the verify
code to find the intermediate certificates for any local certificate
that has been set which can lead to verification errors for the local
certificate to be emitted.
Task-number: QTBUG-33228
Task-number: QTBUG-7200
Task-number: QTBUG-24234
Change-Id: Ie4115e7f7faa1267ea9b807c01b1ed6604c4a16c
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For convenience, it reads more easily (and is somewhat expected) to
be able to add a string to a QJsonArray like you might with a
QVariantList: QJsonArray() << "string". Previously, QJsonValue provided
a private void* ctor to explicitly deny this case because it would
implicitly convert to a boolean. This ctor provides a const char* ctor
(much like QVariant) that interprets the incoming text as utf8 and
creates a String type QJsonValue.
[ChangeLog][QtCore][QJsonValue] Added constructor to QJsonValue for const char *
Change-Id: Icafa954d3da1fb264f9d0fd7cd1a1d2fbbe15095
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
operators for +, +=, and << were added to QJsonArray to make
it easier to work with, and more closely resemble the Qt
container classes
[ChangeLog][QtCore][QJsonArray] Added convenience methods to QJsonArray for appending QJsonValues
Change-Id: I96e0a43015f7c0f980cbbef7f20bd2085ee04795
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
update-mime-database does not exist, so there is no point in
trying to build this test.
Change-Id: Id60f2f8fc3af33d3f7ae2fb4f1042356b60f6596
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
... to have a real world test case for uploading via SSL,
QHttpMultiPart (+ resetting) etc.
Change-Id: I004dd6f2507776b2fb8ebe1f02625b40abff6261
Reviewed-by: Richard J. Moore <rich@kde.org>
It seems that sometimes QCursor::setPos() will not get the opportunity
to run the event loop before scrolling the list view unless we do it
explicitly.
Task-number: QTBUG-35060
Change-Id: Ic635bd8d1a4e3dbcadf9605e88197df6a0f69fc7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Otherwise you get:
undefined reference to `vtable for QAbstractSocketEngine'
when -developer-build is not used.
Change-Id: I444140736a6bf736894dc12a20f6a4d48af2678e
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Otherwise you get:
undefined reference to `qt_qhostinfo_clear_cache()'
Change-Id: I32313f290b9e4236440ae01afe12285d4539be60
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
- Use a separate widget for each test.
- Replace hard-coded timeouts by qWaitForWindowExposed.
- Center windows on screen.
Change-Id: I45ae306fd23348ee5dec3849e64ec98843e8bf32
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Mongolian and Phags-pa characters have been given a Joining_Type
classification for contextual shaping. As a part of these additions,
one Phags-pa character has the Joining_Type value of L (Left Joining),
which no character had been assigned before.
* The unassigned code points in the Currency Symbols block have been
given the Bidi_Class property value ET and the Line_Break property
value PR, to help implementations support new currency symbols,
when they are encoded.
* Hebrew letters and basic punctuation marks have been assigned
the newly introduced Word_Break property values Hebrew_Letter,
Single_Quote, and Double_Quote.
* The Bidi_Class property has been extended with four new values
for directional isolates.
For more details, see http://www.unicode.org/versions/Unicode6.3.0/
Change-Id: Iad62d02edc58a8497898dcd6d6c70d5aece317ea
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This reverts commit 934f062203.
The patch needs to be modified a bit. Many users considers
not having the old feature as a big regression.
The feature needs to be improved with a variable that is
only set when the user uses setSingleStep.
Task-number: QTBUG-33906
Change-Id: I35e5d3e9d3d7a3ebd01807b03a0e7a424185d483
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
the diff -w for this commit is empty.
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I9c0b110e36dd80c6a0b7275aa13bc548419aca9c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
[ChangeLog][QtTest] Added test duration to xml output.
When running tests with xml output a new tag of the form
<duration msecs="123"/> is added to each test function and the test as a
whole.
Change-Id: Ibc4db066b6acf5fac6c578f5e5ca5ce4b5d8ea8e
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Fix parsing of ISO Date from being totally lenient to being semi-strict
by requiring the separator positions to be non-numeric.
[ChangeLog][Important Behavior Changes] Parsing of Qt::ISODate by
QDate::fromString() and QDateTime()::fromString() is not as lenient as
before, the date component separators are now required to be
non-numeric. This means a string like "2000901901" will no longer be
recognized as a valid ISO Date, but "2000/01/01" will still be even
though it doesn't strictly meet the ISO format of "2000-01-01".
Task-number: QTBUG-34141
Change-Id: I0e481144136c60d4cac61364b9b2c1d2cd1e78fc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Explicitly check that the QTimeZone is valid before trying to use it.
Change-Id: Iec415a2cb07071502fe71ee5ac92a7657e818f99
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The tests pass with the new test server image. Once we are using the
new test server we can remove the test for the host not found error.
Change-Id: Iac8ba6d8ce31b0865b33a003086aac0339afe338
Reviewed-by: Richard J. Moore <rich@kde.org>
It's usually a bad idea to surround slots or signals with #ifdef since
moc may not parse it the same way the compiler does.
Change-Id: I6a3623ed7cb9fbc1b966df9d60f71b7fdf91acfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
There was a comment about the test failing for max() because of an
overflow. That happens if you're at UTC or ahead of it (to the East of
the Prime Meridian), which is how this test usually gets run (UTC,
Europe/Oslo, Europe/Helsinki, Pacific/Auckland). But if you're behind
UTC (to the West of the Prime Meridian), then the overflow happens for
min().
Change-Id: Iebba49d1303e9f18f5038f5cf23c77bf83e5fd4b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The encoder is in qjsonwriter.cpp, which requires special handling for
ASCII due to the use of escape sequences. The decoder is in
qjsonparser.cpp, which only scan one character at a time.
As a side-effect, the JSON parser now reports the UTF-8 error in the
first character with error, instead of the last. This is probably what
should have been expected.
Change-Id: I52e5bc30d71466b6a36098b4150c61b2e385d8e9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Like before, this is taken from the existing QUrl code and is optimized for
ASCII handling (for the same reasons). And like previously, make
QString::fromUtf8 use a stateless version of the codec, which is faster.
There's a small change in behavior in the decoding: we insert a U+FFFD for
each byte that cannot be decoded properly. Previously, it would "eat" all bad
high-bit bytes and replace them all with one single U+FFFD. Either behavior is
allowed by the UTF-8 specifications, even though this new behavior will cause
misalignment in the Bradley Kuhn sample UTF-8 text.
Change-Id: Ib1b1f0b4291293bab345acaf376e00204ed87565
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add support to hide the cancel button on the last page of a wizard. This
is useful for wizards where the last page is used as a summary page that
should not be cancelled.
[ChangeLog][QtWidgets][QWizard] Added NoCancelButtonOnLastPage option.
Task-number: QTBUG-7484
Change-Id: I282bda55a8dec9cde6439a9285d79e0a5c6df96a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
If width was specified, but not height (or vice versa) the actual
window size was not as expected:
* The window width was not the width specified.
* The window height became 0.
This was unexpected, since if both width and height was not specified
it would fallback to becoming 160x160 (on Windows).
However, with the advent of https://codereview.qt-project.org/71999
both width and height might receive sensible defaults based on the
content of the ApplicationWindow, which would mean that it might be
reasonable to expect that you only need to specify one size component
of the window.
This also fixes an assertion in file
..\..\..\3rdparty\angle\src\libGLESv2\renderer\SwapChain9.cpp, line 81
The assertion happened when a window was created with 0 height (but
valid width), and then its height got increased, causing it to become
visible.
Change-Id: Ia9e730418e35d679907bdcc59b00c3c988216c32
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
[ChangeLog][QtCore][QVarLengthArray] Added the indexOf, lastIndexOf and
contains functions to QVarLengthArray. These functions make the class
more similar to QVector.
Change-Id: I9bd2b22bd8b7151c2d17aede36e5f2126570600b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
According to docs DynamicPropertyChange event should be sent from
setProperty function only when property is added, removed or
changed.
Change-Id: I080a27a4119a63580b03172f4b5b367338c6f440
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Adds inplace version of QImage::rgbSwapped() and QImage::mirrored() that
can be used on temporary QImage objects when supported by the compiler.
[ChangeLog][QtGui][QImage]Rvalue qualified mirrored and rgbSwapped methods for inline conversions
Change-Id: I4ffb658bf620dfc472d9db14c1aa70291c1fd842
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
The units that were supposed to have variance were completely off in the
test leading to all benchmarks with slight variance being completely
flaky.
Change-Id: Ib76593813974adee462b3f03be9370d2248d770c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
This also fixes the auto test, tst_QKeySequence::parseString() with
Win+A and Simon+G.
[ChangeLog][QtGui][OS X][QKeySequence] return Qt::Key_unknown with
invalid modifiers on OS X
Task-number: QTBUG-24406
Change-Id: Ie90393c9691f443c7c359cb3a487609a9691bc44
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The style name should be macintosh, not mac.
This also reverts commit 2f46ea9fd6.
Task-number: QTBUG-23680
Change-Id: I7fd06da165ca5bc99801c13af13fdb3d35119566
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This test doesn't fail any more.
This reverts commit 6f21509ac0.
Task-number: QTBUG-23677
Change-Id: Idc094ce0c90b8d3ba0a75d93ccef8da4801605c7
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Add an API that allows to retrieve and detach the texture from the
framebuffer object. The next bind() call will then create and attach a
new texture.
[ChangeLog][QtGui][QOpenGLFramebufferObject] Added takeTexture() for
retrieving and detaching the texture from the framebuffer object.
Task-number: QTBUG-35881
Change-Id: I2cca37f5872c1685b1238047f8b912e6534ab781
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
While there is no implementation for accessibility yet, enabling it allows
the interfaces to be used and an accessibility plugin to be developed
for this platform.
IAccessible2 and MSAA bridge autotests are disabled for this platform.
Change-Id: I2bfd07f6b21ca469b27d88ef11df723ac8ff8202
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This function has been completely broken since Qt 5.0. Unfortunately
the autotest's verification steps were somewhat faulty so returning
a null pixmap from renderPixmap() did not trigger a failure.
The implementation is now done with framebuffer objects and pixel
readback. This is not ideal performance-wise, but is the only option.
In Qt 4 pixmaps were often backed by platform dependent native pixmaps
that could be used as rendering targets for OpenGL content. This is not
an option anymore since pixmaps are raster backed on all the major platforms.
Task-number: QTBUG-33186
Change-Id: I8f558e33bf7967ac3be439fd5a3eac07b6444be5
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This makes testlib a lot more hackable since when the output is changed
in a defined way we can regenerate the expected output (eg adding the
test duration which will be a follow-up patch).
Note that the script does not work properly on Windows and not all
benchmarks work, but at least it reduces the work of adapting files to a few lines.
Change-Id: I910387cd92ff82aa629747a3a3033dae17fbd711
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The newly added generate_expected_output.py was used to get the expected
output into a more reproducible state.
Change-Id: I1ca75c8e0c5778d25c1df531bd298007aac0ff4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix QCocoaWindow::setGeometry() to respect WindowFrameInclusive
* Support fake fullscreen on 10.6 or WindowFullscreenButtonHint was not set on
10.7 and later
* Fix tst_qwindow on 10.6 and later
Task-number: QTBUG-23059
Task-number: QTBUG-34629
Change-Id: I6e032ca55b45674388b00506a424d3bd7ece429f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
When declaring a Q_PROPERTY(SomeType::SomeEnum foo ...) and SomeType is not a
QObject but a gadget, then we must still include SomeType's meta object in the
list of related meta objects.
Task-number: QTBUG-35657
Change-Id: I46195140cb5d180c4f03bb1fe06a876e3fe11267
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Change childWidget->windowHandle() to childWidget->internalWinId() in
q_createNativeChildrenAndSetParent() to determine whether should we call
childWidget->winId().
This is because in some circumstances Qt will crash due to accessing
deleted QWidgetWindow object if we use windowHandle(). Think about the
following scenario:
1) create a widget A without parent and add two child widgets B and C to A
2) create a native widget D as the child of B, note that when we set
Qt::WA_NativeWindow attribute to it, its QWidgetWindow will be created
which means its windowHandle() is not null.
3) create a top level widget E as the child of C and show it. This will
make Qt call createWinId() to A and then
q_createNativeChildrenAndSetParent() will be called to create A's native
children recursively and finally make D's QWidgetWindow object become a
child of A's QWidgetWindow object. Please note here that B will not become
a native widget just because at that moment windowHandle() of D is not
null and Qt will not call winId() to its parent B
4) Set A's parent to another widget which has been shown, setParent_sys()
will be called to A and then Qt will call destroy() to A. in destroy() Qt
will try to call destroy() to its children recursively with a condition that
the child has Qt::WA_NativeWindow been set. But D's parent B is not a native
widget right now so B and D is not destroyed. Qt will then deleted the
QWidgetWindow object of A, since E's QWidgetWindow object is a child of
A's QWidgetWindow object, it will also be deleted. Now E hold a deleted
pointer of QWidgetWindow object. This is the source of crash later.
Task-number: QTBUG-35600
Change-Id: I97a20a68e626ee62b15bb4eae580e26f8948923b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Some database systems (like PostgreSQL) use alphanumeric error codes.
Introduce a new method nativeErrorCode() which replaces number().
If the error code cannot be converted to int, number() will return 0.
Task-number: QTBUG-142
Change-Id: Ic7fba841737674b75c0c01c2263f51d2041da497
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
In a slot connected to readyRead, if the app detects that the
buffer size is too small and increases it, it expects that
readyRead() will be emitted again.
setReadBufferSize() doesn't re-enable the socket notifier when
calling from within readyRead, and readyRead itself was missing
the code to do it.
Change-Id: Ia00a3066ad3ba09d5cfae0716adc5691ae96c3fa
Done-with: Thiago
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use of mkpath/mkdir is removed in order to make the proxy less
invasive when there is no compiler service running. Creation of the
directory structure is fully the service's responsibility.
Service availability is now only checked once, at the first invocation of
D3DCompile, as it is expected to be started before the application.
Change-Id: Ib8c4f062c418497c2253daf524654e1db30dae47
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Windows 7 and later have LOCALE_SSHORTTIME, which is what we need.
Task-number: QTBUG-33718
Change-Id: I4c3f113d17102a37fb752de56f06b312f27c7887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
For IPv6 addresses don't call toAce as it returns the empty string.
We should reflect the behavior of browsers here, which all accept
cookies from IPv6 addresses.
Original-patch-by: David Tapuska <dtapuska@blackberry.com>
Task-number: QTBUG-35022
Change-Id: Ic00369e923d044ec459822b2405865c13e4185b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
If the domain is an IP address, we should not do any magic regarding
leading dots etc.
Task-number: QTBUG-35022
Change-Id: I7722de4e6027666dde27e9e37b6353e3da775d94
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
This is only possible for two important reasons:
1) QString and QByteArray d pointers are both done with QArrayData and
that class does not care that the alignof(T) changes from 2 to 1,
so we can give the pointer from QString to QByteArray
(after adapting the allocated size, which is now double)
2) conversion from UTF16 to Latin1 always has fewer bytes (exactly half)
Change-Id: I17b2690c910f3de8db55156c6d6b5f55be06d827
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The test used a member testWidget that was cleared and reset after each
test, which caused focus fights and side effects. The widget is now
created and shown only when necessary.
Change-Id: I0dc635e9d4cdf4f899994b88206bb0125526f6df
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Assume an unrelated class that declares an enum and uses Q_ENUMS. Consider
then a class that uses UnrelatedClass::Enum as a Q_PROPERTY. We used to
include UnrelatedClass in the primary class's related meta objects, in order
to support use-cases like
obj->setProperty("enumProperty", "ValueOfEnumAsString");
If however moc happens to see Q_DECLARE_METATYPE(UnrelatedClass::Enum), then it
would exclude it from the related meta objects, which would silently break the
string based enum value conversion. This was meant as an optimization, but it
isn't apparent to the developer why sometimes the string conversion would
work and sometimes not (depending on whether somebody declares that macro).
This also becomes visible in QML, which relies on the same embedded type
information for enum assignments.
This patch removes that check in moc's code generator and cleans up the code a
little. However always including the prefix of Q_PROPERTY(SomePrefix::Enum ...)
is not correct either, because it may be that SomePrefix is a namespace, which
would cause compilation issues. Therefore we limit the inclusion of related
meta objects only to Q_OBJECT decorated classes the moc has seen, and for these
we save the fully qualified name in the related meta objects array (for QTBUG-2151).
While this patch makes the previous workaround for namespace issues by using a
Q_DECLARE_METATYPE not workable anymore, by saving the fully qualified name we
are making a hopefully sufficient effort to not require a workaround in the
first place. There's always the new workaround of fully qualifying the type in
Q_PROPERTY.
One side-effect of this change is that in the autoPropertyMetaTypeRegistration
test of tst_moc, the CustomQObject for Q_PROPERTY(CustomQObject::Number
enumValue ...) is now a related meta object, and therefore when querying for
the type of this property via QMetaProperty::userType(), we are now aware of
this being an enum and try to resolve CustomQObject::Number via
QMetaType::type(qualfiedName). As there is no guarantee for this to succeed, we
must now also do what is done in the non-enum code path in ::userType(), which
is to call the moc generated type registration function.
Task-number: QTBUG-33577
Task-number: QTBUG-2151
Change-Id: Ibf20e7421cba464c558a25c76a7e1eef002c6cff
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
[ChangeLog][QtWidgets][QLineEdit] A blinking cursor in the middle
over horizontally centered placeholder text looks bad. Thus,
horizontally centered content is now considered as an exception
and the placeholder text is hidden when the line edit is focused.
Task-number: QTBUG-31669
Change-Id: I17aa1e6656673f81545a8437f90814b188ad484a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
tst_QObject is getting big, so make a separate test for QSignalBlocker,
but leave parts of signalsBlocked() in tst_QObject as that seemed to
have been the only check for blockSignals(true) actually blocking signal
emission.
Change-Id: I1cfac035e0e39203eea8626d43f316cc6244ee86
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
When QSignalBlocker was reviewed, move semantics were asked for.
This patch add them.
This makes QSignalBlocker usable as a by-value argument (to transfer
control of signal blocking into a function) as well as as a return
value (to transfer control of signal blocking out of a function).
Change-Id: I714aa2a283bb33dba76e860649e88ed202e913c5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Attempt to fix
FAIL! : tst_QAbstractItemView::task200665_itemEntered() Compared values are not the same
Actual (spy.count()): 0
Expected (1) : 1
Loc: [tst_qabstractitemview.cpp(1292)]
which might have been introduced by removing the absolute qWait(200) in favor
of qWaitForWindowExposed() in afe8e368, so trying to compensate with a
QTRY_COMPARE.
Change-Id: Id437acd810b54e005daaf66ffffd4dd586075ab6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
To be able to call SetNamedPipeHandleState on stdin in a child
process, we must create a read-end pipe handle with the
FILE_WRITE_ATTRIBUTES flag set.
This can't be done with CreateNamedPipe but only with CreateFile.
Therefore we're creating the handles for the child process always
with CreateFile now. Besides, it's conceptually cleaner to have the
server handle of the named pipe in the calling process.
[ChangeLog][QtCore][Windows] Fix regression from Qt4 in QProcess.
It wasn't possible anymore to alter pipe modes of stdin in child
processes.
Task-number: QTBUG-35357
Change-Id: I85f09753d0c924bdc8a6cef1ea5dbe6b2299c604
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Press and hold is an interaction available on many platforms,
particularly when touch is involved. In Qt Quick this is exposed to the
user via MouseArea::onPressAndHold. This value should not be hard-coded,
but rather use a platform-specified default. This commit adds the
low-level hooks necessary for that to happen.
Task-number: QTBUG-24793
Change-Id: I621a8ac9de66b881e34336228056bffbb6306a70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
... because they fail on the new test server. This commit can be
reverted once the Socks5 socket engine is fixed.
Task-number: QTBUG-35490
Change-Id: I85635d4b44d26168d40a56b7a121693297564f0f
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
... because it was used to operate a man-in-the-middle proxy.
Task-number: QTBUG-35474
Change-Id: Ic7f19708b278b866e4f06533cbd84e0ff43357e9
Reviewed-by: Richard J. Moore <rich@kde.org>
It's still a relocation, but at least it can be marked read-only
after the relocation run, if indeed the dynamic linker goes to
such a length.
Change-Id: Ibadddac3ab99d2e58cc32cfd57311bddd3bdb0ef
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
d3dcompiler_qt is a DLL for use with ANGLE which replaces d3dcompiler_XX
at runtime to proxy shader compilation calls. This is useful for:
- Loading the newest D3D compiler DLL found, instead of loading the
version specified when Qt was compiled
- Reporting better debug information when the compiler cannot be loaded
- Caching shader blobs for later use
- Returning cached shader blobs
- Deferring compilation to another mechanism, such as a D3D compilation
service running on a host debugging machine *
The above use cases are especially important for Windows Store apps, as
they are not allowed to ship the d3dcompiler. On Windows Phone, where
there is no runtime compiler, this is essential for handling QtQuick apps
which require runtime shader compilation.
* This requires a separate service which monitors a directory for shader
source files, compiles these files into D3D bytecode, and places
the bytecode in the qtd3dcompiler cache directory. This directory is
monitored by qtd3dcompiler, which is then able to then load the blob.
Change-Id: I9889c8d66d2ddbe5a7a1dc44bfe5d8ad229b0e43
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QHash::key() is O(n) and we're calling it n times. That can make repeated
calls to the meta object builder very slow, as for example QQmlPropertyMap
when inserting properties repeatedly.
Fortunately this is easy to fix, as the value in the hash map is also the
index, so we can simply iterate over the hash once. With the exception of
the class name, which we have to treat specially to ensure that it is always
the first entry in the string table.
Task-number: QTBUG-32720
Change-Id: Ic954c45c454107feee83216131f601cc69d4c63b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Brings Windows QPA on par with other platforms.
[ChangeLog][Windows] Don't cover the taskbar when maximizing
frameless windows.
Task-number: QTBUG-8361
Change-Id: Iba35132f697cb7379650a4c883b616c5c2023d4c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
It's unexpected that all messages generated by the stream version
of qDebug and friends have a trailing space. It also makes switching
to categorized logging (which only supports the stream version) difficult,
since all autotests checking for debug output would have to be adapted.
Task-number: QTBUG-15256
Change-Id: I8d627a8379dc273d9689f5611184f03607b73823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This will break network paths passed as command line arguments.
Introduced by 4ff6951550 .
Task-number: QTBUG-35432
Task-number: QTBUG-30628
Change-Id: Ice9ce15275ef69e9e9e82daf5a303e7c56294368
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make
QCommandLineParser::add{Help,Version}Option()
QCommandLineOption::setDefaultValue()
QCommandLineOptionPrivate::setNames()
have transaction semantics: either they succeed, or they change nothing.
It's trivial to provide this guarantee, so do it.
Add a test for the surprising property that setDefaultValue("") resets
defaultValues() to an empty QStringList instead of one that contains
the empty string.
Change-Id: I61623019de3c7d2e52c24f42cc2e23ec5fddc4da
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix isValidId() which was failing valid IDs because it was splitting
name parts by \ instead of /. it was also rejecting offset from UTC
formats names. Add unit tests.
Task-number: QTBUG-35025
Change-Id: I4d23d2e54f4a9fac9afcc4eff0a02d6f4af21385
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The code was there to do it, but it was using minimumValue instead of
maximumValue to test if the '+' should be allowed.
Task-number: QTBUG-20691
[ChangeLog][QtWidgets][QSpinBox] Entering positive values with the '+'
prefix is now allowed.
Change-Id: Iff62d073e350dc9a33b7e06e4b492048c74437c4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The abstractions are needed so that they can work with both
QGraphicsLayouts and QtQuick.Layouts.
Since the plan is to move the engine to QtGui, this means that the
engine cannot have any references to anything in the QtWidgets module.
As a consequence of that several things had to be done:
* The style info object had to be redone with an abstraction layer
to get rid of style and widget dependency. (Abstract class is
called QAbstractLayoutStyleInfo)
* QGridLayoutEngine must be subclassed due to some specializations for
QGraphicsLayoutItem, manifested as QGraphicsGridLayoutEngine.
* QGridLayoutItem must be subclassed due to some specializations for
QGraphicsLayoutItem, manifested as QGraphicsGridLayoutEngineItem.
Did also some minor cleanups, reordered arguments so that all styleInfo
arguments are last in all function calls
This also fixes QTBUG-35099 (bug was spotted during this refactoring)
Task-number: QTBUG-35099
Change-Id: If49d40f71870dc8d99d2e145be158e3080b595fa
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
(same thing for center- and delimiter-aligned tabs)
The width of the inline object wasn't taken into account, the code in
QTextEngine::calculateTabWidth only looked at glyph widths.
Change-Id: I303a6561c67870ff2094a685698e642fc1b53b12
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
A QMenu with no actions gets a size of (0, 0) on OS X.
With the new stricter expose event behavior this
is considered invalid geometry and the platform plugin
won't send an expose event, causing the qWaitForWindowExposed
test to fail.
Add a menu entry since the layoutDirection test is
not really interested in testing the special case of
empty menus.
Change-Id: I5221dc3f0472ac13edf821df08bacc3a4eb5cd9d
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Take longer search strings into account instead of just using the first
character of the search string.
Touches up https://qt.gitorious.org/qt/qt/merge_requests/1418 for
resubmission.
Task-number: QTBUG-3032
[ChangeLog][QtWidgets][QSpinBox] Fixed keyboard selection with
multiple-character strings.
Change-Id: I2f68c8b97b1a1884659dcb19f52b1efeace9b88b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
When comparing expected with actual debug messages, allow the expected
ones to contain a trailing space. This is needed to not break all
autotests in a follow up patch, which will prevent ~QDebug() from
generating a trailing space by default.
Task-number: QTBUG-15256
Change-Id: I7f67393ddfbfe37fde1ca5ef45e4ad7f4b5324b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
The cursor() test was missing a QTest::moveMouse() before sending of the
mouse event (as all the following subtests do). When run on a desktop with
the panel on the left side of the screen, the mouse pointer would land over
the left item instead of in between them, as assumed by the subtest, and
the following QCOMPARE failed.
Change-Id: Ib74fdf0cfbfbc8ecb79a906610a2da5cb50c89d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Use QTest::qWaitForWindowExposed() and QTRY_COMPARE() instead of
hardcoded timeout.
Task-number: QTBUG-35308
Change-Id: I27eee9932dd3b6087db4ad13b1a4fb184a487f57
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Introduce isNull overload to take field name as a parameter.
This is corresponding to the commit
7e6e141234
Change-Id: I122f79707d26eaa09c2f38dc31aeee1dac7de33b
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Currently the QPrinter constructor, setOutputFormat() and
setPrinterName() make bad assumptions about the availability of printers
when configuring NativeFormat which can lead to inconsistent print
engine set-ups leading to crashes in the print dialog, especially on
Windows where a valid DEVMODE is needed.
This change cleans up the init and methods to ensure NativeFormat can
only ever be set if we have both a valid plugin and a valid printer,
if not the PdfFormat is used. One side-effect of this is that it is
now impossible to set an invalid printer name via QPrinter (but still
able to be done via QPrintEngine if really needed). Also if no
default printer is set then use the first available one.
This also fixes a bug where setting a new printer name on Windows
reset all the saved settings.
[ChangeLog][Important Behavior Changes] QPrinter no longer allows you
to set an invalid printer name.
Task-number: QTBUG-34345
Task-number: QTBUG-26008
Task-number: QTBUG-26430
Change-Id: I19737e4209d8c8df5817ea83246b3dd0c483ee85
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
As the last line in the QObject destructor, we call setParentHelper(0) to
remove ourselves from the parent. In the process of that we also initiate the
QML parentChanged callback. The first thing that parentChanged callback used to
do (but now does it too late, after 26350b5ceafa0ade1328037f6234a7d288eb8f48 in
qtdeclarative) is to check if the object was deleted and then return. We could
re-introduce the check there, but I think it's cleaner to not bother calling
the callback on a dead object in the first place.
Change-Id: Ia4d43b65a9b3744a451b4c312a2d6f9c0e3b67dc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add a check for the case sensitivity of the file system, so that
unit tests can determine whether names of preference files with
different case should generate an error or not.
* Add check for OS X native file format in rainersSyncBugOnMac().
Task-number: QTBUG-32655
Done-with: Liang Qi <liang.qi@digia.com>
Change-Id: I76821653dd4ebc00e20abdbb5b79c1a80290dece
Reviewed-by: Liang Qi <liang.qi@digia.com>
For the conflicts in msvc_nmake.cpp the ifdefs are extended since we
need to support windows phone in the target branch while it is not there
in the current stable branch (as of Qt 5.2).
Conflicts:
configure
qmake/generators/win32/msvc_nmake.cpp
src/3rdparty/angle/src/libEGL/Surface.cpp
src/angle/src/common/common.pri
src/corelib/global/qglobal.h
src/corelib/io/qstandardpaths.cpp
src/plugins/platforms/qnx/qqnxintegration.cpp
src/plugins/platforms/qnx/qqnxscreeneventhandler.h
src/plugins/platforms/xcb/qglxintegration.h
src/widgets/kernel/win.pri
tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
tools/configure/configureapp.cpp
Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
Tweak a handful of tests which didn't compile on this platform.
Change-Id: I208d9eb289dfb226746c6d0163c3ea752485033b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
The QPrinterInfo copy and QPrinter constructors and the assignment
operator were not taking the shared_null into account, and so any use
of them resulted in a new null QPrinterInfo different to shared_null,
which lead to isNull() always returning true in anything other than
the simplest use case. While fixing this also make the shared_null a
Q_GLOBAL_STATIC.
Task-number: QTBUG-21087
Change-Id: I0beb24088208e9ed58d21ca26b0c8d00b02e5b8f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Since contains() just wraps indexOf(), which has a QLatin1String overload,
add one for contains(), too, for consistency.
[ChangeLog][QtCore][QString] Added QLatin1String overload of contains()
Change-Id: I2acc628a51e00789fb2b90400cf0c523a5b5e65a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When we unlock the mutex, we need to take in account that the Connection
pointed by 'node' may be destroyed in another thread while it is unlocked
Doing 'node->prev = &node' will make sure that 'node' is actually
updated when it is destroyed.
Setting isSlotObject under the mutex is safer and ensure that no other
thread will attempt to deref the object.
The regression was introduced in 5885b8f775
tst_qobjectrace was updated to catch races arising when we are
connecting with function pointers.
Change-Id: Ia0d11ae8df563dad97eb86993a786b579b28cd03
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
New macro QVERIFY_EXCEPTION_THROWN may be used to check that some code
really throws an exception of specified type.
Change-Id: I7cf499c7c37a35407862bc604c6eb862c5f329d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Avoid menus showing up at 0,0 which is a taskbar area when running
Unity.
Task-number: QTBUG-33972
Change-Id: I156eec78248cec1708adf6bcf2e9ddcc98b7d8c4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
There is a known bug where duplicate textChanged signals are
triggered on backspace/delete. The bug has been seen on Windows,
Mac, and Linux. Gabi showed that this duplicate signal is caused by
two calls to finishEdit(), one direct and one nested,
in QTextCursorPrivate::remove().
To attempt a fix, I removed the direct call and do not change the
nested call. This change only affects text buffers when they
receive remove commands.
This seems to fix the problem, shown by the test project
uploaded to the bug tracker and also in countTextChangedOnRemove
in tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp.
Further analysis of finishEdit() and QTextCursorPrivate::remove():
finishEdit() calls signals contentsChanged() as long as a valid block
is being edited. Remove() calls finishEdit for all non-table edits,
so finishEdit will be called for most cases.
Methods in the public QTextCursor all seem to set adjusted_anchor
and anchor, none reading it directly, so I haven't found publicly
observable consequences to "adjusted_anchor = anchor = position;".
Task-number: QTBUG-15003
Change-Id: Ic35f25ee81c4007867b47cd8be03c146a673f86d
Reviewed-by: Graham Coleman <ravelite@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Qt::WA_Mapped maps (sic) to windowHandle()->isExposed(), and we set/update
it in QWidgetWindow::handleExposeEvent(). Setting it directly in show_sys
shortcuts QPA and assumes showing a window is synchronous on all platforms,
resulting in trying to flush the widget backingstore when the window was
not exposed yet (due to discardSyncRequest starting to return false).
This reverts commit 829b1d13b2.
Change-Id: I0bd700d4939bc69ba184d8586435b68ec3dd72fb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This was a tweak to fix a bug in 2005 which has probably outlived its
usefulness, plus an accumulation of workarounds on top. (started as
48b5266e8ff9b472a16290dd923fe24dd0b6989b in the historical repo)
Task-number: QTBUG-34760
Change-Id: I2c01269e43636385ee5c89305c6b90f4a7f2c537
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The private method dateForLocalTime() was not checking that transitions
were valid, resulting in infinite looping when a time zone didn't have
any future transitions.
Change-Id: I0e5d07063861778dd86056a80c36fdd9f9d36133
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix parsing of TZ file abbreviations, to correctly return cases where
POSIX rule doesn't have separate DST rules, and where abbreviation
is a sub-string of another abbreviation, otherwise any toString() call
will crash.
Add test to exercise all available time zones, especially useful for TZ
file to confirm all file format variations dealt with. Fix parsing of
Version 3 of TZ file, and ICU display name, to allow all files generated
from release 2013f to pass, otherwise isValid() call will crash.
Task-number: QTBUG-34061
Change-Id: Ie0b6abc218adff1c8967eb33fdb0762041d2305f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The name Olson was misspelled as Olsen in the public api of QTimeZone
which is needed to be fixed before first public release in 5.2 would
freeze the api and prevent it being fixed. It has been decided that
renaming as IANA ID would be more future-proof.
Fixes to the private code will be done separately to keep this patch
against release branch to the minimum required.
Task-number: QTBUG-34735
Change-Id: I8ee90644862c907f6d1937b8536f0c02583ae736
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
For me, this test failed because I don't have a Documents folder in my
home directory, even though that's what's returned from QStandardPaths
as the first DocumentsLocation.
Fix by falling back on the home directory if documentPaths.front()
does not exist.
Change-Id: I483f62f3b4b43d055c74774a7058a4aa420849b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The dockwidget's toplevel window would be a parent of the container's
window when floating. When plugged back into the mainwindow the
dockwidget's window is destroyed and the container's window along
with it. Added a function toplevelAboutToBeDestroyed to unparent
the containers window before this happens so parentWasChanged will
work correctly.
Change-Id: I06679cfb3a8fa3834c0db0be5973c012b8277275
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
We don't want platform behavior for whether or not maximized/fullscreen
windows can be resized to affect the test for resize event propagation.
Change-Id: I8c118733ca5d2553aacf24d0b8debeb1a4e27103
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Give processes a more complete environment (openSUSE
requires more variables to start an X11-process),
add test column indicating whether a test is
supposed to crash. If it is not, report crash reason.
Change-Id: I1e0ad59824963f69ee425f331d845741be2b3928
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
When clicking on a widget currently focused, w/o having Qt::ClickFocus
set as focus policy, the focus should stay on the widget and not get
propagated to the widget's parent.
Task-number: QTBUG-34042
Change-Id: I53f1153829cc7228de02a90e38125b5cf4ee5008
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
qWaitForWindowActive waits until the timeout for the window to receive
a non-0x0 position, even when it's active, just in case the WM sets
the position as a response to focus-in.
Change-Id: I748cce2747f406a8cdff556465175f02675fcd13
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
We claim that -1 is a special automatic value, but calling
setMinimumSectionSize with -1 is unfortunately ignored due a
regression in 524c3e05e8
Change-Id: I7d7e5dbbf78e561849d2f2352c9edb2df36aa181
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Make it possible to match messages by a pattern.
Change-Id: I713312e86db5471755459f1ecc43e8f1ac7a95fb
Reviewed-by: Jason McDonald <macadder1@gmail.com>
GCC refuses to use a merely static const uint array in a constexpr function.
Fix by making the array constexpr if supported by the compiler.
Change-Id: Idd59d3f74f8f4e98aad82bc892f4a6469932df9f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This necessitates adding d==0 checks in QCollator. By documenting that
moved-from instances can only be assigned to or destroyed, we can
limit the functions in which to check for d==0 to the assignment
operator and the destructor.
Doing otherwise would destroy all advantages of move semantics by
introducing a heap allocation to re-populate other.d.
Add a test for this (QCollator didn't have any before).
Change-Id: Ic6ff202072822bebfd5e48259c3d0fa345a63118
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Rather than breaking at column 79 precisely, break entire words,
to improve readability.
Change-Id: Ie30db00f0e6ed95cce87480c3b91804826c6076b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Vertical scrollbar may get out of sync. When this happens, the calculation of
firstVisibleItem will retrun "-1". This must be handled in ::sizeHintForColumn().
Added an auto-test for the crashes.
Task-number: QTBUG-34717
Change-Id: I867fd144ef3ce45e382337c5eafe345f573cd944
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Center windows on screen to avoid conflicts with Unity taskbars,
observe minimum geometry for Windows, move cursor out of the
way for Mac. Introduce QScopedPointer to ensure cleanup in
case of failures.
Change-Id: Ic169e015e795597457b8e85a28ff7fcb7b9b9430
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
It's not really clear if styles *must* return a non-negative value for
QStyle::pixelMetric(PM_Layout{Vertical,Horizontal}Spacing), but both
QBoxLayout and QGridLayout seems to be robust enough to handle this.
They will simply make sure that the spacing is never negative.
We therefore make QFormLayout equally robust.
Task-number: QTBUG-34731
Change-Id: I62235bfcd8adf7757cf15bc9927b29650ae6459d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Previously matched Qt.platform.os, however that can only provide one
string. Multiple selectors can be present at once, so we can provide
both unix and linux instead of having to pick the most specialized one.
Task-number: QTBUG-34796
Change-Id: I219517d740fa7385e923a9e09cb7e241378fbaee
Reviewed-by: David Faure <david.faure@kdab.com>
Up to now, the feature classe Uniform Initialization was subsumed by the
Q_COMPILER_INITIALIZER_LISTS flag together with support for
std::initializer_list.
This caused at least two problems:
1. On QNX, the standard libray does not ship <initializer_list>, even
though the compiler (a GCC 4.6, IIRC) supports it. But since there
was only one Q_COMPILER flag for both, support for the compiler-only
part of the feature had to be disabled, too.
2. MSVC 2013 supports initializer lists, but has a bug that renders full
uniform initialization support, as required for QUuid, useless.
By splitting the feature into two, we can separate them better, and do
so in QUuid, which is the only class that currently takes advantage of
uniform initialization (to provide constexpr constructors).
Since Q_COMPILER_INITIALIZER_LISTS worked as a flag for uniform
initialization so far, with the two known exceptions above,
UNIFORM_INIT is defined whenever INITIALIZER_LIST is, except that
I don't revert UNIFORM_INIT on QNX as I do for INITIALIZER_LISTS
and that I expect the MSVC 2013 features to set INITIALIZER_LIST,
but not UNIFORM_INIT.
Task-number: QTBUG-34705
Change-Id: I81916e950a0f3aab3de7977e0326d2de3d31b14c
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When EnumForms was used then the dmPaperSize was not always correct for
the custom paper sizes available on some printers. By using
DeviceCapabilities we can be sure that the information is correct in this
respect.
This also fixes respecting of the custom paper size if one is given and
there is no corresponding existing paper size for it.
Task-number: QTBUG-34276
Change-Id: I9924d5be8527027fc434261e37f6c7aae66210c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
As the test case shows, clear() is semantically equivalent to
setKeySequence(QKeySequence()), so implement it that way.
Change-Id: Id68edbbf85aac3bcff82c81310c38274ed8e6708
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
With 46a8885ae4, we failed when parsing
entities whose partially expanded size was greater than 1024
characters. That was not enough, so now we fully expand all entities.
Amends 46a8885ae4.
Change-Id: Ie80720d7e04d825eb4eebf528140eb94806c02b1
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
need to leave some items out like media folder access, as this is not
available by default and also requires certain capabilities to use
those.
Furthermore updated the tests for sandboxing as well as skip cmd.exe
related tests as that does not exist on WinRT.
Change-Id: I992b1e195b79615bea0be4f84f56cfb8f0d902bf
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
All ci nodes are currently missing 3d support, when that is enabled
this test will start to fail.
Task-number: QTQAINFRA-711
Change-Id: Ie6b840e290a9371fa895681e58d6dedf55b777e6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Currently network is only required to gather the host info for one
test case. That does not justify to disable all other tests, which can
provide useful information on the state when doing a port. Hence
disable that testcase if no network is available.
Change-Id: I202ef49b3e07ae69ec85ee0432ae0a771a90e816
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
It is probably better not to have a default boolean in
QHeaderView::setResizeContentsPrecision
Task-number: QTBUG-34665
Change-Id: I0bb2c35abc1d5713bb3ee65df3af86c04f175a38
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
to reflect the fact that this returns and sets the whole session
ticket, and not just the session ID.
Change-Id: I00fe2bc4197dbcd7a02b3ae4f2f84e3a2a7edad0
Reviewed-by: Richard J. Moore <rich@kde.org>
Add few cases where conversion to or from LongLong was missing
We need to make it work if we want to use variant.canConvert<qint64>
[ChangeLog][QtCore][QVariant] Fixed QVariant::canConvert with longlong
Change-Id: I0f65073802b62d99250601dd90a8cd2e4d934b60
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
It introduces QTBUG-34653 (Qt Designer widget box no longer
repainted after collapsing items or using the filter).
This reverts commit 04de24c644.
Task-number: QTBUG-13522
Task-number: QTBUG-34653
Change-Id: Ieb9766e7f15acea901fce4ad7142aa72557b9957
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The tracing API still misses some real-world exposure. Let's
re-do this in dev to have more time.
This reverts parts of following commits:
466e0dff4b7a47aebe9ea652bab6a78f0654ceb84162522edd32f27b43679ff81bdc1a
Change-Id: If97340c37b8b3363f597683336a8390d5ff386f1
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The problem is the verifyConstExpr<>() line involving the ~ operator.
The result as an integer is a value that can no longer be represented
in an int. This is known at compile time and thus template deduction,
which only has an int to match against, fails.
To fix, use an unsigned int as the first template argument of
verifyConstExpr<>().
Clang's error message for this is really sub-optimal, cf.
http://llvm.org/bugs/show_bug.cgi?id=17834
Change-Id: I3a77dc54d2bee12b016d75724ac1bd7801f4cf2d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Make sure that the size of QIntegerForSize<N>::{Signed,Unsigned} is
actually N.
Change-Id: I221304f7c420e80758ef7b115bafb7cf1f8c8829
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Since the original change caused a problem with the CSS
rules being always inherited where in some cases this should
not be happening.
This reverts commit 6f65466137.
Change-Id: I6e9cf163d752b1869b5e967a7ab59963d655ba87
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This is what ConfigLocation was meant to be. A directory shared by all
applications. Unfortunately when I wrote the fallback on Windows,
I picked DataLocation (which is app-specific) instead of
GenericDataLocation (which is shared between apps). This makes it
impossible to have config files shared between apps, e.g. for libraries.
It also makes ConfigLocation quite inconsistent (on Windows one cannot
use it to load another app's config file, while it works everywhere else).
All this is fixed by GenericConfigLocation, which is shared between apps.
Change-Id: I23a755131061d4fea01e13dd1038fbd8ef333a5d
Reviewed-by: Alex Richardson <arichardson.kde@googlemail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Only DirectConnection is tested
Change-Id: I525c6a65428489c34e58d1d9600b4e5ebda733b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Nested references with a depth of 2 or greater will fail. References
that partially expand to greater than 1024 characters will also fail.
Change-Id: Id4e49d6f7cf51e3a247efdb4c6c7c9bd9b223f6e
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Allowing for creating a printer in various modes
and toying with the paper settings.
Task-number: QTBUG-34276
Change-Id: Ieb35dc55c509f84d7d81817c7903e02a41ba8b44
Reviewed-by: John Layt <jlayt@kde.org>
WinRT doesn't use the Windows Timezone backend, so don't build the
Windows test.
Change-Id: I32620546de3ad1f19402cc1359f8038200c915ec
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This should be using qputenv; putenv is deprecated on MSVC.
Change-Id: I7c27cf5f7955624fa3553b7a34ab11c6fae462b8
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
The grabbing always grabbed the desktop. This caused it to also grab
tooltips, siderbars etc that could overlap the window which again
caused the pixmap comparison to obviously fail.
This will currently only fix it on windows. If needed, it should also
be fixed for other platforms.
Task-number: QTBUG-30566
Change-Id: I5cee8651e1d94dedded0acae8b19f351acd976c4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Check if the item is hidden before show the item(QWidget)
Task-number: QTBUG-13522
Change-Id: I1c605d5cb8a80f340e9b7601612d3760f51cb4a7
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
The current synchronization mechanism was racy: decrementing waitingThreads
and then hoping that the wakeOne will wake a thread before its expiry
timeout happens. In other words, on timeout, a just-assigned task would
never run. And then no other task would run, if maxThreadCount is reached.
Fixed by using a queue of waiting threads (rather than just a count), and by
moving the wait condition into the thread itself, so we know precisely
which one we're waking up, and we can remove it from the set of waiting threads
before waking it up, and therefore it can determine on wakeup whether it
has work to do (caller removed it from the queue) or it expired (it's still
in the queue). This is reliable, whereas the return value from QWaitCondition::wait
isn't reliable, when the main thread has already decided that this thread
has work to do.
Task-number: QTBUG-3786
Change-Id: I1eac5d6c309daed7f483ac7a8074297bfda6ee32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Pass window flags on to ColorWidget constructor and use a window
frame + stay on top-hint for the moveChild/showAndMoveChild tests
to make the screen grabbing more reliable.
Disable animations on Windows since they seem to affect screen
grabbing as well (fading in of windows).
Task-number: QTBUG-30566
Change-Id: I8eacfc203d26674dc1b283d6643f3d434f218f26
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
I don't think I ever worked on a project of non-trivial
size that didn't at some point add a QSignalBlocker.
This commit adds code, tests and documentation. Later
commits will convert naked blockSignals() calls to use
QSignalBlocker.
The implementation is purely inline to avoid the heavy
overhead of cross-dll function calls for this miniscule
task. This should not be a problem because QSignalBlocker
only uses public API and a pattern that we anyway need
to keep working until Qt 6, at least, so even changing
the implementation later will be no problem as the old
implementation lurking in non-recompiled code will be
acceptable, too.
This implementation is an evolution from KDTools'
KDSignalBlocker, with the following changes:
- Implements unblock() and reblock()
- Uses the return value of blockSignals() instead of a
separate signalsBlocked() call.
Change-Id: I1933dfd72a0f5190324be377cfca3c54cf3d6828
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
It is now configurable if test results are stored in xml, plain text
or in both formats. Default is xml, like it was,
Max runtime is also configurable so that we can reduce the CI round.
With default setting it takes more than eight hours within current
CI node.
The latest test result dir is linked as latest.
Change-Id: I5d27cefe17e4f86648132db7ec104711d993c3de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>