This fixes a regression introduced by
04d3a89e20 as it left out the custom build
step for the source code file generated for PCH.
Task-number: QTBUG-42596
Change-Id: I53d5a36b842dcffbde2657910e6a96dca0e99c7b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
If the menu is closed from the keyboard gesture, and
the focus object doesn't change, the menu will still
be in a visible state, even if the keyboard is hidden.
This patch will ensure that this can not be the case
by listening for keyboardWillHideNotification. Since
we have no guarantee for when the destructor runs, we
apply a pessimistic approach and ensure we stop listen
when the menu gets closed.
Task-number: QTBUG-42523
Change-Id: If734ea32d1823b978c9c1c67ebcc5b6c3c5c338c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Since the picker menu uses IM to set an alternative
input view, we also need to specify that we IM is enabled.
Task-number: QTBUG-42523
Change-Id: Ia559fbc0ca7e6a1a4499d5eb179baa2d915ecb17
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Current approach of reloading input views assumes that
the first responder is not a QIOSTextResponder, but
a QUIView. This is not always the case, e.g if someone
calls update after setting IM enabled on current focus
object to false. In that case we'll try to close the
keyboard by reloading input views on a quitextresponder which
can fail if the text responder has an external input view
attached.
This patch will instead hide the keyboard by resigning first
responder when it is a QIOSTextResponder. If it is not
a QIOSTextResponder it means that the keyboard is already
closed, or a third-party UIVIew that supports key input is first
responder. In either case we then leave it as-is.
Task-number: QTBUG-42523
Change-Id: I4dab648af9029941a8d5d3b00011fbd169be5482
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Mandatory as per the standard iterator requirements, was causing
compilation errors in the STL algorithms.
Task-number: QTBUG-41628
Change-Id: Iee12a3b822383f63c07e270244fd0e145a486b95
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Because change a093204f07
qeglfshooks_stub.cpp don't compile anymore on any other *nix
platform than linux as those functions have been set linux
specific only.
Change-Id: I339672b1bf2745511076030cc1fe13dc7f2356ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This reverts 1dd9a0af4f. It was
a band-aid for a change in the unicode itemizing algorithm
which caused the script of a script item to become unreliable.
This change has since been reverted, so the band-aid is no longer
needed, and it also causes problems for WebKit on Windows when
it ends up preferring Arial Unicode MS as the font for Uchen
script, even though the font does not support this script.
The autotest from the reverted commit is kept in place and still
passes.
[ChangeLog][Text] Fixed regression when rendering Uchen text in
WebKit on Windows.
Change-Id: I488c84703bb55a050d90092c6bf9e5c70a9e31c2
Task-number: QTBUG-41372
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Apple will from February 1, 2015, require all applications uploaded to
the App Store to be built for both 32-bit (armv7/s) and 64-bit (arm64).
https://developer.apple.com/news/?id=10202014a
We enable fat Qt binaries by passing both -arch armv7 and -arch arm64
to clang, which takes care of lipoing together the two slices for each
object file. This unfortunately means twice the build time and twice
the binary size for our libraries.
Since precompiled headers are architecture specific, and the -Xarch
option can't be used with -include-pch, we need to disable precompiled
headers globally. This can be improved in the future by switching to
pretokenized headers (http://clang.llvm.org/docs/PTHInternals.html).
Since we're enabling 64-bit ARM builds, we're also switching the
simulator builds from i386 to fat i386 and x86_64 builds, so that
we are able to test 64-bit builds using the simulator, but we're
keeping i386 as the architecture Qt is aware of when it's building
for simulator, as we need the CPU features to match the lowest
common denominator.
Change-Id: I277e60bddae549d24ca3c6301d842405180aded6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Building all architectures of a multi-arch build during Qt development
is in most cases not needed, so we expose a way to limit the archs we
build by passing ARCHS="subset of archs" to make, similar to how you
can pass ARCHS to xcodebuild. If the subset doesn't match any of the
valid architectures for the target, it will fall back to the default
architectures, so it's safe to pass eg. ARCHS="armv7 i386" to make,
even if building for both simulator and device. The variable may also
be exported to the environment for more persistent limits on which
architectures to build.
Change-Id: I47b10bc9d743f0301efff4181d6881ae140d557f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
We need to tell Xcode which architectures it should set up pre-link
dependencies for, as well as run the rename script in the root object
file directory. We pass it the current architectures so that we only
rename main() for simulator or device, not both.
Change-Id: I095d7c8a22ff0cb2ce872c9a86c93a070c1fcc65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Without setting firstResponder to 0 upon destruction, the current retain
count would never reach zero after the event was used. The result being
that QIOSTextResponder was seldom destroyed, which would also affect its
inputView etc which would also be kept alive.
Change-Id: Ia88e6a9d8764e7e9532487153e5e81a7ad0f9741
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
We'd transfer or clear first-responder in a lot more cases than just
when transferring to a new Qt window, such as when presenting a new
view-controller on top to send an e-mail or take a picture using the
camera.
Change-Id: I6b2a8a6d9fd99910b96a86cf9847b7ff0128f20a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
With multi-architecture builds and ONLY_ACTIVE_ARCH set to NO, Xcode will
build the final target for multiple architectures at the same time, but
CURRENT_ARCH will only match one of them, so we failed to set up the
right dependencies for our pre-link step, causing the step to happen
after linking in some cases.
We now build an exhaustive dependency list based on QMAKE_XCODE_ARCHS,
so that ONLY_ACTIVE_ARCH=NO can be used for release builds targeted at
the App Store.
Change-Id: I6702f020a6970807adc624779f6dde09be62beb9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
iOS8 will check if the app has a LaunchScreen.xib to determine
if it supports iPhone6/6+ (scale factor and resolution). So
we follow the same pattern as we do with the launch image for
iPhone5, and generate a default LaunchScreen.xib.
The xib file in this patch is a copy of a default file
generated by a native Xcode project (with quotes escaped), but
with the text label set to be $$TARGET.
Change-Id: I163ab48b6f4edea4cc1f6840a1f3d8b3cc0326db
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This hack was reintroduced in a4478b2896,
and hides scaling artifacts in fonts where there is heavy hinting,
such as Arial, but introduces new bugs in other fonts, such as
Vijaya. The bottom line is that we shouldn't arbitrarily override
the pixel size of the font with the character height that we get
from GDI. Due to hinting, there will be some artifacts when printing
with screen resolution on Windows. The only way to make this look
correct is to use high resolution printing, like the documentation
says, or perhaps to force design metrics on the text layout.
Task-number: QTBUG-40770
Change-Id: Id151eb0ede5f73efb2a401924ce379d4414ca2b1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The new template and CSS have some requirements that need changes
in the generated .html:
- Generate a new div 'sidebar' and place the TOC (if one
exists) inside it, allowing the template to extend the
sidebar contents dynamically. Do this for all pages
except index.html.
- Change the DOCTYPE declaration to be html5-compliant
- Replace <tt> tags with <code> to be html5-compliant
- Add a new config variable HTML.prologue - this allows
the template to insert custom html into beginning of
the page, before the page title but after any navigation
or table-of-contents items.
- Wrap tables inside <div> elements. This allows for
better-working CSS design for small-screen devices.
- Write out extra parameters first when outputting
function synopsis to have better styling.
- Inject zero-width-space characters into function
names to allow the browser break up long function
signatures in a nice manner.
- Edit the CSS for the offline style to adapt to
above changes.
Task-number: QTBUG-42086
Change-Id: I3075cdc11bcb07a66150388519263fd721c8002b
Reviewed-by: Martin Smith <martin.smith@digia.com>
The marker can occur legitimately twice e.g. on iOS
with universal binaries.
Change-Id: Ie334bcd104d45140ff969f44230e6de2212e8e25
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
Refactor the current app CFBundleIdentifier support:
handle frameworks as well. Add @BUNDLEIDENTIFIER@
placeholder to the OS X info.plist.lib templates.
This means the Qt frameworks will now get a valid
CFBundleIdentifier entry the same way as app bundles:
by extracting the identifier prefix from Xcode settings
and appending framework name.
Task-number: QTBUG-32896
Change-Id: Ica8f28332a88e37a823c46fca7a2c373157af020
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Switch_showText specifies whether the on/off text is shown in the
thumb and Switch_splitTrack specifies whether the track is clipped
underneath the thumb.
Change-Id: I03fc6b799fe714e7b6e604328901c8c5a418ca6e
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Commit ec360d7ad9 made it work for ELF
platforms, Apple platforms and for MSVC, but we apparently forgot it for
MinGW. This patch corrects that mistake.
We won't have the PE-COFF section parser until 5.5, but this will at
least making Qt 5.4-built plugins work on the faster case.
Change-Id: I51b06837dc321eaa4724c9598293cf85570f67fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Calling the function has the same effect as dismissing the keyboard using
the native keyboard dismiss button or the hide-keyboard gesture, and will
result in the QIOSTextInputResponder losing first-responder status and
the current focus object being cleared.
QtWidgets and other parts of Qt will try to hide the keyboard during
focus changes between widgets, which we already take care of when the
focus object changes, so we detect the situation and ignore it, by
requiring that the current focus object matches the one we've brought
up the text responder for.
Showing the virtual keyboard is still a no-op, as there is no way to
show the virtual keyboard without a focus-object.
Change-Id: Iefcb403c2b6d3da8a4df3fcd53bc1244ba9c4d23
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Allows us to track state through the normal gesture recognizer states
instead of custom variables.
Change-Id: I4fe1b370a581132a9bbb8f51f7bee73381b80341
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
The standard POSIX clock functions are present on QNX, but only
return timing information with millisecond accuracy. To get
accuracy beyond that, platform-specific functions must be used.
Change-Id: I54a0550f1865dbea3c60a86ecd8ad99df3fe42b4
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Due to the way that the QCC mkspecs are structured, the recent
change to add full optimization support causes the -O2 flag to
be completely dropped from QCC builds in release-with-debuginfo
mode, since the QMAKE_CFLAGS_OPTIMIZE variable is not declared
in any configuration file included by QCC toolchains. This patch
adds the necessary flags to make the QCC toolchain operate correctly.
Change-Id: I4cd93442d59fae7c92fc5219cddb16f367447203
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
In rare cases, the Windows event loop can be spinning inside the inner
loop and the message hook is never called. This can be triggered on the
Direct2D platform by opening 32+ window handles.
The issue can be worked around by using the same approach Windows CE uses:
don't rely on the message hook to inform the event loop that the post
message has been delivered. Instead, uninstall the hook and let it be
called directly by the event loop.
Task-number: QTBUG-42428
Change-Id: I10280126dd50729bc260aa5f7029549e2e061c01
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
It is possible that Qt calls paint() several times for an item that
has caching enabled, even without any explicit call to update(). There
are various reasons why that is possible (memory pressure, item gets
transformed, etc.); the important part is that
1) the user must not rely into "caching enabled" = "1 paint() call"
2) the user must always draw the same content from within paint(),
unless update() was called before that call to paint().
Task-number: QTBUG-18410
Change-Id: I2c8d77e6e11aaceffc9a21003dd3f4cc46edd582
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Add WINRT_MANIFEST.rotation_preference as description which orientation
is allowed or preferred by the app. Valid values for Windows Phone are
portrait, landscape, landscapeFlipped. WinRT also allows portraitFlipped
Task-number: QTBUG-40830
Change-Id: I6b11afcdb72c2c158dadddafc5d90c1d18ab9d8b
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
The defaultConfiguration could switch and be either active connection,
so we determine the default should be what has the default route.
Change-Id: I194f27b60e7a3598eca2ff09c2225ba1a46564d9
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Cabling changes can be detected right away, so we should act on that
and change the configuration state.
Change-Id: Ifa9709077215567001e11ab655208a2c1b090073
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
There are some issues preventing 2x images from loading, mainly incorrect
testing for exist() by passing an url, which always reports ‘false’.
Task-number: QTBUG-36383
Change-Id: I1e8e5a91b01f1a4ddd3559c2e860db5bc41908ce
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
QIODevice makes readData() call only when its read buffer is empty.
Also data argument points to the user or reserved read buffer area.
So, no need in data transfer from read buffer at this point at all.
Task-number: QTBUG-41797
Change-Id: Ieb4afdf7eec37fdf288073e4a060e64424f22b9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1853579dad1bbb44599314213a1d8a203ecae1c9)
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
IBus can hand us multiple attributes for different formatting properties
of the same text range for events. The IBus input method plugin used to
convert these straight into multiple QInputMethodEvent::Attributes, each
with their own QTextCharFormat instance.
According to the QInputMethodEvent documentation, behavior with multiple
TextFormat attributes for the same text range is undefined. In at least
one known user, KDE's Kate text editor, it causes invisible text for
pre-edit text events as the QTextCharFormats are applied in turn with
partially default-constructed foreground/background brushes:
https://bugs.kde.org/show_bug.cgi?id=339467
This patch makes an effort to merge formatting information for identical
text ranges into a single QTextCharFomat, while otherwise preserving
existing behavior (attribute order is unchanged and attributes deseria-
lized from D-Bus as having invalid QTextFormats remain untouched).
No attempt is made to cope with overlapping text ranges. Segmenting into
smaller ranges and merging for the overlaps would be conceivable, but
until a case of an input method creating events with overlapping ranges
is known seems not worth the effort.
It's worth noting that the IBus input method plugin for Qt 4 also
attempts to merge formatting information into a single QTextCharFormat,
but with a distinct implementation from this one.
Change-Id: Ie3dc38b353724ffb7b5f2d7f316393027373baf2
Task-number: 41640
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Not all platforms do have QRegularExpression as it is based on
pcre.
Change-Id: I6b8e701ff7cf30e776ee34e5dc836cd24c9543b5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The GraphicsView stack still seems to have issues emitting focusObject
change signals when the focus object changes inside the item hierarchy.
To be on the safe side we use our own view of whether or not IM is
enabled, and try to detect and warn if we find a case where the two
are out of sync.
Change-Id: I9fde896ea14ea5b65784723110887e06453edbd4
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
In the toolchain for x86 the va_list type is defined as char *, which
in itself isn't strange, but it was somewhat unexpected as it differs
from the arm toolchains. Either way we should not make assumption about
the va_list type as there is no guarantee it won't cause conflicts when
overloading. This fix simply renames the private overloads.
Change-Id: I7808619d0fa3ca63b75796308cfdff6aa41a7fd0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Found by clang static analyzer.
Change-Id: I8f15ae1a8e6afb91eafa6cee1d1b21e3539af6c1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit changes several instances where moc was generating code that
used 0 as a null pointer constant. The Q_NULLPTR define is the more
idiomatic way to do this, and additionally this silences warnings
generated by e.g. GCC's -Wzero-as-null-pointer-constant.
[ChangeLog][Tools][moc] Fixed "zero as null pointer constant" warnings
in moc's generated code.
Change-Id: Ibe382b7bdbdddaf20cb4bdfd075fcdd1f363f9d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>