Commit Graph

21954 Commits

Author SHA1 Message Date
Erik Verbruggen
467c2bc9c3 Remove support for QT_QLOCALE_USES_FCVT.
We expect floating-point math to be IEEE754 compliant.

Change-Id: I2b257177f2ef5fce38ac4d8fd76f746dc7b9fc15
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-28 12:44:55 +00:00
Alex Blasche
e1cdfc5529 Make Qt for Android compile when using errors for warnings
In file included from kernel/qsystemsemaphore_android.cpp:35:0:
kernel/qsystemsemaphore_p.h: In constructor 'QSystemSemaphorePrivate::QSystemSemaphorePrivate()':
kernel/qsystemsemaphore_p.h:104:10: error: 'QSystemSemaphorePrivate::createdSemaphore' will be initialized after [-Werror=reorder]
     bool createdSemaphore;
          ^
kernel/qsystemsemaphore_p.h:101:11: error:   'key_t QSystemSemaphorePrivate::unix_key' [-Werror=reorder]
    key_t unix_key;
          ^
kernel/qsystemsemaphore_android.cpp:43:1: error:   when initialized here [-Werror=reorder]
 QSystemSemaphorePrivate::QSystemSemaphorePrivate() :
 ^

widgets/qdockwidget.cpp:208:6: error: unused parameter 'floating' [-Werror=unused-parameter]
 bool QDockWidgetLayout::nativeWindowDeco(bool floating) const
      ^
cc1plus: all warnings being treated as errors

Change-Id: I69af3ba3883b4311477f0e4e991b5cc0900fb71b
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-28 12:38:34 +00:00
Konstantin Ritt
6ef40175e5 Introduce QMatrix4x4::isAffine()
- a convenience method thats checks if the matrix
has no projective coefficients.

Change-Id: Ieea8ac2e4237b471a683ad5010672b1e89a0c953
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-01-28 12:37:52 +00:00
Konstantin Ritt
14419b0a2b Introduce QQuaternion::inverted()
Change-Id: I6de77082bb7c32e48fb7f7d765a58fdbe68db1fd
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-01-28 12:37:50 +00:00
Konstantin Ritt
a14559bc78 [QVectorND] Add missing operator/=(const QVectorND &)
Change-Id: Ic1d2912808b95e02ba5d9cb2972c81c6374bbca9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-01-28 12:37:47 +00:00
Laszlo Agocs
6462744b6b Avoid warning in makeCurrent
This warning is not necessary. We don't warn in doneCurrent or QOpenGLWindow either.

Task-number: QTBUG-44094
Change-Id: Icb3cf51137258c939d5dfb653cf98ded3c147aac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-28 12:37:20 +00:00
Laszlo Agocs
f939c3728c Bail out in composeAndFlush when makeCurrent fails
And show a warning so we have a chance of knowing what
happened.

Change-Id: I9ddf3842b7d19946876ac1a2375611e8c13bbb9a
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-28 12:37:14 +00:00
Joerg Bornemann
5582851c33 turn off nmake inference rule generation on detected conflicts
When there are source files with the same file name in different
directories of the project, then nmake's inference rules might pick up
the wrong source file. Note that this even happens when only one of those
files is in SOURCES. The existence of conflicting file names is enough
to cause hard-to-find build failures.
The usual work-around for this situation is CONFIG+=no_batch.
This is now done automatically when a conflict situation is detected and
a warning message is printed.

Task-number: QTBUG-13496
Change-Id: Icd81027407d3d489dbc50231e5ed8bcb91f8d2bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-01-28 12:33:18 +00:00
Eskil Abrahamsen Blomfeldt
ce9c4915d5 Android: Don't open assets files in read/write mode
We would return true when opening assets in read/write mode despite
the fact that the files are not writable. The logic now matches
that of the qrc file engine.

This also adds a unit test for Android-specific issues.

[ChangeLog][Android][Important Behavior Changes] Opening assets with
QIODevice::ReadWrite now returns false to correctly indicate that the
files are not writable.

Change-Id: I019cc27861fc9b000dc13c5e0a38c0fc09a08671
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-28 12:20:54 +00:00
David Faure
b65a415e67 Simplify fontsampler example by using the automatic tristate feature.
All the features implemented here are done by QTreeWidget, which also
sets PartiallyChecked when appropriate.

Change-Id: I8c8b515478708d1b7a853e7b8d963dd8fc9863fb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-01-25 12:38:04 +01:00
David Faure
dd23d9f161 QTreeWidget: forbid forcing PartiallyChecked on parent tristate items.
ItemIsTristate means QTreeWidget determines the check state of parent
items based on the check state of child items.
Checking/unchecking the parent propagates to children; but setting
the parent to PartiallyChecked shouldn't do that, especially since it can
lead to children without ItemIsTristate having PartiallyChecked check state.

Change-Id: Ibc8b7c77d9ec4c1578c07f3c62581edb770f8439
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-01-25 12:37:51 +01:00
David Faure
4910f416c2 Itemviews: add ItemIsUserTristate flag
ItemIsTristate is now again purely for enabling the automatic management
of the check state of QTreeWidgetItems, while ItemIsUserTristate is
separate from that and lets the user select the three states manually.

This restores the original behavior of ItemIsTristate for QTreeWidgetItems,
which got broken by letting the user cycle through the states too.

[ChangeLog][QtWidgets][QTreeWidget] Restored Qt 5.1 behavior of
QTreeWidgetItems with ItemIsTristate to enable automatic management
of the check state. User-editable tristate checkboxes are now enabled
by setting the new flag ItemIsUserTristate.

Task-number: QTBUG-40060
Change-Id: I341f5e983804d3b4f27982520bb6647f3014cccc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-01-25 12:37:41 +01:00
Konstantin Ritt
ed56e79b53 [HarfBuzz-NG] Fix build on WinRT
This adopts c26d5cf6ef
and moves some code around.

Change-Id: Icbc1f4e0cfa6c6b994c3e5096cf1cc66bc0b32f9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-01-25 08:41:11 +01:00
Konstantin Ritt
3de9bc9cb1 Update bundled HarfBuzz-NG to 0.9.38
Most important changes:
* Fixes for Arabic, Hangul, Hebrew, Indic,
  Mandaic, Myanmar, and New Tai Lue shapers.
* Fixed out-of-bounds access in Indic shaper.
* Build and stability fixes, various optimizations.

Change-Id: I4f0e32c017f62fe576bee41a430d3da6d571de80
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-25 08:41:05 +01:00
Konstantin Ritt
3c1e16df75 Micro optimizations to HB-NG path
No changes in functionality.

Change-Id: I9cf90241bdb087ef16fb0b759a5976848a197f55
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-24 17:33:00 +01:00
Tor Arne Vestbø
29f96fab24 iOS: Limit auto-rotation to device screen (excludes external screens)
An external screen should always stay in the native orientation of the
screen, and not be affected by rotations of the device. If the user
requires the external content to follow the device rotation, this
can be done explicitly by listening to orientation changes of the
main screen, or using QSensors.

Change-Id: I3a98655d11915f0db107930e7d97a24417656bc9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-24 13:23:55 +01:00
Tor Arne Vestbø
d824c7bcc5 Track QPlatformScreen -> QScreen using QPointer
Allows the QPlatformScreen to verify that the QScreen is alive before
sending events to QPA for the given screen (which will assert if the
screen is being destroyed).

Change-Id: Ie77674fead3e0a4d4f6fedbf1f7f3c98364c7485
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-24 13:23:54 +01:00
J-P Nurmi
b26dc9bc05 QPlainTextEditControl: reimplement anchorAt()
See comments in QPlainTextDocumentLayout::hitTest(). Since
QPlainTextEdit does not do hit testing on the document layout
level, allow QPlainTextEditControl to override anchorAt() so
that hit testing can be done on the widget level instead.

Change-Id: I70247eafae96897382a0c7db7d596128a03e7a6c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-24 12:36:41 +01:00
Giuseppe D'Angelo
7414c2c404 QOpenGLWidget/QOpenGLWindow: add a destructor which calls makeCurrent
Generally speaking, QOpenGLWindow subclasses are going to use some
various QOpenGL* wrapper object to handle their buffers, FBOs, etc.

Some of those QOpenGL* wrappers are QObjects, hence it should be safe
to have them as child objects, and expect Qt to clean them up properly;
but that doesn't happen because of how the destruction will work.

In particular, when the subclass object is deleted, there may not be
the right OpenGL context set as current. The deletion will go up to
~QObject, where the child objects will be deleted, resulting in a crash.

That will *also* happen if someone connected to the context's
aboutToBeDestroyed() signal: the context will in fact be deleted
after the child objects, since it's stored in QOpenGLWindowPrivate,
whose dtor will be run after ~QObject (!).

Now, in the general case, QOpenGLWindow subclasses should always
have a dtor in which they call makeCurrent() (also because various QOpenGL*
class are not QObjects, hence they're kept around as full members
instead of pointers-to); but at the same time we should clean up
properly the QObject children.

All of the above of course stands for QOpenGLWidget as well.

Task-number: QTBUG-44094
Change-Id: I2379041fe175416936f6d40292039f773a515b35
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-01-24 12:35:56 +01:00
Allan Sandfeld Jensen
dd07b1e389 Add conversion functions for C++11 u16string and u32string
The patch adds convenience functions for working on C++11's new char
width specific unicode strings u16string and u32string.

[ChangeLog][QtCore][QString] Added methods for convenient conversion
to and from std::u16string and std::u32string.

Change-Id: I67c082e4755c592d61daaaaa70c8867ef0b23dcb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-01-24 11:50:13 +01:00
Marc Mutz
05cda3d465 src/corelib/tools/tools.pri: add missing qtools_p.h
Change-Id: If7af29fdaefddc1e3f08148610ba2720f5927b67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-24 11:12:38 +01:00
Marc Mutz
f272c40697 tst_QSet: make qhash() test deterministic
Change-Id: I857e66f21030da2210122c8c95c95f05a73da50a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-01-23 23:38:27 +01:00
Konstantin Ritt
6a1d9134b8 Fix build on [older] MinGW
Add some macros missed in older MinGW.

Change-Id: Ia61ff270d012022c4e9ec0d4dd2ea050860f4fcd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-23 20:32:32 +01:00
Tor Arne Vestbø
1b209ccd6d iOS: Associate UIScreen and show UIWindow on initial QWindow mapping
We delay showing the UIWindow until the first QWindow is created and
mapped to the screen. This allows external screens to stay in mirror
mode until a QWindow has been explicitly created on that screen. We
also remove the screen-association when the last QWindow on that
screen has been removed, which will return the external screen to
mirror mode.

Change-Id: Iccecb297281d0c4f397f69f2494debff051ade01
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-23 19:47:58 +01:00
Tor Arne Vestbø
04e4a09b85 iOS: Base [QIOSViewController shouldAutorotate] on the locked orientation
Instead of keeping a separate property for the auto-rotation. Allows us
to override shouldAutorotate later on to make the decision even more
fine grained.

Change-Id: I9a3cd6c1316f2a5485a94ef8d9b633df87f46f5f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-23 19:47:57 +01:00
Tor Arne Vestbø
73ef1ec693 iOS: Ignore statusbar changes for windows on external screens
Change-Id: Ib7919abb2da324f6ffa058e8b215bf566ff43e40
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-23 19:47:57 +01:00
Rafael Roquetto
8ca735762d Fix tst_process on QNX when using spawn
QNX posix_spawn() implementation actually allows for detecting whether a
non-existent process has failed to start.

Change-Id: Ic1bf8da0d4636f1d7d9b7b4cf6ad45376f6df0ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-23 19:13:38 +01:00
Rafael Roquetto
bc4b1d7efe QNX: QProcess workaround for the stdin pipe
Due to a bug in the internal implementation of posix_spawnp on QNX, all file
descriptors with a value lower than the maximum file descriptor specified
in the file_actions structure are duplicated by default, ignoring the
FD_CLOEXEC flag. This includes all file descriptors that we are not working
with. So we add those file descriptors that have the FD_CLOEXEC flag to the
file_actions structure as close actions.

Change-Id: I316bc334addb46a4b84c199a69e9bd291ca706c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-23 19:13:30 +01:00
Thiago Macieira
75a2c81b00 Handle posix_spawn using exit code 127 to indicate fail-to-start
Most posix_spawn implementations are done using fork(), so the only way
to report errors afer fork() is via a special exit code.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html
Change-Id: I3a37f81b0cb278bb31e5cb83c87e6b4c034dbc19
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-23 19:13:27 +01:00
Thiago Macieira
1814142b7a Use forkfd in QProcess
Replace the existing code in QProcess that dealt with signaling of child
processes exiting with forkfd and spawnfd. The previous code was
convoluted and hard to maintain, having shown its age in the last
year. I've been running it for a year and a half and the new
implementation is definitely an improvement.

This change replaces support for the QNX Neutrino spawn() call with the
POSIX version. We lose the ability to do setsid(), but we gain quite a
few ioctls() that were done to fill in the file descriptor mapping
structure. That's also the only OS for which we have the ability to
thread-safely chdir() before the call to spawnfd().

Another advantage is that forkfd does not require a dedicated thread
running to handle child processes exiting.

Change-Id: I5eb76821dfdb6a8ed2989d7f53b3c31e515c3174
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-01-23 19:13:17 +01:00
Thiago Macieira
f3459a43af Add spawnfd for use where fork / forkfd can't be used
In certain environments, using fork() is not recommended due to the need
for an MMU. This commit adds support for those environments, by using
posix_spawn. Limitations of this environment are:
 - we cannot reliably detect failure to exec (e.g. non-existing executable)
 - we cannot do setsid(); we do setpgrp(0, 0) instead
 - we cannot thread-safely chdir() to the requested dir

Because of the former limitation, the QProcess unit tests that rely on
failure-to-start error conditions are either skipped or marked as
expected failures. There's a non-reliable solution that is implemented
in a another commit.

This change also makes it easier to transition the QNX builds to using
fork(), which is supported from QNX Neutrino 6.6 and onwards.

Change-Id: I5cb46abf2ef8783941525d35cc991f00d2bf2d58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-23 19:13:12 +01:00
Thiago Macieira
9931fa9df4 Fix forkfd on OS X 10.7 and earlier
dtruss logs show that the signal handler does enter and is active, since
it does the first waitid() call, but then returns immediately:

 waitid(0x0, 0x0, 0x7FFF62D7C468)               = 0 0
 sigreturn(0x7FFF62D7C9A0, 0x1E, 0x0)           = 0 Err#-2

Since there was no error return, we conclude that si_pid was zero on
return. Source code for OS X 10.7 confirms that si_pid is set to zero
unconditionally, which is rather stupid:
 http://fxr.watson.org/fxr/source/bsd/kern/kern_exit.c?v=xnu-1699.24.8#L1330

This is fixed for OS X 10.8:
 http://fxr.watson.org/fxr/source/bsd/kern/kern_exit.c?v=xnu-2050.18.24#L1399

Without that information, we have to scan each child anyway, so
just disable the waitid() solution on OS X. This is a "hammer" solution
which will get forkfd working. We can later try and detect at runtime
whether waitid() is working.

Change-Id: Ic5d393bfd36e48a193fcffff13bb584927cdeafe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-23 19:13:07 +01:00
Thiago Macieira
bd1be70e0e Fix compilation of non-waittid forkfd() outside of Linux
POSIX.1 does not guarantee the presence of the si_utime and si_stime
members. So instead of trying to set those members to zero, ask the
compiler to initialize everything for us.

This was found on OS X when HAVE_WAITTID was removed.

forkfd.c:192:11: error: no member named 'si_utime' in '__siginfo'
forkfd.c:193:11: error: no member named 'si_stime' in '__siginfo'

Change-Id: Ic5d393bfd36e48a193fcffff13b90aa6ccf592ae
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-23 19:12:59 +01:00
Thiago Macieira
c8849dd8d5 Use waitid with WNOWAIT in forkfd
The previous implementation required one syscall per child we're waiting
on to see which one exited. That means the algorithm was O(n).

This implementation uses WNOWAIT to find out which child exited and then
goes straight to that one. So it's O(1) on the number of children, but
runs 2 * number_of_children_that_exited + 1 syscalls, assuming there are
no race conditions with other threads. If there are or if a child not
started by forkfd exits, we'll still iterate over each child we're
managing to see which one exited.

It modifies the existing code so that it will do a waitid() with WNOWAIT
to check on the status of the child: if the child has exited, we'll try
to lock the entry so only one thread will do the final wait(). In the
case we read the PID, then the child exited, was reaped by another
thread, the PID got recycled and that child exited again, we'll fail to
lock the ProcessInfo entry so no harm comes. If by an absurd coincidence
this other child was started by forkfd() and its ProcessInfo is exactly
the one we are looking at, then we'll succeed in locking but that's a
benign race: we'll do what the other thread was trying to do and the
other thread will give up.

Future improvements to the algorithm are discussed in the Gerrit change.

Change-Id: Ie74836dbc388cd9b3fa375a41a8d944602a32df1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-23 19:12:53 +01:00
Thiago Macieira
39482e6e0f Add the compilation of forkfd to QtCore
This also brings in the harness to forkfd that uses QBasicAtomic
instead of the generic GCC atomics.

Change-Id: Id5488bf192db0027bc684956ade0bf6c640c9512
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-23 19:12:48 +01:00
Andy Shaw
1bb05c4daa Keep the width as it is to ensure the underline is drawn correctly
When the width of the decoration was floored then in some circumstances
(such as when latin and Hangul text was mixed) an underline of the text
would appear to be broken on HiDpi screens. Since the width is correct
then we should keep it as it is to ensure it meets up correctly.

Task-number: QTBUG-44062
Change-Id: I2cbf722a9cf9c7e15caa9aad061bf28d3bd0bb59
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-23 15:58:15 +01:00
Konstantin Ritt
a4a45d7bed Get rid of Q_GUI_EXPORT occurrences in QPlatformSupport
This fixes GCC warning on MinGW, when built with -Wattribute (the default)

Change-Id: I8e2b56a4a8fe9db0ec821f346a523b670df80f85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-23 14:22:43 +01:00
Alexander Volkov
de71c8a6f8 Add QTextStream::readLine() overload
The most common use case for QTextStream::readLine() is reading
a file line by line in a loop. The existing readLine() method
allocates new memory for each line, that results in a loss of
speed. The introduced overload can use already allocated memory.

Besides it allows you to not think about filesystem specifics.
The current QFile documentation suggests a separate way to read
files from /proc filesystem. With this overload it's possible
to use the same idiom in all cases:

    QTextStream in(&file);
    QString line;
    while (in.readLine(&line)) {
        process_line(line);
    }

The idea was inspired by the blog post of Ivan Čukić:
http://ivan.fomentgroup.org/blog/2014/10/03/api-design-and-impact-on-the-performance-qt-vs-stl-example/

Change-Id: I0c62b4a52681870589bc099905e83ed69e03dd40
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-23 14:36:27 +01:00
Giuseppe D'Angelo
0192630f55 QNetworkAccessManager: introduce support for TLS PSK
Expose the same kind of TLS PSK client support we already have set
in place for QSslSocket.

[ChangeLog][QtNetwork][QNetworkAccessManager] It is now possible to use
TLS PSK ciphersuites when using HTTPS (or similar protocols working over
SSL).

Change-Id: I56a048e9f4f841f886758c781af2867d18538a3e
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-01-23 14:27:25 +01:00
Eskil Abrahamsen Blomfeldt
c27e1f498f Android: Fix crash in QCompleter test
The call to QPlatformWindow::setVisible() will trigger flushing
of the window system events. Depending on the events, this could
lead to the window being hidden. Since platformScreen()->addWindow()
and removeWindow() was done *after* this flush, you could get the
remove for a window before it had been added, whereas the logic
in these functions were written under the assumption that there
is exactly one remove per add, and that add always precedes the
remove.

This has only been seen when running the QCompleter test so far.

This patch reorders the statements to make sure the events are flushed
after the window stack has been updated. In addition, it adds asserts
for the assumptions in the addWindow/removeWindow code to catch bugs
there earlier.

Change-Id: Ic67b03afbf7acbcb78be86bffa4c26360dc5832f
Task-number: QTBUG-43836
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-01-23 14:24:24 +01:00
Konstantin Ritt
e58a721c5d Don't build WinCE specific code on other platforms
Change-Id: I7ade08e57ea0c9c496e316ff0f856b8951eab61e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-23 14:06:13 +01:00
Konstantin Ritt
4046055caf Deprecate QFont:: rawMode()/setRawMode()
rawMode only has an effect under X11 in pre-QPA times.

Change-Id: Iaff8fed8f4ae5af5dd0399bb3ebd9d590a39a758
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-23 14:06:03 +01:00
Shawn Rutledge
e20a8c69a7 D-Bus tray icons: make endian conversion work again
Endian conversion needs to be done on aligned data, but the data is
stored unaligned in the QByteArray.  So the new qFromUnaligned()
function is needed.

Change-Id: I12f9e52cea81d06129b306709bb9d2cd004f04e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-23 05:34:29 +01:00
Shawn Rutledge
5facb0ce90 D-Bus tray icon: when eliminating large icons, scale to medium size
22px is not always large enough: KDE5 seems to like to make icons up to
28px, and they could be even larger on high-DPI screens.

Change-Id: Ifa8e0d49b310e4b4304207596f0f32c36a5db6a7
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-23 05:34:17 +01:00
Shawn Rutledge
e910c36a3f D-Bus tray icon: ensure that the image is square before sending
Sometimes KDE doesn't render non-square icons properly when they have
been received over the D-Bus protocol.

Change-Id: Icc6fa3d64a1598ea8f719192ae18d32f287d6a79
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-23 05:34:11 +01:00
Shawn Rutledge
cec103897f QSystemTrayIcon uses D-Bus org.freedesktop.Notifications on Linux
If StatusNotifier is working, then QSystemTrayIcon::showMessage() will
send notifications using the org.freedesktop.Notifications protocol.
https://developer.gnome.org/notification-spec/

Task-number: QTBUG-4011
Task-number: QTBUG-31762
Change-Id: Ia1925ec3dd81b1b7b8f3b490b6364aaf8f93f395
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-23 05:34:00 +01:00
Tor Arne Vestbø
d24cfc8b86 iOS: Decouple screen geometry calculations from UIWindow geometry
At startup or when a new UIWindow has been created but not associated
with a UIScreen yet, its geometry will be invalid, and cause the wrong
geometry for its corresponding QScreen when we use it to map geometry.

Instead we explicitly use the status bar orientation to map to the
correct geometry.

Change-Id: If37b3ab2ad5db65e20a7e3af5c3854b3e3ddff0d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-23 03:05:17 +01:00
Tor Arne Vestbø
d4fd619b10 iOS: Don't re-apply window state during QIOSWindow construction
We set the parent of the window as part of constructing it, which will
cause a layout of the QIOSDesktopManagerView's subviews, but in this
case we don't need to re-set the window state as that's taken care of
later on in the QIOSWindow constructor.

Change-Id: Ic197c9a50394908c8aa2155abdc97bc322937a85
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-23 03:05:17 +01:00
Tor Arne Vestbø
ed950a8ec1 iOS: Simplify QIOSWindow::setParent()
Change-Id: I78c47c6ccdb53045f3fa412b1489e08691d3e195
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-23 03:05:16 +01:00
Tor Arne Vestbø
cc0a114cd6 iOS: Only use [UIDevice orientation] for the main/device screen
Auxiliary screens are always in their primaryOrientation.

Change-Id: I078151ccbdb8a78eb095a05672f7804ab608ff24
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-23 03:05:16 +01:00