Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo.
Task-number: QTBUG-20480
Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Deprecate the old API for now as not to break existing usages.
Change-Id: I7abbbbe8a34951282537a9d74cded03743f44df7
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Focus change happen as: FocusAboutToChange event -> focus change
-> FocusOut event -> FocusIn event.
Input method need to have focus when calling commit(). Notification
on focus about to be lost allows QWindow implementations to commit in
time.
Also changes QWidget documentation to match code reality.
Change-Id: I17a8a374a33dd700909f79e370b42348869261a6
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
The parser makes the default language en_US, and no mimetype xml says
<comment xml:lang="C">, so use the en_US string for the C locale,
rather than returning an empty string.
Change-Id: Iad7c142e8078abe357773249416e7ce9b3e29a92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
ApplicationsLocation and DataLocation were returning only the local path,
rather than system paths + local path.
Change-Id: I653d14e5bbe1e08c5fa1ecd5a6106336d1cd0369
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make sure that if ShowAlphaChannel option is set then also setShowsAlpha
needs to be set for the panel before setting the current color, otherwise
alpha channel value is omitted.
Task-number: QTBUG-24320
Change-Id: Ifb3822711af8ffd0cf6cb4c8aab2b0020d296663
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
We are running out of type ids for built-in types, 255 is not enough.
QMetaType already contains about ~70 types, situation is maybe not
tragic now, but there is a great chance that we will want to add more
built-in types from different modules like jsondb or declarative. Then
it might be tight, because we are not allowed to reorganize type ids
(it would be a binary incompatible change).
This change was not possible up to now. Old moc generated code assumes
that type id can be safely stored in 8 bits.
This is source compatible change.
Change-Id: Iec600adf6b6196a9f3f06ca6d865911084390cc2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Since change 2e4d8f67a8 the need for Map and Unmap events has
gone away, as now the Expose event is used to notify the application
about when it can start rendering.
The Map and Unmap events weren't really used except by QWidget to set
the WA_Mapped flag, which we now set based on the expose / unexpose.
Also guarantee that a Resize event is always sent before the first
Expose, by re-introducing an asynchronous expose event handler. Since
an expose is required before rendering to a QWindow, show a warning if
QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a
window that has not received its first expose.
Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
- Fixed path was failing to find sub program.
Change-Id: I86f1a6941e244c9bc25ad0441cc7a441607560b7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
For Qt5 we no longer want to support the older revisions due to the
dual codepaths that must be maintained, and because the format of the
meta-object data is quite different in revision 7.
The dual codepaths have been replaced by asserts that indicate the
revision in which the feature was introduced, and the older-revision
fallbacks have been removed.
It's not possible to build code generated by moc that has
revision <= 6 with Qt5 because the type of the
QMetaObject::stringdata member changed from const char * to const
QByteArrayData *. For the same reason it's not possible to build a
dynamic meta-object generator targeting revision <= 6 with Qt5.
Hence, too old meta-objects will be caught at compile time, and the
code will have to be ported to generate revision 7 (e.g., by running
Qt5's moc on the original class declaration).
Change-Id: I33f05878a2d3ee3de53fc7009f7a367f55c25e36
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QMetaMethod::typeName() is documented to return an empty string if
the return type is void. But after the introduction of
QMetaType::UnknownType (where void was made a distinct type),
returning an empty string causes the idiom
QMetaType::type(method.typeName())
to break; the result will be QMetaType::UnknownType rather than
the expected QMetaType::Void for methods that return void.
New code should use the new function QMetaMethod::returnType()
instead, but it would be good if existing code still did the right
thing.
The consequence of returning "void" instead of an empty string is
that it breaks existing logic that uses the typeName() length to
determine whether a method returns void. But we judge this as the
lesser of the two evils; it's better to have a typeName() function
that is consistent and keeps the QMetaType::type(method.typeName())
idiom working, than to force the typeName() inconsistency for void
only to keep code that does "strlen(method.typeName()) == 0"
working.
The places in Qt that were relying on a zero-length typeName()
(testlib, dbus, declarative) have already been changed to use
returnType().
Also adapt QMetaObjectBuilder, which is internal API.
Change-Id: I70249174029811c5b5d2a08c24b6db33b3723d19
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Since the introduction of QMetaType::UnknownType, void is a proper
meta-type, and the normalized form of "void" should be "void", not
an empty string.
Add more tests to ensure that we do remove "void" in the one case
where it actually should be removed (e.g. "foo(void)").
Change-Id: I72dc2d24da67cf52da00c678f50213cff1b92e25
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
This causes all sorts of problems, but is also blocking the introduction of new,
more detailed signals, because the backend never correctly identified the removal.
The object handle appears to be woken up before the directory is actually
deleted, thus causing QFileInfo::exists() to return true, and not doing the
removal dance. This behaviour isn't exactly documented (as far as I was able to
find out), but also seems to happen consistently, and Chromium also contains
a comment noting a similar issue.
Task-number: QTBUG-2331
Change-Id: Icfb6219b78e688852d7863a666a0ffc31bb4d573
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This actually involved tiding up QObject sources a little bit
to clearly separate QString / QRegExp overloads of findChildren.
The corresponding qFindChildren overload for MSVC 6 compatibiltiy
was *not* added.
Change-Id: I84826b3df9275a9bda03608a5b66756890eda6f8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QVariant handlers can not be unregistered. We are not able to guarantee
that such operation is safe and we do not want to.
Change-Id: Id9a12e6a8c750110e4a08eab1de3e07e5c408675
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QFont::defaultFamily() should not use any hardcoded font names like
"Helvetica" or "Times" as they might not be present in certain systems,
it should rather use abstract names like "sans-serif", "serif" and
"monospace" then let the platform plugin to decide which font map to
them.
Change-Id: I5aafb103a5238c17b10773711ad504806c6fc3ce
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This patch changes invalid QVariant qDebug stream value from
"QVariant(, QVariant::Invalid)" to "QVariant(Invalid)"
New tests were added.
Change-Id: Ia57d4fc2d775cc9fce28e03eba402c2173845b35
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
With the move to the QPA architecture EGL is now only required by
individual platform plugins and the configure script has been adjusted to
reflect this.
Change-Id: Ieadacef0b970f29752d9e3e36a007e5cbb005b0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Make QJsonValue, QJsonObject, QJsonArray and QJsonDocument
first-class meta-types.
This is an enabler for a lightweight integration with QML.
Change-Id: I4725efdd2746cf97fd26d3632a99e8eee849f834
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
We will not be testing BIC of Qt5 against Qt4
Change-Id: I6f0eea3dd60eea1535749240a178a19605c981d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This fixes a situation where we (wrongly) assume that
a section with size 0 is hidden. However a hidden
section should be one that we have called hideSection
(or setSectionHidden) on.
Change-Id: Ic14eded2666022f27434dc55927323a74910549c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The Lancelot raster painting autotest assumed latin1 encoding of the
QPS scripts files, while the script engine would import subscripts
as UTF8. This fix standardizes on UTF8.
Change-Id: I9e7c1ee7b6ffe77ff68edc8423f00dfb9ab3e95b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
This makes the api cleaner and generally the child should not be there.
It is only sometimes more convenient not to create a QAccessibleInterface
instance, so the functionallity is kept.
Change-Id: I26018a6d3e0549f4d79856775b4167c5660e229d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
There are many tests, examples that depends on widgets. This patch
disables some of them if Qt is configured without widgets.
Change-Id: I5460dadca736c54221874adcd518a7021725d90a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This function calls platform specific function
QWindowsPrinterSupport::supportedPaperSizes(), which then called back
to QPrinterInfo::supportedPaperSizes(), causing infinite recursion.
Fixed by providing a proper implementation for querying supported
paper sizes in QWin32PrintEngine - the same implementation was used in
Qt 4.8.
Task-number: QTBUG-24190
Change-Id: I64a2773d83596df19818bf2636f1255943d7851d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Also make the handling of events in the test pointer
based since mac-g++ doesn't seem to like const
references the way they were before.
Change-Id: I7fe39978d4729b8e586be30978b74aa51ca7cfe6
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
These were not covered at all by tst_qmetatype.
Change-Id: Ic957470ac78b2c15fe449efe17e1f178a41c3690
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
This involves invoking the Moc classes directly and using the data
structures it provides instead of invoking the moc exectutable and
parsing the generated code.
Change-Id: Ia5c654e8ef58d52d0d3376252c13e13885f80da3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
C++11 adds cbegin()/cend() functions for the same reason Qt has
constBegin()/constEnd(). This patch adds these functions to the
Qt containers with the same implementation as constBegin()/constEnd().
It also fixes the return types in the documentation of existing
constFind() functions (documentation only).
C++11 only adds cbegin()/cend() (and crbegin()/crend(), which Qt doesn't have).
In particular, it doesn't add cfind(), so I didn't supply these, even though
Qt comes with constFind().
This is a forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1365.
Change-Id: Ida086b64246b24e25254eafbcb06c8e33388502b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Cached font was used regardless of the format, resulting in incorrect
advance in some cases when default format differed from the cached
format.
Task-number: QTBUG-24188
Change-Id: I39e4156bd9ba743afa7e106e934c90227fbf2b8b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Commit 3fe1eed0 changed the QVERIFY in line 1354 to QCOMPARE. This was
done to work around a (not yet understood) compiler issue. That however
was wrong, as char pointers in QCOMPARE are assumed to point to
'\0'-terminated strings and will get dereferenced.
In this case the intent was to compare the actual pointer values, as the
pointers point past the end of the array and should not be dereferenced.
Explicitly casting to (void *) and using QCOMPARE will not only keep the
intent, it will hopefully also provide meaningful output on failures. As
such the fix was applied throughout the test.
Change-Id: Ib0968df492ccc11d7c391bb69037cd7241e55493
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The DNS server can legitimately include NS and A records for
the authoritative name server in addition to the DNS records
that were requested.
These are now ignored when checking the reply (we only check
results that match the query, rather than failing if a result
is for a different host name than the query).
Task-number: QTBUG-24698
Change-Id: I327f31d58cdca50c7df6b32b275d7f28b56405f0
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
For OnFieldChange and OnRowChange, we don't want more than one row in
the cache with uncommitted changes. This could happen if deletion in
the database fails while other changes are pending.
Chosen solution is to return false if other rows have pending changes.
Also, we only allow 1 row removed at a time.
Updated test, changes and documentation.
Change-Id: I68baf6d221789b4754e891535070011c759a2155
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
The model can never do a good job of knowing when user moves to a
new row in the view. Faking it by detecting when another row
is changed was not a good solution because it cannot detect
when the last edited row is left.
Either the view should automatically submit when the user leaves
a row or the application should provide a way to submit.
This change made it possible to reuse the logic of flags() in
setData().
Change-Id: I2550e5b113bceba1a852fc21203babeca07c5748
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
For OnFieldChange and OnRowChange, inserting rows should not be
allowed if there are pending changes in cache.
Change-Id: Ia794332959a35a1de87e798ba1a74ace3dfae68f
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
For OnFieldChange and OnRowChange, before submitting new changes,
setData() and setRecord() attempt to submit pending changes and
revert them upon failure. However, they fail to consider that
reverting pending insertions removes rows from the model. As a
result, the new change can be applied to a row higher than intended.
One possible solution would be to adjust the targetted index for the
removed rows, so that the intended row is affected by the new change.
But this still causes the strange editing experience as rows jump
up just as they are being edited.
It does not seem right in the first place for the model to initiate
reverting changes. It should be up to the application to decide what
to do when data cannot be committed. In particular, setData() and
setRecord() should not have the side effect of reverting already
pending changes.
The chosen solution is simply to refuse new changes that don't make
sense for the edit strategy. For OnFieldChange, flag() will
indicate read-only when editing is blocked by a pending change.
Since setData() and setRecord() submit data immediately for
OnFieldChange, it no longer makes sense to resubmit changes
automatically before a new change.
For OnRowChange, setData() keeps the behavior of automatically
submitting a pending row before starting on a new row. This is
historical behavior and is probably motivated by the fact that
QTableView does not automatically call submit() when editing leaves a
row. The obvious shortcoming of this is that the last row to be edited
will not be submitted automatically. It also prevents us from flagging
rows other than the pending row as read-only.
For OnRowChange, setRecord(), being row-oriented by nature, should
submit the change immediately rather than waiting for the next call
to setRecord(). This makes setRecord() consistent with insertRecord().
Change-Id: Icb4019d8b7c53a7ee48f8121a7a525e8bc35d523
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
The tst_QSharedPointer generate another Process to test some invalid
codes, and it expect that the prcoess will crash and return a non-zero
value.
The process which is a console application was linked to windows
subsystem, and QProcess seems can not get its return value. This
cause the unit test fail.
In addition, when the process crash under debug mode, a debug error
report-dialog will appear, which is very annoying, so I suppress it too.
Task-number: QTBUG-24160
Change-Id: Ia1c872d4515c83b0aa516bcfe3783f59797d2d49
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Use QTest::ignoreMessage() so that the warnings don't appear in the test
output and so that the test will fail if the warnings are not produced.
Change-Id: I418d78819fc9dbfd7da2a8b6c0a1ebfa967347e2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
These issues are permitted to go unfixed for ARM and MIPS, for the time
being.
Change-Id: Ibdf33dc42e3de19ef20e9dc50f12f451ea6dbf23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This test has been repeatedly unstable.
Task-number: QTBUG-24796
Change-Id: I603965c0189ad6da0cdf48527c4919c55e1918b4
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
QTreeView already does this in the exact same way. It's necessary to
call submit() so edit strategy OnRowChange in QSqlTableModel will
work as expected.
Change-Id: Ib430143e8a71f3b0bcd842fcc772cc7ee4525f0a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Added support for QString overloads taking a QRegularExpression.
Change-Id: I8608ab0b66e5fdd2e966992e1072cf1ef7883c8e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Refactor NSWindow creation into createNSWindow and
setNSWindow. This is necessary to support QMacNativeWidget
where we re-use an already created window.
Implement popup window handling. Make sure the window
is displayed correctly and closes when it should.
Take control over window activation in order to prevent
infinite loops involving the QtCreator "cmd-k" window.
Activation events are for now not sent to popup-type
windows.
There is now a different set of test failures: add
and remove some QEXPECT_FAILs.
Change-Id: I229761b59f90c9815b968eacc2cbc9c20cc5047e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This patch renames the functions in Qt5 according to the
notes. It also renames resizeMode to be consistent.
The old functions are both marked with both QT_DEPRECATED
and '### Qt 6 - remove'
All usage of the function within the qtbase are also
changed to use the new functions.
Change-Id: I9e05fa41d232e9ca43b945fcc949987017f3aedd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Removed the Q_DECLARE_METATYPE in favour of first-class support
inside QMetaType and QVariant.
Change-Id: I904236822bfab967dc0fbd4d4cc2bcb68c741adc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Duplicated code was removed. As an side effect:
- one runtime flag check was replaced by a compile time check.
- is enum flag can be used together with built-in types.
Change-Id: I54173e7b07ce7e487d3cc21ba24dcccd28b5d049
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Resource files are expected to be readable.
Change-Id: Ife2b624e69b58e2fb996bc3e210a6e6c5c6852fe
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The removed code was already commented out when the test was added to
the Qt repository and does not compile when uncommented as it calls
non-existant overloads of QtConcurrent::FunctionWrapper1::operator().
Change-Id: I5a02efae4b89e2815b077474aa7cd0192dcb2730
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Seen with gcc 4.6:
tst_qarraydata.cpp: In member function 'void tst_QArrayData::grow()':
tst_qarraydata.cpp:1445:29: error: narrowing conversion of 'i' from
'size_t {aka long unsigned int}' to 'int' inside { } [-fpermissive]
Change-Id: Iad55659554b64ee34655640d606153f058a8cd05
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Checks if model has any changes to submit.
Includes new test covering isDirty(index) as well the new
overloaded function.
Task-number: QTBUG-3108
Change-Id: I0ccbda45d5d9f06434cf1e1c037a9efb76d0cc37
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
1. QJsonParseError::MissingObject defined
2. QJsonDocument::fromJson() will result in defined error after parsing
of something like "{ 'key':1 , }" or "[ {'key':1}, ]"
Change-Id: I8e6234a03b8aca4e5ad6180f273f91066b86d7a1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
In commit 75286739 it was assumed that negative positions shouldn't
influence the size of the returned substring. That however changes
behaviour that was depended on even inside Qt.
With this change, the old behaviour is reestablished.
A negative value of n is still taken to mean "all the way to the end",
regardless of position, and overflows are still avoided.
Change-Id: I7d6ed17cc5e274c7c7ddf0eb0c3238e1159ec4f6
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
No longer base the implementation on a QWidget which is not
necessary when all that is required is a message window listening
to task-tray messages. Export a service function creating a message
window from the Windows native interface and use that.
Task-number: QTBUG-20978
Change-Id: I01d0faeac777df4eee802c51d2bc722fce814080
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Change-Id: Id565fa1eb8fe13c62a93a5afa39a5701ce7b20ea
QPixmap::grabWidget is deprecated, which calls QWidget::grab() at present.
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
GCC complained about undefined behaviour when
deleting subclasses of AbstractTester through
pointers to AbstractTester, and it's doing so
correctly...
Change-Id: Ie641281d8aafe32c5c9784e8aa39672ff0b699c7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This is a semi-automatic search, so I'm
reasonably sure that all the exported ones
have been caught.
Change-Id: I314d341ad0db4e9d4bbf353a9537c9422ad8a54b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These unit tests do not depent on QtWidget.
Change-Id: I95526125c563885c0531da7ebfee06bca9a87b1c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Subclass QAccessibleEvent to give details what changed in the
state change.
Change-Id: I9005d311e85a3c8bfa6e062833fa6a8a7dc6a4a4
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
The test was assuming that "data()" is a special function in autotests,
but that hasn't been the case since early prototypes of testlib.
Change-Id: Ic24cf5dc539b55d12eba0a6ab17173e2ed698f21
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
- Use const_cast to avoid "deprecated conversion from string constant to
'char*'" warning when building argv arrays from string literals.
- Use Q_UNUSED to avoid warnings on unused local variables.
Change-Id: Idd2c8279adc102b6ebc6af7486ba26fe9ed4e7c1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Make the various versions of the failure message align consistently so
that it's a little easier to compare the actual and expected values. Of
course, the value won't align nicely unless the "actual" and "expected"
strings are the same length, but at least this commit makes that
consistent across all versions of the message.
Change-Id: If9ce231df3b5d279a06f6458fdb5da0aa4586068
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Add Q_IS_ENUM() macro to determine if a given type is an
enumeration. Use information from that in QMetaType::registerType()
to store whether custom registered metatypes are enums or not.
This information can then be accessed by calling
QMetaType::typeFlags(int type). This is used by the declarative
code to determine whether a custom type in a variant can be safely
cast to an integer, which is required to allow passing non-local
enums as signal/slot params.
Change-Id: I9733837f56af201fa3017b4a22b761437a3c0de4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The function is public, so it should validate input instead of crashing
Change-Id: Id67463b0b61ab74a76c1ede7f052bdbed37822b6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Antialiasing of fonts was causing two tests that relied on finding
at least a certain number of pixels of certain color to find one or two
too few pixels of that color and thus fail.
Fixed by increasing the amount of text displayed to make sure enough
pixels of correct color would be present.
Also removing the test insignification, as the test will now
pass completely when run under Windows Classic theme, which CI uses.
Task-number: QTBUG-24323
Change-Id: Ic0b614d33e4e4f5df18d53cb72a05db5d8b6b5e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Both tst_qimagereader.cpp and tst_qimagewriter.cpp do not depend on
QtWidgets.
Change-Id: I7e8b31c23db203c44ccb4cd4e8e747d18c5d7ed7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
QPointF is in the category of types for which QList
is needlessly inefficient (elements are copy-constructed
onto the heap and held through pointers). Use a vector
instead. This is consistent with the QPainter API.
Change-Id: Ie3d6647e05b40a33a7bb0598cbbcde4676e00836
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Although passing a null pointer to pcre16_get_stringnumber for
the compiled pattern should simply make it error out, it's actually
an undocumented behaviour, so let's stay safe and add an explicit
check.
Tests for this codepath are added.
Change-Id: Ifd9c87874f6812ba487104ec1a5bbc83c3b16761
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
PCRE's JIT uses by default 32K on the pcre_exec caller's stack. This
is fine for most situations, but in some cases (esp. patterns with
lot of recursion) more memory is required.
Therefore, if a match execution fails due to exhausting JIT memory,
we let PCRE allocate up to 512KB to be used for the JIT's stack.
The pointer to the allocated memory is put in thread local storage
(so it can be reused from the same thread, if needed, and automatically
goes away when the thread dies).
Change-Id: Ica5fb7d517068befff88ebb198a603a26ec5d8a7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
they are obsolete (qmake knows the qt build configuration anyway), and
messing with QTDIR is a recipe for disaster.
Change-Id: Ib3594f38ec3192a5f70771f8bc5d8fd435bbbd15
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
The commit 660af10dee seems to have fixed
the test, so removing the insignification from it.
Task-number: QTBUG-24348
Change-Id: I564e90db53d10b54e22342a1cdbef6826929c63a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
When objects or arrays where being used read only, several objects
can share the same d pointer, but will have different pointers into
the binary data. Correctly change the pointer into the binary
data even if the d-pointer is the same.
Change-Id: Ife0ea5ac5daf46586f855dccdf35b51ec696a623
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>