When handling signals from the session, a pointer is needed.
Also the QNetworkReplyImpl needs to access the manager's session.
So, the manager should have a strong and weak reference.
The strong reference is held during connection establishment.
The weak reference is held all the time, though it will become
null when the session is destroyed in idle.
The non static member function getNetworkSession() is used to
create strong references from the weak reference where required.
Task-number: ou1cimx#1004278
Change-Id: I4b5b36b1d996b98e659d993969006c61b4440c15
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
For bearer management to work correctly, we need to know when there
are no network replies active. Previously this was implemented
using qFindChildren, but that doesn't work when the user reparents
QNetworkReply.
QtWebkit does this (actually sets parent to 0).
Also the qFindChildren implementation was racy if multiple requests
were finished in parallel. Again, likely to be triggered by webkit
loading page elements.
Task-number: QTBUG-15812
Change-Id: I181a9ba6611c7c4b6fffa2d84fe4029d89e8f596
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
This should've been done together with the bulk of other changes in:
bdce610022 and
bf7f170607
Task-number: QTBUG-19004
Change-Id: I6d95a29140c1de5e6800812add9d7882511b909a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
QNtlmWindowsHandles was placed inside Q_OS_WIN in some places and in
other places inside Q_OS_WIN32. It seems that Q_OS_WIN is correct
define everywhere.
In addition placed "InitSecurityInterfaceW" inside L macro to convert
argument to wide characters in WinCE. WinCE GetProcAddress takes
LPCWSTR instead of LPCSTR.
This fixes the QtNetwork build for WEC7, where Q_OS_WIN32 apparently
is not defined. Should it be defined, is another story...
Change-Id: Id309d20c46b66139e2cb2e62349067848d8ebb4e
Reviewed-by: Shane Kearns <shane.kearns@accenture.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>
In particular, currentSender->signal is about to be changed from
the method index range to the signal index range (i.e., excluding
non-signal methods). The public senderSignalIndex() function will
still return the index in the method range, so QtDBus will then
continue to work without change. If necessary, QtDBus can afterwards
be ported back to using the internal API again (including the new
QMetaObjectPrivate API for working with methods in the signal range).
Change-Id: I58212e859560a8e241adee99dd2da9ef009d4e5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
even if QT_NO_CAST_FROM_ASCII is defined.
Change-Id: I8c4deceedb6f3e3cd5bdf72d6e9d189c509c9ff3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
to QLatin1String's compare operators that takes const char *s or QByteArray.
Such comparison leads to a potential misuse since QByteArray could contain any arbitrary data
in any arbitrary encoding and QLatin1String is used to only contain strings in UTF-8 -
they are just a different beasts aimed for different purposes, and since QT_NO_CAST_*_ASCII
disallow indirect conversions and require the user to know what he's doing,
let's be consistent here too.
Change-Id: I9bf5f326495157db8a6af064d6154961b7861a7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Just enable ELF stuff on any platform which uses ELF format, instead of a selected subsets of those.
Change-Id: I0753c020c718bc67b4b50c3957fe8dc10afd2c61
Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
Even in common script we may need to have a preferred font list
(which font should be used for CJK codepoints, Chinese, Japanese
or Korean? Since the codepoints they cover may overlap.) Adding
current default language into the pattern in that case will give
a better recommendation for the fallback list if the system have
configuration files like that.
Change-Id: Idbc7f7b0cf24108d6cc255a1add0b29b730588c0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
These are:
"enumeral and non-enumeral type in conditional expression",
"comparison of unsigned expression >= 0 is always true",
and "address requested for 't', which is declared 'register'"
Change-Id: Ia9bab2e1e2c212a2889197e8dd5f7295dda9dadd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This autotest appears to be parallel-safe.
Change-Id: I12f9202633941e9339de0709353efb2b41df4fa1
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Added missing header.
Compile failure is only reproducible when precompiled headers are
disabled.
Change-Id: I0fb2e51b3352ebad3b7b5b58898347605b8d5090
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Call createWinId on modal_widget to make sure
it has a valid QWindow.
Change-Id: Ieaec2bcaceb2ac28032cb42e5f8bcaf7a33828ca
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
There is no session management currently implemented for the xcb QPA
backend. Update the build system to reflect this.
Change-Id: I3486de5741f1fb7e09330ca142b8235a84d3b91d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Also rename the binary and avoid crashes when tslib initialization
fails.
Change-Id: Ia7ccf7c997e1b1484bd475626ca16c9a9642466e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
We depend on this being set correctly set in device_config.prf
Change-Id: Iee69c5ce35af26f9ecd6edacdd70e13ae4a9aa90
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
It was depending on internals of Q_ASSERT
Change-Id: I3dfc0ae0438135a30961f36808dbfc3e663a5538
Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
In preparation of changing the implementation to return an index in
the signals-only range, not all-methods range.
Change-Id: Ib743a4bc9da27ad776ade262b215ebf988e7ab28
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Also wraps various string literals with QLatin1String.
Change-Id: Ia0681bfae00006d9e9ad51f05d0e0d0f45cf2cec
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.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>
The mysterious comment was just suggesting that they weren't
necessary. Turns out the comment is wrong: they are necessary for
non-strict iterator modes.
Task-number: QTBUG-25063
Change-Id: I20ada17035642ee656c431d6bf2152a5243cecdb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Instead of saving the ability of the compiler to produce SSE2, AVX,
Neon, etc. code in .qmake.cache (Unix) or qconfig.pri (Windows), move
everything to qmodule.pri. Accordingly, move the DEFINES += settings
to qt_module.prf instead of qt.prf.
This allows us to re-use these settings in other Qt modules (other
than qtbase), if necessary. Though currently the extra compiler
definitions are found only in src/gui/gui.pro. They can be moved
elsewhere when it becomes necessary.
As a side-effect of this change, some other flags are moved from
.qmake.cache to qmodule.pri (on Unix). The flags that are getting
moved should probably be moved anyway.
Change-Id: Ibc3ab0111e148d81870772f9357273660aa93417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The QT_ALWAYS_HAVE_xxx macros are gone: they were hard to use and not
defined properly. It indicated that the compiler was producing code
that required that particular instruction set, so we could use it in
our code unconditionally. Instead, let's use the GCC-style __SSE2__
and __ARM_NEON__. MSVC does not generate the __SSE2__ macro, so let's
do it for the compiler. Also, define __AVX__ and the macros for the
technologies leading to it when we manage to detect an /arch:AVX build
(currently not possible, see note in the header).
ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all
uses of the intrinsics are either in specially-built files, protected
by runtime checks, or they are unconditional (qstring.cpp). So we only
use the intrinsics when the compiler was instructed to generate code
for that instruction set anyway.
Change-Id: If8382f30422cee0e5831d051b003acf036824abf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The QT_HAVE_xxx macros are replaced with QT_COMPILER_SUPPORTS_xxx.
They indicate that the compiler supports those intrinsics, but not
necessarily that they can be used right now.
ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all
uses of the intrinsics are either in specially-built files, protected
by runtime checks, or they are unconditional (qstring.cpp). So we only
use the intrinsics when the compiler was instructed to generate code
for that instruction set anyway.
Change-Id: Ie58eebbc0518ad1d5420a85174fd84153bb9abaa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
On many systems the device nodes will not be writable normally. There
is no reason to open for writing in any case. Also switched back to
non-blocking I/O.
Change-Id: I9290e6b1ce7e3bc6cb0e75069b3968f647ffbeee
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Also drop the explicit keyword in constructors with multiple
args since it has no effect on multi-arg constructors.
Change-Id: I48af6ede6cc968c52720c6107cadf3aa4dbfc7f7
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Move CUPS code around to create a new CUPS printsupport plugin, this
fixes QPrinterInfo for CUPS which depends on the plugin to work.
It QT_NO_CUPS is defined then the plugin is not built and only Print
to PDF is supported under Linux.
* Move unused genericiunixprintersupport plugin to start new CUPS
printsupport plugin
* Split QPdfPrintEngine to create QCupsPrintEngine
* Remove LPR related code from QPdfPrintEngine
* Move CUPS specific code from plugin base class to derived CUPS class
* Remove forcing CUPS print engine to use PDF mode as PDF is now Native
* Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to
QCUPSSupport
* Remove qprinterinfo_unix as no longer used
* Remove all QT_NO_LPR uses
There is now no CUPS specific code left in printsupport/kernel except
QCUPSSupport which is needed for the dialogs.
Task-number: QTBUG-23060
Change-Id: Ie8fa4512a2424edc8943068e0fa9fb714cc42db9
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Needed for QObjectPrivate::Connection. Since it's a nested class,
it's not possible to merely forward declare it.
Change-Id: Ie2ad1b3972df5433cdb49ee443f053ba2d613779
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The desired meta-object is already stored in a local variable.
Change-Id: I40c7840f07f5dbd67110e2f7d5bb618cbb269047
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The desired method is already stored in a local variable.
Change-Id: Ibf0078813c7aebc83604b9c7ad9a8b6c596c5c65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Textures are now created and uploaded on demand on first render()
call where we are guaranteed to have a current GL context.
Change-Id: I352c876dd1d8b7ed73536de21fa2880cdc6bdb60
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Application default font should be locale aware in fontconfig db
as in other font databases. We use a hack to obtain the system
default language parsed by fontconfig and use that to find out
the preferred font for a given language (such font list is edited
by fontconfig from fonts.conf in FcConfigSubstitute() process).
Change-Id: I99bb8dd29d2dde2c8019ed8e77f5bfc09ddf3ca5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This used to be the Qt/Embedded's QCursor handle implementation.
Change-Id: I31b8ed44ac9325defcb13d887949d9536a262be8
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>
This function is unavailable in QPA land (it currently returns
the QRegionPrivate as the handle()).
Change-Id: I4e81e29d4546a4737c1aaab4ee1fb97e28a473f5
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
- Add QWindowsEGLContext usable for ANGLE and Windows CE.
- Add QWindowsEGLStaticContext containing the display
for resource cleanup.
- Add EGLSurface to QWindowsWindow.
- Add a -angle option specifying the path to the external
ANGLE installation to configure, add libraries to
the mkspecs.
Initial-patch-by: Jabot Corentin <corentinjabot@gmail.com>
Task-number: QTBUG-24207
Change-Id: I5f80b1efb6996da7c5d70aa3720f7801c9e4c6af
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>