As of 6cec75a730 we use pkg-config to
pickup OpenGL. Some OpenGL implementations list additional directories
to be used as include directories in CFLAGS. Up until now, if this has
been empty, then the default path has been used. Now that there may be
additional directories, the default include path is not used, which
causes gl.h to be picked up.
Task-number: QTBUG-43377
Change-Id: I86e995cb8d718724a75d9f3f5713e87451fd7129
Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
The LOG_TAG for Android can be set by QCoreApplication::applicationName
instead of a constant "Qt" tag. This will avoid that multiple apps
will use the same tag.
Also it will be easier to filter the logs for different apps instead
of "adb logcat -s Qt" for all Qt apps.
Change-Id: I422cc3adf8b526634b5daa9a1bb1b90403de5618
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The calculateTabWidth() can trigger shaping of the item, which can
cause the layout data to be reallocated, so we need to update the
local pointers to it, like we do when we explicitly invoke the
shaper.
[ChangeLog][Text] Fixed problems with text layout when using custom
tab stops.
Task-number: QTBUG-43126
Change-Id: Ifaeeeb4bfb1a55e6638b12b444f53d2679d3d1e6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Load again JSON document is it was freed.
Task-number: QTBUG-43111
Change-Id: I22f1de221371b49fec8b3d66ad5f0bd2af9656fe
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
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>
Update4 provides a native Sleep implementation. Hence the wrapper
needs to be disabled.
Change-Id: I162da45934b02c262ac09b557c66c3363c276e54
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@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>
Ensures that we have a consistent view of what the last used texture
was, which is critical when deciding whether or not we need to re-bind
the texture or update texture properties.
Change-Id: Ib47eb00abde98d148fc6e569ce3e359b340328fb
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.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>
If you click "Pick screen color" and move mouse over QColorPicker (the square with gradients)
unexpected things will happen: black will be picked half the times.
This is because QColorPicker's black cross is painted under our mouse cursor.
Although "pick screen color"'s use case is to pick colors in other windows, there's no reason
to not make it work on QColorDialog itself too.
Task-number: QTBUG-43288
Change-Id: I03ca02148cc15ad41d545723d4ac4f5a82842b4b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
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>
Calling QOpenGL2GradientCache::getBuffer() will generate the texture the
first time, calling glBindTexture in the process. We did this without
first ensuring that the right texture unit was active, resulting in the
generated gradient texture binding onto the glyph cache mask unit.
We now provide a specialization of bindTexture for a QGradient, which
ensures that the right unit is active before calling getBuffer().
Unfortunately we have no way of knowing if the result of getBuffer()
was a texture that was already bound, or if we need to bind the result,
which means we have to do an unconditional bindTexture of the resulting
texture ID. This means double-bind for the initial texture generation,
but this was already an issue in the original code.
Task-number: QTBUG-43039
Task-number: QTBUG-41244
Change-Id: I20c9b795c8c14f8d58be2b60a284c5a060705ec0
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
QFontEngine must be accessed amd deleted only in a thread in which
it was instantiated, so we remember that thread and check if it
hasn't been changed every time we access the engine.
Change-Id: I28bc0394ced9cbd437dc950d35ffcbd99cfa7152
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Switching texture units means the value of lastTextureUsed could be
invalid, meaning we need to unconditionally re-bind and update parameters.
A future optimization would be to keep a per-texture-unit cache, so
that we wouldn't have to re-bind and set parameters when switching
units back and forth, but this complicates the current code somewhat,
so it's left for another patch.
Change-Id: Icb2a5d03457a907f3c25bbb437feeb7c5f155716
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The xcb backend relies on grabbing the x server in a few situations like
popuphandling. For Qt 5.4.0 the logic enabling this code path was moved
into the plugin. However it defaults to never grabbing the server
Change-Id: I82489a0727affbce62587b3d7470085cf716a0cc
Task-number: QTBUG-43049
Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Samsung does not support TYPE_TEXT_FLAG_NO_SUGGESTIONS, even
though that flag was introduced in API level 5. Therefore, we
have to use TYPE_TEXT_VARIATION_VISIBLE_PASSWORD. This effectively
makes ImhNoPredictiveText a synonym for ImhSensitiveData on Android.
Task-number: QTBUG-43297
Change-Id: I3e7139d144276462e46512445ad7b8e7114d8e32
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
QImage::transformed compensates for unwanted translation. This compensation
is performed in "pixel space". However, a possible code path to perform the
transformation uses QPainter which is devicePixelRatio-aware and expects the
transformation matrix to be in logical coordinates.
For example, image.transformed(QTransform().rotate(45)) will result in
cropped out image if devicePixelRatio == 2.
Change-Id: I830ff3ffa25531d842dc9c77f1d0e8d4bd502c9d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>
A bunch of zeroes were missing. And not to the left.
Task-number: QTBUG-43279
Change-Id: I1a710cf572099547b2ade7b2574a7e0a61649758
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>
Set the source for mouse events which were caused
by other mouse events.
Change-Id: Ifca1648883ef2b94bb317ed9340759475d350146
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Let the keyboard gesture work better alongside other gestures
by reporting that it should:
1. not prevent other gestures from triggering. This means that
even if our gesture triggers (we close the keyboard), gestures
attached to sub-views will still continue tracking.
2. not be prevented by other gestures. This means that if
a gesture in a sub-view triggeres before our gesture, our gesture
will still continue to track.
In short it means that regardless of other gestures, we always
close the keyboard if our text responder is first responder and
the user flicks down. And we do so as "silently" as possible.
Change-Id: I22386b5ef5dedbc498a2899929ddd07424e514d8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
We try to keep a on-to-one relationship between UI controls with text input
and keyboard visibility. But if the control does not use text input, then
there is no reason for us to clear focus when the keyboard hides. In fact, we
should avoid doing so, since that will stop e.g buttons from working correctly.
The typical flow is:
- a touch release targeting a button is sendt to QApplication.
- QApplication transfers focus to the button.
- qiosinputcontext gets notified, we refuse, and clear focus again.
- QApplication enters a propagation loop where it tried to
find out the receiver of the event. Since the button is now
unfocused, the event will propagate up to a grandparent instead.
- the button will as such not trigger.
Change-Id: I70baa38299f40defc4a77f62790502e2d6ebbba9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This is a cherry-pick from upstream change
e7cfb3dd2029c1bfe5c175ad994c03cac221ad4d
Change-Id: Iefe01545319f9ad268c0c6bf8e8b2181e09d8a84
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Change-Id: I15b313b5f0d57358e405f16e941fc5061028c6a7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
We auto-scroll the screen to reveal the cursor whenever the cursor rect
changes or other properties of the input methods are updated, but the
expected behavior when explicitly moving an item under the keyboard,
such as when scrolling a view or moving an item using drag, is to
not scroll the screen until typing commences. This matches how eg.
Safari or the Notes app handles the same use-case.
Change-Id: I6b6932d9bcbdccd8df26db982246c162f1574d86
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>