Lots of uses of the annotations and error names, plus a bunch of local
unit test names (including one file that had to be renamed).
The meta object generator is updated to support both the old and new
names. That means some references to com.trolltech *must* remain in the
source code.
Task-number: QTBUG-23274
Change-Id: Icc38ae040232f07c437e7546ee744a4703f41726
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Change the old com.trolltech ones to org.qtproject and introduce Use
the alternate domain name for the Qt Project because the dash
character is not valid in interface and error names.
Task-number: QTBUG-23274
Change-Id: Iac1699e70525d67f983c10560932acff6b2ecde6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
The testChildrenLayoutsChanged fails randomly. This happens rarely,
f.i. wasn't spotted by CI when QHash randomization itself was merged;
but is indeed reproducible by running the test a few times in a row.
This is now blocking api_merges integration, and I have no idea
how to fix it.
This patch marks the test as insignificant for now (the bug
tracking this test failure is QTBUG-25325), and switches the failing
tests from QVERIFY(a == b) to a proper QCOMPARE (so that the
expected values do show up in the build logs).
Change-Id: I16f0e28bcbb06dbac2e7169f4676a19ccf626a92
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
http://unicode.org/versions/corrigendum6.html:
> in Unicode 5.0, the list of characters with the Bidi_Mirrored property
> was made consistent for brackets and quotation marks, in preparation for
> new constraints on bidi mirroring. However, after publication of
> Unicode 5.0.0 it was discovered that this change adversely affected
> several quotation mark characters in deployed data.
Task-number: QTBUG-25169
Change-Id: Id49caf401af2d5a1e6dbcc32b2f350aa20b7f901
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The test fails consistently on the CI (but never fails on any
of the developer machines). This is possibly a timing issue.
Change-Id: Ie40d9c38c3128a93898b0e50bfde5a754bd2b7fb
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The key returned by QHash::key is an arbitrary one that maps to the
given value. The test instead relied on it being a specific one.
Change-Id: I090351797e8b52036d78160fd810518a11e8107d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Applied Bill King's suggestion in QTBUG-1363. Columns of
hStmt must be accessed in order.
Verified using ODBC driver on SQL Server 2005 on Windows 7.
Added test for length of text field for MS SQL Server over ODBC.
Task-Id: QTBUG-1363
Change-Id: I6673dafe75e3ef394d41e439adb45096c1421068
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The hash autotest is wrong: it assumed that the iterator on the hash
would reach the end after iterating on two elements with identical key.
But three elements were added to that hash, and the third one
can appear after the other two.
That code path is left for the map test only.
Change-Id: I51de7987e2b132b6caff7bb4bac6a57fb7fcb530
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
I have run the test 250 times in each of these configs with no
crashes observed, so assuming the instability has been fixed
by another change.
ubuntu 11.10 64 bit
ubuntu 10.04 32 bit
windows 7 msvc2010 64 bit (debug)
windows 7 msvc2010 32 bit (release)
Task-number: QTBUG-20686
Change-Id: I02bab165c263cf79684c7723eae1e278839b1e37
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Just XFAIL the failing test instead of ignoring the whole test.
Task-number: QTBUG-25272
Change-Id: Iedca9913032f13c6610b049a0313c9e4336216e0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Just implementing the ### Qt5 suggestion about making
controlTypes a virtual function.
Change-Id: Ic1db47fe488f089de965438e456e9b48e0b96f32
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This test has been XPASS'ing since a long time now.
Change-Id: Ibfcd1b5078e0b8efed9ed0740a4238d24ef8ca33
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
That was a regression introduced in 1c5db1aff
Example:
signals: int *someSignal();
would produce this code:
int* _t0 = int*();
which does not compile
So have special handling for pointer to change it to '= 0'
Change-Id: Ie695e15e309d15c3cfd5c5a69ac8bf6d61ae9915
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This test hangs 2-3% of the time.
Task-number: QTBUG-25284
Change-Id: I32e01696262be2de7e015b8f811d1666551426cc
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
The new QUrl is able to distinguish a URL component that is empty from
one that is absent. The previous one already had that capability for
the port, fragment and query, and the new one extends that to the username,
password and path. The path did not need this handling because its
delimiter from the authority it part of the path.
For example, a URL with no username is one where it's set to QString()
(null). A URL like "http://:kde@kde.org" is understood as an
empty-but-present username, for which toString(RemovePassword) will
return "http://@kde.org", keeping the empty-but-present username.
Change-Id: I2d97a7656f3f1099e3cf400b199e68e4c480d924
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This test no longer fails, so we can remove CONFIG+=insignificant_test
Task-number: QTBUG-22767
Change-Id: If3ca194fc982ad8fdc3e9a7f62fc346190ff01ea
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This test no longer fails, so we can remove CONFIG+=insignificant_test
Task-number: QTBUG-22766
Change-Id: I379873d5c483157e414201e5f8a13c3f4407f9fd
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This does not fail anymore, remove CONFIG+=insignificant_test
Change-Id: I4f98cfad563adfa460910976317c91e852db6872
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Add a toplevel manual.pro and other .pro-files to build them and
fix the build.
Change-Id: Ibc98a27b39dd1304edfa8a6894d62e77ce7ef387
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
I can't say for sure why q*linecontrol passes an empty rect to
the updateNeeded() signal when an input mask is set; presumably
the empty rect at some point has meant "full update", but there
are a few problems with this. Surely a full update is wrong,
even if the semantics have been lost in translation somewhere
(likely the qlinecontrol refactoring). This fix ensures
that empty rects from updateNeeded() are interpreted as a request
to update the whole widget. A further improvement would be to
ensure the line control doesn't request a full update when an
input mask is set. The cursor is usually wider when a mask is
set but because of QLineEdit::paintEvent()'s implementation,
there is currently a mismatch between the cursor width as seen
by q*linecontrol and what is actually drawn, which causes
rendering artifacts if updateNeeded() sends the cursorRect().
Since QLineEdit and Q*LineControl aren't actively developed, it's
best to keep this fix minimal, although the performance cost of
updating the whole line edit when an input mask is set is
unfortunate.
Task-number: QTBUG-7174
Change-Id: Ie51e015d760915e07b0220b770f04fc958d93a12
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Most of the tests were removed while QUrl::toEncoded or fromEncoded
were deprecated in the development process. Since they aren't
deprecated in the end, bring them back.
Change-Id: Ibdb6cd3c4b83869150724a8e327a03a2cd22580d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
By having the default value equal to zero, we follow the principle of
least surprise. For example, if we had
url.path()
and we refactored to
url.path(QUrl::DecodeSpaces)
Then instead of ensuring spaces are decoded, we make spaces the only
thing encoded (unicode, delimiters and reserved characters are
encoded).
Besides, modifying the default can only be used to encode something
that wasn't encoded previously, so having the enums as Encode makes
more sense.
As a side-effect, toEncoded() does not support any extra encoding
options.
Change-Id: I2624ec446e65c2d979e9ca2f81bd3db22b00bb13
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This allows things like http://example.com/{1234-5678}?id={abcd-ef01}.
But do not allow it in other parts of the URL. I could allow it in the
fragment, but in the username and password it would be too ugly.
In order to do that, make DecodeReserved use two bits and have
PrettyDecoded set only one of them. That way, toString(PrettyDecoded)
can be distinguished from toString(PrettyDecoded | DecodeReserved),
just as path(PrettyDecoded) can be distinguished from
path(PrettyDecoded & ~DecodeDelimiters).
Also, take the opportunity to avoid decoding the reserved characters
in the query. Keep them encoded as they should be.
Change-Id: I1604a0c8015c6b03dc2fbf49ea9d1dbed96fc186
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
DecodeReserved applies to all characters between 0x21 and 0x7E that
aren't unreserved, a delimiter, or the percent sign itself.
Change-Id: Ie64bddb6b814dfa3bb8380e3aa24de1bb3645a65
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
There's little value in having the DecodeUnambiguousDelimiters option
since neither QUrl nor QUrlQuery can return values that are ambiguous
in that particular context, ever.
This option could be used to encode a character if, when placed
in a URL, it would need to be encoded. Such cases are hash (#) or
question marks (?) in the path component, or slashes (/) and at signs
(@) in the userinfo.
However, we don't need two enums for that, since there are no
other characters that can appear in either form. Still, leave two bits
for this enum. In the future, if we want to split the gen-delims from
the sub-delims, we are able to.
Change-Id: If5416b524680eb67dd4abbe7d072ca0ef7218506
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This tests how QUrl encodes and decodes certain characters and leaves
some other ones alone. It also tests that the output of toString() (in
whichever encoding was being tested) is also parsed again to be
exactly the same as the previously decoded form.
Change-Id: Ie358d001f8b903409db61db48bde1ea679241a60
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This is the same fix as the previous commit did for the other
components of the URL. But we're also changing how we handle the "[]"
characters in a query: previously the handling was like for other
sub-delims; now, they're always decoded, assuming that the RFC had a
mistake and they were meant to be decoded.
Change-Id: If4b1c3df8f341cb114f2cc4860de22f8bf0be743
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Refactor the way that QUrl stores and returns the components of the
URL so that ambiguous delimiters (gen-delims that could change the
meaning of the parsing) are interpreted correctly. Previously, QUrl
called "unambiguous" the form found in a full URL, even though each
item in isolation could have more characters decoded.
Now, instead, store only the fully decoded form. To recreate the
compound forms (the full URL, as well as the user info and the
authority), we need to do more processing.
This commit applies to the user name, password, path and fragment
only. The scheme, host and port do not need this work because they are
special; the query is handled separately.
Change-Id: I5907ba9b8fe048fff23c128be95668c22820663a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
- The crash on XCB can no longer be reproduced.
- Use QFINDTESTDATA instead of SRCDIR defines.
- Remove Windows CE specific profile section.
Task-number: QTBUG-20756
Change-Id: I6077b3a0daacb15ab440a90c7bda247aa3756fa5
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
0xfdef-0xfdd0 is definitely 31 and not 15 :)
also fix all copy-pastes of this code (greping for '0xfdd0' helps ;)
Change-Id: I8f3bd4fd9d85f9de066f0f5df378b9188c12bd48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Crash on XCB can no longer be reproduced.
Task-number: QTBUG-20756
Change-Id: I057231a397573f2a28a1325c6d6f728735ebbee6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This tests that modalWindow() returns the expected value and that
QEvent::WindowBlocked and QEvent::WindowUnblocked are sent correctly
when modal windows are hidden and shown.
Change-Id: I872f35e0240c928566ab35fa5764fad6cfda6db6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these
functions just to avoid an include, except to pay for it with worse runtime
performance.
On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15%
faster(!) than adding an additional call to qMemSet. The advantage on sizes
above that is unmeasurable.
For qMemCopy, the benefits are a little more modest: 16-7%.
Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
In (SHA) b800d8b94a the span model
was replaced with a plain section model. The code however still has
variables and classes called someting with spans which would be
confusing for possible new readers of the code.
This patch cleans up most of it. It only renames classes,functions
and variables (and not any semantics or the public API).
Change-Id: I6ceb068c7317223f0d8e37f8032197f518d0174c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Some FTP implementations (currently not including QNAM) strip the first
slash off the path in an FTP URL so that the path in the URL is relative
to the login path (the user's home directory). To reach the root
directory, another slash is necessary, hence the double slash.
In anticipation of future URL normalisation, which Qt 4 could do, "//"
could be rendered to "/", so this extra slash should be "%2F".
This operation is done only in QUrl::fromUserInput.
Change-Id: If9619ef6b546a3f4026cb26b74a7a5a865123609
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Source-incompatible changes are no longer desirable for Qt 5, so these
items must wait until at least Qt 6.
Task-number: QTBUG-23524
Change-Id: I0b9ae5f6f3a792e0169a4b0d3aefbdcb744acd2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Since different platforms come with different fonts, we should
probably leave it up to the platform to decide which family to use.
Change-Id: I18bb81c0ce87cc7e9ac7f3abaeae1b41c0ce8410
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Port of Robin's work from I0a53aa4581e25b351b9cb5033415b5163d05fe71
on top of the new qHash patches (the original commit just introduced
lots of conflicts, so I redid it from scratch).
This is based on the work done in the QHash benchmark over the past
few months experimenting with the performance of the string hashing
algorithm used by Java.
The Java algorithm, in turn, appears to have been based off a
variant of djb's work at http://cr.yp.to/cdb/cdb.txt.
This commit provides a performance boost of ~12-33% on the
QHash benchmark.
Unfortunately, the rcc test depends on QHash ordering.
Randomizing QHash or changing qHash will cause the test to fail
(see QTBUG-25078), so for now the testdata is changed as well.
Done-with: Robin Burchell
Change-Id: Ie05d8e21588d1b2d4bd555ef254e1eb101864b75
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Avoid the conversion to a temporary QString -- just hash the address
as a byte array.
Change-Id: Ic35cdbbc3ee66c32a28d911bd27de0092395979f
Done-with: Shane Kearns
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
When sorting a model recursively, the children of a QFileSystemNode
are extracted from their parent in a QHash order; then filtered,
then sorted (using a stable sort) depending on the sorting column.
This means that the order of the children comparing to equal for
the chosen sort are shown in the order they were picked from the
iteration on the QHash, which isn't reliable at all.
Moreover, the criteria used in QFileSystemModelSorter for sorting
are too loose: when sorting by any column but the name, if the result
is "equality", then the file names should be used to determine
the sort order.
This patch removes the stable sort in favour of a full sort,
and fixes the criteria of soring inside QFileSystemModelSorter.
Change-Id: Idd9aece22f2ebbe77ec40d372b43cde4c200ff38
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Same as with QtCore, remove the #ifdef and #ifndef and select the side
with STL.
Change-Id: If1440080328c7c51afe35f5944a19dafc4761ee5
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
QT_NO_STL is now no longer defined, so remove the conditionals and
select the STL side.
Change-Id: Ieedd248ae16e5a128b4ac287f850b3ebc8fb6181
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Two equal QByteArrays must return the same hash.
Change-Id: Iddd45b0c420213ca2b82bbcb164367acb6104ec8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Two equal strings / stringrefs must return the same hash.
Change-Id: I2af9a11ab721ca25f4039048a7e5f260e6ff0148
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It was confusing DataLocation and GenericDataLocation, and the same
for CacheLocation and GenericCacheLocation. The test was passing in
the api_changes branch because these were giving the same result
(empty app name), but the QCoreApplication::applicationName fix in master
makes these different, so the bug in the test showed up after merging.
Change-Id: I80ef6883c96cfd02b8c277d9d686717028d396bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This uses an alternative approach to the testing formerly introduced
in 4ef5a626. Zero-termination tests are injected into all QCOMPARE/QTEST
invocations. This makes such testing more thorough and widespread, and
gets seamlessly extended by future tests.
It also fixes an issue uncovered by the test where using a past-the-end
position with QString::insert(pos, char), could move uninitialized data
and clobber the null-terminator.
Change-Id: I7392580245b419ee65c3ae6f261b6e851d66dd4f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
The approach used to verify for zero-termination is too intrusive and
requires additional maintenance work to ensure new zero-termination
tests are added with new functionality.
Zero-termination testing will be re-established in a subsequent commit.
This reverts commit 4ef5a6269c.
Change-Id: I862434a072f447f7f0c4bbf8f757ba216212db3c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
This enables easier updating of those structs, by reducing the amount of
code that needs to be fixed. The common (and known) use cases are
covered by the two macros being introduced in each case.
Change-Id: I44981ca9b9b034f99238a11797b30bb85471cfb7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There were two constuctors offering essentially the same functionality.
One taking the QStatic*Data<N> struct, the other what essentially
amounts to a pointer wrapper of that struct. The former was dropped and
the latter untemplatized and kept, as that is the most generic and
widely applicable. The template parameter in the wrapper was not very
useful as it essentially duplicated information that already maintained
in the struct, and there were no consistency checks to ensure they were
in sync.
In this case, using a wrapper is preferred over the use of naked
pointers both as a way to make explicit the transfer of ownership as
well as to avoid unintended conversions. By using the reference count
(even if only by calling deref() in the destructor), QByteArray and
QString must own their Data pointers.
Const qualification was dropped from the member variable in these
wrappers as it causes some compilers to emit warnings on the lack of
constructors, and because it isn't needed there.
To otherwise reduce noise, QStatic*Data<N> gained a member function to
directly access the const_cast'ed naked pointer. This plays nicely with
the above constructor. Its use also allows us to do further changes in
the QStatic*Data structs with fewer changes in remaining code. The
function has an assert on isStatic(), to ensure it is not inadvertently
used with data that requires ref-count operations.
With this change, the need for the private constructor taking a naked
Q*Data pointer is obviated and that was dropped too.
In updating QStringBuilder's QConcatenable specializations I noticed
they were broken (using data, instead of data()), so a test was added to
avoid this happening again in the future.
An unnecessary ref-count increment in QByteArray::clear was also
dropped.
Change-Id: I9b92fbaae726ab9807837e83d0d19812bf7db5ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTBUG-23059 only affects 2 test functions, not the whole test. XFAIL the
2 failing tests.
Change-Id: I87086a9ec573362625bc090038dfd7c79aeb9426
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This tests that we get the windowModalityChanged() signal as needed, but
not unnecessarily either.
Change-Id: I2232fa9d45c72e472b324b681859b4b0d574b467
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Algorithmic complexity attacks against hash tables have been known
since 2003 (cf. [1, 2]), and they have been left unpatched for years
until the 2011 attacks [3] against many libraries /
(reference) implementations of programming languages.
This patch adds a qHash overload taking two arguments: the value to
be hashed, and a uint to be used as a seed for the hash function
itself (support the global QHash seed was added in a previous patch).
The seed itself is not used just yet; instead, 0 is passed.
Compatibility with the one-argument qHash(T) implementation is kept
through a catch-all template.
[1] http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf
[2] http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks
[3] http://www.ocert.org/advisories/ocert-2011-003.html
Task-number: QTBUG-23529
Change-Id: I1d0a84899476d134db455418c8043a349a7e5317
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
tst_rcc and tst_qdom rely on specific QHash orderings inside
rcc and QDom respectively (see QTBUG-25078 and QTBUG-25071).
A workaround is added to make them succeed: QDom checks for
all possible orderings, and rcc initializes the hash seed to 0
if the QT_RCC_TEST environment variable is set.
Change-Id: I5ed6b50602fceba731c797aec8dffc9cc1d6a1ce
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
It is an extension coming from the use case when you, for instance, need to
implement a countdown timer in client codes, and manually maintain a dedicated
variable for counting down with the help of yet another Timer. There might be
other use cases as well. The returned value is meant to be in milliseconds, as
the method documentation says, since it is reasonable, and consistent with the
rest (ie. the interval accessor).
The elapsed time is already being tracked inside the event dispatcher, thus the
effort is only exposing that for all platforms supported according to the
desired timer identifier, and propagating up to the QTimer public API. It is
done by using the QTimerInfoList class in the glib and unix dispatchers, and the
WinTimeInfo struct for the windows dispatcher.
It might be a good idea to to establish a QWinTimerInfo
(qtimerinfo_win{_p.h,cpp}) in the future for resembling the interface for
windows with the glib/unix management so that it would be consistent. That would
mean abstracting out a base class (~interface) for the timer info classes.
Something like that QAbstractTimerInfo.
Test: Build test only on (Arch)Linux, Windows and Mac. I have also run the unit
tests and they passed as well.
Change-Id: Ie37b3aff909313ebc92e511e27d029abb070f110
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
The string from the server should begin with "* OK" and end
with "\r\n" according to the IMAP specification.
Still have a check for "server ready" as this does not change between
cyrus versions.
Change-Id: Ia01ed8aa054e5726bba8b411d30edc6205cc8465
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
According to documentation, SQLite doesn't have a separate Boolean
storage class. Instead, values are stored as integers 0(false) and
1(true). In QSqlQuery::bindValue(), if a boolean value is bound
to a placeholder, it is converted to text true and false. This fix
converts boolean value to integer 0 and 1.
Task-number: QTBUG-23895
Change-Id: I4945971172f0b5e5819446700390033a1a4ce301
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Due to some bugs that are not reproducable with a normal HTTP GET
This patch also adds the option to process multiple URLs
serially (using application level queuing) rather than the default
parallel (using QNetworkAccessManager queuing on 6 TCP connections)
& renames the authentication command line options to match wget.
Change-Id: I10915feb3bba23abbd7a72f9844c03f347f9bff5
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
While QArrayDataPointer offers generic detach() functionality, this is
only useful for operations that may modify data, but don't otherwise
affect the container itself, such as non-const iteration, front() and
back().
For other modifying operations, users of the API typically need to
decide whether a detach is needed based on QArrayData's requirements
(is data mutable? is it currently shared?) and its own (do we have
spare capacity for growth?).
Now that data may be shared, static or otherwise immutable (e.g.,
fromRawData) it no longer suffices to check the ref-count for
isShared().
This commit adds needsDetach() which, from the point-of-view of
QArrayData(Pointer), answers the question: 'Can contained data and
associated metadata be changed?'.
This fixes QArrayDataPointer::setSharable for static data (e.g.,
Q_ARRAY_LITERAL), previously it only catered to shared_null.
SimpleVector is also fixed since it wasn't checking Mutability and it
needs to because it supports fromRawData().
Change-Id: I3c7f9c85c83dfd02333762852fa456208e96d5ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This enables a truncating resize() to be implemented. It is similar to
destroyAll(), but updates the size() as it goes, so it is safe to use
outside a container's destructor (and doesn't necessarily destroy all
elements).
The appendInitialize test was repurposed and now doubles as an
additional test for QArrayDataOps as well as exercising SimpleVector's
resize().
Change-Id: Iee94a685c9ea436c6af5b1b77486734a38c49ca1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This follows QArrayData::detachFlags's lead. Given the (known) size for
a detached container, the function helps determine capacity, ensuring
the capacityReserved flag is respected.
This further helps aggregating behaviour on detach in QArrayData itself.
SimpleVector was previously using qMax(capacity(), newSize), but there's
no reason to pin the previous capacity value if reserve() wasn't
requested. It now uses detachCapacity().
Change-Id: Ide2d99ea7ecd2cd98ae4c1aa397b4475d09c8485
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Adds given number of default-initialized elements at end of array. For
POD types, initialization is reduced to a single memset call. Other
types get default constructed in place.
As part of adding a test for the new functionality the arrayOps test was
extended to verify objects are being constructed and assigned as
desired.
Change-Id: I9fb2afe0d92667e76993313fcd370fe129d72b90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Way back in the mists of time, someone added SO_REUSEPORT to socket binding,
which was great, because otherwise it meant that multiple UDP sockets couldn't
share the same port on OS X (as platforms with SO_REUSEPORT apparently don't
support rebinding with SO_REUSEADDR).
However: SO_REUSEPORT also means that *any* bind on a port will succeed, which
is most definitely not wanted in the case of TCP sockets, so check the socket
type before performing the actual bind.
Also test that multiple listens don't take effect.
Change-Id: I2f8d450bcfb8a7f3abd8918a4e789a850281dd13
Done-with: Thiago Macieira
Done-with: Shane Kearns
Task-number: QTBUG-6305
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
On OS X and Windows, this was not working, because the socket was being bound
in v6 mode (due to ::Any being for dual mode), but the address passed was a v4
address, meaning it took the wrong codepath. Linux, strangely, apparently works
anyway.
This is fixable in OS X (by using the v6 join path when bound in v6/dual mode),
but the same fix doesn't work on Windows, failing with WSAEADDRNOTAVAIL.
Don't allow this behaviour, and provide a sane error message telling the user
what to do instead.
Done-with: Shane Kearns
Task-number: QTBUG-25047
Change-Id: Iaf5bbee82e13ac92e11b60c558f5af9ce26f474b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
QPlatformInputContext now gets notified on changed focus and
has inputMethodAccepted() telling whether current focus object
accepts input method events.
Also adapted IBus plugin to use this. Key event filtering for
focused objects without input method support got fixed by the
change.
Change-Id: I6910aa6af2459d752a5763f0ae88fa8c34e5b165
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Unit test to override mask delay value so running it is not dependent
on platform style hint.
Change-Id: Ic5cc12d32cf97e64729b3af54250bdc05c0c95ad
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
When FTP login fails we fail to remove the entry from the cache.
This is because the cache key is created from the url with the
userInfo. So this needs to be set again to match the key used
when inserted.
Task-number: QTBUG-11824
Change-Id: Ib3fd2d737581653ae59c56d0810d42e2d8dc2176
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Do not append blank character if it is the default.
Task-number: QTBUG-20834
Change-Id: I17f6ac4058f295f25ff49f33c41bd9ee40b75811
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Callers should just call the standard allocation functions directly.
Adding an extra function call onto all basic memory management for the sake of
making it instrumentable in rare cases isn't really fair to everyone else.
What's more, this wasn't completely reliable, as not everything was using them
in a number of places. Memory management can still be overridden using tricks
like LD_PRELOAD if needed.
Their aligned equivilents cannot be deprecated, as no standard equivilents
exist, although investigation into posix_memalign(3) is a possibility
for the future.
Change-Id: Ic5f74b14be33f8bc188fe7236c55e15c36a23fc7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Postgres async notifications can contain a payload parameter
that is currently discarded. This patch provides the QSqlDriver
api change necessary to deliver a payload with each emitted
notification by adding a QVariant parameter to the notification
signal. It also provides the implementation for the qsqlpsql driver.
The qsql_ibase driver has been updated to reflect the change to the
notification signal signature.
The eventNotificationPSQL test in the qsqldatabase test has
been expanded to test proper payload sending and receiving.
All tests/auto/sql/kernel tests have been run with sqllite and
postgres with no regressions.
Task-number: QTBUG-13500
Change-Id: I9137f6acc8cfca93f45791ca930e0287d93d5d0d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Tests added that cover boundValues with positional binding,
and boundValueName.
Change-Id: I2962d76607b716d19d3e0be958109be2f032f2d9
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This patch fixes a critical bug in the qsqlpsql driver where
notifications aren't delivered when received. Any blocking libpq
function(specifically PQexec) will read all the incoming data
from the socket, including any pending notifications. This would
cause the socket notifier to never be fired for incoming
notifications that are already queued inside libpq. The qsqldriver
test case was skipping the postgres notification test because of
this bug, now its enabled and passing. In order to fix this
bug I made a wrapper function for PQexec in QPSQLDriverPrivate
that calls _q_handleNotification via QMetaObject::callMethod
QueuedConnection in order to deliver pending notifications
when control returns to the event loop. I also added a flag
to ensure only one call is made each time the event loop is
entered.
Change-Id: I19f5297094ae7ae46bfb0717e4fca744d69f7b92
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
QSqlTableModel::headerData() generates a crash if an invalid filter
is set. QSqlQueryModel::indexInQuery() should check the index value
before applied to d->colOffsets[].
QSqlQueryModel::initRecordAndPrimaryIndex() is updated to sync the
size of rec and colOffsets.
Task-number: QTBUG-23879
Change-Id: Ic9f88bb288592aa6fb3c1415cc818632dadaab56
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
For data allocated and maintained by QByteArray, there's a guarantee
that data() is null-terminated. This holds true even for null and empty,
where logically the terminating character should never be dereferenced.
For tests that modify or generate QByteArrays, this ensures the
invariant is kept.
In the toFromHex() text, const-ness of temporary variables was dropped
to enable the test macro to be used, as the qualification didn't add
much to the test otherwise.
Change-Id: I7ee52e79e3a9df7de18c743f3698dab688e6bf0e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Window- and ApplicationModal native dialogs need to send WindowBlocked
and WindowUnblocked events as well. This will let us test that they work
properly.
Change-Id: Iaa4ddb79bb0872f9ab1e61336a5decb262472283
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Prepared queries should be able to use a name parameter more than
once. Currently this will result in undefined behavior and crashes.
This patch fixes the bug and implements the needed test case.
Task-number: QTBUG-6420
Change-Id: I07d6537e432a9b2781e9ef3d9f597bceb054527e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
There are probably lots of places that rely on that behaviour, so go
back to what it was.
Change-Id: I4d1503a0ee105a50cdfaab52d9a5862a02c70757
Reviewed-by: David Faure <faure@kde.org>
I don't know if the bug is in moc or in qmake. But it bails out trying
to parse the .cpp file after the
tst_QUrlInternal::nameprep_testsuite_data function. If the #include is
placed above, it works. If it's placed below, it doesn't.
Change-Id: Ide554aa5aa3f1999e29604ba6d25ccdb09f6ef28
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Don't crash when either side is null but not both sides.
Also make sure operator< is working properly and satisfies the basic
conditions of a type (such as that if A < B, then !(B < A)).
Change-Id: Idd9e9fc593e1a7781d9f4f2b13a1024b643926fd
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The strict mode check is now implemented after the tolerant parser has
finished, and only if the tolerant parser has not found any errors. We
catch the use of disallowed characters (control characters plus a few
not permitted anywhere) and broken percent encodings.
We do not catch the use of Unicode characters, as they are permitted
in IRIs.
In the tests, remove the old errorString test since it makes little
sense.
Change-Id: I8261a2ccad031ad68fc6377a206e59c9db89fb38
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Note that QUrl can only remember one error. If the URL contains more
than one error condition, only the latest (in whichever parsing order
URL decides to use) will be reported.
I don't want too keep too much data in QUrlPrivate for validation, so
let's use 4 bytes only.
Change-Id: I2afbf80734d3633f41f779984ab76b3a5ba293a2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The use of any broken-down components of the query now needs
QUrlQuery.
The QUrl constructor and toString() are now rehabilitated and the
preferred forms. Use toEncoded() and fromEncoded() now only when we
need to store data in a QByteArray or the data comes from a QByteArray
anyway. Change to toString() or the constructor if the data was in a
QString.
Change-Id: I9d761a628bef9c70185a48e927a61779a1642342
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Also say hello to QUrl's constructor and QUrl::toString being allowed
again.
QUrl operates now on UTF-16 encoded data, where a Unicode character
matches its UTF-8 percent-encoded form (as per RFC 3987). The data may
exist in different levels of encoding, but it is always in encoded
form (a percent is always "%25"). For that reason, the previously
dangerous methods are no longer dangerous.
The QUrl parser is much more lenient now. Instead of blindly following
the grammar from RFC 3986, we try to use common-sense. Hopefully, this
will also mean the code is faster. It also operates on QStrings and,
for the common case, will not perform any memory allocations it
doesn't keep (i.e., it allocates only for the data that is stored in
QUrlPrivate).
The Null/Empty behaviour that fragments and queries had in Qt4 are now
extended to the scheme, username, password and host parts. This means
QUrl can remember the difference between "http://@example.com" and
"http://example.com".
Missing from this commit:
- more unit tests, for the new functionality
- the implementation of the StrictMode parser
- errorString() support
- normalisation
Change-Id: I6d340b19c1a11b98a48145152513ffec58fb3fe3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Now that QUrlQuery exists, these methods are no longer necessary in
QUrl itself. Manipulation of the items should be done using the new
class.
They are now implemented using a temporary QUrlQuery. This is hardly
efficient but it works.
Change-Id: I34820b3101424593d0715841a2057ac3f74d74f0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This class is meant to replace the QUrl functionality that handled
key-value pairs in the query part of an URL. We therefore split the
URL parsing code from the code dealing with the pairs: QUrl now only
needs to deal with one encoded string, without knowing what it is.
Since it doesn't know how to decode the query, QUrl also becomes
limited in what it can decode. Following the letter of the RFC,
queries will not encode "gen-delims" nor "sub-delims" nor the plus
sign (+), thus allowing the most common delimiters options to remain
unchanged.
QUrlQuery has some undefined behaviour when it comes to empty query
keys. It may drop them or keep them; it may merge them, etc.
Change-Id: Ia61096fe5060b486196ffb8532e7494eff58fec1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Change it to operate on QChar pointers, which gains a little in
performance. This also avoids unnecessary detaching in the QString
source.
In addition, make the output be appended to an existing QString. This
will be useful later when we're reconstructing a URL from its
components.
Change-Id: I7e2f64028277637bd329af5f98001ace253a50c7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The reason for this change is that the strict parser made little sense
to exist. What would the recoder do if it was passed an invalid
string?
I believe that the tolerant recoder is more efficient than the
correcting code followed by the strict recoder. This makes the recoder
more complex and probably a little less efficient, but it's better in
the common case (tolerant that doesn't need fixes) and in the worst
case (needs fixes).
Change-Id: I68a0c9fda6765de05914cbd6ba7d3cea560a7cd6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This one function is an all-in-one:
- UTF-8 encoder
- UTF-8 decoder
- percent encoder
- percent decoder
The next step is add the ability to modify the behaviour, by telling
the function what else it must encode or decode and what it should
leave untouched.
Change-Id: I997eccfd2f9ad8487305670b18d6c806f4cf6717
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
These functions are now aliases to {to,from}Ace, which are usually
what you want. The original functions from Qt 4.0 had the wrong
semantics and wrong name. The new ones from Qt 4.2 execute the ACE
processing from IDNA (specifically, the ToASCII and ToUnicode
operations described in the RFC).
But so as not to be without tests, export the tests in unit testing
environment and test the punycode roundtrip. Note that the
tst_QUrl::idna_test_suite test tests *only* the Punycode roundtrip,
not the nameprepping.
Change-Id: I9b95b4bd07b4425344a5c6ef5cce7cfcb9846d3e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Copy the unit tests that related to percent-encoding to
tst_qbytearray.cpp and use public functions to execute
QUrl::fromPercentEncoded and QUrl::toPercentEncoded.
Change-Id: I6639ea566d82dabeb91280177a854e89e18f6f8d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
The clone() method didn't detach if we had enough memory
allocated, but didn't consider that the object being
modified is not the root object of the binary blob.
Change-Id: I9a479ae1c873b7fe9cff7e13c539e7a41961bf68
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
Reviewed-by: abcd <amos.choy@nokia.com>
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
This functionality does not work anymore. Modality is tied to top-level
windows, not to any arbirtrary QWidget.
Change-Id: Ie7545cbcfbf4021850b215f014bb0f7274971327
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The change in plugin loading has meant that different plugins in the
same plugin folder will not be handled properly when loaded with
different instances of QFactoryLoader.
A solution is to only unload compatability plugins from
QFactoryLoader::update() since they are the only plugins that are
actually loaded in that method.
This auto test shows the error on the current version of QFactoryLoader
and passes with the fix described above.
Change-Id: I12001525d51bb631d6742c5965357598322f247c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The new code now generates lowercase hex instead of uppercase, so
adapt the unit tests to pass.
Also, "123.0.0" is now considered valid (compatibility with inet_aton).
Change-Id: I07b5125abf60106dc5e706033d60836fb690a41f
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Similarly, only test against the libc function on Linux, as other OS
sometimes have different behaviour.
Change-Id: I9b8ef9a3d660a59882396d695202865ca307e528
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
In the unit test, check against inet_aton on Linux with GLIBC
only. Other platforms have this function too, but they sometimes have
different behaviour, so don't try to test them equally.
Change-Id: I1a77e405ac7e713d4cf1cee03ea5ce17fb47feef
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
WA_PaintOutsidePaintEvent is only suggested to be used when porting Qt3 code
to Qt 4 under X11 platform. and it has been broken now.
Change-Id: Ie4297b2a449f1055ca10ada9efb930e6018b1efb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QStandardPaths now knows a "test mode" which changes writable locations
to point to test directories, in order to prevent auto tests from reading from
or writing to the current user's configuration.
This affects the locations into which test programs might write files:
GenericDataLocation, DataLocation, ConfigLocation,
GenericCacheLocation, CacheLocation.
Other locations are not affected.
Change-Id: I29606c2e74714360edd871a8c387a5c1ef7d1f54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Add a checkbox to the main window and dialog .ui files to allow
exec()ing ApplicationModal dialogs.
Change-Id: I4d8a4be136d0f6b688938a8020a6ebcc69a9dfe8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This adds checks to ensure Q_ALIGNOF is returning the desired alignment
for explicitly-aligned types.
The alignment check is now inlined in the test inside QCOMPARE so we get
slightly more informative errors:
FAIL! : tst_Collections::alignment() Compared values are not the same
Actual (quintptr(&it.value()) % Value::PreferredAlignment): 64
Expected (quintptr(0)): 0
Loc: [tst_collections.cpp(3384)]
In this case, this is enough to notice "non-native" alignments are being
requested. Having test parameters otherwise hidden in template arguments
doesn't help the situation.
Change-Id: I05267fd25b71f183cfb98fb5b0a7dfd6c28da816
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The intent is to force instantiation of template container classes and
semantics or behaviour are otherwise irrelevant in this context.
tst_collections.cpp:3036:15: warning: inequality comparison result unused
tst_collections.cpp:3037:15: warning: equality comparison result unused
tst_collections.cpp:3100:15: warning: inequality comparison result unused
tst_collections.cpp:3101:15: warning: equality comparison result unused
Change-Id: I70ad38b18dcbc43879e36a34b1da460aee5f7b07
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Instead use QMap if we want a stable order.
Task-number: QTBUG-24995
Change-Id: I93f643df236f5078768f539615fa47163e5262e8
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
They predate Qt 4.5, but it looks like the comments are indicating
that QVariantList and QVariantMap types will use the basic template,
but that is not the case. Instead they will use the compare
specializations for QList<T> and QMap<T> respectively.
Change-Id: Iebf7e9b8aaa8a699ea720090fbf641dfecde0ff7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Test that they do expand properly and don't produce errors. This is
templated code, so it doesn't get tested fully unless we instantiate
them.
Also check that the alignments are correct.
Change-Id: I2a8ee2165167f54b652b4227411e209850974b8e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
QComboBox does in fact have a user property
since b1b87a73012342dc1619a8e907ea9954d59ca564.
Change-Id: I24eb2ef267cec5d8a9f7348954b703fa6df04fa5
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: David Faure <faure@kde.org>
Both classes had such components before, but there were issues with
the NOTIFY signal not being in the same class as the Q_PROPERTY.
This patch solves that problem by using a signal of a different name.
Task-number: QTBUG-15731
Change-Id: Ibc7ce4dba8a6b88c05d62a90e14d0101c5cd3082
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
This makes it more useful in all the Qt apps that don't set it,
given that it's used internally by QTemporaryFile, QTemporaryDir,
QStandardPaths, QDBus, QAccessibleApplication, etc.
Qt4 compatibility in the deprecated QDesktopServices is preserved,
no fallback there.
Change-Id: I584463507cf917a3720793c6bd45d07c60f8356c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
That is not what depends is for.
Change-Id: Iabf93e890f009bd6c8fcc18dde1891bf20a493f1
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
There isn't really a need for the dependency as LanguageChange events can be
caught in QObject::eventFilter, directly.
Change-Id: I39778fbe1663924d97705b514ae399cfd3749776
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Previously the method didn't take into account that hitTest()
returns visual index, i.e. containing the preedit, and thus was easily
hitting assertion. Need to compensate for that before checking for actual
link.
Change-Id: I119e7f91088b4db9d347a3da338f6df915ce9719
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This test allows us to recreate any modal scenario. Multiple top-level
windows with any depth of window and application modal dialogs is
possible.
Change-Id: Ieef2c557d2f9ad2d2b2d2b598e9415f4c1e2dcb5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The speed calculation caused a dived by zero exception.
Change-Id: I83281c8e66b9c18e7d282920901ccac1e9444a68
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Feature to be reimplemented simplified. Cases when input method
needs to be reset with possibility to commit use
QInputMethod::commit() again.
Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Commit 5e9089135b had some problems:
* It left out the cast to IServiceProvider in the refactoring of
QueryInterface. This broke IAccessible2.
* It also failed to enable the codepath for MinGW inside wrap(), which
effectively caused MSAA for MinGW to be disabled.
It also adds an autotest to the bridge (finally). It is simple,
but it should help avoiding committing stuff that completely breaks
the bridge.
Change-Id: I459d89c3bdb93e54ddea85872b50fc1dba0fe4a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The code in question was already commented out before the test was added
to the Qt repository in 2006. After changing the code to use
QFile::rename() for portability, the test appears to pass.
Change-Id: I52a8578a47da419cabf5826b633cc4f2ac2c5218
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This autotest gives different results on consecutive runs, and is
therefore insignificant for the purpose of detecting regressions.
Task-number: QTBUG-24977
Change-Id: I5c4dfd663ce5df6b60ae47a29d332c06e3c0585f
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Calling raise() on a hidden window should not show it. The setVisible()
function will ensure that the window is raised (since we use orderFront
or makeKeyAndOrderFront). This fixes the failing
tst_QDockWidget::task169808_setFloating() test as well.
Task-number: QTBUG-24774
Change-Id: If34472ebbcd615c10654efafd54c84c03d10bc8c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
THe UK still uses the Imperial system at least for distances
and many other things.
Change-Id: I99379de35620114328ad6a7fc9b226a46692bedd
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Replaced hard coding as QT_GUI_PASSWORD_ECHO_DELAY with
a style hint.
Change-Id: I0b78ebad723dbe19d9b9496583203e31545874e2
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Apparently there are still issues here and there (e.g. in declarative)
with properly recognizing more complex event sequences (like triple
clicks). The behavior of qtbase is correct but we need a test case
that makes sure the functionality will not regress.
Change-Id: I08c558fcfdde0dd06e194b4f0affc6f6896573bf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Make sure that the keybaord modifiers are maintained properly when
handling window system events.
Change-Id: Ie75cbe5eb509c29e3d2291694f2de509fbf3098a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The QFlags::operator int() isn't being called, so GCC complains that
this isn't an integer expression.
Change-Id: I537d06fd4a52ecbcddf0ef67807b298c42d3e911
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Lack of support for these types is not a real issue as endian
conversions on byte-sized types are no-ops. Still, the conversions are
useful as they facilitate writing of generic code. They can also be used
explicitly as a way to document in code an endian-specific binary
format:
uchar *data;
quint8 tag = qFromLittleEndian<quint8>(data++);
quint32 size = qFromLittleEndian<quint32>(data);
This commit also adds a test for functions documented in the QtEndian
header.
Change-Id: I2f6c876ce89d2adb8c03a1c8a25921d225bf6f92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>