In QML it is common to connect signals to slots that are implemented as
JavaScript functions. QML used to maintain separate data structures that
mirrored the QObject connection list and kept references to the JavaScript
objects necessary to perform the call on signal activation.
The recent addition of functor based QObject::connect makes it possible
to store this information in QSlotObjectBase sub-class instead, which
eliminates any extra bookkeeping.
This patch adds internal connect and disconnect overloads to QObjectPrivate
that allow for connecting QObject *sender, int signalIndex to a given
QSlotObjectBase and similar for disconnect.
Change-Id: I90f43d13eb95bd884d752484cf4faacc446f4d6a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
On Mac it's expected that some elements are
filtered out of the a11y hierarchy.
We do this with the shouldBeIgnored function.
The problem is that we would ignore some objects
and then return them in the child attribute function.
This is inconsistent and leads to voice over not working.
For example having a plain QWidget with other widgets as
children would cut off all of these widgets, since the
plain QWidget would be ignored.
Change-Id: I5f6c26b272e5ca57d59c1ed1ef47e9a2b1181295
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Compilation failed because "open" is defined as "open64" in fcntl.h.
This definition is reverted now.
Change-Id: I9badcf11131320c53e442cd5b8b21bb5aa4efee5
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Add font combo to top level via layout and position top level
instead of the (child) font combo.
Change-Id: I0f754c37c009d1ed83615b800d6f2467e858c047
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
When calling intersect() on a large (1000000 items) QSet, with a small
(1000 items) QSet as the argument, the function takes signifcantly
longer than when the operand and the argument are reversed. This is
because the operand set is always iterated over in its entirety.
This patch changes intersect() to iterate over the smaller set. This
reduces the large operand scenario's benchmark to ~0.000063
milliseconds, compared to the current ~134 milliseconds:
1000000.intersect(1000) = empty: 0.000063 (was 134)
1000.intersect(1000000) = empty: 0.000039 (was 0.000036)
1000000.intersect(1000) = 500: 0.10 vs (was 130)
1000.intersect(1000000) = 500: 0.023 vs (was 0.093)
1000000.intersect(1000) = 1000: 0.20 vs (was 139)
1000.intersect(1000000) = 1000: 0.017 vs (was 0.016)
Task-number: QTBUG-22026
Change-Id: I54b25c49c78c458fef355e9c6222da8a64c7681f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The TXT record is particular because each RR can contain multiple text
strings. So we need to join each RR's texts too.
To make it easy, I've made everything be QStrings.
Change-Id: Ia0506544b913585e7be860c81077cff8e0dab547
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The DNS protocol changes the order of the RRs in each reply it sends,
in an effort to balance the load in servers. For most tests, to ensure
that we get always the same result, we simply sort it back.
For MX and SRV, we can't sort because we also need to test that
QDnsLookup sorted correctly according to priority. So instead allow
that test to have multiple alternatives.
Change-Id: I5c119f907b31789de5c9cf2471cc82ecd140d06f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If an app knows it needs to connect to a host beforehand, it can "warm up" the
connection cache by making DNS lookup, TCP (and if needed SSL) handshake before
the actual HTTP request is sent. When the HTTP request is made, it will be
considerably faster when there is already a working connection.
Here are some typical results from the benchmark:
* Linux desktop with Ethernet:
"http://www.google.com" full request: 279 ms, pre-connect request: 61 ms,
difference: 218 ms
"https://www.google.com" full request: 344 ms, pre-connect request: 60 ms,
difference: 284 ms
* mobile device (BlackBerry 10) with Wifi:
"https://www.google.com" full request: 898 ms, pre-connect request: 159 ms,
difference: 739 ms
"http://www.google.com" full request: 707 ms, pre-connect request: 200 ms,
difference: 507 ms
Task-number: QTBUG-30771
Change-Id: I3566b7f08216ab93a39e2024ae7d1ceb7ae21891
Reviewed-by: Jonas Gastal <gastal@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Section 4.2.2.4 of ISO 8601 allows for decimal fraction representations
of dates and times. Currently, when calling
QDateTime::toString(Qt::TextDate) or QDateTime::toString(Qt::ISODate),
the milliseconds will be omitted. However,
QDateTime::fromString(str, Qt::TextDate) and
QDateTime::fromString(str, Qt::ISODate) already support decimal
fraction representations, so this patch just adds this support to
QTime::toString, and hence QDateTime::toString().
Task-number: QTBUG-30250
Change-Id: If58e4b3d3105322c51d11a76b832e5e634d8991f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch adds a way to enable operator<, operator== and operator<<
into QDebug for QVariants with custom types.
Change-Id: I3d12d891bd7252ad2b8f1de69bced354800a1f29
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
It is nice to be able to control how long time a tooltip is shown.
This is the first part of solving:
Task-number: QTBUG-1016
Change-Id: I8e313df8a2acdc5ccc91d9c8ce956c30c76daf4b
Reviewed-by: David Faure (KDE) <faure@kde.org>
The test now passes on Ubuntu, Lucid, too.
Task-number: QTBUG-20778
Change-Id: Id7ddc4b34d03f8fb9af977c0f40615d544934f13
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Convenience function that returns user data for the current item,
analogous to currentText().
This avoids to having to write the cumbersome
QVariant variant = comboBox->itemData(comboBox->currentIndex());
(It's quite common to put strings as text and the corresponding
enum values as user data.)
Change-Id: I8c7632c647c5583d18e4e22703aeb4447d73162d
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
If no stretch factors were specified, we used the preferred size as a
stretch factor. Obviously, that didn't work if the preferred size was
actually 0.
This patch works around this by actually setting the stretch factor to
1.0 if this is the case.
This should work fine in most cases, except for the case where there
are also other items with a preferred size close to 0.
In this case, the item with preferred size 0 will just grow
faster than an item with e.g. preferred size 0.1.
Task-number: QTBUG-31217
Change-Id: I966455da0bdd00308591c7f7cfbc4e134d423e57
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
The winapi call used to load the icon does not
support the arguments on windows ce
Change-Id: Ia600eb9b05d5eb40778d8c281e6ce8278bfd7177
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
"QTest" is the C++ namespace; "QtTest" is the library name
- Edited the logger output in qplaintestlogger.cpp
- Updated documentation
- Updated expected outputs for self-tests
Change-Id: I43c525c43221a8d4e843a00d6d55b0f06ef55fd7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Latin1 strings are usually stored as 8 bit data in the json binary
format. But that data structure has a size limitation of 16bit, so
we need to fall back to storing the string as 16 bit data if it is
too long.
Task-number: QTBUG-30946
Change-Id: I0069b1367030b0b2f819fd1f04e34c9e2534a2a3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Return the codec if one was found by QTextCodec::codecForUtfText,
instead of returning the default (UTF-8).
Task-number: QTBUG-31293
Change-Id: I95e3260376c00537006b7fbfdc3df5850e1ba657
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
List decorators may be clipped if you set a large font size and/or
small indent for a QTextList. This fix is to prevent clipping by
moving list decorators and items to left (or to right in case of
right to left layouts) so that the list decorator is always painted
inside the layout.
This commit fixes painting related issue, so auto test is not needed.
The manual test program can be used for verification purposes.
Task-number: QTBUG-5111
Change-Id: I7fdd92399445d33fe9eaf525a05fe5cd860b57c6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Required to prevent qmlscene flicker on startup.
Also brings back that qWait() in tst_QGL::graphicsViewClipping()
that seems necessary after all.
Amended-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Change-Id: I14ba6e18ac98e5df1ce8ecbc263b30176b67d111
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
The optimisation done in cbaf52b099 for Qt
5.0 got the order wrong of the comparison. The queue must be sorted in
decreasing priority order. But since higher numbers mean higher
priority, that means the queue must be sorted in decreasing priority
number order.
Task-number: QTBUG-29163
Change-Id: Iaf3424b9bb445bf5c71518927f37253cead454f3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
In JSON, any number is stored in double. We need to make sure we
keep the maximum possible number precision for integer number. In
IEEE 754 double format, the significand precision is 53 bits(52
explicityly stored).
Autotest is included. qint64 and double work fine.
Task-number: QTBUG-28467
Change-Id: I7f857671c50e4334e9329c778f9b4f090f490540
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
when the type is a pointer to a registerable 1 argument template type.
Task-number: QTBUG-31002
Change-Id: Iac0d6b71b2b805a1876110a0781d02188083c4e5
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
When encountering code such as:
X<a<b>
moc does not have the mean to know if 'a' is a type or a variable, so the
type parser currently assume that '<' always open a template parameter.
(instead of being the operator<)
The type parser do not care about the actual type, it just need to strip
the string out. The problem is that then the whole rest of the file will
be considered as the type.
With this patch, we also stop the parsing at semicolon. The type will
be wrong, but this allow the parser to recover and it will continue to
look for more classes after this.
(In other words, moc will no longer break if it encounter such construct
in a header. But it will still not parse such types correctly if used
within a Q_OBJECT class)
Task-number: QTBUG-31218
Change-Id: I1fef6bc58493d7c00df72401c9ad55463b24eaa7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Although it is possible to construct those containers, they are not
usable, as qHash(float) and qHash(double) are ambiguous.
Also don't use CustomMovable as a container key.
It is not equality or lessthan comparable.
Change-Id: I8c7ee068250e2e2b3427769153e3017721c13c50
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
With scrollbars enabled we would get two resize events when tiling the windows.
First one with the expected viewport size, and then a second one with a bigger
viewport when the QMdiArea calculated that the space it set off for scrollbars
was not needed after all. Depending on whether or not the geometry propagation
of the platform plugin was synchronous or not, we would get one or both of the
events before evaluating the viewport size against the expected size, resulting
in flakeyness, and an expected fail on OS X.
We now explicitly disable the scrollbars during the test, and restore them for
the latter test that verifies that scrollbars show up when the area is resized
below the minimum size of the combined child widgets. This allows us to unskip
the expected failure on OS X, and should make the test less flakey.
Change-Id: Ief767456cfd79f5cd0bb0e220c40e5995674ff71
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Currently Qt looks at 1000 rows when scaling a column.
That can be slow in some situations and too inaccurate in others.
With this patch we leave it up to the user to decide how precise
e.g resizeToContents should be.
Change-Id: I6ef60f9a3bb40fc331ce1a1544fdc77488d20ca3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Void is not constructible, so there is no point in checking how fast
it can be constructed.
Change-Id: Icb4b607bebce30fff5fc57b105101f019e0e0db5
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
XPASS : tst_QWidget::update() QCOMPARE(w.numPaintEvents, 1) returned TRUE unexpectedly.
Loc: [tst_qwidget.cpp(4017)]
Change-Id: Ib7664871ed218f4c88fd2430491fa65443651927
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QFontComboBox had convenient filtering options but somehow not
QFontDialog, so provide the same type of flags and a similar behavior.
Change-Id: Ia8efabc60ae795673c772ff8ed63fd49244a5bb9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
There has been frequent failures with CI, especially with OSX 10.7.
These seems to work ok in CI node when ran alone but CI is running
those in parallel with some other tests, and this is causing errors,
most likely due to lost focus.
Change-Id: Ic4151099c27a4b5d91778c9b13e88d2d661e8a0d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Session tickets can be cached on the client side for hours (e.g.
graph.facebook.com: ~ 24 hours, api.twitter.com: 4 hours), because the
server does not need to maintain state.
We need public API for it so an application can cache the session (e.g.
to disk) and resume a session already with the 1st handshake, saving
one network round trip.
Task-number: QTBUG-20668
Change-Id: I10255932dcd528ee1231538cb72b52b97f9f4a3c
Reviewed-by: Richard J. Moore <rich@kde.org>
Numpad is unnecessarily long.
Change-Id: I19a6ce129e26a4f6f8344f514317214c48abde6e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
QVariantMap would work too; I presume this is why the annotation is needed,
rather than QtDBus automatically figuring out which type to use.
This even checks that QHash<QString,QVariant> works in the annotation,
although QVariantHash would be simpler to write, obviously.
Change-Id: I7a339ca90f10e5ec97dcea1bb4dbba3c515e6b23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Folders can have a custom icon, set by the user. Some system
folders also have one, for example c:\windows\fonts.
This option allows you to disable this behavior, you'll get the
folder directory icon.
As a side-effect, you'll get a very big performance improvement
on removable/network media: 2 seconds vs 60 seconds on a SDCard
with 10000 folders.
Change-Id: Id55ea628186e0a6523585ec7a4ff622d6f5da505
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
in order to test for regressions in qdbusxml2cpp too.
Change-Id: Icd2a6f319c5fabf0b0f2a1fe8c70afcd2c84263e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
The test showed frequent failures with XCB in
initialShow2() (line 3200) after
01bc34088e (QTBUG-30923) which
can be fixed by ensuring the widget from the HFW-test is deleted.
Use QScopedPointer to ensure widgets are always deleted in case
of test failures, too.
Task-number: QTBUG-20778
Task-number: QTBUG-30923
Change-Id: I2af7737b604820463f760d6b6787dd5a5a93d602
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Fix connection to pointer to member signal that belongs to the base
class, but whose type is a pointer to a member of the derived class.
The current code only use the QMetaObject of the type coming from the
function type to look up the signal id. But if the signal was casted
to a pointer to member function of a derived type, then we also need to
look in the base classes
Change-Id: Ib98fc38f63942946acb34d9f83c100991d58e4e5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In some situations we can get into resizeSections in a hidden
QHeaderView. If the headerView is hidden then we look at all the
rows, and that can be extemely expensive for a large model.
This patch limits the sizeHint with only looking at a maximum
1000 rows. Though this is more inaccurate it is also faster -
and it is not much different from what QTreeView does.
Change-Id: Ief4b54c5a3c5a0db02e8b595c9b9b3162633ee67
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
In Qt 5, I managed to break the guarantee that a deserialised local
datetime is the same time of day (potentially different UTC time),
regardless of which timezone it was serialised in. This happened after
I fixed QTBUG-4057 with If650e7960dca7b6ab44b8233410a6369c41df73a,
which serialised datetimes as UTC.
This patch reverts QDateTime serialisation to pre-Qt 5 behaviour to
restore the guarantee and consequently re-opens QTBUG-4057.
Change-Id: Iea877f7ed886f530b928067789b53534e89fe8cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If tabFocusFirst is not cleared or set to another valid item,
there will be crash later if the removed item is deleted after
removal.
Task-number: QTBUG-30923
Change-Id: Iba9a6ce9334c52f8e552b0accda95ebb5fcfcdb1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
A new set of classes is introduced for iterating over the contents
of a container within a QVariant without knowing the exact type of
the container, but with the guarantee that the element type within
the container is a metatype.
The implementation of the iterable interface uses
the stl-compatible container API so that we can also iterate over stl
containers, or any other container which also conforms to stl norms.
This enables the functionality in the bug report.
Task-number: QTBUG-23566
Change-Id: I92a2f3458516de201b8f0e470982c4d030e8ac8b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This patchs allows the user to convert defined QMetaType types like
MyType to be converted by using e.g. QVariant::toString(), mapping to
MyType::toString(). Also all the other QVariant::toXYZ() methods are
supported so far.
The patch adds static methods QMetaType::registerConverter supporting:
- implicit convertion
- conversion using member method of source type
- conversion using unary functor
Change-Id: I4f1db83d9c78bcc9df5c42f82f95cce0480cdcc3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
qWarning now depends on QT_MESSAGE_PATTERN, depending on that variable.
It will show things like the moc process id or the Parser::error
function name. We don't want that.
Change-Id: I5b35401200f0f7de2442aa77d700a82402081489
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Change-Id: Ida382a80dba882bbeb920756adc0c16321efe37e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Provide a new displayIntegerBase property which control the base used
by the spin box to display the value in its internal line edit.
Change-Id: Ibadc37107db8770d757b64350946bf19142e8f6c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
If a process dies before all output is read into the internal buffer
of QProcess, we might lose data. Therefore we must drain the output
pipes like we already do in the synchronous wait functions.
Task-number: QTBUG-30843
Change-Id: I8bbc5265275c9ebd33218ba600267ae87d93ed61
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
I also modified tst_QDnsLookup the test to use ';' as a separator as
opposed to spaces because I added MX and SRV records with multiple
RRs.
Change-Id: I62c7b6ad342c1bb23c4d9ac9730e35ab422e3ea2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
With QUrl variants of the static methods, it is possible to get to use
VFS facilities of the platform if available.
Since we can't predict if the application will use the VFS available in
the platform or its own mechanisms, an extra parameter is provided to
restrict the protocols allowed to the user. This extra parameter
defaults to no restriction, which is the most convenient if the platform
file dialog and the application use a matching VFS. It's likely to be
the most common use.
Change-Id: I4c9effde9d194d226cd8b7a140eb9036187ba87b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Test locale-based formatting of numbers when we pass field width, base
and fill characters. This now tests the fact that we replace a '0' for
the locale's zero character.
Change-Id: Ib872a592fd9a754e3ef11495a9497a6947056631
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This test is unstable on Mac OS 10.7 with developer builds, so marking
it as XFAIL if it happens to fail.
Task-number: QTBUG-30565
Change-Id: If7094c3b19299f0dbe57cb82a8614032a75573d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
This was added just so that moc could pick up the enums and so that
we could use the enums in Q_PROPERTY declarations, which was needed for
accessibility in QML. It turns out that Q_GADGET is enough for us.
This is a strictly a binary compatible change.
However, QAccessible was marked internal in 5.0, so we are free to
change it. In addition, this class is static and cannot be instantiated.
Change-Id: I27e2e97c5f4b45c38678264c6b593a4383db8d3e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This way I can have in my QtQuick something like
Text {
text: "<font color='#ff0000'>H</font> <font color='#99ff0000'>H</font>"
}
and it works properly
QtQuick already supports #AARRGGBB for color: properties so I've
decided to go the notation
Once this is merged we can remove the extra code
in QQuickColorProvider::QColorFromString
I've also added some tests for the hex -> QColor conversion that where
non existent
Change-Id: I1dd4a2ec113293aec26968329b2e4930df6fdcb7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This removes some XFAILS that were no longer correct and
fixes some existing problems in the tests where ODBC is
concerned.
Change-Id: I91de526bb50ad4046ba07ddb5336aa3714966687
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Previously, accessibleTree->child(0) would return an interface for the
header even if it was hidden.
Also, the assertion was wrong since the index would be 0 if both row
and column were 0. The assertion was actually found while using the
project explorer of Qt Creator (2.7)
Change-Id: I9f3cc2c13b6887569d10c4e062a64552f898231a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Make sure the value of QWindowsWindow::isExposed is in sync
with regions we expose.
This provoked a couple of existing issues in the qwidget test.
setWindowGeometry tested that windows with invalid sizes got
exposed on screen. They didn't, but because the plugin sent
bogus events, these used to pass. Same with windowMoveResize.
The expect fails are also rather bogus. Showing invalid-size
widgets could be considered undefined behavior. The Window
manager could resize it, choose to not show it at all, etc,
but they now pass on windows.
resizeEvent has been broken since 5.0.0, but the test didn't
spin the event loop so the second event didn't get delivered
before the test completed.
Task-number: QTBUG-30744
Change-Id: I3a9efcd095f366126a87739f4248185b6c81d407
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QPrinter is not implemented on android, so the test fails to
link there.
Change-Id: I10ca0179323362a9c9f74325332043c968d67d3c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
... but rather throw an error, so the HTTP layer can recover from a SSL
shutdown gracefully. In case the other side sent us a shutdown, we should
not send one as well, as it results in an error.
Change-Id: Ie7a56cf3008b6ead912aade18dbec67846e2a87e
Reviewed-by: Richard J. Moore <rich@kde.org>
ignoreProxyFor() always returned true if the no_proxy was not set,
which resulted in the first token being an empty QByteArray, causing
the endsWith() check to always evaluate to true.
Add a unit test that is enabled for those platforms that use the generic
system proxy.
Change-Id: I6081ad5e0b8e2c3fee1568835907c32bde5b7772
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
It was only used for toUpper/toLower but always computed in the
constructor, including QString::toLatin1 conversion and allocations.
This needlessly slows down all other uses, including supposedly "cheap"
operations QString::toDouble, or accesses inside QResourceFileEngine.
The benchmarks indicates that doing it always when needed is bearable.
There's still a lot of improvement potential on these code paths.
Change-Id: I88b637ee11f9f7ea614f8da4ec5df0bf40664fce
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Previously if l had a parent, addChildLayout would warn and skip the
reparenting, but it would still add the sub layout to the layout.
This caused some inconsistencies in the hierarchy which in worst case
could cause crashes.
Task-number: QTBUG-30758
Change-Id: I618ec3341636b97bd71e421201b22c746dcf43e1
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Task-number: QTBUG-30346
Change-Id: I3d6dbe1e88bb5e2748eadabb2663f30be16f8d18
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This is the patch from the bug report with a few alterations to get it
to compile, and also with the GroupSwitchModifier code removed, as this patch
just focuses on Qt::KeypadModifier. The problem was determined to be in
QKeySequencePrivate::encodeString, which doesn't handle the
Qt::KeypadModifier flag.
Task-number: QTBUG-4022
Change-Id: Ic981eb8b5cd88c7b36892d3019b8175db4b7b6f2
Reviewed-by: David Faure (KDE) <faure@kde.org>
There may be multiple libraries specified in the mkspec, such as
EGL and Mali, as used in devices/linux-sh4-stmicro-ST7108-g++, so
create an imported target for each one. Also populate the
Qt5Gui_EGL_LIBS variable with all created imported targets. Similar
variables are created for the used OPENGL implementation.
In the case of using the packaged ANGLE library, we already know the
exact locations of the binaries.
This makes it possible for third parties to use the same GL
implementation as used by the Qt build itself. As these are used only
privately by QtGui, they are also added to the DEPENDENT_LIBRARIES
of that target so that they are found for rpath-link usage.
On some platforms (eg Raspberry Pi), multiple include directories must
be set to include egl.h, as the headers it includes for vcos are a
bit scattered.
Task-number: QTBUG-29132
Change-Id: I1126da3d37cd51c88d3670347c8b6405b285efb5
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Keep the content aligned to the bottom when the view has been scrolled
to the bottom and the content is relayouted (for example due to
sorting).
Task-number: QTBUG-30653
Change-Id: I9513e295e276d25ff2068036cd80dbf91314fe84
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This patch adds SizeAdjustPolicy to QAbstractScrollArea.
If it is set to AdjustToContents it will make use of the new
protected viewportSizeHint() (BC since it was reserved in Qt5).
This function returns a suggested size based on contents.
Change-Id: I5d8aa517e88b8b21c5712e62b4d574c3aad99d3b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
uic doesn't get compiled when -no-widgets is used, so disabling
its test.
Change-Id: I8c81ec468e40841548dacb356fd87ecf85d7b6ac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
There is already an enum to disable SSL session tickets, which has been
used to disable session sharing for now. However, SSL session sharing
is not the same as SSL session tickets: Session sharing is built into
the SSL protocol, while session tickets is a TLS extension (RFC 5077).
Change-Id: If76b99c94b346cfb00e47366e66098f6334fd9bc
Reviewed-by: Richard J. Moore <rich@kde.org>
The signal needs to be emitted directly as the event is not passed to
the QLineEdit if the QSpinBox gets the Key_Return. Since this signal
may be relied upon then we ensure it is emitted directly.
Change-Id: I17cdec62c9f995bacfd7d3cc66d6324f26c84c67
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
An RTL menu containing a menu item which opens a submenu was showing
the wrong arrow if the application's direction was not also RTL.
So now the test for QTBUG-30595 can be simplified: no need to set
the application direction, and therefore less chance of failure.
Change-Id: Id140656206c6fefea3649289477dc54c77e2dd5e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Change-Id: I8174ca78b4e2d8b4344278acf8ca4b0db3115d1a
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
logicalDotsPerInchX returns qreal, and qreal in WEC7 is defined to
float instead double. There is no required overload:
qFuzzyCompare(float,double)
And for that reason build fails. Ensure qreal is casted to double which
is default type used by compilers for floating point literals such as
'96.0'.
Change-Id: I24c701715b3dcf1a2137256a1c251c19d0c1dbe9
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
WEC7 does not have ws2_32 lib. The lib is needed for gethostname symbol,
instead of using hard coded platform specific libs,
rely on QMAKE_NETWORK_LIBS variable containing network libs.
Change-Id: Ice39ca3f2d176cc5df88beded4b64d2b92f4f3ba
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Use Q_OS_WINCE ifdef in both method declaration and definition,
in addition combine QT_NO_PROCESS and Q_OS_WINCE ifdefs to one line.
Change-Id: I0787e4341c41b46a5fc089f24a538c0ad40a0875
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Apparently testAllFunctions method has been changed to take pointer,
but code inside different WinCE defines was not updated.
Change-Id: Id15380ecc1e85650d679cb7437923ff9c77057ae
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
WEC7 does not have time() function. Let's use Qt APIs to query time and
initialize random number generator, Qt APIs have already been adapted
to work on all supported platforms.
In addition use QByteArray instead of QString to avoid unnecessary type
conversions later on with toLatin1().
Change-Id: I1ae3729397b0f4a1bd138022a4e122021e10f1e9
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Windows Embedded Compact does not have drive letters like desktop
Windows => do not try to build drive letter related test code for WEC7.
Change-Id: I2c3659220a001510c0555e2dd773b4dd68e9c2cc
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
We don't need to keep an internal QBuffer position, we can just use the
one from QIODevice::pos(). It will keep track of goings ahead and
backwards for us, plus it will make the default bytesAvailable() work
out-of-the-box too.
This error was reported on IRC.
Change-Id: I8559e8ee56edaa01ca8732c1f1012082ebe3a3f2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Previously only 32bit signed integers were ensured to be supported by
JsonValue type via API but it is expected that a larger integer range
should be supported by a JSON implementation.
This commit brings the Qt implementation into parity with NodeJS
JSON.stringify() in respect of the JavaScript Number type.
Change-Id: If91153cb3b13ecc14c50da97055b35ce42f341e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously Qt JSON writer would only emit 6 digits of precision as this
is the default with the formatter.
However with testing against NodeJS JSON.stringify() this behavior is
inconsistent with the defacto standard JSON implementation and conveys
a loss of precision.
Change-Id: Ie1845a6e0ee0b4c05f63ec0062f372e891855f0b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
My interpretation of RFC4627, Section 2.4 "Numbers" of:
Numeric values that cannot be represented as sequences of digits
(such as Infinity and NaN) are not permitted.
I have also verified this matter with NodeJS JSON.stringify() that
emitting a null is consistent behavior with a JSON implementation
written in JavaScript.
Previously Qt would emit:
{
plusInfinity: inf,
minusInfinity: -inf,
notANumber: nan
}
Which maybe turned into a string values of "inf", "-inf", "nan" by
the receiving parser. Now it returns the JSON null value just like
NodeJS JSON.stringify().
Change-Id: I9f9c17f12b2606280806c47a9d90465c4ba5f786
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Auto tests using CET expect there to be no Daylight Time before 1980,
but Windows does apply Daylight Time. Fix expected test results to
match.
Task-number: QTBUG-30420
Change-Id: I7080598fa0a20c1cd5680782606ab983e714e546
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Use the correct metrics for the requested PageSize instead of always
defaulting to A4.
Task-number: QTBUG-30494
Change-Id: Ia3978afe3f7cc9b1ded1065416e5c3def44e7a05
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
QFontCache now references QFontEngineData-s it maintains,
so that QFont instances not freed prior to calling ~QFontCache()
would destroy QFontEngineData on their own.
Task-number: QTBUG-25434
Change-Id: Ia7679d64de436841f09ac7be62ceb570e50cce5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
In QGuiApplication only Qt::AA_SynthesizeMouseForUnhandledTouchEvents
is taken into account when synthesizing mouse from touch events, in
QApplication only the PlatformIntegration syle hint
QPlatformIntegration::SynthesizeMouseFromTouchEvents.
With this patch both attributes are checked. Furthermore the check was
moved out of translateTouchToMouse in QApplication in order not to
influence the result which is returned to the user, when mouse events
are not be synthesized.
Change-Id: I87ac7299f0a9fbf0a083eff9c547f0dbfab75dfb
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
- Remove member variable testWidget and instantiate on the stack
to ensure tests do not interfere.
- Move widgets away from taskbar areas.
- Fix windows geometry warnings by making small windows frameless.
- Fix wrong target widget for key click in
keyBoardNavigationWithMouse().
Task-number: QTBUG-30573
Change-Id: I6d9fad0f212814a67367baf446750e9bed0ebdb2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Before it would skip out a row depending on the size of the tableview.
Now it will show the next set of cells for the direction it is going in.
Change-Id: I02926d0b2187ffafffb63f7fff43c233b4d7d6af
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
By calling itemData() of the source model directly, the result cannot
contain data provided by the proxy model itself. The base class
implementation however will call data() on the proxy instead.
Change-Id: Ib0ef5f5621457adbfa4bd896a756dfcb98d0ae54
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This allows re-using the function in QtQuick.
In addition TextBoundaryType is moved to QAccessible
and QAccessible2 as namespace ceases to exist.
Change-Id: I184bc2c181a22ca51ac4db4e5a080dc26d4acfe0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Calling clear_mapping causes the persistent indexes to be queried, and
mapped using map_to_source, so that they can be restored later. That
is not the appropriate response to the source model being deleted
because there won't be anything to restore.
Simply clear the stored mapping information instead so that the source model
actually exists when mapToSource is called by the framework.
Change-Id: I99692ee7aa9c6714aec45c68fe4a2d62be189d60
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Change-Id: I1d8061302fbb8494b5ae31e20a644745fe969f10
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
- Use qWaitForWindowActive in task178797_activatedOnReturn().
- Remove hardcoded timeouts, use qWaitForWindowActive/Exposed.
- Instantiate widgets on stack or use QScopedPointer to ensure
cleanup.
- Move widgets to a central location, avoiding taskbar areas.
Change-Id: I98991b70067dddab9aa69b1681fa80398ec8b1f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Oracle has a limitation of 30 characters for a tablename so the main
change is to account for this, which meant changing all the usages of
qTableName(). Some other fixes are included that ensure the tests are
working correctly as far as Oracle is concerned.
Change-Id: I8ad8a5a33e6a70fcad235f6a7e82e91687b74fee
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The only way to make this possible is to disable the
atomic-rename-from-temp-file behavior. This is not done by default,
but only if the application allows this to happen.
https://bugs.kde.org/show_bug.cgi?id=312415
Change-Id: I71ce54ae1f7f50ab5e8379f04c0ede74ebe3136d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... because SkipSingle was removed in Qt5, and a QSKIP would result in
the SSL tests not being executed.
This can be reverted once QTBUG-29972 is fixed.
Change-Id: I3663ee52f00c3f4391ce78cf63bd444656d79cb3
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This was spotted while tracking down a similar bug related to spans.
This now also eliminates the Q_EXPECT_FAILs in
heightForWidthWithSpanning(), since it now finally works.
The problem was only for the maximum size, since the size of an ignored
row/column was min: 0, pref: 0, max: FLT_MAX (the default constructed
values for a QGridLayoutBox).
Change-Id: Ibb33c26ede40ed02edd26f596ba6133d59c9962f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
If a row/column is only used only because of the spanning of an item,
the cell should be treated as it didn't exist. We keep track of this
with the "ignore" bit array.
The old code would always start from the row/column at position 1.
In the attached testcase this made the effectiveRowSpan become larger
than actually needed.
Task-number: QTBUG-30255
Change-Id: Ief0e7018ee8e5ee36272ce075a43312ffeac7b91
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This functionality is used in multiple places in Qt itself, so it makes
sense to have a global function for this. This also allows to map this
onto specialized assembler instructions, should an architecture provide
them, later on.
Also added comprehensive tests, using a 4-bit lookup-table implementation
as a reference.
Change-Id: I8c4ea72cce54506ebb9fbe61141dbb5f1b7a660f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This adds Q_DECL_OVERRIDE to the virtual functions in the test.
Change-Id: If1b7646c9a6f50c6efe2d03d253bd8e0b4c09716
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
By moving it to QSqlDriverPrivate we make it easier to check what
database is actually connected which is particularly useful for the
autotests.
Change-Id: I54d1c2c998919c1d54efb1b6ac9303070ece54aa
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Since there already is a one-to-one relationship
between QObject and QAccessibleInterface it makes
little sense to create and destroy the interfaces
on each call to queryAccessibleInterface.
Add a cache and keep created interfaces around for
the lifetime of the corresponding QObject.
This changes the memory management rules: accessible
interfaces must no longer be deleted. If you get an
QAccessibleIntrface pointer that pointer will stay
valid as long as the corresponding QObject is not
deleted.
This also re-enables accessibility for Mac.
We limit the range of the IDs so that they are
useable for Windows directly.
That means we can get rid of the event cache there.
This is based on: Iebf2f374916fc70a9dd29e95f45a6444b85f6cee
Change-Id: I9fe6531812c0dbc5b41101ac05830a6dd75e13a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
In particular, set online state right upon construction of the
QNetworkAccessManager instance. Therefor, QNAM needs an instance of a
QNetworkConfigurationManager internally.
Before, this would only work properly if a network session was created.
Now, networkAccessible() returns the correct status.
Change-Id: I7ff9ccfd18ad376a131fc5977843b55bf185fba0
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Changelog: http://pcre.org/changelog.txt
Amongst other things, the Unicode tables were upgraded to 6.2.0
and case folding support was added, which also fixes a QString
autotest (marked as XFAIL).
Qt still requires 8.30, not 8.32.
Change-Id: I4056c1dc1d949d33443bb8ca280de4c8c363ac74
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Say hello to Interlingua and Mongolian once again.
Change-Id: I735fbc5793f34620be1f6932a251224b9ded02e3
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
- Organize the test images into different sizes.
- Add a button and icon drawing test.
- Don't show all tests by default.
Change-Id: I95eff846b8c5159085f53b413dea7212c1ea5071
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Used by features in CMake 2.8.11.
This matches the features in FindQt4 in that version of CMake,
namely that the IMPORTED targets contain the appropriate
INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS
and that the qtmain.lib static library is automatically linked to
on Windows by executables. Additionally, the
INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately
if Qt requires users to use position independent code.
Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Make top-level windows generate enter/leave events
for sub-windows. Keep track of the current "under mouse"
window in mouseMoved and send EnterLeave events when
it changes.
mouseEntered/mouseExited handles enters and leaves
from the top-level window.
Add tests/manual/cocoa/nativewidgets.
Task-number: QTBUG-27550
Task-number: QTBUG-29751
Change-Id: If4b9f9e0f39d9fb05fdab45a100ffdcf107965ad
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
... but only if the QNetworkConfiguration manager requires one.
Change-Id: I1c69c43438f1df9080d207c8598a42201f759c5b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
If you include a static library in the test, all symbols will
be duplicated, and this can cause nasty crashes because global
static data is also duplicated. This happened on Linux because
of a global static cache in the font engine where the two instances
of it would get out of sync, and we would reference invalid
data.
To test QPlatformSupport features, a QPlatformSupport test which
does not load any platform plugin (or uses its own platform plugin
which does not load QPlatformSupport) is needed. For now, I will
just revert adding the test, since it is broken and was added
as part of supporting Windows CE:
f2fabf77f9.
Change-Id: I6c002d1e0880ee8e031a68eee80e781fe0c62af4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The handling of StyleChange de-maximizes the child window temporarily,
which was emitting subWindowActivated.
This would crash lokalize, because deactivating a window means deleting
the widgets associated with it, and style-change handling is done in
QApplication by looping over QApplication::allWidgets, which would then
contain dangling pointers.
Full valgrind log at https://bugs.kde.org/show_bug.cgi?id=271494#c7
Change-Id: Ifb24032cde2cd470dcae7cd553ec5ab45a919dd6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When QTemporaryFile attempts to create a new file in
createFileFromTemplate, it fails if the filename exists and is a
directory. Windows returns error code 5 (ERROR_ACCESS_DENIED) in this
case - rather than ERROR_FILE_EXISTS - which is not handled.
This patch handles ERROR_ACCESS_DENIED in addition to the already
handled ERROR_FILE_EXISTS, meaning that QTemporaryFile will continue
to look for unique names when a directory with the same name exists.
Task-number: QTBUG-30058
Change-Id: I42339887d7f5483e3dc6a03a9da15111c350da8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Replace <QtWidgets> includes by class includes, remove tests
that do not compile.
Change-Id: I52837e8c567dc8ac365c7d43c37beb9a368f6f72
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
The plugin should try each class name from the meta object
in succession instead of giving up right away and just using
QWidget.
This improves the handling of the itemviews and makes many sub-classes
of QWidget outside of Qt work.
Change-Id: Id81017c648fe229c3eb85d6d9ae6696d5f16a1ef
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
The QODBCResult::exec() returns false when query is an delete
with no data do delete caused by SQLExecute function returning
SQL_NO_DATA, but the false return means error on execution.
Task-number: QTBUG-10569
Change-Id: I6c7ebadcf62ab404b60c7bcccdab6a10bf16a923
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The connection to qt-project.org seems to be the one that causes this
particular test case to fail.
Task-number: QTBUG-29941
Change-Id: Ie5e430646997e86e3acb04132cd90a1773a091da
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
The test has been recently failing in CI. The problem was easy to
reproduce in a virtual machine by resizing the window of the virtual
machine small enough. This change makes sure that the requested size
hint is significantly smaller than the desktop size, to avoid the
window manager stepping in and limiting the window size.
Change-Id: Id8ce63b2b88cbed964e0330633c5d2e1dc33598c
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
(cherry picked from commit 36e6632fa3)
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Skip the test on X11 where it's consistently failing in CI but not when
trying to reproduce locally. Also attempt to make test slightly more
robust on other platforms (it's already #ifndef'd for Q_OS_MAC).
Task-number: QTBUG-30271
Change-Id: I6743eb99549abbd945e380a3a54ce8620000298a
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
1. when there were some engines with ref > 1 in the cache, prior to calling
QFontDatabase::{add,remove}ApplicationFont()/removeAllApplicationFonts()
(QFontCache::clear() has never decreased engine's cache_count);
2. when the QFontEngineData's engine is not in cache i.e. the Box or Test font engine
(~QFontEngineData() didn't free engines it keeps).
Instead of using the font engine's (external) "cache_count" counter,
QFontCache now references a given font engine every time it is inserted to
the cache and dereferences exactly that number of times in clear().
Change-Id: I87677ebd24c1f4a81a53526f2e726e596b043c61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
When variadic templates and decltype are supported, detect the best
overload of operator() to call.
Currently, the code takes the type of the operator(), which requires that
the functor only has one, and that it has no template parameter.
This feature is required if we want to connect to c++1y generic lambda
(N3418)
Change-Id: Ifa957da6955ea39ab804b58f320da9f98ff47d63
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Instead of first finding it and then testing that we can find it.
Change-Id: I1a1090693520b1d6adadef93839f25d277947e76
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This has been broken forever, just like generic signal
disconnection. It didn't use to show up before because in Qt 4,
QObject's destructor would not call disconnectNotify().
Just like in the previous commit, we need to verify whether the signal
was disconnected from the last receiver. A wildcard disconnect might
be disconnecting only from a specific receiver.
Task-number: QTBUG-29498
Change-Id: I0790128ea878fdf3ac563c99d96c6aa7d270e9a3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
There has been a latent bug forever in QtDBus that would make a signal
disconnect actually disconnect too much. The reason is that
disconnectNotify() is called every time a signal is disconnected from
a receiver, but that doesn't mean it was the last connection.
This test checks whether disconnecting from voidSignal() to our test
receiver will also disconnect from exitLoop(). If it does, we'll get a
timeout. I could have implemented it with two receivers, but in the
buggy case, it would always fail first in the timeout verification.
Change-Id: I5766d8a38594eb25e65b304913251303660fad41
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
OpenProcess + WaitForSingleObject is supposed to fail after the process exits,
but this seems to take some time until Windows notices.
Change-Id: I942a9b4a458c23fc4ac33b28386e28821128e991
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The test has been recently failing in CI. The problem was easy to
reproduce in a virtual machine by resizing the window of the virtual
machine small enough. This change makes sure that the requested size
hint is significantly smaller than the desktop size, to avoid the
window manager stepping in and limiting the window size.
Change-Id: Ie319892747bee60ea6f11e27b6c1bfb4731ef587
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
The test has been recently failing in CI. The problem was easy to
reproduce in a virtual machine by resizing the window of the virtual
machine small enough. This change makes sure that the requested size
hint is significantly smaller than the desktop size, to avoid the
window manager stepping in and limiting the window size.
Change-Id: Id8ce63b2b88cbed964e0330633c5d2e1dc33598c
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Task-number: QTBUG-28540
Change-Id: I916d104c8aba551ee9a5b34da3fd85dcb26bbf64
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change-Id: I8ecdda35912a95e69c2f8dd98ce9c41c77b222d2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
moc do not see Q_COMPILER_VARIADIC_MACROS as defined (because it does
not know the builtins defines)
So it would never parse those macro, and never generate the signals or
slot.
Always let moc parse the variadic macro, and put non-macro function in
the header so the generated code would compile on every compiler
Change-Id: Ie9504539ee737c81e831b217f8d623fe810d9e35
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.
Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp
Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.
Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
In Qt 4, QSignalSpy didn't *really* connect to the signal it was
spying on. See the "we need to connect the signal somewhere in order
for D-Bus to enable the rules" comments.
In Qt 5, it connects, which rendered this section of the test bogus:
since the signal is still connected, the QSignalSpy will notice that
fact and will not be empty. This is passing due to a false
positive. The upcoming fix breaks it, so we need to remove it.
Change-Id: Ic8fbf7d0e941403e97149f5bc392334a52c66ab1
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Change-Id: Ib6347360d678bbe54445ebb0680ad66d77a7f3c7
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
There is no need to list the dependencies of the Widgets module.
Change-Id: I9469d4f352685f7122a258f1a44bd017fdc5b3a7
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
It is flakey and often blocks integration.
Task-number: QTBUG-29730
Change-Id: I8acfc243ec6a6782b7f7d78fc27827f3fdc1ce52
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change the data type of PI from qreal to double, because qreal is defined as float and not as double on arm.
The testcase however expects PI to be a double value.
Change-Id: I003481071ecb2c1f54e6dcee9b450da2f1654969
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
This should have been done right from the start,
instead we only made the documentation internal.
Also remove the classes from the BIC data.
Change-Id: I238a7a7cc5d26980b23931c78e7e5a4477d46920
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Expanding on the change fixing QTBUG-24762 with the realization that any
line needs to be drawn in a consistent way regardless of system or
painter clip, not just dashed lines.
Task-number: QTBUG-25036
Change-Id: Ief7ef19cc92c52e7d792500a581a072ba032767e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
While adding a test case for the new behavior, two issues
with the connectSlotsByName implementation came up:
1. for auto-connected slots that don't exactly match a signal,
a 'compatible' one is searched. There might be more than
one of those. The implementation randomly picks any.
2. The "No matching signal for %s" warning gets printed even for
slots that can never be connected via connectSlotsMyName
anyway (e.g. "on_something"). This is inconsistent.
This fixed both: an explicit warning is printed if more than one
'compatible' signal is found and the "No matching signal for %s"
warning is only printed if the slot adheres to the full
"on_child_signal()" naming convention.
In the process I added comments and changed the code slightly to
make it more readable and explicitly hint at non-obvious behavior.
Change-Id: Icc8e3b9936188d2da8dfff9f0373c8e5c776eb14
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Print out available information from QLibraryInfo, QStandardPaths,
QSysInfo, QPlatformIntegration, QStyleHints, QPlatformTheme
and QScreen.
Change-Id: Ia0bdc6174a1748c539acee18ba16a27a48d58ee5
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This allows finding a minimum particular version of Qt 5.
Change-Id: I96112f1be90f397ec60a2b233989ac0e0380bef9
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The problem was that the elapsed timer was not restarted,
causing the currentTime() not being adjusted for the time
it was paused.
Task-number: QTBUG-30108
Change-Id: Ib9b2c5a0dea52762109e0b25f1068dd7c88e15ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Invoking find_package with a version but without the version
file present results in an error.
Change-Id: I29d662081ad5dbd7b2259abeec06affda97cbb6a
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The DBus module is aware of its QtCore dependency, and it doesn't need
to be found explicitly. This test probably dates from when that was not
the case.
Change-Id: I3c78997660efed14d84b062d38d8c68dd4f7ae56
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Adapt to API-changes, exclude network/SSL-tests for Windows.
Change-Id: I80d5ef1bd81e149a2f04fa7644376a8a88b1f7b9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Change-Id: Iea4905d802213848594d2ad0266696e5edb884f8
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
tst_QSharedMemory::simpleProcessProducerConsumer is on the top list of
unstable autotests. Disabling it for now.
Task-number: QTBUG-25655
Change-Id: Ib297b3382b736794bab6cdb668103bef74a55d8c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
If the widget is larger than the screen,
its title bar top left corner will be shown
inside the screen.
Task-number: QTBUG-30142
Change-Id: Id93773874be3616b3ef4b9bee6e1bb751c541d7b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Replaces "QRegularExpresssion" with "QRegularExpression" and adds some
auto tests for the warning itself.
Task-number: QTBUG-30054
Change-Id: Iba333a4388795eccca809fb430c295f503794263
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
It introduced a regression by requiring that a p/P was also present:
QTime time = QTime::currentTime();
qDebug() << time.toString("h:mm:ss a");
// Outputs "10:05:42 am" in Qt 4.8.
// Outputs "10:05:42 a" with 6497649730.
This patch also clarifies the QTime::toString(QString) documentation.
Change-Id: I4d73a959c2ca76304f03a4ce9717b540ad4e8811
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
We do not currently have shared memory or system semaphore support
on Android.
Change-Id: I8e8f3fc6ff8d6de0333002c3e1b31cf070416dbd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Android is not a proper Linux, and in particular it does not have
pthread_yield().
Change-Id: Ibf94cfacdc24d0c3baaef002c64f9f50c72c01d2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This broke the build on Android where fileno returns a short.
Change-Id: Ic8d32380078faeedcd22e785a912fede28251156
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
QMetaObject::connectSlotsByName(QObject* o) creates a list of all
children to look for signals that match slots of o. This changeset
simply adds the object o itself to that list.
The motivation is to finally fix the long standing QtCreator bug
QTCREATORBUG-6494. Where executing 'Go to slot...' and choosing
'accepted()' for a simple QDialog named 'MyDialog' will add a
on_MyDialog_accepted() slot to MyDialog. That slot never gets
connected. More details may be found in the linked QTBUG-7595.
Task-number: QTBUG-7595
Task-number: QTCREATORBUG-6494
Change-Id: I35f52761791af697eabb569adb5faee6fae50638
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Since we currently implement only half of the XEMBED protocol (we lack
the container part), we use a simple XEMBED container built with Gtk+
and PyObject. Using an interpreted language as Python helps us avoiding
a build dependency on Gtk+.
Change-Id: Ibc6282371c6f767e481c8a8ba2b5ca9cdd0d8b82
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
In case somebody uses QVector as a stack, it is not fair to have
takeLast, removeLast and pop_back to do way too much work.
This is still very slow compared to std::vector::pop_back
(mostly due implicit sharing), however it is more than a
factor faster than before.
Change-Id: I636872675e80c8ca0c8ebc94b04f587a2dcd6d8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If the process terminates while QApplication::processEvents()
runs, the subsequent waitForFinished() returns false and the test
fails.
Task-number: QTBUG-29951
Change-Id: I41f461358920ad430951613dd919885f68ae212c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This patch adds takeFirst and takeLast which are functions
that QList also has.
Change-Id: I761f90b529774edc8fa96e07c6fcf76226123b20
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch adds the functions removeFirst() and removeLast().
Functions that QList has.
Beside making these functions, pop_back and pop_front are
redirected to these rather than calling erase.
Change-Id: Ifc5f8a78e33f436f06f21095a920ec5d4311fd6f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We need to clip lines to the unclipped device rect in the case of
dashing, since otherwise the dashes will be shifted and rendered
differently when partial repaints are done.
Task-number: QTBUG-24762
Change-Id: I3599b54baa552acc20bf8cc2e12f846b45f6019e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Make sure the graphics view is exposed and has been painted before
trying to grab the framebuffer.
Task-number: QTBUG-29943
Change-Id: I2945cb78b58265864744a0d5fc99fb430306b578
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
QKeySequence provides conversion to and from strings. But a similar
convenience was missing for QList<QKeySequence>. It would come in handy
when you want for instance to save/restore the shortcuts of a QAction.
Change-Id: I9e4f2001c58a595392a5019a57c564992c39bf88
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
I changed the existing test-case code to make it more scalable
in terms of adding more connectSlotsByName related tests. The
old "manual list of ints"-method was really not developer friendly.
This is a preparation for a subsequent modification of
connectSlotsByName behavior.
Change-Id: Ib760e52631ce4b5ae2a3ebdb4854849ff6c93bfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
We cannot access children directly, since that won't ensure that
the pending sort is executed. However, the functions we need are
there already and actually makes the code nicer.
Task-number: QTBUG-29903
Change-Id: I6899284275dd79b991896a5f08486b58d95f819d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>