Unlike QTextEdit, there's no implicit width for a QGraphicsTextItem,
meaning any rich text that is supposed to be centered or right aligned
will not be unless the user explicitly sets the width.
There's also another possibility: calling adjustSize() manually.
Document that.
Task-number: QTBUG-312
Change-Id: I83023269f4c63643e8224887efe2143dd1bb1908
Reviewed-by: Andy Shaw <andy.shaw@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>
Each entry in the link-to-link tables and in the
broken-links table now includes the source file
path of the file where the link or broken link
appears and the line number in that file. The
line number often refers to where the comment
that contains the link begins, so sometimes
the link or broken link appears further down in
that comment.
Change-Id: I692bfc173c8711bf26c9c59ad9771930c27e24a8
Task-number: QTBUG-41850
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Although it is not recommended, it is allowed to have a carriage
return in a qdoc command parameter that is enclosed in curly
braces. qdoc is supposed to use QString::simplified() to sanitize the
string so that all whitespace is replaced by a single ' '. But in at
least one case, this didn't work, and the carriage return was left in
the string, which caused qdoc to report that it couldn't find links
that have the carriage return in them. The problem has been fixed by
replacing the carriage return with a ' ' right when and where it is
detected.
Change-Id: I31c31f19a1e4150b2e27613ecbac260c46a7109b
Task-number: QTBUG-42449
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
The cross-module link report now contains an entry
for the links to broken links subpage. It is the
last entry in the links-to-links table on the QA
page.
Change-Id: I9e0b3ba5f2efe76055902467348db878dbed9991
Task-number: QTBUG-41850
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
qdoc no longer tries to autolink symbols that begin
with two underscores. There may be other cases where
qdoc should not try to autolink. They should be
handled in this same place.
Change-Id: I5a39ea2bb0edec2289b8a4b1a9af1f33534093a1
Task-number: QTBUG-42441
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Currently, qdoc processes \keyword and \target the same way. The
negative effect of this is that when either command appears at the top
of a qdoc comment, the anchor it generates in the html file is just
above the details section on the html page. This is usually wrong,
especially for \keyword commands, where the anchor generated should
always be at the top of the page/text where the \keyword appears. This
update implements that. \target anchors are meant to be used when the
anchor should appear somewhere in the middle of the page/text, exactly
where the \target command appears.
Change-Id: Ibbbf1087562a977ff74ccd98febfe9310ecba8f0
Task-number: QTBUG-42290
Reviewed-by: Topi Reiniö <topi.reinio@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>
We need to reset the active_engine belonging to QOpenGLContext whenever
we make the QtOpenGL paint engine active, to give the OpenGL paint
engine in QtGui a chance to sync its state if we've used the QtOpenGL
paint engine inbetween.
Change-Id: I445ce2f99bfbacf55650c881c4fdf07f2ff85069
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
When using QGLWidget in combination with QOpenGLFramebufferObject from
QtGui, instead of QGLFramebufferObject from QtOpenGL, the current_fbo
variable doesn't get updated when framebuffer object bindings change.
To ensure that the QGLWidget correctly releases the currently bound
framebuffer object when using a QPainter, we keep track of whether
QOpenGLFramebufferObject has modified the current FBO binding, and if
that's the case we need to read the OpenGL state directly instead of
relying on a cached value.
Change-Id: If7e0bd936e202cad07365b5ce641ee01d2251930
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Ensure the sdk is of recent enough version since:
1. we build Qt with the latest sdk version, so the app needs
to do the same to avoid compatibility problems e.g when linking.
2. using a launch screen to support iphone6 depends on sdk 8
3. Apple requires apps that are pushed to appstore to use the
latest version of the sdk.
Ideally we should store the sdk version used to build Qt, and
require that apps use the same version or newer. But this patch
will do until that is in place.
Change-Id: I18b06d09c1eda15122975b7169ca7a3372df6054
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
(it led to printing out garbage, when enabling QMIME_DEBUG)
Change-Id: Iaacd9139ac09e7637930317535631be8132fe0a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This particular "feature" leaked into QtQuick1 back in the day. Still
it was never documented in QGraphicsView.
Task-number: QTBUG-18267
Change-Id: Ib5fb446015176f6e9b4095f6ec9030258cbd1ad4
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
To match rendering of subpixel antialiased text in Qt 4.8 and other
toolkits on X11, we should not apply gamma-correction. This also
makes the rendering of subpixel antialiased text closer to normal
antialiased text.
Task-number: QTBUG-41590
Change-Id: I45ad3448334951353657b878d002eea429858f2d
Reviewed-by: Samuel Rødal <srodal@gmail.com>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The cross-module link report is modified so that each module
listed in the table is a link to a subpage on which all the
links from the current module to that module are listed. To
check that these links go to the correct place, click on one
to be taken to the actual link. The actual link is marked
with red asterisks. Click on that link to check that the link
goes to the correct page. Repeat this process for all the
links in the table.
Change-Id: Ifddf7108ed7ef090c4063909fdbd10dac1f2566b
Task-number: QTBUG-41850
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This update fixes a bug introduced in the original update for this
task. The bug caused some links to be generated incorrectly. If the
name of the file containing the target began with the module name,
then a test that asks if the link already begins with the module name
fails, and the link is generated incorrectly. The test now checks for
the module name followed by a slash, which it should have done in the
first place.
Change-Id: Iebac228ac969cef875678b15a248a2a1198ace05
Task-number: QTBUG-41705
Reviewed-by: Martin Smith <martin.smith@digia.com>
When tokenizing, after macro expansion, moc needs to concatenate
subsequent string literals, because parser do not check for such
expressions.
Change-Id: Icc4f01395a5a7b67368eb8341a45ee74ade7d7f5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This allows apps to ship their own openssl libraries inside the
application bundle.
The change consists of two parts: First, adding
<bundle>/Contents/Frameworks
to the alternative search paths. Second, disabling the preemtive
check for libssl.dylib, libcrypto.dylib in the system paths:
The system's /usr/lib/libssl.dylib, /usr/lib/libcrypto.dylib
will still be picked up as a fallback in the alternative search
paths, but only after .app/Contents/Frameworks have been inspected.
[ChangeLog][QtNetwork][QSsl] On OS X and iOS, openssl dylib's are
picked up from the 'Frameworks' directory of the app bundle.
Change-Id: I982930f4a6cf5e0114c04ecbc87f27e54ba8bb88
Reviewed-by: Jake Petroules <jake.petroules@petroules.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>
Fix warning:
QEventLoop: Cannot be used without QApplication
and occasional crashes on Windows.
Task-number: QTBUG-26406
Change-Id: Ia8b2a4e3d375d1e43f0e66fe64a39af5f9cf4d60
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Dario Freddi <dario.freddi@ispirata.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>
- upstreaming the implementation of a BlackBerry 10 specific widget style
- modfied to be integrated as a style plugin being a part of the QtBase
- according docs are provided in QtDocs in another commit
- attributing the excellent work at KDAB who was the original developer
Change-Id: I57c548f6ec4cf02f125ee216f1ce1b764f29e8bb
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
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>
If a context menu contains a menu item which will open a dialog, the
context menu will never get the leave event, which might leave the menu
in an invalid state.
Synthetic leave events are sent to windows, but not to popups that are
blocked by modal dialogs. Hovever, a popup is removed from the popup
stack in QApplication before it receives the leave event. Therefore
always give popups events, even when they are not visible.
Task-number: QTBUG-38021
Change-Id: I63f6febed44f1e7c8f29e7a09af07f32b4ddbc82
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.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>