4 years agoWinRT: Added socket engine implementation
Oliver Wolff [Thu, 13 Feb 2014 10:32:38 +0000 (11:32 +0100)]
WinRT: Added socket engine implementation

Added basic functionality to socket for WinRT. Even though not
all auto tests pass yet, this patch can be seen as a foundation
for upcoming work in this area. Reading from and writing to TCP
socket works and one can listen for tcp connections.

Change-Id: Id4c25ba1c7187ed92b6368c785c4f62837faded7
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
4 years agoWinRT: Exit process event loop if WaitForMoreEvents is not set
Oliver Wolff [Fri, 14 Feb 2014 15:01:34 +0000 (16:01 +0100)]
WinRT: Exit process event loop if WaitForMoreEvents is not set

Change-Id: Ic74a75a56ba3f014b108e96d7a79a8623e6fa1d1
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
4 years agoConsolidate StandardButton, ButtonRole and related static functions
Shawn Rutledge [Fri, 7 Feb 2014 13:04:37 +0000 (14:04 +0100)]
Consolidate StandardButton, ButtonRole and related static functions

Moving them into QPlatformDialogHelper for the convenience of both
widgets and QtQuick.Dialogs.  The main reason is to ensure that
QtQuick.Dialogs does not need to depend on the widgets module, in
order to re-implement the button box concept in a generic dialog.

Change-Id: If400d215338d7cb6dade39d9de60e50b5e7515ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoExtending the inputMethodQuery API
Paul Olav Tvete [Mon, 20 Jan 2014 11:30:35 +0000 (12:30 +0100)]
Extending the inputMethodQuery API

Currently, inputMethodQuery() only provides information about the
current paragraph. On some platforms, such as Android, the input method
needs information about the global cursor position, and more of the
surrounding text. Some queries need to pass parameters.

The current inputmethodQuery() implementation does not allow parameters to
be passed. Changing this would require new or modified virtual functions, which
is not possible until Qt 6. Therefore, a completely new mechanism is needed.

Change-Id: Ic64fd90198ade70aa0fa6fa5ad3867dfa7ed763c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoFix logging with dynamic GL on Windows
Laszlo Agocs [Fri, 14 Feb 2014 14:39:54 +0000 (15:39 +0100)]
Fix logging with dynamic GL on Windows

category() returns a const QLoggingCategory so our code does not
compile anymore. Do it differently.

Fix also the Windows error string formatting a bit.

Change-Id: Ie0b6b02947d94b7ccf4a4a57da487dfa8a15709d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoForce alignment for SSE2 to not crash with mingw
Konstantin Ritt [Wed, 12 Feb 2014 22:55:42 +0000 (00:55 +0200)]
Force alignment for SSE2 to not crash with mingw

Task-number: QTBUG-36807

Change-Id: I946f96f663a63e7102c86a8bbc728ad5bf48d839
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
4 years agoEnable QByteArrayList tests
Jędrzej Nowacki [Fri, 14 Feb 2014 14:03:30 +0000 (15:03 +0100)]
Enable QByteArrayList tests

Change-Id: Id7e0550e857bf4221f49d08539a0b5c70d8386d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoExtend the documentation for orientation in QScreen
Fabian Bumberger [Fri, 14 Feb 2014 11:03:52 +0000 (12:03 +0100)]
Extend the documentation for orientation in QScreen

I find the current description of primaryOrientation and orientation
a bit confusing.

Change-Id: I25d77cff2c27c481607903bc1aeb54eacf616718
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
4 years agoMigrate a recent QT_OPENGL_ES ifdef to dynamic GL
Laszlo Agocs [Fri, 14 Feb 2014 13:38:18 +0000 (14:38 +0100)]
Migrate a recent QT_OPENGL_ES ifdef to dynamic GL

Change-Id: I51581cf174d11db86030da8fe288d640ef81cb58
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
4 years agoiOS: correctly report Landscape or InvertedLandscape screen orientation.
Yoann Lopes [Thu, 6 Feb 2014 15:53:16 +0000 (16:53 +0100)]
iOS: correctly report Landscape or InvertedLandscape screen orientation.

The Qt documentation says that PortraitOrientation is rotated 90 degrees
clockwise relative to LandscapeOrientation. This means that the home
button should be on the right when held in LandscapeOrientation,
therefore, Qt::LandscapeOrientation == UIDeviceOrientationLandscapeLeft.

Without this patch, all QScreen mapping functions are broken.

Change-Id: I2c570cd0307b7fbd59c749d6574dcb258790cfbc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
4 years agoOpenGL: Fix QOpenGLTexture for cubemaps with mutable storage
Sean Harmer [Thu, 13 Feb 2014 16:39:30 +0000 (16:39 +0000)]
OpenGL: Fix QOpenGLTexture for cubemaps with mutable storage

The code was not creating all of the storage necessary for cubemaps
as well as attempting to bind to the cubemap face targets which is
invalid when using mutable storage - typically on OS X where
EXT_direct_state_access is not available and immutable storage is only
available at all if using an OpenGL 4.1 context.

Change-Id: I4cf84f1b88c90e8359366392b3ccda65669ebfa7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
4 years agoMac: FSEvents-based QFileSystemWatcherEngine.
Erik Verbruggen [Fri, 29 Nov 2013 11:55:59 +0000 (12:55 +0100)]
Mac: FSEvents-based QFileSystemWatcherEngine.

Use FSEvents to monitor changes in the filesystem instead of the kqueue
implementation. This removes the limit of wathed files: kqueue uses a
file descriptor for each file monitored, for which the ulimit was set by
default to 256. Now the OSX implementation on par with the other major
desktop platforms.

Change-Id: I2d46cca811978621989fd35201138df88a37c0fb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
4 years agoDynamic GL switch on Windows
Laszlo Agocs [Mon, 27 Jan 2014 13:45:11 +0000 (14:45 +0100)]
Dynamic GL switch on Windows

The patch introduces a new build configuration on Windows which
can be requested by passing -opengl dynamic to configure.

Platforms other than Windows (including WinRT) are not affected.
The existing Angle and desktop configurations are not affected.
These continue to function as before and Angle remains the default.

In the future, when all modules have added support for the dynamic
path, as described below, the default configuration could be changed
to be the dynamic one. This would allow providing a single set of
binaries in the official builds instead of the current two.

When requesting dynamic GL, Angle is built but QT_OPENGL_ES[_2] are
never defined. Instead, the code path that has traditionally been
desktop GL only becomes the dynamic path that has to do runtime
checks. Qt modules and applications are not linked to opengl32.dll or
libegl/glesv2.dll in this case. Instead, QtGui exports all necessary
egl/egl/gl functions which will, under the hood, forward all requests
to a dynamically loaded EGL/WGL/GL implementation.

Porting guide (better said, changes needed to prepare your code to
work with dynamic GL builds when the fallback to Angle is utilized):

1. In !QT_OPENGL_ES[_2] code branches use QOpenGLFunctions::isES() to
differentiate between desktop and ES where needed. Keep in mind that
it is the desktop GL header (plus qopenglext.h) that is included,
not the GLES one.

QtGui's proxy will handle some differences, for example calling
glClearDepth will route to glClearDepthf when needed. The built-in
eglGetProcAddress is able to retrieve pointers for standard GLES2
functions too so code resolving OpenGL 2 functions will function
in any case.

2. QT_CONFIG will contain "opengl" and "dynamicgl" in dynamic builds,
but never "angle" or "opengles2".

3. The preprocessor define QT_OPENGL_DYNAMIC is also available in
dynamic builds. The usage of this is strongly discouraged and should
not be needed anywhere except for QtGui and the platform plugin.

4. Code in need of the library handle can use

The decision on which library to load is currently based on a simple
test that creates a dummy window/context and tries to resolve an
OpenGL 2 function. If this fails, it goes for Angle. This seems to work
well on Win7 PCs for example that do not have proper graphics drivers
providing OpenGL installed but are D3D9 capable using the default drivers.

Setting QT_OPENGL to desktop or angle skips the test and forces
usage of the given GL. There are also two new application attributes
that could be used for the same purpose.

If Angle is requested but the libraries are not present, desktop is
tried. If desktop is requested, or if angle is requested but nothing
works, the EGL/WGL functions will still be callable but will return 0.
This conveniently means that eglInitialize() and such will report a failure.

Debug messages can be enabled by setting QT_OPENGLPROXY_DEBUG. This will
tell which implementation is chosen.

The textures example application is ported to OpenGL 2, the GL 1
code path is removed.

[ChangeLog][QtGui] Qt builds on Windows can now be configured for
dynamic loading of the OpenGL implementation. This can be requested
by passing -opengl dynamic to configure. In this mode no modules will
link to opengl32.dll or Angle's libegl/libglesv2. Instead, QtGui will
dynamically choose between desktop and Angle during the first GL/EGL/WGL
call. This allows deploying applications with a single set of Qt libraries
with the ability of transparently falling back to Angle in case the
opengl32.dll is not suitable, due to missing graphics drivers for example.

Task-number: QTBUG-36483
Change-Id: I716fdebbf60b355b7d9ef57d1e069eef366b4ab9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
4 years agoDon't ignore horizontal alignment for items with baseline alignments
Jan Arve Saether [Tue, 11 Feb 2014 12:22:16 +0000 (13:22 +0100)]
Don't ignore horizontal alignment for items with baseline alignments

Horizontal alignment were ignored when an item had baseline alignment

Change-Id: I2df526dc830952cdc26e1973d4787e9457c94edd
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
4 years agoFix QDateTime auto test
Bernd Weimer [Thu, 13 Feb 2014 11:19:10 +0000 (12:19 +0100)]
Fix QDateTime auto test

Conversion from UTC to local time will result in same datetime value,
if local time is in UTC.

Change-Id: Icd4ea57cb46cc97bcc8fce4f4e579bf64a4d4b10
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
4 years agoQNX: Add support for lgmon
Bernd Weimer [Wed, 29 Jan 2014 12:43:03 +0000 (13:43 +0100)]
QNX: Add support for lgmon

Added configure test, whether lgmon (liquid graphics performance monitor)
is available. The test is supposed to be positive only for internal
BlackBerry NDKs currently.
Added calls to initialize lgmon and to indicate when an app is ready for
user input.

Change-Id: I5cbc29fb38a86585dcebd14d462436deaa1998aa
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
4 years agoLet Q_DECLARE_LOGGING_CATEGORY and Q_LOGGING_CATEGORY return a const reference
Kai Koehne [Fri, 10 Jan 2014 14:42:19 +0000 (15:42 +0100)]

In general QLoggingCategory should be treated as a const object that's
configured by the backend. The only legitimate place where user code
should call setEnabled is in a CategoryFilter ...

[ChangeLog][QtCore][Logging] Make Q_LOGGING_CATEGORY
and Q_DECLARE_LOGGING_CATEGORY return a const object.

Change-Id: I6140442ab48286e05cd3b55064a502bbe6dfb16a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoQSimplex: API cleanup [1/3]: Rename an enum
Marc Mutz [Thu, 28 Nov 2013 20:10:37 +0000 (21:10 +0100)]
QSimplex: API cleanup [1/3]: Rename an enum

Enums should be named LikeThis, not likeThis, even in private API.

Change-Id: I197f9f888204a7c495364bd09357bfca24146560
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoQDBus: replace arg-chain with multi-arg
Marc Mutz [Wed, 29 Jan 2014 13:03:11 +0000 (14:03 +0100)]
QDBus: replace arg-chain with multi-arg

The arguments are all strings, so multi-arg is available without
other changes to the code. Even though insertion of a format placeholder
can be ruled out in the present case, multi-arg should be faster than
a 3-chain of arg() calls.

Change-Id: I8d030227e1bd30c56f1062a0c9dbbaae0143885f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoQDBus: avoid relocations
Marc Mutz [Tue, 1 Oct 2013 21:04:47 +0000 (23:04 +0200)]
QDBus: avoid relocations

Instead of using Q_STRINGTABLE, use a switch/if construct
to be able to share the string data for "write" and "readwrite".

Change-Id: Ia1c7b8a0f13a809372de2e5a956978dc2d569e92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoAdd function to get the actual PID from QProcess
Christian Strømme [Tue, 21 Jan 2014 13:54:27 +0000 (14:54 +0100)]
Add function to get the actual PID from QProcess

It was not possible to get the actual process ID (in a cross-platform
manner) from QProcess, as the user would need to handle the returned
typedef (Q_PID) differently on Unix and Windows.

On Unix Q_PID is the actual process ID, but on Windows it's a pointer
to a PROCESS_INFORMATION structure, which among other fields contains
the process ID. Instead of returning a pointer on Windows,
QProcess::processId() will return the actual process ID on both Windows
and Unix.

[ChangeLog][QtCore][QProcess] Added processId() to QProcess. This
function will, unlike pid(), return the actual process identifier on
both Window and Unix.

Task-number: QTBUG-26136
Change-Id: I853ab721297e2dd9cda006666144179a9e25b73d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoRemove "thread_local" support from the Intel Compiler
Thiago Macieira [Thu, 13 Feb 2014 05:58:39 +0000 (21:58 -0800)]
Remove "thread_local" support from the Intel Compiler

The docs said it supports the feature, but now that we've tried to use
it, we can't. It might have been referring to the non-C++11 extension
from GCC (__thread).

qlogging.cpp(1253): error #303: explicit type is missing ("int" assumed)
  static thread_local bool msgHandlerGrabbed = false;

Change-Id: I9343cf61bd3b2eacac686e602cc0ffea2d4a7a22
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
4 years agoCentralize the handling of all the toXxx (integral) functions
Thiago Macieira [Wed, 5 Feb 2014 00:39:44 +0000 (16:39 -0800)]
Centralize the handling of all the toXxx (integral) functions

By way of templates. This makes the code a lot cleaner.

Change-Id: Ie369561c7631b0d34d76a6852883716cc0aa89d4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoQLocalePrivate: merge removeGroupSeparators into numberToCLocale
Thiago Macieira [Tue, 4 Feb 2014 02:06:46 +0000 (18:06 -0800)]
QLocalePrivate: merge removeGroupSeparators into numberToCLocale

This version will parse the string only once and will not do any
memmove. This is more efficient.

Change-Id: I59026ad0fa61cc3f16146bdcd622fc54cbd8a321
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoQLocalePrivate: move the stringToXxx to QLocaleData
Thiago Macieira [Sun, 28 Apr 2013 01:18:10 +0000 (18:18 -0700)]
QLocalePrivate: move the stringToXxx to QLocaleData

Along with some more helper functions.

There are two more functions used in QIntValidator

Change-Id: I469ef40426cbb73ab515454bd5ecb12d944f5c0a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoQLocalePrivate: move the xxxToString functions to QLocaleData
Thiago Macieira [Fri, 26 Apr 2013 05:40:54 +0000 (22:40 -0700)]
QLocalePrivate: move the xxxToString functions to QLocaleData

Those functions do not need any of extra QLocale settings in
QLocalePrivate, so we can move them easily, along with their flags.

It's also very convenient that we can now bypass completely QLocale
when formatting numbers to strings.

Change-Id: I8cae64e8e2056a6b2d716758e4be79f746644732
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoMerge the pairs of stringTo{Double,LongLong,UnsLongLong}
Thiago Macieira [Tue, 4 Feb 2014 01:33:00 +0000 (17:33 -0800)]
Merge the pairs of stringTo{Double,LongLong,UnsLongLong}

The difference between them was simply whether they operated on QString
or QStringRef. So drop down to what's common between them: a pointer and
a length (or two pointers, but numberToCLocale already operates on a
pointer and a length).

Change-Id: Ie7c8955ac13d6023761e6d3bafe7ab04bd6984e1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoRemove duplicated trimming of a string
Thiago Macieira [Tue, 4 Feb 2014 01:18:11 +0000 (17:18 -0800)]
Remove duplicated trimming of a string

No need to do it in QLocalePrivate::xxxToDouble() because
numberToCLocale() already does it for us. Centralized code = better

Change-Id: Ifecf9119556d4465582212b5be773c18edd13563
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoiOS: only activate top-level windows
Richard Moe Gustavsen [Fri, 7 Feb 2014 11:41:13 +0000 (12:41 +0100)]
iOS: only activate top-level windows

From before we would activate all QWindows that the user
tapped on, or setVisible were called on. This is wrong
since a QWindow does not have to be a top-level window.
For a non-alien widget application this would mean that
we would send activation events for all widgets that the
user tapped on all the time.

With this patch we do some extra checking before we
tell a QWindow to activate.

Change-Id: I1afe97e5384c36c67fee0bbd070d880bba7528a1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
4 years agoiOS: activate window on touchesBegan
Richard Moe Gustavsen [Tue, 4 Feb 2014 13:53:15 +0000 (14:53 +0100)]
iOS: activate window on touchesBegan

We need to activate a window on touchesBegan instead of
touchesEnded. The reason we used to do this on touchesEnded was
to delay activating a window in case the user started e.g a
flick. But delaying the activation can cause problems if the app
activates a different window on press. We will then cancel
this out on release since we then raise the pressed window instead.
This is e.g typical when opening popups, and will cause focus to
not be restored properly when later closing the popup again.

Change-Id: I709b2f2e2633c9dc85c2761b0b176cd23c2f6b36
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
4 years agoiOS: don't store reference to focus object
Richard Moe Gustavsen [Fri, 7 Feb 2014 14:52:44 +0000 (15:52 +0100)]
iOS: don't store reference to focus object

Sometimes focus object is updated after we get a
callback that the cursor rectangle has changed. And
there is no reason to keep a local reference to it.
Since we also send events to the qApp->focusObject from
UIView_textInput, we now end up more consistent.

Change-Id: I3976175aae4e3f346be9bc5b771ac0fdefc03ae6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
4 years agoAdd a CSV logging feature to the benchlib
Thiago Macieira [Fri, 20 Dec 2013 19:14:04 +0000 (11:14 -0800)]
Add a CSV logging feature to the benchlib

This is only useful for logging benchmarks, since it won't print test
passes, failures, etc. It's useful for importing to spreadsheets to do

[ChangeLog][QtTest]Added a CSV logging mode that is suitable for
importing benchmark results into spreadsheets. This can be enabled by
the -csv option on the command-line. The CSV logging mode will not print
test failures, debug messages, warnings, etc.

Change-Id: I245d6f86bb380645c9bc0d748cf474b3ed42cab8
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
4 years agoAndroid: Add Foreign Window support
Christian Strømme [Tue, 4 Feb 2014 10:30:00 +0000 (11:30 +0100)]
Android: Add Foreign Window support

Change-Id: Ie41edd3f17214805673311a375191cd93d2378f6
Reviewed-by: BogDan Vatra <bogdan@kde.org>
4 years agoAndroid: Fix return value in createSurface()
Christian Strømme [Thu, 13 Feb 2014 11:02:23 +0000 (12:02 +0100)]
Android: Fix return value in createSurface()

When the function fails it should return -1

Change-Id: I132a1521897295e6e232126ca51e30d2e32656c8
Reviewed-by: BogDan Vatra <bogdan@kde.org>
4 years agoClose widgets properly from session management.
Friedemann Kleint [Tue, 11 Feb 2014 12:00:59 +0000 (13:00 +0100)]
Close widgets properly from session management.

Introduce new virtual QGuiApplicationPrivate::tryCloseAllWindows()
which allows overriding the behavior in QApplication to properly close
the widgets first.

Without this, QGuiApplication closes the widget windows leaving a stale
window handle behind in the associated QWidget which then causes the
application not to terminate since QApplication::shouldQuit() stills
finds the affected widgets to be visible.

Task-number: QTBUG-35986

Change-Id: I19ac4b5a19250ee68d09e461c03dbace458c98e4
Reviewed-by: David Faure <david.faure@kdab.com>
4 years agoQOpenGLWidget and new-style compositing on eglfs
Laszlo Agocs [Tue, 11 Feb 2014 13:59:30 +0000 (14:59 +0100)]
QOpenGLWidget and new-style compositing on eglfs

Integrate with QOpenGLTextureBlitter, QOpenGLWidget and friends.

Change-Id: Ic2867b713a21a3d2820d546174fc9164b3dd220c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
4 years agoExpose QPlatformWindow::invalidateSurface as a virtual function.
Gunnar Sletta [Tue, 11 Feb 2014 10:45:58 +0000 (11:45 +0100)]
Expose QPlatformWindow::invalidateSurface as a virtual function.

This can be quite useful on some embedded systems to free up
graphics memory when windows are not used. QEglFSWindow already
implements the function.

Change-Id: I79b08efbd3c67d7be34df6a0e12dd184a92d48c5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
4 years agoWindows: Destroy tablet support before unregistering window classes.
Friedemann Kleint [Wed, 12 Feb 2014 14:45:38 +0000 (15:45 +0100)]
Windows: Destroy tablet support before unregistering window classes.

Silences warnings in tests that instantiate QGuiApplication multiple

QSYSTEM: tst_QGuiApplication::removePostedEvents() QApplication::regClass: Registering window class 'TabletDummyWindow' failed. (Class already exists.)
QSYSTEM: tst_QGuiApplication::removePostedEvents() UnregisterClass failed for 'TabletDummyWindow' (Class still has open windows.)

Change-Id: I6af2d38a2debd35f4dc0d48c09244dff022bd6b8
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
4 years agoUpdate HarfBuzz-NG path on Mac
Konstantin Ritt [Wed, 12 Feb 2014 20:41:43 +0000 (22:41 +0200)]
Update HarfBuzz-NG path on Mac

84be1bd4d3ed8d2d9e65301649bc841ea4197fe2 has changed the stored data type
from QFontEngine to QFontEngine::FaceData. Update the implementation
and revert changing the y_scale sign on non-Mac
(aka fix-up 2d576f79f748ca4c9bb54634f0fd44fa207a2248).

Change-Id: I4180257bc8f610fb014fd2a2ad6f8fdceece2f13
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoForce alignment for SSE2 to not crash with mingw
Konstantin Ritt [Wed, 12 Feb 2014 21:59:17 +0000 (23:59 +0200)]
Force alignment for SSE2 to not crash with mingw

Make sure that stacks are properly aligned by replacing CALLBACK with
QT_WIN_CALLBACK so that we don't crash in SSE2 code.

Task-number: QTBUG-36807

Change-Id: I6952d0f252c7b8e481c48521ed1377b7d7510e15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Konstantin Ritt [Thu, 13 Feb 2014 08:35:08 +0000 (09:35 +0100)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

4 years agoHTTP internals: introduce protocol handlers
Peter Hartmann [Tue, 21 Jan 2014 15:28:01 +0000 (16:28 +0100)]
HTTP internals: introduce protocol handlers

... to defer the decision which protocol will be used on a specific
channel. This is to allow using the SPDY protocol instead of HTTP (to
be implemented in a later commit); which protocol will be used can
only be decided after the SSL handshake.

Change-Id: I6b538320668fe4994438f0095ecdc445677cf0a6
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
4 years agoHTTP internals: move some methods inside HTTP request class
Peter Hartmann [Wed, 22 Jan 2014 16:51:43 +0000 (17:51 +0100)]
HTTP internals: move some methods inside HTTP request class

... from the private to the public class, because we need to access
these methods from other classes.

Change-Id: I2c5ea84e0f5d3641c1dc02342348f1022d886249
Reviewed-by: Richard J. Moore <rich@kde.org>
4 years agonew QByteArrayList class
Glen Mabey [Wed, 10 Jul 2013 02:27:22 +0000 (21:27 -0500)]
new QByteArrayList class

Initial submission of a new class QByteArrayList with the
purpose of aggregating and then joining QByteArray instances.

[ChangeLog][QtCore] Added new QByteArrayList class.

Change-Id: I2a9dc71ff7aadb19ebc129a0d47ac8cd33895924
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoWinRT: move most of GUI event dispatcher logic into core
Andrew Knight [Mon, 10 Feb 2014 08:11:18 +0000 (10:11 +0200)]
WinRT: move most of GUI event dispatcher logic into core

The native event dispatcher is responsible for delivering callbacks
to non-GUI handlers, such as network socket listeners. So, the non-GUI
logic is moved into the core dispatcher so that the event loop works
better for apps (and test cases) which use QCoreApplication.

Change-Id: Ic5f7d939cf164198fd39aa5880e265ae560b39b4
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
4 years agoFix crash in MinGW when initializing font database
Kai Koehne [Wed, 12 Feb 2014 15:38:51 +0000 (16:38 +0100)]
Fix crash in MinGW when initializing font database

Make sure that stacks are properly aligned so that we don't crash in
SSE2 code (as used in QString).

Task-number: QTBUG-36807
Change-Id: I765c1972fbb0a4b0c2dc5e4465e1d19e00b3322b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoUse QtPrivate::is_integral instead of listing each integer type
Thiago Macieira [Tue, 11 Feb 2014 23:00:36 +0000 (15:00 -0800)]
Use QtPrivate::is_integral instead of listing each integer type

This changes the code added by 0e4d94edd0caac9d2378a00a0aa961a0be3ad796
by removing the Q_INTEGRAL_TYPE enum value and instead relying on our
private copy of typetraits.

Change-Id: Icb6c814a36125de0d712421b97e11e8abc0f7416
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
4 years agoAndroid: default palette taken from the Holo Light theme
Shawn Rutledge [Fri, 17 Jan 2014 14:00:07 +0000 (15:00 +0100)]
Android: default palette taken from the Holo Light theme

Currently QAndroidPlatformTheme::palette has been returning null so
the default colors came from elsewhere.  Now they will default to
colors taken from the Holo Light theme to the extent possible.

Change-Id: I022c5ef679d9d0dcb76721a4d520492bc8a6f4cf
Reviewed-by: BogDan Vatra <bogdan@kde.org>
4 years agoOptimize qt_memfill32 a little
Thiago Macieira [Mon, 3 Feb 2014 00:23:00 +0000 (16:23 -0800)]
Optimize qt_memfill32 a little

Benchmarking shows it took up to 3.5% of Qt Creator's initialization
cost. Optimize by modifying only one variable per loop: instead of
updating n and dst128, we only update one variable at a time.

Removing the Duff's Device also improves the code, since the compiler
won't try to update dst128 four times per loop, only once.

The moving of the epilogue close to the prologue was just to make the
code a little cleaner.

Change-Id: I5b74e27d520ca821f380aef0533c244805f003b7
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
4 years agoDeprecate {QCoreApp,QAbstractEventDispatcher}::hasPendingEvents()
Thiago Macieira [Mon, 3 Feb 2014 23:37:42 +0000 (15:37 -0800)]
Deprecate {QCoreApp,QAbstractEventDispatcher}::hasPendingEvents()

This function has a flawed design. It was flawed when it was added in
Qt 3.0.

A "false" return value is racy: any other thread running may post events
to the current thread, thus making the result stale. That includes Qt
starts for its own purposes when it comes to the main thread, like the
Scene Graph thread, the QProcessManager thread, the Windows
QAdoptedThread watcher thread, the Windows pipe writer thread, etc.

A "true" return is stable only if the selected thread is stopped, which
includes selecting the current thread (the case of QCoreApplication).
For that reason, this method should not be public, but a protected one
so that a public static could call it. But even that would not solve the
race condition from the previous paragraph (hence why
QCoreApplication::hasPendingEvents being deprecated too).

And, to top all of that off, all but one of the implementations access
the GUI thread's event loop counter in a non-thread-safe manner. I've
changed the documentation to restrict to the only currently-working use-

[ChangeLog][QtCore][Event loop] QCoreApplication::hasPendingEvents and
QAbstractEventDispatcher::hasPendingEvents are now deprecated. Please
refer to the documentation for more information.

Task-number: QTBUG-36611
Change-Id: Iac61f307e9672839944ae2f75abb1aea30c419f6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
4 years agoRespect the DontUseNativeDialog option for QColorDialog
Andy Shaw [Tue, 11 Feb 2014 22:08:48 +0000 (23:08 +0100)]
Respect the DontUseNativeDialog option for QColorDialog

By reimplementing canBeNativeDialog() we ensure it is only shown
natively if the circumstances are correct. The change was modelled on
how QFileDialog implements the same checks.

Change-Id: If58e33d6d0547e95975d7c0453901fa592eb96a0
[ChangeLog][QtWidgets][QColorDialog] Ensured
QColorDialog::DontUseNativeDialog is respected when showing the dialog.
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoMove setWindowIcon() up to QGuiApplication.
David Faure [Sat, 1 Feb 2014 13:17:51 +0000 (14:17 +0100)]
Move setWindowIcon() up to QGuiApplication.

[ChangeLog][QtGui][QWindow]QWindow::icon() now defaults to the application
icon, which can be set with QGuiApplication::setWindowIcon().

Change-Id: Id1974e5cda81775e515c14b294f67fb99351c6c9
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
4 years agoRestore support for -title command line argument on X11, add -qwindowtitle.
David Faure [Thu, 30 Jan 2014 20:59:41 +0000 (21:59 +0100)]
Restore support for -title command line argument on X11, add -qwindowtitle.

-title disappeared between Qt4 and Qt5, due to all the refactorings around QPA.
Making the caption of the mainwindow configurable allows custom setups
for specific users or use cases.

[ChangeLog][QtGui][QGuiApplication] Restore support for -title command line
argument on X11, add -qwindowtitle on all platforms.

Change-Id: I73e6bf21248f3419178eba583b257172a175e74e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
4 years agoEnabling QQuickWidget and QOpenGLWidget
Paul Olav Tvete [Wed, 18 Dec 2013 13:48:22 +0000 (14:48 +0100)]
Enabling QQuickWidget and QOpenGLWidget

Enable child widgets (without a native window) that render to an FBO
and are composed with the raster backingstore by the platform plugin.
A preliminary version of QOpenGLWidget is included as private API.

Change-Id: I8f984a4d7db285069ce3d6564707942c823d890d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
4 years agoAdded function returning build information to QLibraryInfo.
Friedemann Kleint [Thu, 6 Feb 2014 15:16:07 +0000 (16:16 +0100)]
Added function returning build information to QLibraryInfo.

Useful for bug reports and test logs.

[ChangeLog][QtCore] QLibraryInfo provides information on how
Qt was built.

Change-Id: I867197fd7d2e10bcdf01a8eb47c9c1e03647e2c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoCheck whether exposed widget is mapped in QWidgetBackingStore::sync(QWidget*).
Friedemann Kleint [Tue, 26 Nov 2013 10:09:42 +0000 (12:09 +0200)]
Check whether exposed widget is mapped in QWidgetBackingStore::sync(QWidget*).

Qt::WA_Mapped corresponds to 'exposed' in Qt 5, hence a parent window
fully obscured by its children may not have the attribute set.
In that case, go by the attribute of the child widget.

Task-number: QTBUG-33520

Change-Id: Ia08f283172daaa58f58e5636004461b2c48784f7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
4 years agoCocoa: Bring back two-class native window system
Gabriel de Dietrich [Wed, 12 Feb 2014 10:51:13 +0000 (11:51 +0100)]
Cocoa: Bring back two-class native window system

While inheriting from NSPanel proved to be robust enough, it is
not really future proof as we're at the mercy of Apple changing
NSPanel's behavior. On the other hand, we can't inherit exclu-
sively from NSWindow as the tool window case, where the QWindow
should look like an NSPanel, can't be emulated perfectly without
using private APIs.

This reverts commits 79fb39a87ce5ffbda and df86721bb4028ae.

Change-Id: I9021193e3614633a943578df9e2794b00094a1f7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
4 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Wed, 12 Feb 2014 15:28:07 +0000 (16:28 +0100)]
Merge remote-tracking branch 'origin/stable' into dev


Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444

4 years agoImplement native message box for WinRT
Maurice Kalinowski [Tue, 11 Feb 2014 21:54:19 +0000 (23:54 +0200)]
Implement native message box for WinRT

Added a basic theme class, which creates accessors for the
QPlatformMessageDialogHelper. This handles creation of the
native dialog, but also spawning an event loop around it.

There are some limitations shared with the Android implementation.
First you cannot create custom labelled buttons and also selecting
the default button is not possible. This will be added at a later

Note that Windows Phone is not supported.

Change-Id: I2dec83dcded7919835a6dcdf8dc2a56282024a7e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
4 years agoDisable disabling exceptions with ICC
Thiago Macieira [Tue, 11 Feb 2014 19:19:32 +0000 (11:19 -0800)]
Disable disabling exceptions with ICC

There's a bug found in ICC 14.0 that causes the compiler to assert when
compiling QtDeclarative. Let's leave this here until at least one year
after the fix is released.

Intel task: DPD200253124
Task-number: QTBUG-36577
Change-Id: I76d4b41da7e60397dac65862a3a6ec024b840744
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agoCorrect the documentation of the return types of subjectInfo and issuerInfo.
Richard J. Moore [Sun, 9 Feb 2014 17:52:22 +0000 (17:52 +0000)]
Correct the documentation of the return types of subjectInfo and issuerInfo.

These functions now return a QStringList to reflect the possibility of
there being more than one entry of a given type, but the documentation
did not reflect this.

Task-Number: QTBUG-36304
Change-Id: Iba2eda5e2c3174c8dcea640b5aed9cdc9a432392
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
4 years agoFix build with QT_NO_GRAPHICSEFFECT
Sérgio Martins [Sat, 8 Feb 2014 00:11:56 +0000 (00:11 +0000)]

Change-Id: Iadc78c270f541067dbbebcf77748077cc3a8be13
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
4 years agoMake QToolButtonPrivate::popupTimerDone() more robust
J-P Nurmi [Wed, 5 Feb 2014 10:48:51 +0000 (11:48 +0100)]
Make QToolButtonPrivate::popupTimerDone() more robust

Avoid dereferencing the q-pointer if the button has been
destructed meanwhile popup was open.

Task-number: QTBUG-26956
Change-Id: I68190e9fe84c669229ae0ce4d573ee7a02a8a141
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
4 years agoWindows: Fix potential crash in font database when family name is empty.
Friedemann Kleint [Mon, 10 Feb 2014 14:24:55 +0000 (15:24 +0100)]
Windows: Fix potential crash in font database when family name is empty.

Task-number: QTBUG-36651

Change-Id: Icd3edc7dbed3e692b32374b0ab6251e7f939589d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoWindows: Restore maximized/full screen widgets to correct screen.
Friedemann Kleint [Fri, 7 Feb 2014 09:27:56 +0000 (10:27 +0100)]
Windows: Restore maximized/full screen widgets to correct screen.

Partially revert 54865d47cfd859a0e84ba8e1bbff3b56c93d4e0d and
bring back parts from abba37cd0eff959edf2d011842cbf2b36cce8467 which
failed some tests on other platforms and never made it in.

Avoid setting a geometry on maximized windows since that leaves
them in a broken state. Instead, if there is a need to restore
maximized windows to a different screen, clear the maximized flag
before applying the geometry.

[ChangeLog][QWidget][Windows] QWidget::restoreGeometry() now restores
maximized/full screen widgets to the correct screen.

Task-number: QTBUG-21371
Task-number: QTBUG-4397

Change-Id: Ibd5b736e921f20d4b7365c06c6f9c5dd4469c781
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
4 years agoConfigure: Disable widgets module too if gui module is disabled
Kai Koehne [Mon, 10 Feb 2014 09:01:58 +0000 (10:01 +0100)]
Configure: Disable widgets module too if gui module is disabled

Use the same logic as in the Unix configure script, and disable
"widgets" if "gui" is disabled.

Change-Id: Ica338ad10b965eea297dddaaedeea61a3ae3ebe9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoAllow configuration of logging rules from file system
Kai Koehne [Tue, 4 Feb 2014 15:35:26 +0000 (16:35 +0100)]
Allow configuration of logging rules from file system

Allow configuration of logging rules from outside of the application,
either through a configuration file (.config/QtProject/qtlogging.ini),
or through a file specified by a QT_LOGGING_CONF environment

The logging rules from the different sources are concatenated: First
the rules from QtProject/qtlogging.ini are applied, then
QLoggingCategory::setLoggingRules(), finally from the environment.
This allows an application to overwrite/augment the system wide rules,
and in turn that can be tailored for a specific run by setting a
configuration in the environment variable.

[ChangeLog][QtCore][Logging] The logging framework can now be configured
with an .ini file.

Change-Id: I442efde1b7e0a2ebe135c6f6e0a4b656483fe4b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoFix warning with QT_NO_GRAPHICSVIEW
Sérgio Martins [Sat, 8 Feb 2014 16:58:02 +0000 (16:58 +0000)]
Fix warning with QT_NO_GRAPHICSVIEW

Change-Id: I96064f0db359fbf5c615e48633398b79872e0bc5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
4 years agoFix build with QT_NO_GRAPHICSVIEW
Sérgio Martins [Sat, 8 Feb 2014 00:11:56 +0000 (00:11 +0000)]

Change-Id: I81cfed124a2e9e1c46c966c4819e89df5abd4f74
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
4 years agoWidgets: update widget transform upon receiving QEvent::FocusIn
Richard Moe Gustavsen [Fri, 7 Feb 2014 13:43:37 +0000 (14:43 +0100)]
Widgets: update widget transform upon receiving QEvent::FocusIn

QWidgetPrivate::updateWidgetTransform will only update the
transform if the widget is the current focus object.
But if someone calls QApplication::setActiveWindow, Qt will
call QWindow::requestActivate and then send focus
in/out events, all in the same event loop recursion.

The problem now is that requestActivate is not guaranteed to be
synchronous (it's not on iOS). So the window activation
(together with updating the focus object) will still be pending
when the widget receives the focus-in event. As such, the
transform update will also fail.

This patch will give the event as input to the function, so
that we don't depend on window activation being synchronous.

This will fix IM spell checking popups on iOS to show at the
correct place, also after closing font popups etc.

Change-Id: If0ee70f55692bbd613821b126923364e39ed1199
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoWinRT qmake vcproj: Fix icon locator
Andrew Knight [Tue, 11 Feb 2014 12:55:43 +0000 (14:55 +0200)]
WinRT qmake vcproj: Fix icon locator

This was broken for shadow builds. Adding the output directory to the
manifest file name fixes the problem.

Change-Id: I9e5b47a08f80f7afcfd76e13784fbaec912e50ad
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoPromote the scrollbar style animation to qstyleanimation_p.h
J-P Nurmi [Wed, 18 Dec 2013 15:37:17 +0000 (16:37 +0100)]
Promote the scrollbar style animation to qstyleanimation_p.h

Makes it possible for QFusionStyle to utilize the same animation.

Change-Id: Ifac9eaa3138cf1068439d5b0271a2acce54a3c16
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
4 years agoCleanup TSLib plugin
Samuel Gaist [Mon, 10 Feb 2014 10:00:00 +0000 (11:00 +0100)]
Cleanup TSLib plugin

This patch cleans up the coding style and includes

Change-Id: I710d4a60795e9975d4f8ee79599018e05d85debe
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
4 years agoAccessibility Linux: Report Active state
Frederik Gladhorn [Fri, 7 Feb 2014 16:55:08 +0000 (17:55 +0100)]
Accessibility Linux: Report Active state

The fixme comment is invalid since QAccessibleWidget actually checks for
isWindow and sets the active state.
This is messed up because in Qt 4 there was a work-around to set active
for windows in a different code path.

[ChangeLog][QtGui] Accessibility on Linux now reports the active state

Change-Id: I9e2cf436b3ffa7ef28286ee49d6e582f179930c6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
4 years agonetwork tests: do not rely on external servers
Peter Hartmann [Fri, 7 Feb 2014 14:06:53 +0000 (15:06 +0100)]
network tests: do not rely on external servers

They cause test failures from time to time.

Change-Id: I917bef340401d25bf54e133be9d9562b3b133c9f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
4 years agoEnable categorized logging for bootstrapped tools
Kai Koehne [Thu, 6 Feb 2014 09:43:06 +0000 (10:43 +0100)]
Enable categorized logging for bootstrapped tools

Change-Id: Ie908a175bda103fd8d73031024a823a4c4d3dbb7
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
4 years agoSSL: add support for the Next Protocol Negotiation extension
Peter Hartmann [Wed, 28 Aug 2013 08:56:24 +0000 (10:56 +0200)]
SSL: add support for the Next Protocol Negotiation extension

... which is needed to negotiate the SPDY protocol.

[ChangeLog][QtNetwork][QSslConfiguration] Added support for the Next
Protocol Negotiation (NPN) TLS extension.

Task-number: QTBUG-33208

Change-Id: I3c945f9b7e2d2ffb0814bfdd3e87de1dae6c20ef
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
4 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Frederik Gladhorn [Tue, 11 Feb 2014 14:12:00 +0000 (15:12 +0100)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

4 years agokms: Adapt to initialize() pattern
Laszlo Agocs [Tue, 11 Feb 2014 10:46:14 +0000 (11:46 +0100)]
kms: Adapt to initialize() pattern

Right now socket notifiers are attempted to be created before having
the event dispatcher up. This is wrong.

Change-Id: Ica3034b9fa790c037f28982db23c71342f6597d7
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
4 years agoqmake: Provide feature for windeployqt
Andrew Knight [Tue, 11 Feb 2014 11:49:18 +0000 (13:49 +0200)]
qmake: Provide feature for windeployqt

windeployqt is a tool that aids in the deployment of Qt libraries and
other files on Windows. This feature (CONFIG+=windeployqt) adds
automatic invocation of windeployqt for qmake projects as a post-link
action. For Visual Studio projects, windeployqt is added as a custom
target which runs after linking, automatically adding the output as
deployment items.

Task-number: QTBUG-35630

Change-Id: I4cdcb1a7f70cedccb4a4e17be5eb9f5de35a4d66
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoDoc: Fix issues with QOpenGLTexture enumerations
Topi Reinio [Tue, 14 Jan 2014 11:48:10 +0000 (12:48 +0100)]
Doc: Fix issues with QOpenGLTexture enumerations

Use correct parameters for \enum commands, and add documentation
for QOpenGLTexture::Filter enumeration.

Task-number: QTBUG-35576
Change-Id: If7099da0b2b570c28e683126f0ba3a885d80f741
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
4 years agosupport c'tor as second parameter in foreach macro
Joerg Bornemann [Mon, 10 Feb 2014 16:11:08 +0000 (17:11 +0100)]
support c'tor as second parameter in foreach macro

Passing a constructor as second argument to foreach didn't work when
building with gcc.
For MSVC this already worked as a different foreach implementation is

Change-Id: Id98444c699b4cebc14ea62076c5f7cba33ffb824
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
4 years agoDocument `moc -f<...>` behavior change in Qt-5.2.0
David Faure [Fri, 7 Feb 2014 13:42:05 +0000 (14:42 +0100)]
Document `moc -f<...>` behavior change in Qt-5.2.0

Better late than never :)
Task-number: QTBUG-33749

Change-Id: I5035255e66a56754b609441f5b81ab119565a7cb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
4 years agoDoc: Adjust QDir::tempPath docu as recommended by Ossi.
David Faure [Mon, 10 Feb 2014 13:16:16 +0000 (14:16 +0100)]
Doc: Adjust QDir::tempPath docu as recommended by Ossi.

Change-Id: I709d8ce8151f2bb480865067a3e80ed838b26e4a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoFix out-of-tree compilation of widget examples
Kai Koehne [Mon, 10 Feb 2014 10:53:46 +0000 (11:53 +0100)]
Fix out-of-tree compilation of widget examples

'styles' are only defined in the qt build internals, when the
examples are compiled inside a configured Qt source. That's not
the case for the examples e.g. in the Qt SDK.

(windows is a default style on all platforms, anyway. So I
think the check is superfluous in the first place.)

Task-number: QTBUG-36655
Change-Id: I7114619efd479408dad99c8514f8e33ddcab7c7c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
4 years agoMinor optimization for QTextEngine::shapeText()
Konstantin Ritt [Sun, 9 Feb 2014 04:37:51 +0000 (06:37 +0200)]
Minor optimization for QTextEngine::shapeText()

Remember the engine index for each sub-item and avoid moveGlyphData()
where possible (ie. when there are no glyph indexes to care about).
Also don't memmove data we didn't ever initialize.

Change-Id: Ib8e5fd937a10e4e3c8c0e18961a2e2c1a4167924
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoFix log_clusters calculation in HarfBuzz-NG code path
Konstantin Ritt [Sat, 8 Feb 2014 22:46:40 +0000 (00:46 +0200)]
Fix log_clusters calculation in HarfBuzz-NG code path

The old code wasn't good enough to catch all the glyph (de)composition cases,
thus leading to an assertion in QTextLayout's addNextCluster() helper.

The new code catches all the corner cases and introduces somewhat
better performance to the HB-NG shaper backend.

Change-Id: I5b6c673395a4a039dc55b200abbf74b0ba5d0829
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoFix drawing vertical gradients in RGBA8888 formats
Allan Sandfeld Jensen [Fri, 7 Feb 2014 13:38:47 +0000 (14:38 +0100)]
Fix drawing vertical gradients in RGBA8888 formats

The RGBA8888 formats was incorrectly using the qt_gradient_quint32
which is argb specific. This caused vertical gradients but only
vertical gradients to be drawn incorrectly.

This changes the RGBA8888 formats formats to use the generic gradient
method and renames qt_gradient_quint32 to qt_gradient_argb32 to
indicate its limitation.

Change-Id: Ia1cd48ca7f4f78b64f31d6263e81cd8ac3b0954e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
4 years agoFix compilation when including files created in shadow dirs
Thiago Macieira [Sun, 2 Feb 2014 01:26:33 +0000 (17:26 -0800)]
Fix compilation when including files created in shadow dirs

For normal #includes, moc simply ignores the missing file, but it could
generate problems later. It's a problem when the file being sought is
the FILE from plugin metadata. A very good example of this is Qt

coreplugin.h:49: Error: Plugin Metadata file "Core.json" does not exist.

Change-Id: I16af04b477f52c6bd53c14147ec777b358dfdf50
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoWindows: Fix return value of WM_QUERYENDSESSION.
Friedemann Kleint [Mon, 10 Feb 2014 16:54:44 +0000 (17:54 +0100)]
Windows: Fix return value of WM_QUERYENDSESSION.

LRESULT should be non-zero if the application can quit,
and it is always handled.

Task-number: QTBUG-35986

Change-Id: Ic8b0ecc731d3efaf94e2a62491918d379fe59f5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoPrint qCDebugs in arbitrary categories by default
Giorgos Tsiapaliokas [Fri, 29 Nov 2013 13:21:03 +0000 (15:21 +0200)]
Print qCDebugs in arbitrary categories by default

The debug output of all categories will be visible by default,
except from the "qt.*" categories. "qt.*" categories are private
and their default debug output will be hidden.

[ChangeLog][QtCore][Logging] Enable qCDebug's for all categories except qt one's

Change-Id: Ibe147c8bbe0835a63b3de782288b9c3251321d8f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
4 years agoFix assert when converting RGBx8888 to ARGB32_PM
Allan Sandfeld Jensen [Fri, 7 Feb 2014 13:35:04 +0000 (14:35 +0100)]
Fix assert when converting RGBx8888 to ARGB32_PM

RGBx8888 to ARGB32_PM is incorrectly using the RGBA8888 to ARGB32_PM
which asserts the input format is RGBA8888. Since the routine also
performs an unnecessy premul, we should be using a the generic rgba2argb

Change-Id: I7b67328f804f5f2a9664a35c04836679e8c8b8e5
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
4 years agoMake QUrl::isLocalFile fast by storing a flag
Thiago Macieira [Wed, 15 Jan 2014 22:45:44 +0000 (14:45 -0800)]
Make QUrl::isLocalFile fast by storing a flag

The XDG specification for file URIs requires us to use triple slashes in
file:/// for URLs with absolute paths. I don't like special-casing any
particular scheme, but we've done it for file for many years now.

Since we need to test this situation in a couple of places, it's easier
to just cache the result once, in setScheme (both functions).

Change-Id: I078b45b5b6c861f4caee082b4730fd6f67684ae4
Reviewed-by: David Faure <david.faure@kdab.com>
4 years agoCocoa: Add setNSToolbar(QWindow *, NSToolBar *)
Morten Johan Sørvig [Mon, 20 Jan 2014 11:08:49 +0000 (12:08 +0100)]
Cocoa: Add setNSToolbar(QWindow *, NSToolBar *)

Calling this function associates the given native
toolbar with the QWindow. QWindow will then set
it on the native NSWindow at the appropriate time
during window creation.

Change-Id: I2a50f79b2a0453cc739f8d68e965e37b95998083
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
4 years agoCocoa: Neuter -[QNSView cancelOperation:] for normal windows
Gabriel de Dietrich [Fri, 7 Feb 2014 13:16:22 +0000 (14:16 +0100)]
Cocoa: Neuter -[QNSView cancelOperation:] for normal windows

QNSWindow inherits QNSPanel regardless of the kind of QWindow. With
NSPanels, pressing escape is equivalent to dismissing the panel.
That is not the behavior we aim at for normal toplevel QWindows.

Task-number: QTBUG-36694
Change-Id: I1a1c138183cc43c968249442021f334cd37f7ce0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
4 years agoExport optimized premultiply and unpremultiply methods
Allan Sandfeld Jensen [Wed, 29 Jan 2014 10:41:31 +0000 (11:41 +0100)]
Export optimized premultiply and unpremultiply methods

This patch optimizes the unpremultiply method further by using a
lookup table to avoid any divisions at all.

The opportunity is taken to export both premultiply and unpremultiply
since they are commonly used methods relevant to the exported QRgb type
that can be both premultiplied and unpremultipled ARGB.

[ChangeLog][QtGui][QColor] Exported highly optimized methods for
premultiply and unpremultiply of QRgb values.

Change-Id: I658bcf57b0bc73c34c1765b64617d43b63ae820b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
4 years agoWinRT: Fix use of std::thread in QThread
Andrew Knight [Wed, 5 Feb 2014 14:50:44 +0000 (16:50 +0200)]
WinRT: Fix use of std::thread in QThread

Don't delete the thread object without detaching it, use detach()
instead of CloseHandle(), and avoid a double-delete.

Change-Id: Ia169a96fb32805e06abe099c3c35e97ce485f088
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
4 years agoQOpenGLTextureBlitter
Jorgen Lind [Sun, 2 Feb 2014 21:29:38 +0000 (22:29 +0100)]

private api, but useful for 2d gui code that suddenly finds itself
needing to get a set of textures onto some fbo

I didn't want to include ARB_copy_image since it looks like its from
texture/renderbuffer -> texture/renderbuffer while this class implies
texture -> write fbo. We could wrap ARB_copy_image in QOpenGLTexture or
some other class or we can add it later.

I have not added any QOpenGLTexture functions since this class opperates
on the GLuint identifier. We can add overloads later.

Change-Id: I3e565b33466c1c183a249a33c3e82c6786debd55
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
4 years agoRemove useless if
Frederik Gladhorn [Tue, 4 Feb 2014 13:51:58 +0000 (14:51 +0100)]
Remove useless if

Change-Id: Ide9f06b71159e86fdd2aa178cd3aa0ab2faf5d2c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
4 years agoAccessibility: Fix reporting the same name/value twice
Frederik Gladhorn [Thu, 6 Feb 2014 10:46:03 +0000 (11:46 +0100)]
Accessibility: Fix reporting the same name/value twice

NVDA for example reads name and value, so that most of our
accessibles would lead to the same text being read twice in a row.
Instead use Name as that's best supported on all platforms.

[ChangedLog][QtWidgets] Fixed accessibility issues that would lead to
screen readers reading the same text twice.

Task-number: QTBUG-36678

Change-Id: I6c5c9cdcf5392c7135a65bd30f87a590c3c07fb4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>