Apparently, the function before returned const-&, but now returns by-value.
Use the member data variable directly, the function is const anyway.
Change-Id: I324bc675fd7c9b5bfb28c475eba0c0275379132c
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
> error: 'REFKNOWNFOLDERID' does not name a type
> error: 'GetKnownFolderPath' does not name a type
> error: 'SHGetKnownFolderPath' was not declared in this scope
REFKNOWNFOLDERID is a typedef for `const KNOWNFOLDERID &` and
KNOWNFOLDERID is a typedef for `GUID`.
Change-Id: I2371f49aba6e20b0bd44aad423dd822e5ee152d4
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
The native PDF strokes can not be used with constant opacity as any
overlapping parts of the path will end up being drawn multiple times
getting the wrong final opacity. A constant opacity should therefore
be treated the same as opacity on the pen color, and trigger the
fallback drawing.
Task-number: QTBUG-37101
Change-Id: I44f70a8b494567ee89804a5fa6333304a5abe91e
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
While the user is touching the screen, postpone scrolling
until we get a touch release. Scrolling in the middle of
a touch sequence will change the coordinates under the
touch, and cause some artefacts.
Change-Id: I02ef420abaab780a459f014d4b4cfb75c8fbb725
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
On iOS we have set the style hint 'SetFocusOnTouchRelease'. This is in
conflict with the 'hide keyboard' gesture, since a control can
try to regain focus (and open the keyboard) if the gesture ends
on top of it. So we need some extra work-around code to prevent this
from happening.
The correct way would probably be to cancel the touch sequence once
the gesture triggers, but this is not well implemented in Qt yet,
especially in combination with widgets and mouse synthesis.
Since usage of the gesture behaves really bad in some cases (e.g
if using the TextEdit example) we need to apply this for now.
Change-Id: Ib3327c0bd94d722b4c4793bc6d152d6d19810e4b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
If you show/hide the keyboard quickly while we scroll the
screen, the scroll will appear to jump. The reason is that
the screen animation will start from where the model layer
is at, and not the presentation layer. So specify that
the animation should start from the current state of the
presentation layer.
Change-Id: I3db87ab11aab583eb50784b0c0a03a9a07c8b822
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
If you resign/become first responder several times
while the keyboard is animating (e.g changing focus between
focus objects while the keyboard is animating), iOS will
short-cut the whole animation, and jump directly to
keyboard end-state. For that reason, we always need to handle
keyboardRectChanged, and not bail out early. This is
fine, since the guard we had was really only meant for
keyboardWillShow/Hide in the first place.
Change-Id: I3a3d1e7061962286c538360029ed38410dc0f347
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
On some devices eglBindAPI() will block forever if called before
eglInitialize().
Task-number: QTBUG-37635
Change-Id: Id27f37e3efcd2ff16e97e1f3381ac3ae8ae0ef33
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This makes in-source builds on mac somewhat bearable.
Change-Id: I8c9e8e470acf90b03ee25e21dbbdd61ae2656820
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Fixes failures on Windows 8.1.
Task-number: QTBUG-37822
Change-Id: I30460f430e2249555c4e857237e27aa9b03dfa1b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Change the test widget to use a non-single-shot timer
to hide the menu once it has become visible.
The test shows hangs on Windows 8.1 CI nodes.
Task-number: QTBUG-37822
Change-Id: I8fc782e53256616119920aef714f89f25863b39f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Ensure triggered() and task176137_autoRepeatOfAction()
are using an active main window. Change click timer in
triggered() to repeat until the menu is visible and
add a timer to close the widget and bail out if the
simulated click fails to close the menu.
Task-number: QTBUG-37822
Change-Id: If675660d02335bffd5caa89796914924dad1a909
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
QFontDialog should always show the correct size, even if the size
is not available in the list of standard font sizes. Native font
dialogs across common platforms show the correct size at all times.
Inside init() function, the size list requires proper initialization
since the initial value of size is zero.
Task-number: QTBUG-10317
Change-Id: Idc9e922ac95f797ac98bbf6c885e52828c4c48fd
Reviewed-by: Liang Qi <liang.qi@digia.com>
The calculation of the width/height required for the
scaling algorithm was prone to floating point rounding
issues, where the lower value got rounded down, the higher
one rounded up. This could lead to a situation where we
iterated over one more line/pixel in the line than we have
in the source image.
Correct this by passing the dimension of the source image into
the function and bounds checking the values before iterating.
Task-number: QTBUG-35927
Change-Id: If44b2235a479224660d508a0504fec40d724763a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
When a transient scrollbar is already at the end and user attempts to
scroll further, the scrollbar is "flashed" to indicate that the scroll
area is already scrolled to the end. This is done so that the scrollbar
is first painted with a flag turned on to make it appear visible and
then again with the flag turned off to make qstyle start fading it out.
The previous code that relied on paint events to clear the flag was
error prone, and caused the scrollbars to get stuck in an inconsistent
state. This change makes sure that the flag gets cleared regardless of
whether a paint event in each state is received or not.
Task-number: QTBUG-37787
Change-Id: I907697c32cd4d55208a490804a221a5dd6bf7b0b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
There's no need to create a hidden window to get a surface on iOS, as
the platform supports FBOs. Note that defaultFramebufferObject() returns
0 in the case of offscreen surfaces, which is technically not a valid
FBO on iOS due to the indirect rendering, but binding and rendering
to the zero-FBO seems to be no-ops, so clients may safely call eg
glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject())
to restore the default FBO after drawing to its own FBO.
Change-Id: I2e67f5d69c0698562052f5ac1df0bbfaa3337148
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
- Add a command line parser to properly evaluate help option and
directory argument, add options to disable gestures.
- Add logging category so that the user can actually see what is
happening.
- Scale large images.
- Use qreal instead of float.
- Minor polishing: set window title, position file dialog at
pictures location.
Task-number: QTBUG-37759
Task-number: QTBUG-37203
Change-Id: Ibaf54a13034b150386a8aee476f83a9eba298298
Reviewed-by: Indrajit Tapadar <indrajit.tapadar@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
The compiler DLL is a system module starting with Windows 8.1, so
directly link to it instead of expecting a packaged DLL. This makes
shader precompilation completely optional on this platform.
Change-Id: I46cd175ac32e4909a518a059721241b1d6e7be17
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
These ifdef guards were originally a part of
"0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch",
but were lost during the last ANGLE upgrade.
Task-number: QTBUG-37842
Change-Id: I4340c1641675dd310c14454a851eb4bc0ae2ec0d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We don't support xlfd fonts anymore and indeed QFont::setRawName()
is an empty method.
[Changelog][QtGui] QFont::setRawName() and QFont::rawName() are
deprecated.
Change-Id: Ic52d42a9bc200ba8b246dd4e28c77f84e086dad5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The Khronos documentation for glCheckFramebufferStatus recommends calling
the function to see if the framebuffer is complete prior to rendering.
We now give more info to clients that call makeCurrent(), by storing the
state of the default FBO and returning that, instead of always returning
true and leaving the clients vulnerable to calling OpenGL functions on a
non-complete FBO.
Change-Id: Ia99c21f811ac799b350f07e73b2ae4b173d71120
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
QOpenGLVertexArrayObject saved the QOpenGLContext it was created in at
the point of QOpenGLVertexArrayObjectPrivate::create(), but didn't set
the saved context back to 0 in QOpenGLVertexArrayObjectPrivate::destroy().
The result was that the zero-pointer checks in the VAO destructor never
hit, and we ended up trying to make a destroyed QOpenGLContext current.
This bug was triggered by the QFontEngine having a limit of 4 concurrent
glyph caches, so when we created the fifth glyph cache we would remove
an earlier one, which destroyed its VOA, that referenced a QOpenGLContext
for a window that had been destroyed already.
We now reset the context back to 0, and disconnect aboutToBeDestroyed()
at the point of QOpenGLVertexArrayObjectPrivate::destroy().
Change-Id: Ib16f3877b310144886cf863b16697c137e7c7941
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
In QOpenGLMultiGroupSharedResource::value(), the m_resources memeber of
opengl context group will be checked and may be inserted a new value. This
function may be called from different threads with the same opengl context
group object: Think about that OpenGL context A and B are shared, they
live in different thread, and in each thread we call
QOpenGLContext::functions() to the context, that may cause the race I
mentioned above. So I put a QMutexLocker to prevent race condition.
Change-Id: I101a28f46b2af72b3094a9945880efeb3563482a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
- Record the last event ID with every callback. This event ID is passed
to FSEventStreamCreate when restarting the stream, so the watcher will
receive all events that occurred since invalidating the previous stream.
- Never start with kFSEventStreamEventIdSinceNow, because this will
generate a (bogus) soft-assert in FSEventStreamFlushSync in CarbonCore
when no event occurred since stream creation. The last globally
generated event ID is used instead to simulate the "now".
- Do not dispose and recreate the stream in the callback, but use a
queued signal-slot connection to schedule this on thread that owns the
watcher.
Change-Id: I02f5a845d9e27f9853ed97925ab9c7a5bc0dede1
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
We manage embedded modal sessions with a stack and only run
the top-most session. We also stop the last modal session
before starting a new one. However, if there is no modal
session running yet, we end up stopping NSApp. This seems
to cause ill side effects on OS X 10.9. Notably, starting
a new modal session outside QCocoaEventDispatcher, like when
opening a native file dialog, makes this last modal session
impossible for the user to quit.
In this patch, we make sure NSApp is kept running if there's
no modal session running yet, akin to calling QDialog::exec()
at the event dispatcher level. The behavior for ensuing modal
sessions remains unchanged.
Task-number: QTBUG-34677
Change-Id: I6a23b191e4dce18514504b8e953f8caa7fad8731
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Introduce function checking whether the system settings in
native format can be written to. If not, default to user scope or
skip the respective tests instead of failing.
Task-number: QTBUG-37822
Change-Id: I330aff9b79bb22254216f022af807e010bc8e8ba
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
- add QT_XKB_CONFIG_ROOT envvar, this can be used to provide an alternative
XKB configuration search paths (default XKB configuration root is detected when
building Qt library). At runtime these paths might change - when dropping Qt
application binary into a system with different setup.
Change-Id: Ia21a3e7f0339c95793c1f543d1a95b1591e5d8df
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use the new X11 support API xkb_x11_* released in libxkbcommon version 0.4.0.
From the commit message where this API was introduced:
"These are function to create an xkb_keymap directly from XKB requests
to the X server. This opens up the possibility for X clients to use
xcb + xcb-xkb + xkbcommon as a proper replacement for Xlib + xkbfile for
keyboard support.
Why not just use the RMLVO that the server puts in the _XKB_RULES_NAMES
property? This does not account for custom keymaps, on-the-fly keymap
modifications, remote clients, etc., so is not a proper solution in
practice. Also, some servers don't even set it. Now, the client just
needs to recreate the keymap in response to a change in the server's
keymap (as Xlib clients do with XRefreshKeyboardMapping() and friends)."
This patch moves XKEYBOARD presence decision from compile time to runtime
for a proper remote X client support.
Task-number: QTBUG-31527
Task-number: QTBUG-32760
Change-Id: I4d402668cda2126ef180b27022154f96b1874b1d
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
I'd like to keep registerTouchDevice from androidjniinput.cpp, touchEnd
as a backup for buggy Android devices that are not setting
Configurations.touchscreen field correctly.
Task-number: QTBUG-36007
Change-Id: Ib8f107474baa278b2d82d9ca14913512dfff01c2
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
The integration seems to have been missing this flag. Hence we tried to
open new windows in non-fullscreen mode causing lots of issues. For
instance this resolves QCombobox popup problems.
Task-number: QTBUG-37593
Change-Id: I3d3e3699dff91dcb95613893c2a5bdefc90131b7
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Namely, the Mali 400 and the Adreno 200. We used to enable this
workaround only for the Samsung Galaxy Tab 3, which has a Mali
400. The same problem was confirmed with the Samsung Galaxy
Note N7000 (Mali 400) and the ZTE Blade (Adreno 200).
Task-number: QTBUG-33951
Task-number: QTBUG-34984
Change-Id: Ic624962986f718285b98ab4ca48e22f9aa110753
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
When the launch mode is singleInstance, then intents will not be
launched as activities inside the same task, but as separate
tasks, and onActivityResult() is always called immediately
without any data. This is documented in various stack overflows
and google group messages if you search for it on the Internet,
and the singleInstance launch mode is documented as "not recommended
for normal use". This broke e.g. automatic downloads of Ministro. The
singleTop launch mode seems more like what we're after, and fixes
both the original issue as well as the current problem with intents.
Change-Id: Iab24a654a4433f979064509b1ef721db9ef352af
Reviewed-by: BogDan Vatra <bogdan@kde.org>
After a test ended, we would instantly try to fetch its output,
but at this point, it might still not be available through the
adb interface, probably due to some cache synchronization in the
file system? Adding an arbitrary three second pause between
finishing the test and requesting the file fixes this. If the
error pops up later again, we could do something more robust,
like going in a loop for X seconds until the file has been fetched.
Especially if detecting task finish was successful.
Task-number: QTBUG-37444
Change-Id: I5442e1e0181f489b0626834a390e46c15bc0b371
Reviewed-by: Simo Fält <simo.falt@digia.com>
Examples under examples/ipc were not part of any module
documentation. This change adds the above folder to
Qt Core documentation, and moves the corresponding
files so that the example documentation is built
correctly.
Change-Id: If1f34ce7ef04a02df8a87f820bb2e68ffa723dd4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>