If the Windows version doesn't support dual stack then we should bind
to IPv4. So we should change the socketProtocol to
QAbstractSocket::IPv4Protocol as well.
Change-Id: I7f9d0bdd861f82d720e347d3fa968198de720d1a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Just like for the QChar::ByteOrderMark, `ch == QChar::SoftHyphen`
is much more readable than `ch == 0x00ad // (soft-hyphen)`, etc.
Change-Id: I9c85f14cfd979037d35103c3259a435fd729b869
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Rationale:
QCC is a wrapper around GCC, but it doesn't understand -std,
so we need to pass it via -Wc.
The underlying GCC is v4.4, which doesn't know -std=c++11
yet, only c++0x.
We can't use -std=c++0x here, because the QNX headers
depend on some GNU extensions (nanosleep() was one that I
saw), so it has to be gnu++0x, ie. STD C++ + GNU extensions.
Change-Id: Ia5caf68f558b1638224e4876f1bbec84a0a93f67
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The part of tst_qwidget::reparent() that "makes sense only on Windows"
is antiquated at least since the introduction of alien widgets.
It basically tests if QWidget::winId() returns a valid window handle
(has been replaced with winHandleOf here in the meantime).
This is always successful, because winId() creates a valid window handle.
Change-Id: I52c370e26fd9b34861bd4d52c12dded243382d43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Since QWindowSystemInterface is now part of QPA API. The correct
inclusion is:
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qwindowsysteminterface_p.h>
Bulk of the work was done by:
find . -type f | xargs sed -i -e 's,#include <\(QtGui/\)\?QWindowSystemInterface>,#include <qpa/qwindowsysteminterface.h>,g'
Change-Id: If75fc32611e72ef1cf58505794def375b1acf74a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
We cannot use QWidget::grab for widgets that have WA_PaintOnScreen set.
QScreen::grabWindow copies the real screen contents for us.
Change-Id: If1f6233ec48bcb2b941ea683c56ce71a39642e67
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Grabbing a widget with a position != (0,0) and an invalid size returned
a pixmap of the widget's size. As we're grabbing just a part of the
widget, the pixmap must be smaller by the amount of x, respective y.
Autotest: tst_QWidget::grab()
Change-Id: I3d5103e6e7c042cc6112038ace236e3f69060bda
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
The original commit message follows.
Fixes: Fix the windows PaintOnScreen issue once and for all
Details: To allow both the case where X11 people accidentally set
PaintOnScreen (which should not have any effect on windows)
and where people set it and subclass with paintEngine() {
return 0 } to use GDI / DirectX we do this rather nasty hack.
Original commit in Qt4: 07a2f68bd5869152471e4ffc4a63c683ef141ae8
Autotest: tst_QWidget::paintOnScreenPossible
Change-Id: Ifbb7dc4611959be3ecc362c29a1c3436b0e0fa82
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Postgres can report detailed information about an error using error codes.
See http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html .
The current driver doesn't report the error, nor is it supported by the
QSqlError object.
The patch appends the error to the error message, helping applications to:
- handle different errors in a specific way
- show correct, translated error messages, independently on the language of the postgres installation
Change-Id: Ica3530ac33d3aaa9985e06f6c1f302ece9891033
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
36547f4eff removed the _qpa from .h
files and promised to remove it from .cpp files at a later date.
Change-Id: I24a5c3796f6b07dd9a1931b699f3212d315edb12
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
On windows without ssl there was a disconnect on sslError signal
that was not wrapped in ifdef.
Change-Id: I9b1327adfa853d4dc8f1d8a0120f8f0ed7c13e9e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
qvector.h:459:30: warning: destination for this 'memcpy' call is a
pointer to dynamic class 'QImage';
vtable pointer will be overwritten [-Wdynamic-class-memaccess]
::memcpy(dst, srcBegin, (srcEnd - srcBegin) * sizeof(T));
~~~~~~~~ ^
qvector.h:459:30: note: explicitly cast the pointer to silence
this warning
::memcpy(dst, srcBegin, (srcEnd - srcBegin) * sizeof(T));
^
(void*)
QImage inherits from QPaintDevice, which has virtual functions.
qimage.h declares QImage as a movable type, so
QTypeInfo<QImage>::isStatic is false. Hence, the memcpy codepath will
be reached when the vector is not shared.
We should trust that people declaring such type traits know what
they're doing, so silence the warning.
Change-Id: If36582f57a398fc237fb4bd4f72938fb09667118
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As discussed on mailing list and QtCS 2012.
Any file starting with qwindowsystem is now marked as
QPA API.
This change drops _qpa from the filenames and adds gui-private
where required for the code to compile. This change is backward
compatible otherwise and compat headers are created for
the old inclusion headers.
Change-Id: I72ea0f394dee74f46e614fcf11ab5500ac9fef2a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
WinCE does not support SM_SWAPBUTTON, so the define will
let ce fail the function call and correctly assume normal mouse
button handling
Change-Id: Id603b3b6a995e22d8800e19a5566a56df95c8962
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Implemented as in other shared classes (e.g. QPen).
Change-Id: I5b96d4a4795870d6252aa53de6fbaedde7c0095a
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
The reqExp used to handle wildcards in the path was broken. So we
always searched the working directory and not the specified path.
Autotest where passing because of a hack used for Windows paths
where we removed the first two chars in the path string.
This fix will not use nativeSeparators thus removing the Windows hack
and fix the regExp to match wildcard chars.
Task-number: QTBUG-23573
Change-Id: I56fadbb67f25b8ce9c0f17cb6232e0bdb9148b1c
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
If a request is aborted while under load, the abort signal can be
queued in front of a signal emitted from the httpReply.
The abort slot is deleting the httpReply and setting it to null.
So when the queued slot is processed the httpReply is null and
caused an MMU fault.
Removed qWarning from existing null checks, as these are expected
if abort is called with precise timing so that it races with the
reply finishing on the socket.
Task-number: QTBUG-26245
Change-Id: I0a7e0223fda1bc01d117fe8a993c7f6e43fd72ff
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Richard J. Moore <rich@kde.org>
by using QVarLengthArray instead of allocating memory on a heap
and by skipping a subsequent checks & calls in some cases.
Change-Id: I300d8eaf02ef718ce50833b7c2ca7ebe8cfd0224
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
pkg-config returns glesv2 build flags, which are parsed into a few
variables. However, extra spaces get included in these variables and
quoted, which makes includes paths not work.
This problem can only be hit, if you do not have GL ES 2 headers
installed system-wide, but you do have installed into $prefix, and
pkg-config configured to return the configuration for $prefix. Even
though pkg-config returns correct paths, extra space gets included.
Fix it by parsing the strings returned by pkg-config just like a shell
would parse a command line. pkg-config escapes e.g. spaces, so those
escape sequences need to be interpreted, while doing word-splitting. The
result is a quoted list, as expected in the qmake files.
Done-with: Pekka Paalanen <ppaalanen@gmail.com>
Change-Id: I0593ef7e0606ac5ea80da046e45f86806206951a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Implemented as in other shared classes (e.g. QPen).
Special case:
QUrlQuery: document existing swap().
Change-Id: I4b36cc9577fbf2232d4b2a2d8822d26e41e22cad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Ideally, each TryGetFontTable() call sequence should be followed
by the call to ReleaseFontTable() with the context value
taken from the first TryGetFontTable() call,
otherwise we'll leak the buffer allocated for the font table.
Change-Id: I627bf0133b7f61798e82929723ccfb780ce9ee69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Don't hardcode the "qt_config" EXTRA variable and use QMAKE_PKGCONFIG_VARIABLES instead.
This allows qmake create the .pc files that are unrelated to Qt.
Change-Id: Ic72005e8819a15f6c50f3aaf79424a247fba20af
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
We only want to change the capitalization if the QScriptAnalysis flag
was Lowercase, Uppercase or SmallCaps.
Task-number: QTBUG-17485
Change-Id: Icbecb09b06a9153866ae81d592b3f6779c2dafb5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
They are still internal, but all Qt5 modules will be able to use
them then.
Change-Id: I42ab656115b0976ca959293dfd664ec071f35dbf
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This will allow tests of modules outside of qtbase to find their
CMake config files.
Change-Id: I68036908d0fd2ec640530b57d0f572d211ef44f0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Use a command line argument instead of an environment variable.
Change-Id: I518b21d1fb9567d182384885a308c76e108598d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This will make it possible (in Qt 6) to remove the enums listing
metatype ids. As it is constexpr, it can be used in switch statements
just like enums, as enum values, and as template specialization values.
Change-Id: I51293674c403714e34cb8a8b8953522fc97a740a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
After Mesa 3D OpenGL library deployment to Windows 7 machines the test
starts passing.
Task-number: QTBUG-25293
Change-Id: I228cd683359f3932670bfa6ec8c4f32e2b40144b
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This has been deprecated in Qt 4.8.0. Use X.files instead.
Task-number: QTBUG-3216
Task-number: QTBUG-25106
Change-Id: I581321591291118a13403e92da5997497e12c3fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
If the used font engine is of type QFontEngine::Multi, then we already have
both the "font engine runs" and the stripped glyph indicies for the kerning
-> just call the actual font engine's doKerning() method.
If the font engine is not of type QFontEngine::Multi, then we could safely
avoid the glyph indicies extra manipulations.
Change-Id: Ia8899e6d7beecfd391b050683ac41c21465336e4
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
The only complicated aspect to this was deferring EGLsurface
re-creation as a result of window geometry changes (e.g. when we
receive an orientation change event). To allow this to be done
in a controlled way we defer the surface manipulation until the
next call to QQnxGLContext::makeCurrent().
Change-Id: I8062d3e4d19220a822fbc3b8ca563bb1e3be09d0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
this meant that the common mkspec was unable to do 'sensible' things with the
cflags (hence -Wno-psabi not being applied to C++ code), and probably explains a
lot of other weird things.
Change-Id: I77079027dc1b2691c53212893eb90c7b935d00a2
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
The SXE feature was used with Qtopia but is long gone. Clean it up.
Change-Id: I55fba97b6382300ba63e94f3a6c415227f571e37
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
First, check that the option in question hasn't been already enabled
by the compiler, via compiler switches. If it has been, then we don't
need to verify anything, and we can assume that it's safe to use such
instructions. For example, on an x86-64 build, qCpuHasFeature(SSE2) is
always a constant true.
If the compile-time check fails, then we proceed to try and detect the
processor features at runtime. But instead of insisting on a call to
qDetectCPUFeatures, allow the code using the detection to read from a
variable and simply test it for values. Only if the variable isn't
initialised should it make a function call. The Q_ASSUME allows this
code to be very efficient even with multiple uses of qCpuHasFeature.
Change the uninitialised value from -1 to 0 so that simpler
instructions can be used to check for non-initialisation.
The qDetectCPUFeatures function is renamed to qDetectCpuFeatures to
match the Qt coding style and also to catch uses this code that need
to be adapted.
Change-Id: I24ca5a6ad21075e2e249e1a4f8f5057b8f68ce7c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously the test was skipped, because no OpenGL context was found.
After Mesa 3D OpenGL library distribution for Windows 7 machines,
OpenGL context is found, but the test crashes with exit code:
0xC0000409 (STATUS_STACK_BUFFER_OVERRUN)
Marking the test insignificant until the issue is resolved.
Task-number: QTBUG-26390
Change-Id: I996bbc3399704b541f5baa4832cf39b77b715c1c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
canConvert() and convert() use the metaobject to convert such types.
Change-Id: Ic05e74c5c2423b4b9682b88adc856a16dcba4cff
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
This will allow conversion between pointers to compatible QObject
derived types.
Change-Id: I19e08934571fb3f1b91e594892214041fe5f6a11
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
If the default settings already include the necessary flags, do not
override the compiler flags, possibly lowering support. This allows
the user to specify a higher setting for a Qt build, such as what
MeeGo did (it enabled SSSE3 support in all builds).
Additionally, this prevents us from passing -msse2 or -arch:SSE2
options to x86-64 builds, as SSE2 is a mandatory part of that
architecture. This silences a warning from MSVC that the option is
unknown in 64-bit builds.
Change-Id: I6e2969b672bcac87168c245b8be3309e8cc49224
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Now QWidget::show() will be the same as QWidget::showFullScreen() if the
style hint is set.
This is consistent with QQuickView now.
De-inline related methods to make it easier to change them later
without breaking compatibility.
Change-Id: I843ac6f846428217bfc5dc9f1d0a554de9d0c08f
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
we would ignore the early read variables and fail to export the super
cache's path to the project.
Change-Id: I3c467802b4af22f73be05b25dbd8ccb6196d28a8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Should be be reintroduced with intent if there is sufficient interest, outside of the QWS context.
Change-Id: I598f47b5cf0c10dd66534294d0f27cf0b4e5069a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>