Some objects expect connectNotify to be called in order the signal to be
emitted.
Change-Id: Id0460d9c2aef8f9c3618a2b62b2119a790e06f30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The C++11 std::atomic type is very close to our API, to the point one
has to wonder if the committe was inspired by it. It provides all of
the memory semantics that Qt requires and more, plus some
compare-and-swap operations that we don't use.
The idea of returning the actual value in the event of a failed
compare-and-swap is actually quite good, as often we'll retry with
it. We just couldn't come up with a good name (fetchAndTestAndSet?).
The C++11 atomics require that the compiler support constexpr as well,
since std::atomic itself isn't required by the standard to be
trivially-constructible (in fact, it has a constexpr constructor in
the standard). For that reason, we need constexpr so we can add a
constructor to QBasicAtomic too.
Change-Id: I12c51455ba73350a6f7501aacc2ca7681c4369dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
With this implementation, we can have Qt run on any architecture that
GCC supports without having to write specialised code. However, on
some architectures, the code that GCC generates is not optimal: it
uses locking on ARMv5 and it's always fully-ordered. For that reason,
it appears after the Qt native assembly implementations (it's a
fallback, not an override).
Since they all have fully-ordered memory semantics, we define only the
xxxRelaxed functions. The exception is __sync_lock_and_test, which has
acquire semantics, so we need to define the Release and Ordered
versions too.
On some architectures, GCC can support atomics on types different than
32-bit and pointer-sized (like x86, x86-64, ARM and even
MIPS). However, there's no standardised way of telling: GCC seems to
define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1,2,4,8} if those operations
are present, but I couldn't find it on the ARM compiler (it was there
for i386, x86-64, IA-64 and MIPS).
Change-Id: I55ff7a7c0cfc6388b7ad8e2c0dedecffdf2a3e01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
It was put in source tree before.
Task-number: QTBUG-20439
Change-Id: Ib52d9c2e83ae375aad259ddc74138bbc728b3ed0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Per ### Qt5 comment and the fact that it was already virtual on
QAbstractSocket.
Change-Id: If2d2b2f9cdec1ef4c5bf625e3ce0d6f2d9a7bdfd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It is better to use QMetaType::type because it works well with custom
types too.
Change-Id: I30bc70d16b2aad4ba22682de1c215b917e64209b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The tr() methods are unrelated to the "meta" part, so disabling them
with that macro is not the proper way. They were originally included to
make static checks for string translation simpler, but it just results
in duplicating the definition every time QT_NO_META_MACROS is used.
Change-Id: I29eb9b83a09e1fd6c66c85c9e4ff23d8dbe65f15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
setEncodedUrl() isn't necessary anymore now that setUrl can handle
encoded (and partially encoded) urls.
url() is added for symmetry with setUrl().
Change-Id: I4e671482a5635a86797421ca50882db9cd60d852
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This fixes round-trip bugs. People expect to be able to do
QUrl u(...); QString s = u.toString(); QUrl u2(s); and have u==u2.
This was not true for paths containing a '#', for instance, which would
be parsed back as a fragment. The solution is to make toString output
partially decoded data (more readable than toEncoded, but not decoded
to the point of changing the meaning, if parsing it back later as a
QUrl), and to make the QUrl constructor work with partially decoded data.
Change-Id: I013c01e8947d538435f3c20fc4ec57cd9ccbba6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Extra ; after namespace was causing build failures with -pedantic.
Change-Id: I340252810a04815820964c625377a1dc0635783f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
$publicclassregexp specifies the prefix for Qt classes in a qt5 module. For example
in QtJsonDb all classes have "JsonDb" prefix and forward include headers were
not generated properly - e.g. "jsondb-client.h" was generated in the include
folder, but "JsonDbClient" (which matches class name) was not.
Change-Id: I6b57a799d926254e2ab3fd00fa6e38f95b8eb96c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Added a bit of documentation to the Java-like hashing function.
Change-Id: I3f44eee305d91b76f0f89cd1acf21f6430b9482b
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Change-Id: Ib5abc171fb8fb70e2f73ac92ca22dc09146d8a55
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
- Use an enumeration for the dialog type.
- Implemented on Windows and Mac
Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com>
Change-Id: I213748a08168efbabc2ac0106308e97ff19d19c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
- Check the device type pof the painter passed in.
- Introduce convenience functions for retrieving the DC for
widgets that default to the top level.
Change-Id: I18a8db02c8ffd7a249310a5ffaf3a530f0a3df40
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Do not delete screens in the destructor as this might call
back to the Windows and use QWindowsContext.
Change-Id: I5e66e480d4b6ddb8b17cc92e4bef93013e336be6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Qt::UnknownOrientation is now Qt::PrimaryOrientation.
Change-Id: I2846a90bd11ecd1416c29b7bd861f180ccb129a1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Change-Id: Ibd2d974ac46f80953f628e8d7c93e742e4c8eb23
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Change-Id: I330702f197c8b558f0a00b90f5e147dbef731abd
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
QNetworkCookieJar now has the following virtual methods:
virtual bool validateCookie(QNetworkCookie &cookie);
virtual bool insertCookie(const QNetworkCookie &cookie, const QUrl &url);
virtual bool updateCookie(const QNetworkCookie &cookie);
virtual void deleteCookie(const QNetworkCookie &cookie);
Their implementation is such that the behavior the class previously
had(in memory storage of the cookies) is mantained.
Task-number: QTBUG-23145
Change-Id: I1420894d31e8072eca6903c3c7ffd6f06205a257
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Alexis Menard <alexis.menard@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
Moving away from deprecated QInputPanel inputItem.
Small behavioral changes:
- On focus proxy widgets, disabling WA_InputMethodEnabled on
proxy will no longer disable input method for proxy target.
- setEnabled(false) on proxy widget will no longer disable
input method for target as a special case.
Change-Id: Ifb5b7144d29bd3aefdde7cf4a0bd396db06e67e2
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Deprecated QInputPanel::inputWindow() which is already
just returning QGuiApplication::activeWindow()
* Deprecated QInputPanel::inputItem() and introduced
QGuiApplication::focusObject(). Input methods can check
input method support by Qt::ImEnabled query.
Change-Id: I70a9c1c3f79aadb75c839d0489a9428f7a221df5
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Added the necessary files for importing and compiling PCRE under
3rdparty/, including a small shell script to ease the import
and the update of PCRE from its dist tarball.
PCRE's config.h is used, but it is assumed that a global
s/HAVE_CONFIG_H/PCRE_HAVE_CONFIG_H/g
was run on PCRE source files to avoid polluting QtCore
compilation with -DHAVE_CONFIG_H (the aforementioned shell script
performs this substitution; therefore, -DPCRE_HAVE_CONFIG_H
is added instead to the compiler's command line).
Change-Id: Ic0f23526ebf5f770aefdffc8f688e5816c28fd8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Some older drivers don't fully support glXChooseFBConfig(). As a bonus,
fix some memory leaks here and there.
Task-number: QTBUG-21880
Change-Id: Ie306dee27f616927a6aa55fd71601569b828afcc
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Also add some debugging helpers to make sure applications are correctly
written even on less restrictive platforms.
Change-Id: Ie92e497c32e07b2b83662f7ab5540d8f37777fd0
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
The function is redundant and can be replaced by QMetaType::type().
Change-Id: I131a7fd285a60d8bd0f3b958668a43bd5da2d6c4
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Implement the public slot QWindow::close() and add the correspondent test.
Change-Id: If3f07cce3b26640f06fc52d0e4dca875d9894b3d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Change-Id: Ia3c0736284afbd4acd8cc86538f5a5399964a589
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Added PCRE config.tests, and logic and command line options
(-qt-pcre and -system-pcre) for configure and configure.exe.
Change-Id: I5da2658191198dbcf48c07d7c5de1be1b884a7a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
that way invocation via perl (c.f. syncqt.bat) does not need options.
Change-Id: I5d8e0d1f0ffe1b7cf280fe97d4f70968a3dbbb22
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
mkspecs for QNX qcc, armv7le and x86 targets
Change-Id: Ie4b0ec46a8837ad63f5aea8429cfdd516531e09a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This saves us from using the 100 ms polling timer to read process output.
Task-number: QTBUG-23012
Change-Id: I3f9398d7a4d30826d2d89ac04bd2fd031500ff57
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Named pipes allow us to make use of overlapped I/O for
redirected stdin, stdout and stderr.
Change-Id: I50191b036bce696147139b200ddbc6c31c16112b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Track the input item's window and notify the input method server when the content
orientation changes.
Change-Id: I401c4fd677ed2eebd8b85968d4a2b3692517e097
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>