qdatetime.h uses std::min/max and on Windows windows.h (or some subsequent
header file) may under certain circumstances define min/max as macros.
The easiest way to prevent the windows header files from doing that is to
define NOMINMAX in the place right before windows.h is included. The other
way is to define min and max to min/max themselves to prevent windows.h
from doing its evil thing.
If a user of Qt (WebKit in this case) chooses the approach of defining
min/max to themselves and then includes qdatetime.h, then a subsequent
inclusion of windows.h doesn't work because qdatetime.h undefines min/max.
We should not enforce the type of workaround needed, therefore this patch
removes the workaround from qdatetime.h and requires user code that
happens to include windows header files before qdatetime.h (seldom case)
to choose either workaround.
Change-Id: I7347eec7369491a065e894cff557004e069453d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This extension doesn't work for e.g. default arguments
in function declarations.
Change-Id: I32b7afa6e01b6af55fb2409179b4fd94cb04cd8d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Completing the work of the previous commit: we don't need separate
classes. Merge into the main class's body.
Change-Id: I2f89b34cb6b7f5f9e8d8b809bebd86656f458644
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This allows a QSharedPointer to be used in contexts where the class in
question is still forward-declared. This produced a warning in Qt 4 due
to the expansion of the template, even if there was no chance of the
pointer being deleted there (because the reference count could not drop
to zero).
Now, not only is the warning removed, but you can actually have the
reference count drop to zero in a forward-declared class and it will
do the right thing. That's because the deleter function is always
recorded from the point of construction and we're sure that it wasn't
forward-declared.
The unit test for forward-declarations had to be rewritten. The
previous version was passing only because the QSharedPointer object
was created under the "tracking pointers" mode, which causes a custom
deleter to be used in all cases.
Task-number: QTBUG-25819
Change-Id: Ife37a4cea4551d94084b49ee03504dd39b8802c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
QSharedPointer doesn't work like the other automatic template metatype
declarations because in some cases T* is declared as a metatype, but we
are interested in QSharedPointer<T> (eg QObject*). In other cases, T is
declared as a metatype and we are interested
in QSharedPointer<T> (eg char).
In particular the macro used before this patch was attempting to get the
metatype id of the element_type using for example qMetaTypeId<QObject>()
instead of qMetaTypeId<QObject*>(), which did not work.
Similarly, the variadic macro driven test is no good, because it was
testing QSharedPointer<QObject*> instead of QSharedPointer<QObject>,
so that is removed.
In the end, the only thing we can sensibly automatically declare as
metatypes are QSharedPointers to QObject derived types. That is also
the type that makes the most sense in a QML context anyway.
Change-Id: I13dd40147e2e6bedf38661f898102abaaaa96208
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Some test functions that only test QDate and QTime were in
tst_qdatetime.cpp. Upon moving these into tst_qdate.cpp and
tst_qtime.cpp, there were already some similar tests so I
consolidated them.
Change-Id: I5f8758bf8b4804ae9d3a482f49d21de9f7a1dc03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Most fixes are simple and quite obvious. The ones more involved are
the ones to QArrayData, which had probably not been compiled with
strict iterators thus far.
Change-Id: Ic4ff84c34fd9a04fd686fecaa98149b1c47c9346
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
We need to let the QGuiApplication determine whether quitting is appropriate
based on whether there are visible top level QWindows after the last top-level
QWidget was closed.
This solves the issue raised here: http://thread.gmane.org/gmane.comp.lib.qt.user/1880
The transientParent is the QWindow equivalent of parentWidget on QWidget, so the test
in QGuiApplication::shouldQuit is similar to the one in QApplication::shouldQuit.
Change-Id: I500eff8d5887f24415180134b3a4be3c630a896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
The QSet<int> is a more expensive container to use and create, so
it should be avoided.
This is source incompatible compared to earlier Qt 5 for
QAbstractItemView subclasses which reimplement dataChanged, but this
patch changes nothing compared to already-present SiC compared
to Qt 4.
Change-Id: Id95391dfd62a0a7f487a8765790b007badefb937
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Containers are auto-registered and use normalized names.
Change-Id: Id65c3940401f69436929220e1f6a971135e147ed
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This already worked, but let's have a test so we can be sure it doesn't
regress.
Change-Id: I358b436d216e3ec4310f05ccf4f70f9e7aad3281
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* The Line Breaking Algorithm implementation conformance tests has been added;
* The Grapheme, Word, and Sentence Breaking Algorithm implementation
conformance tests has been updated.
Change-Id: Ia1a6eef6272d580964cb23788ddf30dfd5f4a5a3
Note: the Line Break test data contains some extended cases we don't currently support;
just skip them for now.
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
to make it conformant to the Unicode 6.1 specifications #14 and #29.
The most important changes are:
* The implementation has been reworked from scratch to fix all known bugs;
* Separate-out the grapheme and the line breaking implementation to eliminate
an overhead due to calculating unnecessary breaks;
* Stop using deprecated SG class in favor of resolving pairs of surrogates;
* A proper support for SMP code points;
* Support for extended grapheme clusters (a drop-in replacement for the legacy
grapheme clusters as of Unicode 5.1);
* The hardcoded tailoring of UBA has been eliminated which breaks the 7 years-old
lineBreaking test. Some later, we'll investigate if such a tailoring is still needed.
Change-Id: I9f5867b3cec753b4fc120bc5a7e20f9a73d89370
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Update NormalizationTest.txt data file with one from UCD 6.1;
Add few more QChar::unicodeVersion() testcases;
Add some line break class mapping testcases;
Add some exceptional case mapping testcases;
Add script class mapping test;
Change-Id: I164394984abb2b893c8db62fb77e7bd87aa0850b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Future-proofing. Since Qt source code is now mandated to be in UTF-8,
it is entirely possible that someone will use non-ASCII in data tags.
Though it would be interesting to see how to access them from the
Windows command-line.
Change-Id: I880fc312432b62143888ff1e1d9abbd54f704601
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This supercede https://codereview.qt-project.org/#change,25111 and fixes
some more cases;
The autotest crash is fixed as well (but the test itself omitted due to
.pro file misconfiguration)
Change-Id: I4a3adde18b4f9a8ac9822f700eee71d2a12b9c2c
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
This is a cherry-pick of 4f388c383e39b598d997e21bd9a4f16d89bd0625
from February
Recursive call is caused if user code calls QtreeWidgetItem()::sortChildren and
sorting is enbled in QTreeWidget.
First call is from user code and second is caused by timer.
When timer expires second call is made.
This recursion is prevented with QTreeModel::SkipSorting skipSorting()
in QTreeWidgetItem::sortChildren();
Task-number: QTBUG-20345
Change-Id: Ibf73e69274423f31397a9e391bfba7d5c4103a3c
Reviewed-by: Markku Tapio Heikkilä <markku.heikkila@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
According to ISO 8601 (section 4.2.2.3), seconds can be omitted
from a string representing time.
Task-number: QTBUG-2813
Change-Id: I2578f290845e46a8f49be489f1d7427984ae7f08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
to keep them consistent with positions for all other flags.
This changes the internal behavior so that attributes[0].lineBreakType now means
"break opportunity at start of the text (before the first character in the string)"
and is always assigned with HB_NoBreak to conform rule LB2
(see http://www.unicode.org/reports/tr14/#LB2).
The current implementation is based on the sample implementation from tr14
that aimed to be as simple as possible rather than to be optimal.
From now, we can use pieces of the attributes array "as is"
without having to adjust some positions. Or we can analize some long text
by chunks (e.g. paragraph by paragraph) and consume less memory.
This introduces a minor overhead that will be eliminated shortly.
Change-Id: Ic873a05a9d5203b1c3d5aff2e4445a3f034c4bd2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
SoftHyphen enum value was added to specify such a boundary reason
Change-Id: I4248909eed6ab8cbca419de4dcf9fe917620a158
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Because QSystemLocale::fallbackLocale() is about UI languages,
it makes sense to check LANGUAGE as well if appropriate.
Adapt tst_qlocale.cpp accordingly.
Suggested by Oswald Buddenhagen.
Change-Id: Ib2c9674081809e3251be4e34456b05210eebc010
Reviewed-by: Oswald Buddenhagen
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
postDelayedEvent() and cancelDelayedEvent() are marked as thread-safe
in the documentation. Unfortunately, they didn't actually work when
called from another thread; they just produced some warnings:
QObject::startTimer: timers cannot be started from another thread
QObject::killTimer: timers cannot be stopped from another thread
As the warnings indicate, the issue was that postDelayedEvent()
(cancelDelayedEvent()) unconditionally called QObject::startTimer()
(stopTimer()), i.e. without considering which thread the function
was called from.
If the function is called from a different thread, the actual
starting/stopping of the associated timer is now done from the
correct thread, by asynchronously calling a private slot on the
state machine.
This also means that the raw timer id can no longer be used as the
id of the delayed event, since a valid event id must be returned
before the timer has started. The state machine now manages those
ids itself (using a QFreeList, just like startTimer() and
killTimer() do), and also keeps a mapping from timer id to event
id once the timer has been started. This is inherently more complex
than before, but at least the API should work as advertised/intended
now.
Task-number: QTBUG-17975
Change-Id: I3a866d01dca23174c8841112af50b87141df0943
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
tst_QWindow::positioning() still fails on Mac OS X, and it does so in
several places. Skip this test for now as it causes isActive() to fail
as well. With positioning() QSKIP()ed, all the other test functions
pass:
Totals: 19 passed, 0 failed, 1 skipped
********* Finished testing of tst_QWindow *********
Task-number: QTBUG-23059
Change-Id: I58d036120c0121f515813cd20955ab3b82f81fe1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
When switching the active window within the same application, Cocoa
sends us an NSWindowDidResignKeyNotification for the old activated
window, then an NSWindowDidBecomeKeyNotificationfor the newly activated
window. Our handling of this would first set Qt's active window to zero,
then immediately reset it afterwards. Avoid this by checking the key
window when handling the deactivation event, and don't set the active
window to zero if a new window has become active.
Task-number: QTBUG-24322
Change-Id: I8719fc501049eeaaebb75e9ea03261b2209458b6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
It might be too expensive to always have an accelerometer sensor
running, so introduce API so that the application has to explictly ask
to get the orientation updates it's interested in.
Change-Id: Ib7dc5ad8807718409f744ebef53f4476aa05175d
Reviewed-by: Ian Monroe <ian.monroe@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com>
The function returns mutable iterator on the object that can later be passed to
e.g. erase(), hence it should detach() to be consistent with
QJsonObject::begin() which also detaches.
Change-Id: Id79e8e012fd5469e06b68fbc9eecb7c6848ce9c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
The use of QWeakPointer for tracking QObject pointers is to be
deprecated.
Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QUrl("relativefilename").toLocalFile() changed behavior
and now returns an empty string if the scheme is not set.
Setting the scheme to "file:" in setSource would however
break some other assumptions in the code about relative
url's.
Task-number: QTBUG-22416
Change-Id: I1b3fcbef81f6e356935ec426903989e783ce9a78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Allow for a little more leeway in timers.
Task-number: QTBUG-26004
Change-Id: I59936d0f675b7f734e04b3f5e63631c74ca4f163
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
If a QTemporaryFile is constructed using a template file path,
the path is generated in QTemporaryFileEngine::open() and then
filePathIsTemplate is set to false. If remove() and then open()
are called on the same QTemporaryFile, the path is not regenerated.
This change ensures that if the file path was generated, it will be
generated again in the scenario above.
Task-number: QTBUG-2557
Change-Id: I718ceb89daa9a9d46fdbe811fecc3d57d6dc08c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Currently, QString::toFloat() returns 0 (and sets ok to false) if you
try to convert "inf". This is because inf is greater than QT_MAX_FLOAT
and there is currently no check to handle inf.
Task-number: QTBUG-8629
Change-Id: I498daf4a7a6f880f928461fca628fcaf7d1d6d08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The existing tests has been retained, the new ones has been added.
Change-Id: I12ae1b4e63dde46f3b14a7c1423c13d5881d4507
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Use this to store the loop-level counter needed by QCoreApplication
when determining when it is safe to delete an object.
This removes the hack to hijack the QEvent::d pointer (even though
the pointer is unused).
Change-Id: I91c0b1aa00235ec6e13feb30bf928e56d2f80026
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
ISO 8601 section 4.2.3 states that "The end of one calendar day [24:00]
coincides with [00:00] at the start of the next calendar day", so
fromString() was updated to account for this.
Task-number: QTBUG-25387
Change-Id: I391db0da755dbc822ba0820c302a2c10391e1f3b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QProcess requires an application object to be created in order to work
correctly on Windows.
Task-number: QTBUG-26023
Task-number: QTBUG-26024
Change-Id: Ifa90946262bc7e2a7df6b6aad54e10b54473fc97
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
The documentation says that started() "is emitted when the state
machine has entered its initial state", but the implementation
didn't adhere to that.
The consequence is that if you e.g. emitted a signal from a slot
connected to started(), and that signal was used by a transition
from the initial state, the signal would effectively get ignored and
the state machine would remain in the initial state.
Task-number: QTBUG-24307
Change-Id: Ibbeb627d517eaff821d88e256a949eacf6aae350
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
A QObject can't be a child of itself, so the comparison always
returned false. In practice, this was causing the entry/exit order
of parallel states to be random.
QObject::children() is documented to contain the children in the
order in which they were added, so this fix actually achieves
deterministic behavior.
Task-number: QTBUG-25959
Change-Id: Id3f12d6bfbc249f1d4fed0bafb7d0217093e458e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This test's runtime significantly varies on separate runs on Windows;
runtimes from 10 to 830 seconds have been observed in CI.
Increase the timeout to restore CI stability.
Task-number: QTBUG-26006
Change-Id: Iba153e65264a177d146b2f3647ec6ba529af7135
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
tryRun() already implies tryLink() and tryCompile(), so there is no
point in executing the stages separately ...
Change-Id: Id7321efaca474e8c5db2bc246ac26323d8a99e58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Internally, QObject and QMetaObject already leave out non-signal
methods when working with signals. This is possible because the
signals always come before other types of meta-method in the
meta-object data. Ignoring irrelevant methods is faster and can
save memory.
QMetaObject provides internal indexed-based connect() and
disconnect() functions. However, these functions currently take an
absolute method index as the signal specifier, instead of an
absolute _signal_ index. Hence, QMetaObject and friends must convert
from the method index range to the signal index range.
By providing an API that only considers signal indices, clients of
the index-based QMetaObject::connect()/disconnect() can provide the
proper signal index directly. Similarly, for the qtdeclarative
integration (QDeclarativeData hooks) the signal index can be passed
directly. This will eliminate most of the conversions back and forth
between signal index and method index, and some other redundant work
done by qtdeclarative's custom connection implementation.
There are some places where the behavior can't be changed; for
example, QObject::senderSignalIndex() will still need to return an
index in the method range, since that function is public API.
Changing QMetaObject::connect()/disconnect() to take an index in
the signal range will be done in a separate commit; this commit is
only an enabler for porting existing usage of those functions to
the new behavior.
Change-Id: Icb475b6bbdccc74b4e7ee5bf72b944b47159cebd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Chars that have a case conversion that converts
them into several characters can't be handled
by QChar::toUpper() etc and should get ignored. The code
didn't do that correctly.
Change-Id: I281d122e90bf49187b6449088d2fccef2ef75e86
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Initialiser lists were not tested before in the QVector rewrite, so
the older malloc call was left behind.
Also, std::initializer_list has const iterators returning const data
and broke the build in a few places where const qualifiers were
missing.
Change-Id: I3c04e58361989aa7438621cda63c7df457d7dad8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Move the iterator classes into QArrayTypedData and add constBegin()
and constEnd() to that class.
I also had to add an operator T*() to the strict iterators, since
there are many places that expect the iterator to behave like a
pointer (including in QVector itself).
Change-Id: Icc5ed56ad47b013664a48eef9d31b5273aecb4e3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Use a unique QTemporaryDir instead of a fixed path for the test cache.
Change-Id: Ib664033a509a6cefd7c323708f80ef595b202178
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
This autotest appears to be parallel-safe.
Change-Id: I12f9202633941e9339de0709353efb2b41df4fa1
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Previously, the append functions in QConcatenable in the QStringBuilder
dereferenced the data() pointer of the argument QLatin1String without
performing null check.
Change-Id: I629f19fbce3113f1f80f4272fa7ae34e1dbc6bee
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
tst_qlistwidget::fastScroll fails if the mouse cursor happens to be
over the tested widget, because that causes an item to highlight,
resulting in unexpected region of widget to be painted. Fixed by
forcing the mouse cursor off the widget before the test.
Task-number: QTBUG-24299
Change-Id: I8f45541feda44681179d43eda67d970d5fea4e40
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Should be sufficient to allow implementing the actual functionality in
xcb/cocoa/windows to match the Qt 4 level of tablet event support.
Task-number: QTBUG-25864
Change-Id: Iebcca256dfba841d8976b58fda1b76026d3133a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Use a QTemporaryDir for a unique test cache directory for each process,
rather than a fixed path.
Change-Id: I64df8422d01282bbc108e942947c1b55368bd941
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
tst_QStateMachine::postEventFromOtherThread() assumed that 10,000
iterations of the event loop in a separate thread could always be
completed successfully within the default QTRY_COMPARE timeout.
This may be false if the CPU load is already high - such as when running
other tests concurrently.
Decrease the iteration count.
Change-Id: I780523f73c0c16fa0b2ab3201b2b0affdebc198d
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Write to a QTemporaryDir instead of the test's build directory.
Change-Id: Ib65a0d58fbdf8caf8f2cb7002aeed1ce34742183
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
This test failed a parallel stress test, but seemingly only because it
writes to its own build directory. This should not interfere with other
running autotests.
Change-Id: I27a2f31e32a5b8157ef1082cf0e939bcc0c61c70
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
This test failed a parallel stress test, but seemingly only because it
writes to its own build directory. This should not interfere with other
running autotests.
Change-Id: I80e548fdb0e915ebe86dcd2205537cb6fee09cff
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
This autotest appears to be parallel-safe. It fails our parallel stress
test, but only because it writes to its own build directory. This
should not interfere with other autotests.
Change-Id: Ie99dde24edc0fda0c8ec4352a6e44abb7cbc54f8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Merge the two public ctors.
* Use bitflags instead of shifting bits (more readable).
* Add autotest
* Use int datatype for the "stretch setters". (values out of bounds are clamped)
Streaming to QDataStream will still use the Qt 4 format.
Task-number: QTBUG-25100
Change-Id: Iecb1e78cb12717e4d84448484c3ad8ca469d571a
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
A previous commit changed the Mac behaviour for printerName()
from returning the CUPS Description to returning the CUPS Name.
In case anyone was relying on this for a human-readable name
add new api to return the CUPS Description. Also add the
Location and Make and Model which will be used in the Unix
print dialog instead of directly calling CUPS.
Change-Id: I9901bf8d6368466adf111580f5db5a3f01ca9170
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
We'd like to decrease the default timeout for tests in the Qt Project CI
so that we waste less time waiting for hanging tests.
Tests which genuinely take a long time to run, such as these, should
have their timeout explicitly set in their .pro file.
Change-Id: I4fe6249e9efa764b230251d73a1115c24411e168
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Use a QTemporaryDir instead of the system-wide temporary directory.
The test is still not entirely parallel-safe (at least on X11) due to
requiring the shown dialog to have keyboard focus.
Change-Id: I628dc6ab52dda49f6957a301eea8944bb9d81453
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Use a QTemporaryDir for temporary files, instead of the current working
directory.
Change-Id: Ifeb2944238f785a1f7beb0dc2a7c1e092d121db5
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
This autotest seems to be parallel-safe. It was not marked as such due
to an issue which rarely causes the test to hang on exit on Windows, but
that appears unrelated to whether or not the test is run in parallel.
Change-Id: I30bac75be3ddc14139594605481eb6af3f6795e7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
This autotest fails a parallel-stress test because it writes into its
own source/build directory. However, by inspection, it appears not
likely to cause issues with any tests other than itself.
Change-Id: I13789ba14bab240d34c22c5b77d6407995423afc
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Changed one testfunction to use the test's own QTemporaryDir instead of
the system-wide temporary directory.
Change-Id: I6740a7f4ba7f53174cd0730239d8dc088e5111ba
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Ensure we always use a unique filename when writing to test files.
The test already contained code for this, but it was not applied in a
couple of places.
Change-Id: I1e29ee162c390e014688ab46e3658e2a463d203e
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
In QTreeViewPrivate::adjustViewOptionsForIndex() wrong index had been
used when referencing to array of viewItems. Variable row is set to the
index of the QModelIndex, however it is not as same as the index in
viewItems[] when there was hidden item in treeWidget. Index of viewItems[]
should be used here. Unit test is added as well.
Change-Id: Idc7eda979e7d09c5a07bd6dffd92b7abbac10e67
Task-Id: QTBUG-25333
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
These tests have passed a parallel stress test on all three of Linux,
Mac, Windows. Mark them with CONFIG+=parallel_test to allow CI to run
them in parallel, saving time.
Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
tst_qprocess::lockupsInStartDetached sometimes locks up on mac.
Mark this as a known issue.
Task-number: QTBUG-25895
Change-Id: I08b1bcf39f2bf373e74509a06415d9ba514b8993
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
There is a message check in QStatusBar::showMessage causing the call exits
early if the new 'message' is the same
as the current message. The check has been removed, and new timeout will
always take effect. Unit test is added as well.
Change-Id: I3a03c6842835824caba4adc37c3ed834952c4bb2
Task-Id: QTBUG-25492
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Changed checking of the start position so that it does not call d->control->text() because this removes blank characters when an input mask is used. Thus the
selection fails. Instead d->control->end() is used for checking the start position.
Task-number: QTBUG-16850
Change-Id: I62992fb81bd47d432bade9f219782d48eb309956
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Much of the current QPrinterInfo tests fail due to being dependent on
specific physical or network printers being attached. This change
removes all printer specific tests and replaces them with generic
tests that will use whatever printers are installed.
Note if no printers are installed then the tests will still pass. A
later change will add virtual printers to test returned results are
correct.
Windows test code is also required and will come later.
This does not yet remove the "insignificant" status from the test,
further improvements and code fixes are still required.
Change-Id: I60802445924edb126aadf78337a8cb6f2f3b3d37
Reviewed-by: John Layt <jlayt@kde.org>
Change the way the printsupport plugin creates QPrinterInfo
objects, provide platform api to return a named printer, and
expose this as static public api in QPrinterInfo.
Only the Mac plugin used the old api, the other plugins will
have direct support added in separate commits, but will use
the default implementation for now.
Change-Id: I7d6b6556eb39919cfb15bc0e814afbaf13c5712c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
MSVC2010 32-bit (with and without service pack 1) takes about 1 hour to
compile this file in some builds, since
1c7421ad14.
Avoid the relevant portion of the code just for these compilers.
Change-Id: Icbb4fa12a6d563a7cdc882c30cdb5705675bedb0
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Mac in Qt4 and 5 has been using the PMPrinter Name for the QPrinter
and QPrinterInfo printerName() value, but this is incorrect. This
is in fact the CUPS Description field, is in human readable form
and is not guaranteed to be unique. The CUPS Name field is the
PMPrinter ID value and should be used as the unique identifier
when accessing printers. This has worked up to now due to an
undocumented feature in the OSX api that accepted the Name when
the ID should be used.
Changing all uses of PMPrinterGetName to PMPrinterGetID fixes this
and allows the QPrinterInfo test of names to pass without
munging the names.
Change-Id: I25322aa1a924bed9f67f4ad5e208274c8b700e17
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Calling handleMouseEvent() with w == 0 implies that the local position
is bogus and instead it should be calculated from the global position
once the target window is known.
Change-Id: If173d0570f6dcc8b7bc5d6f21fa1f69d06d9d702
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Single signon code path gets the NTLM responses from the system,
so we can't predict the contents.
Task-number: QTBUG-25851
Change-Id: Ia8aa1741ae5af9e48643331bf9a3768550a30166
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
When given an invalid url, the output shouldn't be a valid url.
KDE's kurltest detected this regression compared to Qt4, where
all invalid urls were empty in toString() -- but we don't want that,
to give as much feedback as possible to the user.
Change-Id: Ie53e6e1c0a1d4bb9e12b820220dfb7e2f7753959
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These tests have failed a parallel stress test and may contribute to
instability in test runs.
Change-Id: Ibbbe01f7d9550b953fc9fbd6ed52fc99fdb5f5d7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
It should return QWidget::inputMethodHints() instead of QVariant()
Change-Id: I01f5de8f2087ac67d125f54f08abed523653eb92
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Added #include <unistd.h> to tests/auto/network-settings.h,
so qtbase auto tests successfully build.
It is needed after the header dependency changes, part of gcc 4.7.
Change-Id: I76d1082f8454263f2c22c31a13aa3c1bf6a0c82f
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Remove all references to (un)checkAction.
This commit finalizes the intended change.
Change-Id: I79d3b30b5c3d9fbe276c2c94fed5971bb21d6c02
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
QChar is actually a ushort and passing it via const-ref is suboptimal
Change-Id: Ib806b90397de6a816142ed130a22c0fe10a85d79
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This allows the QUrl component getters to return fully decoded data,
like they did in Qt 4. This is necessary for some use-cases where the
component like the user name, password or path are used outside the
context of a URL. In those contexts, the percent-encoded data makes no
sense, and the loss of data of what could be represented in a URL is
acceptable.
Also take the opportunity to expand the documentation of those getter
methods, explaining what the options argument does.
Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003811.html
Change-Id: I89f743cde78c02f169c88314bff0768714341419
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This allows one to instruct QUrl to ignore the percent-encodings and
interpret the data exactly as provided. This is useful in certain
use-cases where the data comes from a non-URL context.
The strict-mode checking of the components is not implemented
yet. Currently, the behaviour is equal to that of TolerantMode.
Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003811.html
Change-Id: Ia5abe045a8ce7f9b50cbce3b5a7e3735e068d03a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Since we're about to introduce QUrl::FullyDecoded, this
QUrl::MostDecoded value would be confusing. Replace its uses with what
was intended at the point in question.
Change-Id: Iefd87bc33d37bace507c5cb0f206fa902e08e2df
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This was trying all the possibilities by brute force, but it turns out
that some combinations are not valid so they should not be
tested. What's more, it was using old values of the flags, so this was
actually testing nothing.
Change-Id: I6c2f5230d240fc23418df2d3a1ca905dbc47dd10
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
These tests have failed a parallel stress test and may contribute to
instability in test runs.
Change-Id: I2c4456ad7d3846c2262a0ba714ab8f0c9a05c597
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Change-Id: I5039e011f3c9b44ed1887424f11e4e146c3eb07f
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Similar to XCB.
Task-number: QTBUG-24299
Task-number: QTBUG-24296 (partially fixed)
Change-Id: I4c9d813d9645f957f2caad0c4e395ce0d3d222cc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
In tests when IPv6 is not present QSKIP IPv6 tests.
Task-number: QTBUG-23660
Change-Id: I02abc7322d765a93cbf661e53c76257f03dca73e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
A couple of people reviewing the toText() method (which is new in 5.0)
have said that since the string returned is human readable it should
be a QString not a QByteArray. This change follows their advice.
Change-Id: Ibade9a24870805f7fbe2d299abeb9c6e964f0cf4
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Implement the QPA platform menu interface for Cocoa,
including native menubar support and merging with the
predefined menus created from the bundled .nib. Cleanup
code previously used to maintain the menus, and add
a manual test of the menus code.
Change-Id: Ia99267ddb6485e18e05c540eb32c5aee6cbb85db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
A (probable) typo was causing the code dealing with anchors
to use uninitialized values. This used to work by chance, but was
indeed detected by Valgrind f.i. when running tst_qregexp --
the indexIn test on anc11 data reported:
==3015== Conditional jump or move depends on uninitialised value(s)
==3015== at 0x514B4EA: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1813)
[...]
==3015== Uninitialised value was created by a stack allocation
==3015== at 0x514B3EB: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1803)
Fixing the code also makes the aforementioned test to succeed.
Change-Id: If7b3e518c1bbfcf12573d2637c33ef2eca27c4d5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The Encoding argument of QCoreApplication::translate()
is deprecated and source code is always assumed to be
encoded in Utf8. Simply remove the encoding argument
from the generated .ui.h files.
Change-Id: If6c40f6df13abd45a0303c863077972c3d1fb685
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QIcon has been moved back from QWidget to QtGui, so the QIcon QVariant
and QMetaType handler can now be moved back to QtGui.
Also we can give back QIcon its old number, allowing to get rid of some
compatibility hack when unstreaming QVariant
Change-Id: I439d5c2987c06ecd619f394407850f678164afb8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
- Move the files and tests
git mv src/widgets/kernel/qicon* qrc/gui/image/
git mv tests/auto/widgets/kernel/qicon/ tests/auto/gui/image/
- update the include of QIcon
git grep -O"sed -i s,QtWidgets/qicon,QtGui/qicon," "QtWidgets/qicon"
git grep -O"sed -i s,QtWidgets/QIcon,QtGui/QIcon," "QtWidgets/QIcon"
- Adapt QIcon \ingroup documentation
sed -i s/QtWidgets/QtGui/ src/gui/images/qicon*
- Adapt export macro
sed -i s/Q_WIDGETS_EXPORT/Q_GUI_EXPORT/g src/gui/image/qicon*
- Update .pri and .pro files
- Remove the use of QStyle::alignedRect by copying its content (and
adapt slightly
- Use QGuiApplication::palette() instead of QApplication::palette()
- Add a hook in QGuiApplicationPrivate to call the
QStyle::generatedIconPixmap() from QtWidgets
Another commit follows to adjust QMetaType::Icon and move the QVariant
and QMetaType icon handler back in QtGui
Change-Id: I1b63759f892ebc02dfc30f41bb6e76e0b7451182
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
The CI system is now using the parallel_test flag to run tests in
parallel. This test has become flaky, or at least more flaky than it
was previously. Mark it to no longer run in parallel.
Change-Id: I47bca3be620a8f648a0eb9c9b9f26d2d925efc01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTextLine::cursorToX returned the line width for cursor positions
outside the width of a wrapped right to left line because the
leading space width was always calculated as 0.
Returning a non-zero width for the leading space does cause
problems for other uses of QTextEngine::alignLine() though
as the textAdvance already doesn't include the leading/trailing
space so subtracting it there double accounts for it.
Task-number: QTBUG-24801
Change-Id: I56cbb139814c32813bebb49de8c045b29154a958
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Maintain the consistency of QWizardPrivate's two members:
QVector<QWizardField> fields;
QMap<QString, int> fieldIndexMap;
during and after calls to QWizardPrivate's
void _q_handleFieldObjectDestroyed(QObject *)
member function. The failure to maintain this consistency
caused an out of bounds access and core dump in
QWizard's field(const QString &name) member function.
QWizard's field(const QString &name) member function expects
the values in the QMap fieldIndexMap to be indexes into the
QVector fields. Prior to this change
_q_handleFieldObjectDestroyed only removed the appropriate
entry from the map and erased it from the vector. It did
not decrement by one all the indexes greater than the index
that was removed from the map and erased from the vector
in the rest of the map.
For example ...
So if initially have the following mapping ...
"field0" -> 0,
"field1" -> 1, and
"field2" -> 2
with fields of size 3. After destruction of "field1" have ...
"field0" -> 0, and
"field2" -> 2
with fields of size 2.
Now attempts to look up "field2" using QWizard::field will
have an out of bounds error and possibly core dump or trigger
an internal Qt assert because an attempt to access
this->fields[2] will be made. It should be accessing
this->fields[1], but does not because the map is no longer
consistent with the vector.
This change adds a decrement by one for all the indexes
greater than the index that was removed from the map and
erased from the vector.
Task-number: QTBUG-25691
Change-Id: Ia2a41027628a65faec4ecdd5da235ddd19746a57
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
e.g. in QStaticText, the data is used just to get the line's y-position
and re-calculates just after the loop to determine the bounding rect and to draw the text;
in QWidgetLineControl, the data re-calculated over and over while the result
is seems to remain the same; probably the caching is needed here too
Change-Id: I0f7eb291532f63eccb9c5f749daebb73ff90632f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
The current alternative is to define QT_WIDGETS_LIB before including
qtest.h, but this is not convenient/intuitive when using other build
systems than qmake. If one forgets the define, crashes happen when
using QApplication-related code.
Use <QTestWidgets> in one of the widgets autotests, for testing.
Change-Id: Id96be4976723aea3e8a28c9d0d594daab25a6d90
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The parser is recursive and too deeply nested json would
cause it to exhaust the available stack space leading to
crashes.
We now abort parsing with a DeepNesting parse error if the
document is too deeply nested. The current nesting limit
is set to 1024, which should be more then enough for any
real JSON data set.
Change-Id: I4adea3fd727149f7342536d73cf4530361a0a3a1
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
This reverts commit a17523805e56511465550a6a93a88b3fc3c8325a
The compatibility overloads were removed in change Icf108a80177155f21bb73c165fb8ab5d4e997bc2.
Change-Id: I4861f281451d66a1aa5f3525eea1773dfef0540e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Because the QPA font database would query fallback families inside
findFont(), support for requesting multiple font families in order
of preference (like QFont("Times New Roman, Arial")) did not work,
because the Arial fallback was never attempted. To fix this, we
pass in the queried fallbacks and make sure they are tried before
any platform specific fallbacks.
Task-number: QTBUG-20986
Change-Id: Idb2b717856f013ce2874f00a8debaff60176d2fc
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
+ QChar::LastValidCodePoint enum value that supercede the UNICODE_LAST_CODEPOINT macro
replace uses of hardcoded values with the new API; remove leftovers
Change-Id: I1395c9840b85fcb6b08e241b131794a98773c952
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
inline all non-static members to a static ones (declared with QT_FASTCALL),
ushort converts automatically to uint and the conversion cost is minimal.
Task-Number: QTBUG-13052
Change-Id: I189a6f205736766adcd3de2d61cee71f30cc64f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
texts for the textKeys are stored each in a separate COM(ment) section
so that the maximum text's size is almost 65KB
Task-number: QTBUG-10568
Task-number: QTBUG-111
Change-Id: I7d693741e10e5d78d497cb0af448160077350bb2
Reviewed-by: aavit <qt_aavit@ovi.com>
When qt_ntfs_permission_lookup is used, QFile::permissions failed
for files with long filenames.
Also created a test case for this API, which revealed another bug.
Task-number: QTBUG-25629
Change-Id: I73b7676a9d059c0e782b3f701b2e6bbc92f671ed
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
This can be enabled again now. The sender transfer test is still not
re-enabled since the test would take to long to run if sending
enough data to overwhelm the reciever's kernel buffers.
Change-Id: I4056fdca53ec8ebbcc53dfdc814d8bfdbc73f7ce
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
When a file is specified on a path that includes a drive letter
followed by a colon but no slash then it didn't always account
for the fact that this refers to the current path on that drive.
This fixes the problems in completeBaseName(), baseName() and
path(). Tests are also added for these three cases and some
others too.
Task-number: QTBUG-25353
Change-Id: I47a197c6af066f532442ad269be57597ec61303a
Reviewed-by: Irfan Omair <irfan.omair@gmail.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Initially we didn't do this because someone could accidentally create
another target of a conflicting name, and used a variable to store whether we
have created the target already or not.
That wasn't adequeate to deal with finding the package in a scope
like a function, so we used a directory property. However, the directory
property is not valid in the same scopes as the defined target. For
example, finding a Qt module in both a directory and a subdirectory causes
a conflict.
As it is already unlikely that a target would be accidentally created with
a name like Qt5::Core, we should simply use the IF(TARGET) form.
Change-Id: If64f25d45f51edcd1edb0d4bfb5ed3bb2479bd27
Reviewed-by: David Faure <faure@kde.org>
On some systems prior to this change the code
would not build with the following error reported
by gcc:
error: integer constant is too large for 'long' type
Change-Id: I778bce9a72ccf3a41cdf17883d734082ed3fb4b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Name is about mimetype names, while FileName is about, well, file names.
Task-number: QTBUG-25748
Change-Id: I34a9ac1a5fc06dc3e3855365e19c4dc7a1aa2671
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
This completes the transition from connectNotify(const char *) and
disconnectNotify(const char *) to the new QMetaMethod-based
functions.
Removed the old connectNotify autotests and renamed the
connectNotifyMethodXXX autotests to connectNotify, since there is
no longer any ambiguity about which overload is being tested.
Change-Id: Icf108a80177155f21bb73c165fb8ab5d4e997bc2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The socket engines already implemented this, but it is a good idea
to test it explicitly.
Task-number: QTBUG-25634
Change-Id: Ife3fe09b0119ed435e4055523c553847739a09fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
MinGW installations on case-sensitive filesystems expect
lowercase names of include-libraries and (usually) include
files.
When crosscompiling on Debian 6 (targeting MS Windows) linking
fails because mingw is looking for non-existent include-libraries.
Using lowercase names solves this.
Change-Id: Id3454f4ed8ba42b6ea93d65d9c0ce567db6712df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
QUrl::fromLocalFile("/foo") doesn't set Host, but QUrl("file:///foo")
does (to remember that it saw a Host section, even if empty, which is
useful for urls like "remote://"). So ignore the Host flag in operator==.
Change-Id: I4322b4a75420c4e42766c0d65c1b121f28028a76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix operator== and operator< so that a URL with an empty fragment
or query, is not treated as equal to a URL without any fragment or query.
This restores the Qt4 behavior on this particular issue.
Change-Id: Ie989f37353fb13c791b1d558d638d2e8a5b5d1b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This ensures that we only find Qt5 modules from the same directory
as modules we have already found, not from multiple different
directories which may be incompatible.
Change-Id: I7ad1d81ec41bba2e543130740041338ba44a6c3b
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Null bytearray means no query, and QString::fromLatin1(QByteArray())
doesn't give a null string, but an empty string.
Same for setEncodedFragment(QByteArray()).
Change-Id: I992e9253e35941d66886456872ea06aa2ae92450
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When the scope ID is not set, Mac and Windows will not transmit
packets to link local addresses. This patch implements setting
the scope in the native socket engines and adds a test case.
(it was partially implemented already, though UDP specific code
paths were missed in the unix engine)
Task-number: QTBUG-25634
Change-Id: I23300bdc9856e38458078e913daaa59cd05a74b5
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
If the next active window is already known at the time a focus
out is received, pass it to QWindowSystemInterface.
Fixes a test and Qt Creator's locator bar.
Task-number: QTBUG-24186
Task-number: QTCREATORBUG-1
Change-Id: I0aed4c386c08ed182555c95640e1637c5b67f5ce
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
After we have change the policy we should set the readbuffersize to
unlimited again, so that we try to download all data.
Change-Id: I1b9bdb6c2e5f408c920f6e6d7e85a39e4c18316b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This changes all the containers that uses QtPrivate::RefCount
(QMap already had one), and QVariant
In Qt 4.8, it was pointless to have the move constructor because we did
not have quick way to re-initialize a null container. (shared_null still
needed to be refcounted)
But now that we have RefCount, and that the shared_null do not have
reference count, we can implement a fast move constructor that do not generate
code to increment the reference count.
Change-Id: I2bc3c6ae96983f08aa7b1c7cb98d44a89255160b
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
This cmake function handles all of the necessary logic for using the
include directories of Qt modules, linking to Qt modules, adding
the required definitions, and most importantly, adding the position
independent flags required on UNIX systems to use Qt by default.
The function relies on functionality available in CMake 2.8.8, so it
is only available if that version of CMake or greater is used.
Change-Id: Ibe698e06819129479348c240844264c41553b5fb
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
A leading byte order mark is valid in utf-8 and we should
parse documents starting with those correctly.
Change-Id: Id85398ff6e05b93ceefbaf4a6de5571d5e61ca13
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
there are several reasons to do this:
* text breaking is not a shaper's job;
* since the text breaking rules are bound to a specific Unicode version,
updating Qt's internal unicode data would require updating the data in HB as well;
* makes porting to HurfBuzz-NG some easier
Change-Id: I0bbf8e8a343bc074696f4ddf2ae4e7fa32a61629
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This was crashing because the ':' was found past the end of the
username, causing the recoder to run from position 22 to 11, via the
long way around the memory.
Change-Id: Ic1ae596f34f7db857fb4210294974fb5a6adf691
Reviewed-by: Alexis Menard <alexis.menard@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Because SSL2 is disabled in ubuntu's openssl binaries, the SSL
connection is expected to succeed rather than fail when the server
side is using SSL3/TLS1.0.
Used the OPENSSL_NO_SSL2 macro to decide this.
Change-Id: I2c35aa5aa0c9432ae78000c81f70086bdc31843d
Reviewed-by: Richard J. Moore <rich@kde.org>
If the url we pass as parameter already have percentage encoded data,
we don't want to decode it and call fromPercentEncoding. The test
coverage is not complete for qdataurl.cpp file but it is better than
previously and it will also protect us from future regressions.
Change-Id: I79f709f44bed1b7f274a3de639c7e291fa91a193
Reviewed-by: Thiago Macieira
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Rename posFromMove to posIncludesFrame in Widgets and
make the handling more fine-grained; try to clean it up
as soon as the frame margins are known
in QWidgetPrivate::fixPosIncludesFrame().
- Implement QWidgetPrivate::updateFrameStrut().
- Windows: Handle posIncludesFrame in window creation,
notify changed geometry after setting window flags.
- XCB: Do not change the window gravity in propagateSizeHint()
as this causes the window to jump around. Determine
the gravity in window creation, leave it constant and
fix the geometry when setting instead.
- Store the normal geometry when maximize/fullscreen
state change events are received.
- Remove xfails from fixed tests
Task-number: QTBUG-25331
Task-number: QTBUG-24905
Task-number: QTBUG-24294
Change-Id: I89c7229d86aaf88f02247d63915da7905e4a27ea
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
19d160b72b broke it temporarily, and this wasn't detected by
tst_headersclean, because it sets QT_NO_CAST_FROM_ASCII too,
which disabled the faulty code.
So this adds a new unittest for QT_NO_CAST_FROM_BYTEARRAY alone.
Change-Id: Iaf7a36a1378e77188bcc636e5dc9a1f9b84f70a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Only call qdoc for projects which sets the QMAKE_DOCS variable to
point to a qdocconf file.
Exclude examples/ and tests/ from the qdoc run, by adding
no_docs_target
to CONFIG for those projects.
Change-Id: Ic856c8f19db59309302d0602b3e99735609e525a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
C++ distinguish between "char", "signed char" and
"unsigned char", they are three independent types.
Fix QVariant behavior on ARM. On ARM "char" may mean
"unsigned char", but we depends on the sign during
a numerical conversions.
Change-Id: I610ce3fb88ed5964b67f3ae442d264fe16b2d261
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The implicit cast to QJsonValue was being ignored probably because the
compiler was generating a default QJsonValueRef assignment operator
Change-Id: I3a041595497308868dd7e4aab71027ce21bf8f0b
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This doesn't compile with a typical cross-compilation setup, which
generally won't include cups headers. The commit should have been
rejected, but wasn't, due to a bug in the Qt Project CI.
Since it now causes all other modules depending on qtbase to fail their
CI, it must be reverted to minimize disruption while the commit can be
amended and/or the test toolchain updated to include cups headers.
This reverts commit 80f7a38890.
Change-Id: I315ae275b37de358a74af28ab7bd691c9849acba
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
CUPS is the only supported print system on UNIX, LPR/PS support has
already been dropped but some LPR specific code still remains.
* Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to
QCUPSSupport
* Remove qprinterinfo_unix as no longer used
* Remove LPR related code from QPdfPrintEngine
* Remove all QT_NO_LPR uses
* Remove most QT_NO_CUPS uses, use QT_NO_PRINTER where necessary
Some QT_NO_CUPS uses remain in QPdfPrintEngine, these will be removed
in a following change implementing a CUPS plugin.
Change-Id: I439b6fad9cf88c3d24aa48e49475f49ad310dbad
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The main reasons for doing this are:
1. _qpa.h end up in the master QtGui include file. QtGui is meant for
userland applications. qpa code is neither binary nor source compatible.
Inadvertant use of QPA api makes the user code binary-incompatible.
2. syncqt creates forwarding headers for non-private header files. This
gives people the impression that this is public API.
As discussed on the mailing list, even though QPA api is internal and subject
to change, it needs to treated differently from private headers since they
will be used by in-qtbase and out-of-qtbase plugins.
This commit does the following:
1. The _qpa in QPA header files is dropped.
2. syncqt now treats any file with qplatform prefix as a special file and
moves it to qpa/ directory. The recommended way of using QPA API in plugins
is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API
from multiple modules (for example, qplatformfoo might be in QtPrintSupport)
3. The user needs to explicitly add QT += <module>-private to get access to
the qpa api.
4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo
includes.
This commit does not change the cpp filenames. This requires a more careful
merging of existing non qpa cpp files and existing cpp files on a case by
case basis. This can be done at anytime.
The following files are not renamed as part of this changed but will be fixed
as part of a future change:
src/gui/kernel/qgenericpluginfactory_qpa.h
src/gui/kernel/qgenericplugin_qpa.h
src/gui/kernel/qwindowsysteminterface_qpa.h
files were renamed using
for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done
for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done
includes were renamed using script
for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do
sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \
-e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \
-e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \
-e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \
-e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \
-e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \
$file
done
Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
The overload of this method was renamed
in b64426248d but this one was not.
Change-Id: I60a6ddf0fcf9deea31ccf51e7b0db16c66023356
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
This also tests by consequence that the behaviour of QByteArrays
containing NULs is consistent. Right now, that means the QByteArray
processing stops at the NUL, which is the same behaviour as if a
pointer to the byte array's data were used. (it's what happens if
there's no QByteArray overload and the const char* one is called)
Change-Id: If56a822f95866e8cb5b153d07b48198bb83fb386
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit completes the previous commit so that both QString and
QStringBuilder now operate on UTF-8 input.
A small fix was required in QStringBuilder: an if clause isn't enough
to separate the two append versions. Since there are no QString
functions that append to char*, if we're converting to a QByteArray,
we need to go through a QString first in a separate function.
Change-Id: Ic503340c5d0c32d420c90c91cc2e0fc1ae9230f3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: I052a3412a568ad639f2bf169b4491b56dddff1c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The file has been UTF-8 encoded for years, which means that the line:
QString longerBLOB( "abcdefghijklmnopqrstuvxyz¿äëïöü¡ " );
Loaded a mojibake into QString. Then, this data was stored as a blob
in the database by calling longerBLOB.toLatin1() (a QByteArray), and
reloaded for check using toString().
Once the QString default codec changes to UTF-8, the mojibake would
get fixed, and the test would fail. Make sure it doesn't happen.
Change-Id: If12d6124c973e4a1c1b7978d90fffb9aa5545c66
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: Icb3ab0e1f4f3173563f3de36115b5457cf1ba856
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Use "--headers=file" where the file contains the raw headers to send.
This is useful for replaying requests from log files.
Change-Id: I3bbe582d96fc9797f692a0d5772e8164f8265ce0
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
In Qt 4, we loaded resources through the QTextEdit or
QTextControl if they were the parent of the document.
Modularization for Qt 5 broke this, as we can't cast
the parent to a QTextEdit anymore.
The fix is to make the loadResource() methods in QTextControl
and QTextEdit invokable and discover and invoke them at
runtime on the parent object.
Task-number: QTBUG-25116
Change-Id: Iba04bc16849b0c5ddcd275f12d1a386a8fe591bf
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Make it possible to shadow-build using Qt 4.8 for comparison.
Change-Id: I1a18b7f1d03b11f0420aab14455e2c53d1afd6ba
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
> http://www.unicode.org/versions/Unicode5.2.0/
D. Character Additions:
There are three new characters in the newly-encoded Kaithi script that will
require changes in implementations which make hard-coded assumptions about
composition during normalization. Most new characters added to the standard
with decompositions cannot be generated by the operations toNFC() or toNFKC),
but these three can. Implementers should check their code carefully
to ensure that it handles these three characters correctly.
U+1109A KAITHI LETTER DDDHA
U+1109C KAITHI LETTER RHA
U+110AB KAITHI LETTER VA
UCD 6.1 adds two more of them:
U+1112E CHAKMA VOWEL SIGN O
U+1112F CHAKMA VOWEL SIGN AU
Change-Id: I781a26848078d8b83a182b0fd4e681be2a6d9a27
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Since it deals with paths, let's use the proper path-handling
functions.
Change-Id: I896d2c472dfd675e9ff247657447178702f178be
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Show that nothing is changed either way, regardless of the encoding
flags used.
Change-Id: I31fba5f87eae777d4b708ab789b32169004bcbcc
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
It should only strip one slash (as the name indicates), and not if the
path is just "/".
Change-Id: I133a81977241de77a49d1d1559143d30e0bd52f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This test is passing for Windows now in CI due to recent fixes, so
remove the insignification.
Change-Id: Ib74aea443c4a66c9bf743d88e15d9f27f9ac2fe4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: Ib1eaf42679ab5db4005192c3d00ba79e43edfcca
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: I6ea46cd6dfed75afc253fa2b4e3f1789bdad1d4e
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: I94cc301ea75cc689bcb6e2d417120cf14e36808d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: I2850033159508ebb1ff7564e15b99a146dbee94c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: I38f97ad379deafebef02c75d611343ca15640c8a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
This way, QWinEventNotifier will work on all Windows systems, not just
with the default event dispatcher. Other dispatchers (other than
QWin32EventDispatcher) are permitted, so the class should not abort just
because of that.
If a dispatcher really doesn't want to implement this, they need to
implement the virtuals to do nothing, possibly print a warning.
Change-Id: I2c132bcde95b9d5941c8906a0fcd2ad964087772
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Although we created an enum for pause modes to make 5.x binary
compatible with 5.0, the enum value is not well named.
In 5.1, we propose to add PauseOnProxyAuthentication to the enum.
PauseOnNotify is not clear what it means, while PauseOnSslErrors is.
Any new notification in a minor release would need a new enum value
otherwise applications would get pauses they did not expect.
Task-number: QTBUG-19032
Change-Id: I4dbb7467663b37ca7f0551d24a31bc013968bedc
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This reverts commit df43b9a06a.
Using the same depends information as QMake provides adds a lot of
convenience for users, and is mostly 'correct' from a CMake
point of view anyway.
Change-Id: I8f2a2f74a687c25a0dedcc491ef72ddb5b136090
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
If we're not going to verify the peer, or we know in advance that
windows won't have a CA root then don't ask it to verify the
certificate chain.
The test case started failing in CI when the windows cert fetcher
was integrated due to timing change. I've relaxed the timing
requirement of the test to avoid it being unstable.
Task-number: QTBUG-24827
Change-Id: I694f193f7d96962667f00aa01b9483b326e3e054
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
It seems that this case is failing on CI because OpenGL version,
so skip if OpenGL is not recent enough.
Task-number: QTBUG-24192
Change-Id: I543e7a092e5c107ee57cd9dce7dc5c890a0315cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: I7e7202e6a1a84699ae0d43e4b2e7ee9ec87ed0b6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The mentioned records for råkat.se cannot be resolved.
Note these were marked with a FIXME in the first place.
Change-Id: I4ea3bbb0aec8ca1b3487c44656b48a8715228886
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
I wrote nonsense in that commit. The older methods that take a timeout
all take milliseconds, and the comments in the unit test really meant
milliseconds, not seconds. 1s is not shorter than 100ms....
Change-Id: Ic18899bb0462d89575dc5a9a311478adc4dea1cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is much more performant than calling QObject::receivers(const char*)
Can be used instead of connectNotify in some cases.
Change-Id: I19e0933f678f171f515d9a0f69f0ad4fb7d894b4
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
qVariantValue and qVariantCanConvert are Compatibility members, while in
Qt4.8 they are marked as Qt 3 Support Members.
qVariantFromValue and qVariantSetValue are Obsolete members.
Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reimplementations of connectNotify() and disconnectNotify() can
assume that the signal argument is in normalized form, but after the
introduction of the Qt5 meta-object format, it could happen that it's
not.
The problem is that the internal QArgumentType class, which attempts
to resolve a typename to a type id, was calling QMetaType::type().
QMetaType::type() falls back to trying the normalized form of the
typename if the original argument can't be resolved as a type (this
behavior isn't documented, but that's how it works). This means that
e.g. QMetaType::type("const QString &") returns QMetaType::QString.
Since QMetaObjectPrivate::indexOfMethodRelative() (more specifically,
the methodMatch() helper function) prefers to compare type ids
over typenames (since the type ids are stored directly in the meta-
object data for built-in types), the method lookup would *succeed*
for signatures with non-normalized built-in typenames as parameters.
QObject::connect() would then think that it did not have to
normalize the signature (see "// check for normalized signatures").
The consequence was that the original, non-normalized form got
passed to connectNotify().
This commit introduces an internal typename-to-type function that
is the same as QMetaType::type(), except it doesn't try to normalize
the name. This way, the only place where normalization can occur in
the signature-to-meta-method processing is through the calls to
QMetaObject::normalizedSignature() in QObject::connect() itself.
The implication is that there are now cases where the method
signature will be decoded and processed twice, where processing it
once was sufficient before. On the other hand, it is consistent with
the pre-Qt5-meta-object behavior, where we predict that the
signature is already normalized, and only perform (comparatively
costly) normalization if the initial lookup fails.
Change-Id: Ie6b60f60b0f9a57ebd378d980329dac62d57bbd9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
static_metacall was never set on the metaobject written by
QMetaObjectBuilder::fromRelocatableData, sometimes causing a crash. It
should be initialized to 0.
Change-Id: I79373d895e131f0cc2ff1af6d2177a0c1a282be7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The Qt buildsystem is creating the config files for it even
when it is not building QtDBus, so Qt5DBus_FOUND = True.
Re-enable the CI testing on mac with this change.
Task-number: QTBUG-25522
Change-Id: I5d2690d17fde6c5aabcbdd3e2eef9f0846edd97d
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This autotest fails to build after the introduction of the
QMetaMethod-based connect/disconnectNotify() functions; we are
intentionally keeping the old const char * versions (overloads) for
a limited time, to avoid disrupting other modules.
This commit will be reverted as soon as the compatibility overloads
have been removed.
Change-Id: I9b5a40b51ffa3bfa3d185410389678c262ca7b45
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This API will fully replace the const char *-based connectNotify()
and disconnectNotify() in Qt5; the old functions will be REMOVED
before Qt 5.0 final.
The new implementation fixes the long-standing issue of
connectNotify() not being called when using the (internal)
index-based QMetaObject::connect() (e.g., from QML).
As with the old API, there are still two "unintuitive" behaviors
concerning disconnectNotify():
- disconnectNotify() is not called when the signal is disconnected
using the QObject::disconnect(QMetaObject::Connection) overload.
- disconnectNotify() is not called when a receiver is destroyed
(i.e., when a connection is implicitly removed).
The old versions of connectNotify() and disconnectNotify() are kept
for now, and they are still called. They will be removed once known
existing reimplementations (e.g., QtNetwork, QtDBus) have been
ported to the new API.
Change-Id: I8b4f007f3c6d89199c1ba04a3e23c8ca314e0896
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
The test is passing in CI for both Mac and Windows, so removed the
insignification from it.
Task-number: QTBUG-24885
Change-Id: Ida39d98b72e49fc82358d016b8de725bbfc5d6de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This test has been passing consistently since the previous crash was
skipped in commit 6dbd00b120.
Task-number: QTBUG-22792
Change-Id: I41ac001a3b9e16cde4d674dc9f34ab2dffb848cd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test has been passing consistently since it started running in CI.
Task-number: QTBUG-24295
Change-Id: If2a163607ae72cae9e28619dd5de1b333aea4ed9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
These tests have been passing consistently since they started running
on Windows in CI.
Change-Id: I4505497afc477a7f4fbda0acc29987d0d0cf220a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This test has been passing consistently since starting to run in CI.
Task-number: QTBUG-25445
Change-Id: Id024921b18ea4ef94ad2f47d9db2ccda3212eaaa
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
The test has a single stable failure on both of these platforms. Mark
the failure with QEXPECT_FAIL (that was already the case on Ubuntu
11.10) and re-enable the test.
Note also the elimination of duplicate bug numbers.
Task-number: QTBUG-24234
Change-Id: Ica11e7d1f3cd9487647127984fef7c75e0e764fe
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Change-Id: Ifdd89397f88b090a6b43d40636dbeac029faaed8
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change-Id: I58efa1f295dbc652b1882937ca27ea52d9f4a923
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Turns out that we've had some old unit tests commented out that did not
compile. QString does not have a std::string constructor nor overloads
to many other methods. And std::string does not cast to char* on its
own. So these tests need to be removed.
Change-Id: I22df66fc3ccc68bc2840f2d83747234418e480f5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
And use QString::toUtf8() to recover the byte array original.
Change-Id: Ic94de12e7ac67479e85a64a86f8467428b4d22ba
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Remove all non-UTF-8 sequences from source code in Qt.
Change-Id: I46d9cb23ef2199894896f171d553b3144822f36c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The test was flawed, as it didn't process queued events before checking
for received event counts, which caused window minimum size enforcement
triggered resizes to be missed. Added event processing steps before
critical checks and also increased the size of the windows so that
event counts are predictable also on Windows.
Note that this might also fix the issues this test has on Mac, but I
can't test that.
Task-number: QTBUG-24904
Change-Id: I01a4bd1ddabcf3650a8abff67b03c75b9c40a626
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Given a member function that's a signal, returns the corresponding
QMetaMethod. Inspired by the implementation of the template-based
QObject::connect().
The primary use case for this function is to have an effective and
exact (not subject to shadowing) way of checking whether a known
signal was connected to in reimplementations of
QObject::connectNotify(QMetaMethod), avoiding string comparisons.
Example:
void MyObject::connectNotify(const QMetaMethod &signal)
{
if (signal == QMetaMethod::fromSignal(&MyObject::mySignal)) {
// Someone connected to mySignal ...
}
}
Change-Id: I5e4de434275fe543c004d569dcaa9ceda3442f03
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Instead of allocating and reading the entire image and then scaling it
down, this code reads only one line at a time and scales it on the
fly.
Change-Id: I61fde307146c11dcd90ca617cc2e7f85dd3b66c4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This autotest passes when run alone, but sometimes fails when run
concurrently with other tests.
Change-Id: I327de7f4a9f8af385351e4c6b09a57311efd6eb6
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
QFontDialog and QColorDialog were ignoring the DontUseNativeDialog. This
lead to a native (Cocoa) dialog created all the time.
Fix the testcase for QFontDialog. It needs the DontUseNativeDialog flag
set.
Task-number: QTBUG-24321
Change-Id: I159c1ad057bac38226f1e01a56b15f142650bfd8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
cmake was installed on CI macs _after_ this test was added, causing the
test to block unrelated changes. Temporarily disable it as previously
agreed with Stephen Kelly.
Change-Id: I079c0016a5e4a9a03ee1a0bae9a2e836c6b985d6
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
It no longer requires hardcoded configuration, and it passes on
linux, mac 10.6 and windows desktops
Change-Id: Ibaa63520dade58ce13c23cf2aba3ddbc5be1c472
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Also remove some code which has been unused since it was introduced in
32182d107fa75e5619ecc91a81f50626f429ebe1
Task-number: QTBUG-25140
Change-Id: Ic7053d68d8200f845c1ae330342d27af7275e057
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@digia.com>
Reviewed-by: David Faure <faure@kde.org>
Known failures in this test are now handled by QEXPECT_FAIL.
Task-number: QTBUG-24796
Change-Id: I12ba57370cf3df1a85a108fbbcdc9db2222491c1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Unlike path(), toLocalFile() isn't reporting a URL component, so it
should decode the percent-encoded characters fully. This extra
decoding pass is meant to catch %00 to %1F, %7F and %25 (the percent
sign itself).
It also catches %80 to %FF, which aren't decoded because they don't
form UTF-8 sequences. That means QUrl::toLocalFile() has undefined
behaviour if the path contained non-UTF8 sequences.
Task-number: QTBUG-25459
Change-Id: Iab5a0ba6afcfc4510e297984f2ffc208cedd752b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Can't use style name with Windows native font engine, so do the
comparison using style in case multipleRawFontsFromData().
Also XFAILed the advances() case when using Freetype font engine in
Windows, as some of the advances returned are one pixel wider than
expected.
Task-number: QTBUG-24197
Change-Id: Ib5fecd83a93908e57a4c82ffb5495a92474ce45a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
QMetaObjectExtraData was added when support for QMetaObject::newInstance
was added. One needed a place to put the pointer to static_metacall in
the QMetaObject.
But as we break binary compatibility, one can change the size of
QMetaObject, and put everything back inside QMetaObject's own structure.
Meaning it is not required anymore to have one QMetaObjectExtraData
instance per QMetaObject anymore.
Change-Id: If0b8f586cbaf633eed10045adee3ba3366826c86
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
This is done in preparation of introducing the
QObject::connectNotify(QMetaMethod) function. Together with the
forthcoming QMetaMethod::fromSignal() function, which returns the
QMetaMethod corresponding to a Qt/C++ signal (member function), the
comparison operators provide an effective way of checking which
signal was connected to.
Change-Id: I2de48628c4884a7174fb8574895f272cb3fe5634
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
The buildkey support was removed in 7493ee1c44. This commit removed
PI_BuildKey and most of the usages from the code.
Change-Id: I971d68cd4377c358381983c1edcb98360936b698
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This test hangs in CI, but so far I've been unable to reproduce the
problem. Disable the test for now so that this test does not block
changes that bring in needed functionality.
Task-number: QTBUG-25496
Change-Id: I81faa574b6d7bcab2e32becc2af0f71006c7dd9c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Instead of trying to return whether the URL is relative to something
undefined, let's instead follow what the documentation was saying all
along and what the RFC says about "Relative References".
Change-Id: I32722321a6b36c6e3480669ad769390e4c6f7d1c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Previously, the CI system has not been testing on Windows with the
-developer-build configure flag. Mark known failures for this
configuration so that tests can be run in enforcing mode.
Change-Id: I5fbbbe09a7b400d626107c66dcbd5c5469a45b20
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
QLatin1Literal is just a typedef of QLatin1String.
Change-Id: If20ca225e57a7fb45a7775f0fc81aedb6da88c96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QUrl::path() already decodes almost everything, but let's pass the
formatting flag to be sure.
Note: decoding of control characters from U+0001 to U+001F is not
implemented. Non-UTF8 sequences are also not representable.
Change-Id: I9a0ae2282ec3d48cc0e70e5b2d3824fb120709ed
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.
QRegularExpression has no such shortcoming.
Task-number: QTBUG-25064
Change-Id: If119e06221ca99e57c5ad1a1d4cc6468e9f68c7b
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
It's perfectly valid to have a path of /c:/a.txt on Unix, so don't
strip the leading slash unless we're on Windows.
Task-number: QTBUG-20322
Change-Id: I721bd0a65b41048bc735d4eaa0d536174164fe64
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Since this test began to run again on Mac, it has been passing
consistently.
Task-number: QTBUG-22748
Change-Id: Ia81cf60b11d45fb331b5eca5d13df00556c18e07
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Declarative used to have some issues when the MouseArea event handlers
spinned the event loop: subsequent mouse events were all lost. Let's
add an autotest also for QGuiApplication to make sure the same problem
won't occur there.
Change-Id: If5c3b4f58dad609efb302d2ca932493680ffdf13
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
It's not enough to check for UNIX because Qt may have been configured
without dbus, or we could be running on APPLE (on which DBus is not
commonly installed).
Change-Id: Ic57200dad42c0c12b292d1066f799c827294fe9a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Add qSetMessagePattern() to configure the default
message pattern. This one can still be overwritten by setting the
QT_MESSAGE_PATTERN environment variable.
Without this method, there's actually no way to change the
default output programatically. Since QT_MESSAGE_PATTERN is
evaluated when the first message arrives, setting it via e.g. qputenv
might have no effect/be too late.
Change-Id: I115e0c30606f128fdbf5c169a951ffa2a6a48517
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Switch on most of the tests (all but the bearer tests), marking the two
known failures as insignificant tests.
Change-Id: I17f228a938de1a23eddf897f494bfa4e54338dae
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This test had two stable failures, caused by including code not meant
for Windows.
Task-number: QTBUG-25298
Change-Id: I43d9d62ecf5a3c6eec240fafbc43a625c00f45fa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This test has only stable failures. Mark those failures with
QEXPECT_FAIL and re-enable the test.
Task-number: QTBUG-25296
Change-Id: I5615700ec8119a827c30e43ae651a684e78170fe
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
- Specify main.cpp with full path to avoid obscure link
errors (grabbing main.cpp from windowflags)
- Set proper flags on the test window.
Change-Id: I9bbaf9cb5c7e210f53a51b58bd48a827d6104fe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This test only has stable failures. Mark those with QEXPECT_FAIL and
re-enable the test.
Task-number: QTBUG-23674
Change-Id: I0e6cfe4f1992410bbc27b266f7bdafa14451aff7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
The test has one stable failure. Mark it with QEXPECT_FAIL and
re-enable the test.
Task-number: QTBUG-23681
Change-Id: Iade17cbbd1570863bb628572d8da52ec9c0f62ba
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This test function recently became unstable in parallel with the change
to re-enable the test. Skip the unstable function until it can be
fixed.
Change-Id: I0fb962aa3294a0c9b799acee52ab1fb1cd1c6924
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Up until now, the macros would return an internal type that contained
the pointer to the data. This breaks code that tried to use the macros
with operators, like QStringBuilder but also when writing:
QStringList() << QStringLiteral("a") << QStringLiteral("b");
This change seems to work fine now and I can also verify that this
works:
const auto str = QStringLiteral("Hello");
Even though it creates a QString, which is non-POD and non-constexpr.
Change-Id: Iaf82af9bea4245513a1128ea54f9d2d3d785fb09
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
This test has only stable failures on Mac. Mark those failures with
QEXPECT_FAIL and re-enable the test.
Task-number: QTBUG-25298
Change-Id: I1c768226dfeb9307386e8853091baa68936bed29
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Previously the method attempted to reset only as a last resort.
Now reset() is deprecated and resetting must happen between emitting
modelAboutToBeReset() and modelReset(). Since this suffices in all
cases to notify views that they must reinterrogate the model, it is no
longer necessary to signal explicitly row removals and insertions
within the scope of the reset.
Additionally, fetchMore() is now called within the scope of the reset
so insert signals do not have to be emitted here either.
This improved handling of resetting in QSqlQueryModel also allows the
cache in QSqlTableModel to be cleared directly at select().
This change may actually allow views to operate more efficiently since
they no longer have to react to separate row removal and insert
signals. Views can avoid pointless deallocation and reallocation
by considering row count only after the reset is finished. The cost is
that the columns and horizontal headers must be considered in the view
at each setQuery() call. In any case, it is not clear that trying to
be smart about this in the model justifies additional complexity.
Tests had to be adjusted where they expected explicit row removal
and insert signals.
Change-Id: I4f7eac1419824361d7d9bdcc6a87092b33e80d7a
Task-Id: QTBUG-25419
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
This will allow the CI system to run the tests. The tests are only
run if cmake is found.
Change-Id: Ie73a56114c151871160bafcbf0b90b2d54620855
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
These tests were disabled when trying to get CI working on Mac OS
because they asserted or crashed. Now that CI is working well on Mac
OS, start running these tests again, initially as insignificant tests.
CI results will then be used to determine whether the tests can be made
significant.
Change-Id: Ife411e6b8c84ade45c865ef35f3ae0071d6f8d2b
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
On Windows, the test had a stable failure and an XPASS related to an
already closed bug report. On Mac, the test had one stable failure, on
the same statement that had the XPASS on Windows. On Ubuntu, the test
has been passing consistently.
Mark the stable failures with QEXPECT_FAIL, remove the QEXPECT_FAIL that
causes the XPASS, and remove the insignificant_test markers to re-enable
the test.
Task-number: QTBUG-24296
Change-Id: I05dd16b39296919268fee216332929df591f2b66
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Calling peek() for qsslsocket caused socket data to be copied into
qiodevices buffer and therefore make it unaccessible in qsslsocket.
Cherry picked form 4.8-branch & modified to Qt5 API changes
(int -> qintptr)
Original commits:
commit 621f18955082fc73471e75d1f8c35c2dcd4befeb
Author: Shane Kearns <ext-shane.2.kearns@nokia.com>
commit 68b1d5c17aa38d5921bdade2b0e0cb67c6c90513
Author: Kalle Viironen <kalle.viironen@digia.com>
Task-number: QTBUG-18498
Change-Id: I6be4b19baec2f3197537f5e7b61432040ec84ad2
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This test was marked insignficiant on Ubuntu 11.10, but the only failure
was an XPASS. Make the test significant again, and only include the
QEXPECT_FAIL for CI platforms where the test is known to fail, i.e.
Windows and Ubuntu 10.04.
Task-number: QTBUG-20778
Change-Id: I24af3dab45118758382ba03c8c7a310f16301f8c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test has three stable failures on Windows. Mark those failures
with QEXPECT_FAIL and re-enable the test.
Task-number: QTBUG-24294
Change-Id: I9eee2701a228912c3a91fa730e712661fb93add6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Until March 15, 2012, this test failed consistently on Mac and passed
on other platforms. Since then, the test has passed consistently on all
platforms.
Change-Id: Ie773643a1c9dc0ab3596786badbc3c3afd4824d6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Compile fix for tst_qtextscriptengine.cpp test on the mac.
Change-Id: I912a339c6c659dc8958cc5997a331e3c18c9cb06
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
I had missed these, apparently.
Task-number: QTBUG-23274
Change-Id: I6455dc34b18ec9cefccfe527b3fd3ad34fb61aa3
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
I have not added tests for warnings or other failure to input. This
tests only proper output for the moment.
Change-Id: Ie01fd2a78adfa57c27bf288a08cd44ae82f51241
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Change-Id: I87918276987b3a506c2ac8556940fce89a2d20cd
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
These warnings are expected and correct, so ignore them.
Change-Id: I43931950e46bd3c931db869902574ee7219efa1d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Adjust the test because we don't read past the end anymore.
Task-number: QTBUG-25108
Change-Id: I8243f1d5ae79d1256aab2cb1132598a716a7eeeb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
If the "bypass proxy for local addresses" option is enabled in
the windows proxy configuration, then do not use the proxy for
any IP address in the subnet of any network interface.
As the systemProxyForQuery api is now offering HTTP proxy tunnels
for TCP sockets, this change avoids local ad-hoc network
connections being routed through the proxy.
In the case where the local address was on a different interface to
the proxy server, it may have been unreachable through the proxy.
For example IP over USB or Bluetooth.
Change-Id: I0842732832a7795112be029d923ed168edc008d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I279881693b6eba15a2e145742b3281c9425e9b2e
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change-Id: I0c5b511229a7ac0c2aa23a9c3d2053077e94936c
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
- Factor out controls from the window flags test, split state
into Qt::WindowState (QWindow) and Qt::WindowStates(Qt::Widget).
- Add to geometry test.
Change-Id: I25b9a8696bfb7f4faef113ac82559ebb90a140c5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
QObject is no longer exception-safe and there's no one working on
improving this, so let's not block innocent commits because of this
failure.
QObjectPrivate's constructor initialises the
QObjectPrivate::threadData member to null, but the destructor
dereferences it unconditionally (the member is initialised in the
QObject constructor). That means QObjectPrivate is not exception-safe
by any definition and, so, anything depending on QObject is not
exception-safe.
Change-Id: If9d5004630b7ce2fb357e328627794caad67564f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Workaround QTBUG-24451 by retrying creation of SocketPair if it fails
(waitForConnected and waitForNewConnection are used in the factory
function).
Skip very unstable test cases due to QTBUG-25386
Change-Id: I32129922329b895eb3719d61719c487a4d52c466
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add window state change notification logic. Send
and expose event in addition to window state change
on window restore since the QWidget logic expects
this.
Modify QCocoaWindow::setVisible to sync up window
state that may have been set on the hidden window.
Refactor NSWindow event observing to use one observer
function for all notifications.
Add window state testing to tests/manual/windowflags
Add delay after showFullScreen in tst_qstatusbar to
wait for the Lion fullscreen transition.
Change-Id: I57c523cedd0644d4181b40d72046fad4fdb09a9c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This test has not failed in the last 400 CI runs.
Task-number: QTBUG-23639
Change-Id: I2a8e105ebcba3654a6aac4fd8207c8fbcd2c4db3
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Introduce a new QtMessageHandler that takes QString instead of
char *: This avoids converting to local8bit , only to convert it back
to utf16 for Windows.
The old QMessageHandler is kept for a transition period, but will
be removed before Qt 5.0.
Also fix qEmergencyOut (that is called in OOM situations) to not rely
on the default message handler.
Change-Id: Iee0ce5838f97175c98788b847964273dd22d4a37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This doesn't fix the bug, but confirms that it is CI flakyness.
Task-number: QTBUG-21098
Change-Id: Ic37a7574af88205371f4b2c24113d12b1386835c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This test has four stable failures. Mark those with QEXPECT_FAIL and
re-enable the test.
Task-number: QTBUG-25297
Change-Id: Ic5304443c4467c46f70ef033c8f17d7f3732294c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
The test has one stable failure on CI, but that failure is not observed
by all Ubuntu 11.10 users. Mark that failure with QEXPECT_FAIL when it
is going to fail and re-enable the test, following the pattern
established for the qtcpsocket test on this platform.
Task-number: QTBUG-23380
Change-Id: Ic7546595f314c55ebd36957ada92978141a1c509
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
- Remove Q_WS-ifdefed sections and switch by platform name instead.
- Remove Q_OS_IRIX and Q_WS_QWS conditionals
- Fix deprecated QPixmap::grabWidget(), QPixmap::grabWindow()
calls.
- Use QTest::qWaitForWindowShown() instead of
qt_x11_wait_for_window_manager().
- Rewrite some platform-specific code using QPA interfaces.
Change-Id: I29ce4c4f3e5c05edddfd018dc2eabdd77738eb23
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
ConnectInBackground should be set when opening a network session
due to a background request. This test checks that.
Unfortunately, none of the bearer plugins currently in Qt Base support
this attribute, so the test result is inconclusive.
(testing with a debugger shows the attribute is set correctly, but
it can't be read back as the set is discarded by the plugin
implementation)
Change-Id: Idcf777fe489a62d4ff5007ffd291a84ba052311b
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Using the policy change signal from QNetworkSession.
If the new policy disallows background requests and this is a
background request, then generate an error.
This results in a TCP RST on the socket, and a
BackgroundRequestNotAllowedError on the QNetworkReply.
If the reply is already finished, no action is taken.
Change-Id: I4ff5c681a8b7b852727bb95f03664d666f4efe07
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Ftp and Http have different implementations of QNetworkReply,
so test both of them.
Change-Id: If502fa1788110edf89e619966534eea08830a19b
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Test positioning QWindow and QWidget (frame / normal geometry)
for testing QPA plugins.
The test can be built with Qt 4 for comparison.
Change-Id: I695bf28d5fdf738262d322518d01ad04aa5056f5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This test hasn't failed in the last 400 CI builds.
Task-number: QTBUG-4965
Change-Id: I2ff03b7a12906a2b583b3127bf47c12b901ed319
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
This test has not failed during the last 400 CI builds.
Task-number: QTBUG-23641
Change-Id: Ibcb840679e023db41456e41eedcfcc38ecedbaac
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>