It went completely broken after the fix for QTBUG-32928. The crash fix I made
afterwards forgot to take into account that the shortcuts must still be handled,
even when the window in the input event is null. So instead of bailing out on a
null tlw, we have to use the window that currently has the focus.
Task-number: QTBUG-43203
Change-Id: I6cd65ee5bd021f80d9440cba8bc9dfda9abe2cfd
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
The preprocessor used in QOpenGLShaderProgram to help with determining
where it should add the #line and other #define directives is broken
when parsing the standard Qt Project copyright header.
In a multiline comment if the preprocessor encounters repeated '*'
characters when in a multiline comment, it toggles the state between
MultiLineComment and CommentEnding. This is wrong as every asterisk is
potentially the one before the closing '/' of a multiline comment.
This change fixes this by only going back to the MultiLineComment when
in the CommentEnding state if the character is not another '*'.
Task-number: QTBUG-43240
Change-Id: I114e933026ba5de1c23f3e0399613def59f44961
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
... and use it with the opengl compile tests.
Change-Id: I402574be332e41c721a758e63a233d193224f16b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The #version directive detector of QOpenGLShaderProgram is using an
incorrect regular expression to detect the #version directive in the
preprocessed shader source code.
It is allowed to have whitespace before the #version.
Task-number: QTBUG-43240
Change-Id: If60670f49cb40148e5e7fbe6da6c798e8f636c3d
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
The QStaticTextItem's `chars` and `numChars` members are never used,
even when set. In fact, there is nothing useful we can do with the input
string in the absence of clusters mapping.
Change-Id: I81fcbce3e575f4d0dcfc2515286d512b858f592b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The delimiter search scan() loop detects a device or string reaching
the end of input and size limits. After that, 'false' is returned only
when no data was read at all. So, there is no a reason to test anything
except 'totalSize'.
Change-Id: Ib9cc21c0f4b7863c2dafb1bb074c5cda07387b8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The setEmptyDefaultConfiguration test creates a socket and connects its
sslErrors signal to tst_QSslSocket's ignoreErrorSlot slot. This slot
expects the socket to have been stored in tst_QsslSocket's "socket"
member, which was not being done. This patch fixes this problem.
It does beg the question of whether having a "socket" member in the
tst_QSslSocket class is a good idea as it is error prone.
Change-Id: Ic59d1789c5f1ed240c3f0c37981f6ecc35572f0d
Reviewed-by: Richard J. Moore <rich@kde.org>
Tested with the November 2014 Preview.
There are three C++11 features that aren't supported as of MSVC2015:
- attributes
- constexpr
- uniform initialization
Microsoft recognizes that constexpr support in this compiler is partial,
so we don't enable it yet. Attributes are not implemented at all.
As for uniform initialization, Microsoft's feature list says
initalizer_list is supported, but we still see compile errors trying to
initialize arrays in constructor initialization lists.
Change-Id: Id686ccb6b4b2ecd63f16d308552174db1f05f2c5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Tested with the Preview release of November 2014.
Differences to the 2013 detection and support:
- Option -Zc:strictStrings is present in both debug and release mode
and is passed to qmake's own build
- New warnings 4456, 4457 and 4458 (shadowing) are disabled
- Compiler supports -arch:AVX2
Change-Id: I9572ff4d4aded4004c1fa5d6f13ffee5462043d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Most files are exactly the same, so it's silly to duplicate this all
over. The differences could have been kept in each of the qmake.conf
files, but I preferred to centralize because they apply to each newer
version and, soon enough, version-specific configuration would grow
again.
Change-Id: I5c5ed58055c954acf4851d87c70cc5af49c98738
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Microsoft hasn't called their compilers .NET since .NET 2003, so NET2005
and up were wrong.
Change-Id: I28fa99d4e10fcc684be3096eb3237c916a80fa31
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This compiler is no longer supported, as the mkspec was moved to
unsupported/ on commit 55c3799bd3, but the
MSVC support in qmake and in configure depend on an exact string
match. So remove the remaining bits.
No changelog because the actual removal happened in an earlier Qt release.
Change-Id: I538345f4184a6af2ea7449052c161afe4eac625c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
It's a simple enough function, but we don't need to duplicate those 17
bytes all over the place. Now they'll be duplicated at most once per
library.
Change-Id: Ic995e2a934b005e7e996e70f2ee644bfa948eb38
Reviewed-by: Jason McDonald <macadder1@gmail.com>
QTextStream::operator<< calls QTextStreamPrivate::putString, which was
taking a copy of the user's string and modifying it depending on
padding. That is not necessary, since we're only talking about
padding. Instead, calculate the left and right paddings. For the case of
"accounting padding", we move the sign (if any) to the beginning of the
left padding and skip it in the data.
The one side-effect I can think of is that the stream could flush in the
middle of the writing operation.
The debugging section had to be removed because it doesn't make sense
anymore.
Change-Id: I57fdbf98ec6f054f4e085f2e465de3dcbb6225ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
And try to make good use of them in order to match the QFont
request more closely.
Task-number: QTBUG-38482
Change-Id: I768dfa8828e370d77a1c17ecf4796d750b3edd9b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Android does not provide an API to access daylight time transitions,
so the standard QTimeZonePrivate::dataForLocalTime only returns
standard time without the daylight offset
Therefore provide an override,
QAndroidTimeZonePrivate::dataForLocalTime, which tests daylight time
offsets directly rather than using transitions.
Change-Id: Ia8adaf9af40da38aadfa7d22d9a3fe9da9ba24a8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
[ChangeLog][QtWidgets][QOpenGLWidget] Added an UpdateBehavior flag to
QOpenGLWidget and enabled support for NoParitalUpdate for QOpenGLWidget.
NoPartialUpdate is the default update behavior for QOpenGLWidget.
Task-number: QTBUG-40717
Change-Id: I47d11460e4ef899a24cfd4964ddcac57bc3f91ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Add new enum items PM_HeaderDefaultSectionSizeHorizontal and
PM_HeaderDefaultSectionSizeVertical to QStyle and get corresponding
values in QHeaderView. This way we get rid of some magic constants in
QHeaderView and we can have reasonable values for the default section
size for high-DPI displays.
[ChangeLog][QtWidgets][QHeaderView] Default section size is now style-dependent by default.
[ChangeLog][QtWidgets][QHeaderView] Added resetDefaultSectionSize().
Change-Id: I44e152c5cf0bec1e5d78e1e62f47a2d1f761dfbf
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Also warn if a requested generic plugin is not available.
Change-Id: Iab1f1f87be435b4ad446881cba25d0b19a564f08
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This is entirely unnecessary. If the path is bad, then getcwd and friends will
fail. Doing an extra stat imposes an extra performance overhead without reason.
Trivia: A dive into Qt's history shows that the stat dates back to:
Sat Aug 12 14:24:36 1995 +0100
The original purpose of the stat was to avoid calling getcwd unless the path had
actually changed. Subsequently, the caching was removed, but the stat remained.
Change-Id: Ia4598dc74ded36516b3e10e7ab0eb5a6a5690466
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These differ from the functions already marked constexpr in that
they contain subexpressions that are not constexpr. This is fine
according to the standard as long as there's _one_ set of arguments
that yield a Core Constant Expression (paraphrased from N3797
[dcl.constexpr]/5, C++11 contains similar wording), but maybe not
for some compilers, so collect these in a separate change.
Change-Id: If834232fd83059fce7c44d16b71e7d08ef79de65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make sure the relational operators are in a constexpr'able form
by removing the use of the const/non-const-overloaded unicode()
function, which in the relational operators is resolved to the
non-const version, which isn't constexpr'able.
Replaced with direct member access for op== and op< (required
making them friends) and reformulating the other operators in
terms of these two.
Since I managed to introduce a bug while doing this change,
add a simple test for QChar operators, too.
Change-Id: I69f3da849e71abc2a17152f797694950914adebc
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On Android, we disable mouse selection, since that does not work
well with touch screens. In change a03a69efb9,
we accidentally disabled keyboard selection as well. Unfortunately,
disabling keyboard selection will disable all keyboard movement.
This change re-enables TextSelectableByKeyboard.
Task-number: QTBUG-42991
Change-Id: Ie63ed3d88a0abcb72f04e0ec60a5b91c0b14a47e
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Instead listen for if the accessibility service is running or not by
implementing AccessibilityStateChangeListener.
This seems to work smoothly when turning on or off TalkBack.
This should also improve startup time.
Change-Id: I3eb7d6cb9c9c1618afbb59675e4e089c9159019c
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
The problem was that the span we stored in the multiCellMap was the
"effective" span (i.e. the given span subtracted with the number of
ignored rows it would span). Later we used that span to distribute its
size across all its cells. However, since the span now could be smaller
that the given span, we could sometimes fail to distribute to the last
span(s).
[ChangeLog][QtWidgets][layouts] Fixed a bug where spans sometimes didn't
distribute themselves to the last cells they covered.
Change-Id: I31db3d850484dc8b70d62c5f02f680740578c661
Task-number: QTBUG-43099
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Printing a QWindowSystemInterface::TouchPoint can be misleading if
it only includes the normalized position. Many backends do not provide
such information so it is often 0, 0. Print also the "area" which is
always set, the center of this rect is the actual touch position in screen
coordinates.
Change-Id: I2f3efabf6ced6fae9937518cc39d898e66b7894e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
The sslErrors and peerVerifyError test the same situation: connect to a
server which is using the fluke certificate, using the incorrect host name.
They connect respectively to qt-test-server:993 and the.server.ip.address:443.
The sslErrors is prone to backend-dependent failures concerning the order
in which SSL errors are received, just like the peerVerifyError test was
until recently.
This change merges these two tests into one, which is run against the same
two servers as previously. It also adds a check to ensure that sslErrors
and peerVerifyError emit the same SSL errors (regardless of order).
This also fixes the included headers for non-OpenSSL backends.
Change-Id: Ibd5f60d24f1682989378e87729389e4b8f9efac5
Reviewed-by: Richard J. Moore <rich@kde.org>
It did not work since the request was made after mapping.
Add also basic screen size detection and make fullscreen the default. No more
windowed nonsense which is not very useful anyhow due to the trouble with
input (multiple mouse cursors etc.).
Instead, launch always in fullscreen on X. This gives a unified experience when
running with -platform eglfs, regardless of using KMS on a console or the X11
hooks under X or just fbdev. It also eliminates the annoyance of not having
vsync for non-fullscreen X windows on boards like the Jetson TK1 (where fbdev is
not an option).
[ChangeLog][QtGui] eglfs is now using fullscreen mode also when running on X11.
Change-Id: I3b05728c2c37d6e0abd53cf2843670a1262243bd
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Prevent the cursor cache from growing indefinitely hitting GDI resource
limits if new pixmap cursors are created repetitively by purging out
all-noncurrent pixmap cursors.
Change-Id: I4a3bbd6235af13e306ca84ac6fea3fcd69d53279
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
The part of the test that verifies that setFramePosition moves the window
successfully appears to be very unreliable in the CI system. The "tested"
frame position is calculated to be at (40, 40) relative to the top left
of the available screen geometry, which can be non-zero due to task bars
and similar system ui elements. However that position appears to be
unreliable in the sense that the window manager doesn't seem to always
respect that. So instead let's try placing the window (by frame position)
in the center of the screen instead.
Change-Id: I96fe6c37e748fc18262632b5effe5a9e90dc0028
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Commit 0eefa785a0 ported Qt4's method of indirectly drawing the tray
icon's background to Qt5. This commit makes it work a bit better.
When drawing the tray's background, we use a ClearArea request to make
the X11 server fill the tray icon with its background. Then we grab that
background from the server and paint the icon on top of it. So this is
pretty much pseudo-transparency at work. One small ingredient that was
missing before is the BackgroundPixmap of the tray icon. If this
attribute is set to ParentRelative, then our tray icon inherits the
background of its parent window. That way the ClearArea will actually
produce the expected background.
Task-number: QTBUG-35832
Change-Id: I63fc4609064d8f858ca9e5cc290409a298b918b7
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
There is no such thing as a vertical slider in the native Android
style. Therefore, we need to rotate the painter in order to draw
one.
Task-number: QTBUG-41992
Change-Id: Ibe2bf1d7fa27756aad0b8469c8752d6d3e848527
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
By adding PM_HeaderMarkSize to the margins if the section is showing
a sort indicator. Turns out that that particular enum was actually
unused in QtWidgets (!), so tune the value to match reality.
Task-number: QTBUG-629
Change-Id: I8bc70451656d634a064c8b5014e449977c55aa9d
Reviewed-by: Cristian Oneț <onet.cristian@gmail.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The docs were wrong, and the returned values from some styles
did not match reality, so fix that. Again, this style hint was
not used at all within QWidgets...
Task-number: QTBUG-629
Change-Id: Ie6ff80fd09bc3292ba3d787ccca4d6f4c0056e89
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
On Windows, the application manifest file can be linked with the
executable, to specify for example the requested privileges of the
application. On MSVC nmake, the manifest is already handled in
NmakeMakefileGenerator::writeBuildRulesPart, but it is not compatible
with MinGW. On MinGW, this manifest file has to be referenced in the
Rc File. This patch simply handles the existing variable
"QMAKE_MANIFEST" which defines the appropriate line RT_MANIFEST in
the RC file.
Task-number: QTBUG-42454
Change-Id: I921606e002ffe3801c537f30ac2365891f97d5c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Following the principle of device integrations in QtWayland and soon
xcb, a plugin interface is being introduced to gradually replace the
statically compiled-in hooks.
The interface is same as before for the time being, for compatibility
with the existing device-specific hooks.
QEglFSHooks is now just a dummy subclass for QEGLDeviceIntegration to
support the legacy, compiled-in, device-specific hooks. When -device
is not used with configure and so there is no hook active, the new
plugin-based approach kicks in.
The environment variable QT_QPA_EGLFS_INTEGRATION can be set to
indicate the preferred integration name (e.g. eglfs_x11, eglfs_kms).
It can also be set to "none", indicating that no plugins should be
considered and the default, non-specialized integration is to be used.
(this is for devices, like Beagleboard|bone, that do not need any special
code to set up EGL)
Device makespecs can set EGLFS_DEVICE_INTEGRATION. The value is then used
as the default, preferred plugin name when QT_QPA_EGLFS_INTEGRATION is not
set. In the future device makespecs are expected to set a plugin name instead
of relying on the traditional EGLFS_PLATFORM_HOOKS_*.
When neither the QT_QPA_EGLFS_INTEGRATION nor EGLFS_DEVICE_INTEGRATION are
set, all plugins will be tried in an unspecified order. The first one that
succeeds to load is used. If all fails or there are no plugins, the built-in,
non-specialized integration is used.
To debug what integration is being used, enable the logging category
qt.qpa.egldeviceintegration.
There is some built-in logic for desktop/Mesa based systems: Under X,
eglfs_x11 is preferred, otherwise eglfs_kms is prioritized. This, assuming
sufficient permissions to video and input devices, allows simply launching
apps with -platform eglfs. No more editing of eglfs.pri.
[ChangeLog][QtGui] Added support for device-specific backend plugins in eglfs.
Change-Id: Ia2ddcddac014c25817171dc140cd8cf913784ac6
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>