Reverts the wrongly added \internal and adds a warning for users that
the constructors will not be available if QT_NO_CAST_FROM_ASCII is
defined
Task-number: QTBUG-39862
Change-Id: I038eea3f4eef0b914b470309a2f515741eec35a9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Calling it directly is less confusing than calling
it indirectly via the "else" branch in
flushWindowSystemEvents.
Change-Id: I085deff09162137606922a5af7ead23e21497b11
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Set the accepted bit on the QWindowsystemInterface
keyboard event after processing the key event.
Change-Id: I2d8c9382f14840e464153870dff909000e64ddcd
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Add en "eventAccepted" field to WindowSystemEvent,
where the event subclasses can record the event
acceptance status. Make handleWindowSystemEvent()
return the accepted status.
This works for synchronous event processing only. If
the event is placed on the QPA event queue then there
is no way to return the accepted state immediately.
In the latter case handleWindowSystemEvent() always
returns "true".
Change-Id: I081aecc54f43588d42d3aaeec7f8458f06937601
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Convenience accessor for use by the Wayland
platform plugin.
Change-Id: I420209138cfc285f8396913548b9e158a35ee9c1
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Propagate the line stride when creating the high-dpi
backing store image.
Change-Id: I15f41965d8eaf1d01ddac0a1a012b71148f757e3
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
The native OS X color dialog wrapper is now implemented
in qcocoadialoghelper.mm in the Cocoa platform plugin.
Change-Id: Idc4088df93960dd68507d11a9895277e34a18b96
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This way we can remove some life cycle management code.
Change-Id: I8e0c9db0a8c5f0941bbd834380d3e3b3a9d2f306
Reviewed-by: Adam Majer <adamm@zombino.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Contents of the QIODevice's buffer is handled in the base
implementation.
Change-Id: I5a3d68e4e8dcb16d7f5ad695ac43127b8047a061
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead, we use the binary MySQL encoding and copy the data directly
into the QVariant of the desired type. This gets rid of the temporary
string allocations and greatly improves the performance of the added
benchmark. On my machine, the results are:
Before:
0.562 msecs per iteration (total: 563, iterations: 1000)
1,922,479.330 instructions per iteration (total: 1,922,479,330, iterations: 1000)
After:
0.381 msecs per iteration (total: 381, iterations: 1000)
774,132.957 instructions per iteration (total: 774,132,958, iterations: 1000)
Note that the same could be applied to floating point data types in
the future. Additionally, special support for MYSQL_TIME structure
coult be added to get rid of the string conversions there.
To ensure everything keeps working, a new auto test is added as well
that verifies the select statements and insertions of integral data
into a MySql table works as intended.
[ChangeLog][QtSql] Improve performance when reading integer values
from MySQL databases via prepared statements.
Change-Id: I21dd9277661971ded934546f09535014b63f8eb8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Site-local addresses were deprecated in RFC 3879 (September 2004) and
RFC 4193 (October 2005) replaced them with Unique Local Address. ULAs
are part of the global range but supposedly unique to an organization.
Change-Id: I7de033f80b0e4431b7f1ffff13f98d2124c5cffc
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
qwidget.cpp:12864:70: error: cast from type ‘const QWidget*’ to type ‘void*’ casts away qualifiers [-Werror=cast-qual]
Change-Id: I7de033f80b0e4431b7f1ffff13f956cb26108af7
Reviewed-by: Martin Smith <martin.smith@digia.com>
This commit moves the functionality from QtNetwork's QHostInfo to
QtCore. Note that due to Windows ws2_32.dll's quirky behavior of
requiring WSAStartup before calling gethostname, this change required
moving the initialization to QtCore too.
On Linux systems, gethostname() gets the name from uname(), so we bypass
the middle man and save one memcpy.
Change-Id: I27eaacb532114dd188c4ffff13d32655a6301346
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
By using XAML as the platform compositor, many benefits are possible:
- Better input context handling for tablets
- Better multiple window support (including non-fullscreen windows)
- Support for transparent windows and window opacity
- Integration with native platform controls
- Simpler orientation handling on Windows Phone with built-in transitions
This patch applies only the minimal parts to make XAML mode work just as
the raw D3D mode. It does this by:
- Moving all OpenGL parts into QWinRTEGLContext. This will allow us to
have non-OpenGL windows later (e.g. Direct2D raster surfaces).
- Moving more window-specific parts into QWinRTWindow. Each window creates
a SwapChainPanel which can then be used for ANGLE (or Direct2D) content.
- Moving non screen-specific parts into QWinRTIntegration.
- Having QWinRTScreen create the base XAML element Canvas.
- Running certain calls on the UI thread where necessary.
The following code parts were removed:
- The UIAutomationCore code in QWinRTInputContext, as this is incompatible
with XAML automation.
- The D3D Trim and device blacklist, as these have been fixed in ANGLE.
- Core dispatcher processing in QEventDispatcherWinRT. Now there is only
one native event dispatcher; it is always running and never needs to be
pumped.
Future commits should address:
- Maintaining the window stack list and visibility using the XAML Canvas.
- Allowing for windows (e.g. popups) to be sized and positioned instead
of fullscreen.
- Using the XAML automation API to improve the platform input context.
[ChangeLog][QPA][winrt] Windows Store apps are now composited inside a
XAML container, allowing for tighter integration with the native UI layer.
Change-Id: I285c6dea657c5dab2fda2b1bd8e8e5dd15882c72
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows the platform plugin to start using XAML interfaces in the
windowing system.
Change-Id: Ifcd29b8b8d83b138af69786dfc6a1adec21be37e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This is necessary for Qt applications, as they render to GL in physical
pixels. This is consistent with the CoreWindow swap chain behavior.
This includes a partial revert of "ANGLE: Improve Windows Phone Support"
as the modifications to SwapChain11 are incompatible with the XAML swap
chain.
This change only affects Windows Runtime targets.
Change-Id: I401ae81028a9dfdb9da37f51c60844467c476f76
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows the XAML swap chain to work properly, as otherwise it never
got a resize after it was passed into ANGLE with an empty size. This is
fixed by upstream commit 3799c3014a9e4ba4a3853c014a7127254ec19d50, so no
patch is necessary for Qt's local copy.
Change-Id: I43b030fa74f6b30c2aa42a36db2031a84eedf60b
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows multiple applications installed into the same directory,
to share data files without polluting a more global directory
like C:/ProgramData.
Change-Id: Id5f4f9bc9d2ccb7ec677babcc08c1c5a641178f6
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qt5.git now contains the winflexbison tools as flex/bison.
Task-number: QTBUG-46852
Change-Id: I8b86cd4211ae8fb120f955be1f423f94b10b318e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This happens when the cwd got deleted meanwhile; this warning is printed out:
QFileSystemEngine::currentPath: getcwd() failed
and currentPath() is empty. Not a problem in itself, but qprintdialog
should not assume it's not empty, then.
Change-Id: I5c89992b36ca58b6325ced399cff33aca9efb7ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since Q_GLOBAL_STATIC might use QMutex and cause a stack overflow.
Task-number: QTBUG-47554
Change-Id: I4853c5e9b9168d4a417200e2a45a1bf9cb103a30
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It failed on Windows due to readonly files copied from the resource,
until adding a setPermission call.
Change-Id: I1d42b53763583aca73d011e0f2bbf061ef6aa891
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This reduces the number of syscalls greatly, by avoiding the timezone
conversion every time.
Change-Id: I39a54def4b45f25c6e037ced6943b05ddc749c9d
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
qopenglengineshadermanager.cpp(430): warning #177: variable "none" was declared but never referenced
qopenglengineshadermanager.cpp(431): warning #177: variable "br" was declared but never referenced
Change-Id: I7de033f80b0e4431b7f1ffff13f958e4a4cca16e
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
pdfork(2) has semantics very close to what we want in forkfd, but not
quite. Differences:
- we still get SIGCHLD and need to do a wait4
- no support for atomic FD_CLOEXEC and O_NONBLOCK
On the SIGCHLD case: this commit is an improvement over the generic Unix
case, since we no longer need to install a SIGCHLD handler and do not
need to keep the arrays for matching PIDs and file descriptors. That
matching is done entirely inside the kernel.
However, since SIGCHLD is still sent to the process, an uncooperative
SIGCHLD handler can still "steal" our response. At least Glib is
documented not to reap children it wasn't explicitly asked to watch for
(source code matches), but other libraries are known to do waitpid(-1)
(e.g., EFL's Ecore). At least now the behavior is consistent: we will
never install a handler, so the behavior won't depend on the order in
which the handlers are installed.
Change-Id: Iee8cbc07c4434ce9b560ffff13cb4c63306e43ef
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some platforms, such as QNX, do not implement QT_CLIPBOARD.
Change-Id: I3a8b484b4c00c28a91d3727054672c3788f98381
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Currently, when one compiles a Qt plugin that is also installed
system wide to a local path added to QT_PLUGIN_PATH, you have no
way to ever load it as the global plugin will always be preferred.
This is due to the order in which the QCoreApplications::libraryPaths
are constructed, which always appended the QT_PLUGIN_PATH contents
to the end.
Now, the QT_PLUGIN_PATH contents are put first, such that the plugins
in there are preferred and loaded.
[ChangeLog][QtCore][QPluginLoader] Fixed the search order of Qt plugins
so that paths specified by the QT_PLUGIN_PATH environment variable
are searched before built-in paths.
Change-Id: Iad8ca2cd34e7a622c191a416c01c1c5cc1812fc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QAndroidInputContext now sends along the EnterKey type provided by the
EnterKey input method query enabling the QtActivityDelegate to set the
imeOptions for the TextView accordingly.
Change-Id: Ic96077ab4b11cf6dec52283ecf66b2cabe7af665
Reviewed-by: BogDan Vatra <bogdan@kde.org>
In C++, type punning with a union is not allowed. It will result in
compiler defined behavior at best, and undefined behavior at worst.
Specifically, if QRgba64 is passed to a function by value, the different
members of a struct might be passed in separate registers. This means
that any write to the quint64 might not blank out the values of the
struct whenever the compiler looses track with TBAA.
Change-Id: I991b5492fe4bb13a14bb670fef5bf13dacbe6c0a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Qt keeps track of the selection direction since a selection anchor can be placed
both to the left or to the right of the cursor. On iOS, the selection should
instead always be specified from left to right (using a position together with a
positive length). So when restoring the selection after performing the
calculation of the text rect, we need to ensure that we follow this format.
Change-Id: Id8bea6c35e2781e1431ee963f601b6e9ef05dbf5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This permits text rendering consistent with other FreeType enabled platforms,
like Windows and Linux.
Task-number: QTBUG-42839
Change-Id: I8c99bcaa3fb07c16e935a0c3705af467bc3da584
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Just like from RGB32 to RGB30 we must also repremultiply when converting
from RGB64 because the alpha channel loses more precision than the other
color channels.
Since this is not approximated accurately in the simple blending
functions and the functions are no longer needed now the main render
engine supports higher accuracy, the simple blending routines for RGB30
have been removed.
Change-Id: I2b7b8eb015e330a487848fc4370ad3a1e966be91
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Have an autotest to prevent introducing JSON syntax errors
that become apparent only at runtime.
Change-Id: If2bcbf4d227fddcbeb9c095b7986bada078131d7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
On Windows and OS X, where QStandardPaths does not use XDG_DATA_DIRS/
_HOME and shared-mime-info is not installed, the tests that require
additional shared mime info xml files were never run.
Mend that by using QStandardPaths' test mode instead of setting
XDG_DATA_HOME.
Change-Id: I53b75c293c41c4dac63986dcb88972c2b54d5428
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
QComboBox uses a QLineEdit for text editing. But while editing, the
combobox is the widget having focus, not the line edit. Instead the
combobox forwards all the IM events to the line edit internally. This
causes a problem since the line edit will not be able to update the
platforms IM state in QWidget::updateMicroFocus() since it doesn't
have focus. The result will be that the platforms IM state will
get out of sync with the QLineEdit.
This patch will add the missing connections that lets QComboBox
update the platforms IM state when the inner QLineEdit signals
that its needed.
Change-Id: Ic3e0fdbf155d4dbeab31e2cd859f6e425ae87375
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
As it stood, we only told the platform about a selection change if
the cursor also changed position. But if you have a selection, and
press key left, the selection will be cleared without moving the
cursor. And for those cases, we didn't report the selection change
back to the platform. The result was that the IM status in the platform
plugin got out of sync with the widget.
This patch will add the missing connection that updates the platform
whenever the selection changes.
Change-Id: Iab0848f27207b63ed4fb47f0d4f24a6d02e87db1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
When clicking onto another widget while in the middle of composing should
cause it to be seen as an acceptance of the composed text so far instead
of just cancelling it outright.
This was validated against the Japanese, Korean and Chinese IMEs on
Windows 7.
Task-number: QTBUG-42344
Change-Id: I03be0cd099840f51a9550929f33e2afbbf31e85a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Avoid reading from the next pixel when the sample is fully based on the
current pixel. This is particular important for the last pixel in an
image when the next pixel might be outside the image buffer.
Change-Id: I3607f9c6c332d11ff944ca35d216d417368f9fd5
Task-number: QTBUG-47228
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The test is very flakey in 5.5 integrations and the OS X CI machines have
notorious problems with networking stability. So the previously listed tests
are not really at fault, it's an infrastructure problem, that we choose to
ignore for the time being.
Change-Id: I7fbfa7b3778daa6b5e60d95b822847c92927122f
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>