- 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>
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>
The "Fixed CE build of sqlite3" patch is preserved in this change.
(ea70ec8711)
Change-Id: I7da6504a1d1bee7926a122d7c4ec3a2bf4035d03
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This patch fixes an issue when a font that was added with
QFontDatabase::addApplicationFont can not be removed any more.
The reason for that is that QFontconfigDatabase::addApplicationFont
adds the font to the FontConfig application set from where it
cannot be removed any more and is picked up every time the font database
is repopulated (e.g. after a call to QFontDatabase::removeApplicationFont).
This also fixes the QFontDatabase autotest which unfortunately does
not fail on linux, because it tries to add "FreeMono" (which in most
cases is already there as a system font). So this patch removes FreeMono
and adds LED_REAL as test font.
Change-Id: I70fc823075923aa426da1eb3e052affcc416e399
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
For non full screen windows the geometry change event was not sent.
Change-Id: I982621d87fe248bbe13640dd3e17b31fb9f30120
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
This simplifies how we handle QNSView for accessibility purposes.
Instead of trying to half-merge the top level widget
(window->accessibleRoot) into the view, just have the view
always return it as child.
This makes the accessibility implementation for QNSView simpler
and makes applications that show a top level widget such as a button
possible. (We would return accessibility ignored for the button before).
As a side effect finding the active focus and hit-testing should be more reliable as
well.
Task-number: QTBUG-37794
Change-Id: Ib52037f88da8887a0bdc77204b0f3daddfe7709d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
After that, QWidget::isMaximized() should return false.
Task-number: QTBUG-37703
Change-Id: Ic8b0de63ab007066cd277f511dfaa969404ff069
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Adopt to the new lazy font loading strategy in order to reduce memory
and startup time associated with populating the entire font database.
Change-Id: I0134cc123f73cb8485fe85c4a6b8e3b3a3a2cab0
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Make sure QWidget::render takes correct code paths with all
kinds of paint devices.
Correctly restore the inRenderWithPainter flag. The old code
would not correctly restore the flag, likely leading to
inconsistencies. Remove the unused last parameter in
QWidgetPrivate::render. Remove the special handling
for QPrinter in the same method.
Task-number: QTBUG-26564
Change-Id: Iba43269b090abd8dd88c5225b75e1ee9239d58f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Constructing a QCollator is somewhat expensive, and made
localeAwareCompare really slow. As QCollator (at least with
the ICU implementation) is not thread safe, use one collator
per thread. This speeds up collation of a long list of strings
by a factor of 250 for the test case in the bug below.
Task-number: QTBUG-36149
Change-Id: I645cdc3546347d1dcc7a03b7563b628c7f756944
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Our fallback fonts would contain a minimal list of hardcoded fallback
fonts, which is neither sufficient for displaying all text, nor
portable to different vendors which can supply different font sets.
[ChangeLog][Android] Fixed font merging problem which caused e.g.
missing glyphs for Arabic numerals.
Task-number: QTBUG-37738
Change-Id: Ic971343a1cd5610c79a81f6f6152c637937b5626
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
WM_STATE and _NET_WM_STATE are not the same.
c6e271da6d introduces a severe regression
in this respect, making applications on xcb not to follow window state
changes properly.
Task-number: QTBUG-37695
Change-Id: Ia058bc11d5aa988eab513939c9f755c2f77512ee
Reviewed-by: Martin Klapetek <mklapetek@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
When we create an event dispatcher outside of the main thread, we
shouldn't be looking up the core event dispatcher as it will fail. This
ends up printing a scary warning for all e.g. Qt Quick apps when in
reality nothing bad actually happened.
Task-number: QTBUG-35327
Change-Id: I2060f0a9d4baffc42ca727e8d4e1ef7c13f6a2df
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Remove the warning about the graphics mode switch. In some environments
it just pollutes the output since it will always fail.
Change the errno-based warnings to qErrnoWarning.
Change-Id: Ib7a7bfe64eda29996db288e52d369dcfad76c096
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Fix also the statement about buffer size handling.
Change-Id: I94e93fa4df7fee9b789ecca33d8722fbfc86ccc5
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
The QEGL_DEBUG defines have been removed some time ago from
eglfs and eglconvenience, except for this one. It is also
inconvenient due to the OpenGL dependency of it. Quick apps
can anyway get the same information with QSG_INFO=1.
Change-Id: Ie25c5286234a10699652d618d6f4174c6d3238e2
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Some embedded devices do not play nicely with 16-bit (565)
EGL configurations, resulting in ugly banding in Quick apps.
Add a QT_QPA_EGLFS_FORCE888 environment variable that can be
set on systems where it is known that only 24 or 32 bit configs
provide acceptable results.
Change-Id: I7b8d7b9a2cd40b51a844d0795b7156b735e18ebb
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
q_printEglConfig has been left unused. Start using it again,
in case QT_QPA_EGLFS_DEBUG is set. This will, similarly to QSG_INFO,
help debugging, especially on embedded devices.
Change-Id: I1448632ed055dd71e98259f042d3cac64620a4ce
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
The hooks' surfaceFormatFor() function is called twice on the format
when creating platform contexts, once from the integration and once
from the constructor. This is potentially dangerous. Do it only once.
Change-Id: I58eadce01b8f2183abe116f88b1ee9f2b47c003d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Removed/updated some out of date information.
Change-Id: Iec2105f15c83f04dafbed15a9600e3de0e03f0de
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
You can't always get what you want: if you exit from fullscreen
mode via showNormal, it might actually be maximized; or if you exit
via showMaximized, it might actually be normal, if that's the mode the
NSWindow remembers. We can't set the state, we can only toggle it.
But now at least it's predictable, so that if you call showNormal
or showMaximized twice, you will definitely get back to that state.
Task-number: QTBUG-35166
Change-Id: I7422960a64f624920566c25763f5c3b03a684fb5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The flag is used only in qstring.h and gives no real value.
Task-number: QTBUG-37437
Change-Id: I7513b56af208a5edee8452b8bbcb9b128e25133d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
As these fonts are deployed as part of the package for WinPhone projects
by default they have to be installed in order to be available in the
packages.
Change-Id: Iaaca7b7db0525f06d3e1716d5a337550ffb1dea9
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This attriute is needed otherwise if the user puts the application in
background and uses the appication icon to bring it back in front,
andriod will create a new activity.
Task-number: QTBUG-37186
Change-Id: Icdc87239c1a07a3e555296692a4866eb6351348e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Use QStringIterator instead of QString::toUcs4() and escape earlier.
Change-Id: If80b886bece1a43af7078e8cdc9c31babf602731
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This patch implements the TODO concerning the retrieval of
DownloadLocation using SHGetKnownFolderPath
[ChangeLog][QtCore][Windows] Now QStandardPaths::DownloadLocation
returns the proper path for Windows Vista and up
Task-number: QTBUG-35194
Change-Id: Ifc7686e23de76dbfd7826a75e4bf99aa5b9268b0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Correct links and fix typos, remove obsolete documentation,
fix some snippets, mark some classes as internal.
Change-Id: I9a3266605f060783413d32740057a57a820c8929
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
When the window geometry is changed an expose event should only be sent
if the window is visible.
Change-Id: I540ea7e7e07d896495547f3f8bf81738fad3ddee
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Currently QtWebKits custom fonts does not follow the system settings
on Linux. This is because they are only handled by the basic
fontdatabase.
This patch adds handling of custom fonts to QFontconfigDatabase.
Change-Id: I676fc97840766b58cd937bb8e2c9f166f30c8a6e
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
QQuickWindow depends on maintaining state of known touch points
between events, so it needs to be notified when it will not be
receiving the corresponding release event for one or more.
This temporary fix needs to be reverted when we have a proper
event forwarding solution.
Task-number: QTBUG-37371
Change-Id: I5dc40af6feac425be8103c1586f8ebe3a6aad20d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Patch by John Layt.
Analog to how the print preview problems on windows were fixed, this
is needed to correctly print e.g. web view contents.
Task-number: QTBUG-36308
Task-number: QTBUG-37240
Change-Id: If4ecffde969ed221bbbeea80232f29f095fd71cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
For apps created with Qt 5.2.1, the AndroidManifest.xml will
contain a reference to android.app.splash_screen, which was
removed from the application template when the splash screen
functionality was fixed by 4d08d80be6.
To make sure existing apps still compile, we put back a dummy
splash.xml so that the reference in existing manifests still
work. If this splash screen was actually used for something,
it will no longer show up, so we also need to document that people
should update their AndroidManifest.xml to the new system, but
we can't inform people via mysterious compilation failures :)
Task-number: QTBUG-37493
Change-Id: I6289f9b5e2c315fa6db502cbde27bd18e15f1f8d
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
We keep the old value for source compatibility, but it should
probably be removed at some point as the QPA API is semi-public
only.
Change-Id: I06e4c9ca1d8bb878411ad79ef409d60ce2d29f4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
We also remove overriding the background when polishing the palette
in QMacStyle. This is a leftover from pre-10.5 styling.
Change-Id: Icaa6d9c864ab01783d83cc02192981136c417d24
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Refactors the logic to parse the font configuration from fontconfig, so
that it maybe reused for custom fonts in a later patch.
Also fixes a minor mistake that meant we defaulted to medium hinting,
where we tried to default full hinting.
Change-Id: I1e135b8b1e3faeb213aa370ea59ebde3a671273d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Removing symbols when defining QT_NO_DEBUG is a bad idea.
In this case it means that you can't compile corelib as a
release build and widgets as debug without getting an
undefined symbol.
Instead leave the method in the release build, but simply don't
call it.
Change-Id: I50426aefd62e82bccd933323aa0f67c6e5294961
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We need to send key events when the user hits enter, otherwise
there is no way to know when the user has 'confirmed' the
text he wrote. This is on par with how it's done for the
Android port.
Change-Id: I585d4198de24b0d251e5e0dd2956ce81b6483f82
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Before this patch there were no way for the user to hide
the keyboard on iPhone for multi-line edit fields unless
the app had a separate button added for it. And even that
would be problematic since we scroll the screen (and
perhaps the button) to track the cursor.
This patch implements a gesture that resembles the 'hide
keyboard' gesture that UIScrollView implements on iOS 7.
Note that if you start the gesture inside the edit field,
you will start selecting text as well. This will also cause
the cursor to move and the screen to scroll. After some
testing and failing, it seems like we need to live with such
artifacts until we do get around to do the only sensible thing;
fix up how we do text selection on touch platforms. Working
around it becomes just to messy.
Change-Id: I1c0d9c88ff1f5430587a49591f165b9708e5dc60
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Change 287fa94fe2 created a freeze
in the assets file engine because it will try locking the mutex
twice. Since prepopulateCache() is only called from create(),
we don't need to lock it recursively.
Task-number: QTBUG-37661
Change-Id: I00d0fed132a86c1be5603484eb6ee05454da9ef0
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Report for correct geometry for QMacNativeWidget
and other QWindows that are embedded in a NSView
hierarchy. This also makes mapFrom/ToGlobal work.
The implementation is different than for the other
cases: Add a QCoocaWindow::geometry() overload and
query the geometry there, instead of using a geometry
change notification which sets the geometry on the
QWindow.
Task-number: QTBUG-36322
Change-Id: Iab5f0c96b89610c8a4b4a7de49887b0683d551dd
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Add registerContentBorderArea() to the Cocoa native
interface which allows registering multiple "unified
toolbar" areas for each window.
Use this function in QToolBarLayout::setGeometry()
to register the area for each TopToolBarArea toolbar.
Task-number: QTBUG-36700
Change-Id: I52efcc5662556bb94f25f504be3710d0491f79b9
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
Instead of requiring that QPlatformFontDatabase::populateFontDatabase()
populates every single font in the system by calling registerFont(), we
now allow the platform database to call registerFontFamily() instead, and
then keep track of which families we've yet to fully populate in the font
database.
Once a property of a family is requested (such as its writing system,
style, etc), the family is lazily populated by calling back to the
platform database through QPlatformFontDatabase::populateFamily(),
which in turn does the final call to registerFont() as before.
This cuts application startup on OS X and iOS (of which the font population
used to be a major limiting factor) from roughly one second to about 350ms.
Task-number: QTBUG-37165
Change-Id: Ic2fc3447beb818ffe23635a5b7816ed7e70c93a7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This was a regression from Qt 4.7.
[ChangeLog][Widgets][QScrollArea] Respect scrollbar setting for
click-position on Mac.
Task-number: QTBUG-36314
Change-Id: I8bdb1aec9b308b0907f5db29d3519998bc843c18
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
finishComposingText is called when the composing text is finished also
when the sw keyboard is hidden.
Task-number: QTBUG-37631
Change-Id: I4f4e90e60ac3f89784755b591f578e07fdbfdd2a
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
tested manually with internal proxy.
Patch-by: Jonathan Lauvernier <Jonathan.Lauvernier@gmail.com>
Change-Id: Ief5b4579b3444ce70eb99637edf771d37d3971fb
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
... so that the socket notifiers are enabled after selecting and thus
emit signals even after selecting (select() is called e.g. by the
waitFor* methods).
Task-number: QTBUG-36144
Change-Id: I385f288e8c42f92a9c84e53bce843e52f8094ada
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fanda Vacek <fvacek@blackberry.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
The flag is not orthogonal to the rest, and e.g. checking with
flags & Invalid
will fail. Rather make it explicit by comparing with 0.
Change-Id: I428d5e71f5ecd05f61d543aaa78532548ef93d5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The RenderRule for the stylesheet has the correct font information, it
just wasn't being set on the painter that draws the label.
Task-number: QTBUG-8990
Change-Id: I7cbaffc570421db04ebf3254cb6a21a68f7b868b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
The following omitted enum description can be seen at [1]:
"Ensures that the longest variant is always used when computing the
size of a multi-variant string. (Internal)"
This is because \omitvalue does not allow a description (whereas
\value does).
The description was moved to the qnamespace.h as a code comment.
[1] http://qt-project.org/doc/qt-5/qt.html#TextFlag-enum
Change-Id: I7983613bffa90f3071a4e2d678696391048c8757
Reviewed-by: Martin Smith <martin.smith@digia.com>
Set scroll phase correctly for propagated wheel events, and do not
let Qt::ScrollBegin/End steal focus when using Qt::WheelFocus policy.
Change-Id: Ia38b64059d96a228c3b83c9b455db6e30dfb9a46
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Not sure where "OpenGL/ES" is coming from but there is no such thing.
The correct name is OpenGL ES.
Change-Id: If071ee5bd928fea1a2f1aebc11155344df1efe2d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
During the Qt 4 -> 5 migration the setting of the extension flags
in QOpenGLFunctions/Extensions suffered a regression: flags like
GenerateMipmap were never set. This led to the unfortunate sitation
that features that were tied to these flags, like compressed texture
support or mipmap generation, got disabled.
This is now corrected by checking for the extensions like Qt 4 did.
Task-number: QTBUG-37588
Change-Id: I4a7beb1b435af11e05f5304aa04df2ec63b34c18
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Some level 9 hardware does not support 32-bit indices, and in most
places this is already checked. It would appear that most phone
hardware actually does support 32-bit indices, and so this bug wasn't
caught until testing on the Surface RT. This is not surprising, as some
level 9 resources are only a minimum for the hardware spec, not the
true limit of the device/driver.
This patch provides the general fix to use 16-bit indices on such
hardware, but a whitelist of known good GPUs should be added to enable
32-bit indices where available.
Change-Id: I282ede5dd4a323037ade6c44b7cfac2c6445b491
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Print a warning when an invalid logging rule is parsed.
Change-Id: I3bf9a6df4053d36b3803652b2faa86168d5222bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Crash occurs after warnings like:
QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated
Task-number: QTBUG-37515
Task-number: QTBUG-33208
Change-Id: I18b803e4709b9d5f6b33717c2ac43179676351a4
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
mkpath was not working consistently on WinRT. The reason is that
createDirectory() starts from C:/ which is outside the sandbox and an
illegal access error has been returned.
In case the chunk is still inside the "known" writable area, we continue
to the next chunk. Known writable is derived from QStandardPaths. All
but Temp are children of the DataLocation on WinRT.
Task-number: QTBUG-35472
Change-Id: I3b4ab390bd321285da51d02f5eeaf06da4d56298
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Clear and test for the correct button according to
the m_sendUpAsRightButton flag.
(Fixes the warning mentioned QTBUG-35804)
Task-number: QTBUG-35804
Change-Id: I5d724d1cfa66b88b8f54e228bd7fb73a04a9f4c9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The NSWindow releasing code in recreateWindow() has
regressed to not handle the m_contentViewIsToBeEmbedded
case.
Release the NSWindow directly instead of calling
recreateWindow()
Change-Id: Ibc6d10faf4c6dae42e02c400b16f28a1d28eb192
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This will raise the window in front of windows from
other processes as well. Following Qt 4, only do this
for top-level windows.
Task-number: QTBUG-29087
Change-Id: Iae1b9c2928a627501112f97728198ed6dd614b2d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
With this patch reading QTextEdit line by line works with VoiceOver.
Task-number: QTBUG-37204
Change-Id: Id9d7c4294254aaa8fe51ee8b612bfbb43348b777
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
[ChangeLog][QtGui][Accessibility] Allow assistive apps such as VoiceOver
to set the focus on widgets and controls.
Change-Id: I657bf7d827c5e5293cfd628dbb6b8f0592a84f24
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
EditableTextInterface was implemented but not reported to the
accessibility bridges.
Newlines in QTextEdit when using QCursor::selectedText are returned as
unicode paragraphs, replace them by newlines.
[ChangeLog][QtWidgets][Accessibility] Fixed QTextEdit not reporting
newlines to accessibility frameworks and add editable text interface.
Change-Id: Iac21e70f5468a16f8abf242ae148290dbab3f8e4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
[ChangeLog][QtGui][Accessibility] Implemented text attributes to
enable VoiceOver to read QTextEdit and QPlainTextEdit.
Task-number: QTBUG-37204
Change-Id: Ie2fa8086a1bcf4907ac59850dc5c6c08b5f0b7f2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The cmd shell on Windows sets special environment variables starting
with a '='.
Task-number: QTCREATORBUG-8716
Change-Id: Id2852188897522558907d9846fb2af069600235f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Desktop OpenGL has GL_UNPACK_ROW_LENGTH which we
can use use to specify the image row stride.
This removes the need to call QImage::copy(). On
a retina MacbBok pro this reduces toTexture's share
of the total run time by 1-4%. (on tests/manual/
qopenglwidget/openglwidget)
Change-Id: Ia7f49d5c4ffcc347a495701bbaca6aecc2dc3433
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Make QOpenGLContext::create() return false when the native context
could not be initialized. This way the return value and isValid()
become equivalent.
Relying on on having a non-NULL platform context is not enough, many
platforms will return a new instance even if the underlying platform
code failed to create a native context. To ensure that a platform
context is really usable, isValid() has to be checked too.
Change-Id: I6b4e9fdb24347ad52fbd6edbb8d144d51e16c301
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The default pen width is 1 as of Qt 5.
Task-number: QTBUG-37277
Change-Id: I5b7b9c2019bd0e812384e67812b7bcfde37d0b53
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Adapt the stringification code, that is used to produce the
keys for QSqlQuery::boundValues() return value, to keep the
right order of the binding values.
Task-number: QTBUG-12186
Change-Id: Ic11a455bfd9ffd1418b1b021ce5cf78cae9b4504
[ChangeLog][QtSql] Fixed the order of values with positional binding in a QSqlQuery
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Calling NewGlobalRef() throws an exception if it gets an invalid ref.
If one of the jni object-calls throws an exception and the returned
reference is invalid, the subsequent call to NewGlobalRef() will trigger
the second exception and the process will be terminated.
Change-Id: I50c622e695542373d5b2eebd911c882e8e0f6bf7
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
In Qt 5.2.x, the platform plugin inherited from the EGLFS platform
plugin, so calling the super class implementation of hasCapability()
would return true for ThreadedOpenGL. Since this link was removed
in Qt 5.3, we would return false for all devices, giving us a large
performance regression.
Task-number: QTBUG-37586
Change-Id: I27758649ee9c0921902787b93be943751c839eb8
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Do not query scrollarea's own style whether the scrollarea itself is
a transient scrollbar, but query both scrollbar's style individually.
Change-Id: I6397a29bc7b276a92c538cbb7fc0dd921595d093
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Fix a crash-on-exit on Mac, where deleting the context
references the attached NSView.
Change-Id: Iac38184dab7a406e4072452fd9a6b175e6968ade
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Calling QWindow::close() directly bypasses some of
the window close logic in the QWindow subclasses.
Change-Id: I208db5600e6a756e25e207eaaf55dcfad255f406
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Cannot use JNI to query for standard paths
Change-Id: I1596106fd4d5e532d3ac1cd6dbfce3fb9fe1db5a
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Trying to create a 0-size cache image would lead to trying to paint to
a null image, giving runtime warnings.
Task-number: QTBUG-37035
Change-Id: I0a7fdb19cc7548dea2770d6be4eb283f6b898ada
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
When a new QOpenGLContext is requested, the color depth
information is now also taken into account on OS X and WGL.
Task-number: QTBUG-37411
Change-Id: I69d04989a20de3ace041b009fbbdc03fa02cfdf8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
On iOS 7.1 [UIScreen screens] sometimes returns empty NSArray which
is against documentation and causes immediate application crash.
This workaround uses [UIScreen mainScreen] in case [UIScreen screens]
returns empty NSArray.
Task-number: QTBUG-37601
Change-Id: I9b341b9ca788b5fc81804489d2e0a3af84207168
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
It is deprecated, and produces warnings on recent Clang versions.
Change-Id: I83181dd12c06a600a2f0eafbd83fe6111cf7752c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since we're in the 21st century, we set QCommonStyle to return true
to the SH_Menu_SloppySubMenus style hint. This unlocks all the logic
already available in QMenu.
Task-number: QTBUG-20094
[ChangeLog][QtWidgets][QMenu] Enable sloppy submenu mouse navigation
Change-Id: I134c87e348d98d1f46055e0bfef2b4a4a3d2993a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Keeping the timer static would trigger warnings when enabling
SH_Menu_SloppySubMenus in QCommonStyle in a forthcoming patch.
This would happen if we opened a second level submenu quickly
enough and get the mouse event handler to reset the timer its
parent menu started.
Change-Id: Ia768603b40b219f87138c60a595c65ef408761ae
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Setting the current action to 0 clears the sloppy region and
closes the submenu if we hover a separator on the way to the
submenu popup. Now, we choose not to while the sloppy delay
timer is running.
Task-number: QTBUG-20094
Change-Id: I9d1b1358fe64c259dc47f35db8fc8f2b19a73153
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This release comes with important bug fixes. Also we can now
remove the workaround code which was needed for libxkbcommon 0.2.0.
Task-number: QTBUG-31712
Task-number: QTBUG-33732
Task-number: QTBUG-34056
Change-Id: I57caf7f803b9a01a15541a5ad82e464de3b8abbb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
On Mac, hb_coretext requires both CTFont and CGFont.
Due to not supporting the 0 tag by CoreText, hb_blob_get_data()
always fails causing the hb_coretext_shaper initialization to fail, too.
Since HarfBuzz-NG is not a part of QtGui module anymore,
there are two possibilities to workaround this: either engineer the
font data by querying tables one-by-one and generating the font
directory table, or pass CTFont and CGFont refs directly to hb_coretext
via the hb_face's user_data. This patch implements the latter.
Change-Id: I7d2e2df00818ea811642cb6a6c3b9c9abd5d7b94
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Rewrite code to use QByteArray::reserve(), QByteArray::append()
instead of memcpy().
Task-number: QTBUG-37508
Change-Id: I16ead153f33fa5a34bc01ee27ae4cd1b8993b65e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The "Fixed CE build of sqlite3" patch is preserved in this change.
(ea70ec8711)
Change-Id: I9cf211785071386173a87f645773cdae08498354
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This makes some OpenGL autotests fail. Apparently we are sending a expose event before the window
is properly exposed.
Change-Id: I1710ec51605088ce594fc4676214db2d822d1cc5
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
The problem is that on QNX the window activation and focus
events are delayed. QToolTip can not handle this and would hide
the tool tip right after it is created.
Change-Id: I6045d1d277b73508c24174d72a05e0baa4ae6e7f
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
availableTimeZoneIds would release the enumerator.
This leads to a double free, so simply don't release the enumerator.
Task-number: QTBUG-37582
Change-Id: I521a9555d32545afd47095235ccee75a4f3e1974
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The passed-in URL is expected to be a file-scheme URL to be converted to
a QString using toLocalFile(), not a relative path to be prepended with
the application directory.
Change-Id: I647f351c99f0df66ef017936585f044292c16aff
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
System-installed TrueType fonts can be read into memory and loaded into
the FreeType font engine. This allows the application to be packaged
without fonts, but does not work on Windows Phone where DirectWrite is
not supported.
Every single-file TrueType font is registered with the font database,
and then loaded into memory at the point that the font is actually used.
Task-number: QTBUG-37230
Change-Id: I804116e37a874cd146a0653ba4cc018f8b1cd6a4
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
The usual default is 10 pixels, but on a screen with resolution
exceeding 100 DPI, it will be a proportionally larger number. The
reason is that such precise finger and mouse movements are more
difficult on higher-resolution screens.
Change-Id: I6e66299e12e6cac5c4e032251b32a34940970372
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Use the new inputmethod query API. and get rid of the hack where
we would move the cursor back and forwards to make sure that the
Android software keyboard noticed that the cursor had moved.
The android plugin now uses absolute positions instead of
position within the paragraph for all cursor handling (provided
that the control supports the new API).
Task-number: QTBUG-37511
Change-Id: I03463dbbcb4acbfa41e2eab06889d021d50da01f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Remove a last left-over after 5e519b31dc
Change-Id: I85e73a5d81d45b4ccfc80cdaf34ab7b6c3c85bdc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
> In constructor 'QWindowsPrintDevice::QWindowsPrintDevice(const QString&)':
> src\plugins\printsupport\windows\qwindowsprintdevice.cpp:105:86:
> error: 'DC_COLLATE' was not declared in this scope
Change-Id: Ifb64c323765ae4b6abb80c32d4ba2bc3fbffa245
Reviewed-by: John Layt <jlayt@kde.org>
The function is already present for quite some time, but was never documented,
so declare it as \since 5.3.
Add swap() function to qsharedpointer.h so it's visible to QDoc, too.
Change-Id: I8eba420878a096392fd181a180d5751101d37a50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
...which ensures we're not getting the formatting/rendering
artefacts in case of QStackTextEngine.
Change-Id: Ia0696a3e67eb866cf9776c6649c43775944edd1d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QTextLayout's setAdditionalFormats() is expected to invalidate
the shaping results, so that the layouting must be done *after*
the format range(s) gets applied.
Task-number: QTBUG-33475
Change-Id: I6b948fc179da915545a98ac36f2c20163947ec9e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
*.* is not a portable file type filter. Anyway it's better to filter
by mime types, because it's more inclusive now and may even get better
in the future.
Task-number: QTBUG-37393
Change-Id: Ide3c3dfc47cd4b4c55d842b73de5369a0596a546
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Like this we can find out more easily if autotests fail because of
flaky timing.
Change-Id: I57b10f5fc4908bed7d00990641b2ddfd4ea84a11
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qt_mac_image_to_cgimage incorrectly assumes any 32bit QImage format is
one ARGB32 form. This is no longer correct with the introduction of
RGBA8888 format.
This patch recognizes the formats a maps them to the native support for
them in CGImage. It also removes a duplicate method.
The codepath appears to be only used by the old coregraphics paintengine
and MIME handling. Which means RGBA images are probably printed and
copy/pasted incorrectly at the moment.
Task-number: QTBUG-36818
Change-Id: Ie6292defdbaef3e6105cf993e12911eded0918dc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Fix the QT_NO_PRINTER build for issues that have accumulated over last
few months, and in the new changes already approved.
Change-Id: I9aed21dee861837fd1a68a96692c873a4f5be293
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
All code directly using CUPS is now in the QPA plugin and QCupsSupport
is no longer needed, other than the utilities for setting CUPS options
which do not need direct access to CUPS. Delete all the obsolete code.
Change-Id: I561ad8af2415a9b745e2d35fd0624a5acdf27648
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We no longer use QLibrary to load CUPS, so remove checks. Switch from
using QCupsSupport and QPrinterInfo to QPlatformPrintDevice. The
remaining use of QCupsSupport is only for utilities to set CUPS specific
options which don't need to link to CUPS directly, these will be
replaced later with generic cross-platform API.
Change-Id: I6e3d9e9a59633c33af0555eb28443a9fc192b27c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Convert the Linux / CUPS version of the QPageSetupDialog to use
QPageSize and QPageLayout internally. As this is an almost complete
re-write of the internals the liberty has been taken of doing renames
and code moves that would normally be done in separate commits, but in
this case would have been mostly pointless done separately.
Change-Id: I6eaa7c1fbf0a04cb3425f1d322fcae89239e83b7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Using QPageSize internally provides the Windows ID on all platforms so
remove the conditional compile on the QPrinter api and add support to
the print engines.
Change-Id: I31e23d5090a9b6ceb087c29dead050b0ee1855a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use QPageSize and QPageMargins to get/set values in the print engines,
add api to directly set the values, and rewrite the docs to make the
paper-based api obsolete instead of the page-based api.
Add new PPK keys to pass QPageSize, QPageMargins and QPageLayout to the
print engines to ensure no level of detail is lost, e.g. for custom
sizes passed to QPrinter.
[ChangeLog][QtPrintSupport][QPrinter] QPrinter can now use QPageSize
and QPageLayout in the public api to control the page layout for a
print job.
Change-Id: Iee39a4042bcd6141d29b0a82b49066d7a7a78120
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Switch the Windows QPrintEngine to use QPageLayout.
Change-Id: I2b617fe103980c4efbb0ed367547e436f2d8a5e2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change the Windows QPrintEngine implementation to use the
QPlatformPrintDevice to obtain device information, and use QPageSize to
obtain page size conversions. A following change will use QPageLayout
to store that page size.
Change-Id: I990943e2b62ab6dab2c4d4a292c7ed7261beadf2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change the Mac QPrintEngine to use QPlatformPrintDevice and QPageSize
for all device and page size related requirements.
Change-Id: Ie0e598eceaf1a657a1554c0f56078fd857ef2e06
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use QPlatformPrintDevice in the Cups print engine for all device
specific code.
Change-Id: Ic1f5f8b4010a9958c320f3c0c727cf1bd1a70c65
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add support to QPdfWriter for QPageSize, QPageLayout, and resolution.
[ChangeLog][QtGui][QPdfWriter] The QPdfWriter now supports setting
the PDF orientation, layout and resolution by using QPageSize and
QPageLayout.
Change-Id: I9c269f997ec540dac1989f355c6a2e7488947966
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Switch internals of QPdfPageEngine and derived classes to use
QPageLayout and QPageSize to make handling of page layout and size
more consistent by removing multiple implementations. In particular
remove all use of the QPdf namespace version of page size.
Change-Id: Ie820340015e8812c8162bd1a257dd0f51f4f0b85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use new QPageLayout and QPageSize class to store and convert page sizes
and layouts consistently. Extend the PageSize enum to match
QPage::PageSize.
Note that public setters/getters cannot be added as virtuals would break
BIC, but without virtuals the derived classes would break. Instead an
internal api is provided and the derived classes will need to
implement identical api to manipulate it.
[ChangeLog][QtGui][QPagedPaintDevice] Paged paint devices such as
QPrinter and QPdfWriter now support all Postscript standard page sizes.
Task-number: QTBUG-27685
Task-number: QTBUG-25744
Change-Id: I62e96ab94194ab4ac8bed8fa804e0ce1c3233313
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change the QPrinterInfo implementation to use QPlatformPrintDevice as
the backend. Remove all the old QPrinterInfo related code from the
QPA plugin. Add public api to QPrinterInfo to support some features
from QPlatformPrintDevice.
[ChangeLog][QtPrintSupport][QPrinterInfo] Added new public api for
isRemote(), state(), defaultPageSize(), supportedPageSizes(),
supportsCustomPageSizes(), minimumPhysicalPageSize(),
maximumPhysicalPageSize(), supportedResolutions(),
availablePrinterNames(), and defaultPrinterName(). The use of
availablePrinters() is discouraged due to performance concerns.
Task-number: QTBUG-35248
Change-Id: Ic38323a930549ad67bf04a1a6bb43d623dfe6a33
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add Windows implementation of QPlatformPrintDevice.
Change-Id: I007678cd6d2bdae0728b61cc2796a5c5e5d1578f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add support to the CUPS print plugin for the new QPlatformPrintDevice
class. Note this is called QPpdPrintDevicePrivate as it uses the CUPS
PPD support which is deprecated from CUPS 1.6 onwards. A different
plugin will be implemented for the CUPS 1.6 support.
Change-Id: I26d005f90842d9c6262341171ef157536d28cc5d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add a new QPA class to abstract Print Devices. Each platform instance
will encapsulate all required details about a print device instead of
the code being distributed throughout the print engine and print
plugin.
Change-Id: I7f6a537ad55a6e7f599d83f461b1e2ee62b15094
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
New QPageLayout to encapsulate page layout details including page size,
orientation and margins. Scale may be added later.
Subsequent changes will use this class in the paged paint devices,
paint engines, print engines, and print plugins to replace multiple
inconsistent local implementations.
[ChangeLog][QtGui] Added class QPageLayout to support handling page
layouts including the page size, orientation and margins.
Change-Id: Ife1ddd6c2a8d1516542be2eb37425111f41cd5c7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
New QPageSize class to encapsulate paper sizes and names to ensure all
sizes and conversions are consistent and match the Postscript standard
sizes.
Subsequent changes will use this class in the paged paint devices,
paint engines, print engines, and print plugins to replace multiple
inconsistent local implementations.
[ChangeLog][QtGui][QPageSize] Added new QPageSize class to implement
Adobe Postscript PPD standard page sizes. This class supports the
standard page sizes, names and keys from the PPD standard, and provides
convenient size and rect conversion methods.
Change-Id: Ie2c8be0c3df0d29ac5da4cd9877ad41d0982633c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add more page metrics tests to expose the many bugs and inconsistencies
in the page layout handling. No platform or pdf backend passes all
these tests so they are skipped for now, but following commits will use
the tests to ensure the re-write of the page layout handling fixes the
many problems in a consistent way for all backends.
Change-Id: Ic5b16aa08dfe2bd9a9191662fd2bbe6b913e15c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This reverts commit f78661b03c.
The reverted patch was working around that QFontEngineFT was using
the poor QFontEngine fall back. That issue was fixed in commit
0b7beaaaf2, and the work around
is no longer needed.
This also fixes a rare problem with the workaround when the fontengine
and the glyph-cache do not share the same default glyph format which
can happen with QRawFonts.
Change-Id: I150f70a003b137c1d145f6f70cda568c85633e5c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Disable eglfs and similar plugins when opengl is not enabled.
(but egl is present)
GL-dependent parts of eglconvenience need to be skipped too.
Task-number: QTBUG-37457
Change-Id: I44d49495241551bc7b1f565aa0b5ace9f310628e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
The macro should stringify value of the given token not the token
itself.
Task-number: QTBUG-37547
Change-Id: I90f4fa613bd13d5a581828ab13f620b40dfd3593
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QGraphicsPixmapItem did not take the pixmaps
devicePixelRatio into account when calculating the
bounding rect. As a consequence, a 512x512@2x pixmap
would get a 512x512 bounding size instead of the
correct 256x256 bounding size.
Task-number: QTBUG-37008
Change-Id: I266e418b7e5d92bf1d4c96bd9380a27708dc2b4a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
QFontEngineFT::alphaMapForGlyph and QFontEngineFT::alphaRGBMapForGlyph
has been broken since change#65694. They always fall back to using
the path rendering of QFontEngine because we zero the scoped pointer
just before testing it.
To fix it we need to release the scope pointer after we are done using
it.
Change-Id: I8811c1f5261f286f2f3dd3c0f93c988ba0909669
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
When the window manager sets new workarea using the _NET_WORKAREA xcb
atom, QScreen::availableGeometry() does not react to that and returns an
invalid available geometry. This patch reacts to that change and updates
the QScreen property properly on xcb platform.
Change-Id: I8f0b4a27bab0ce450fb7393f4d9a56f3ce9a4ea1
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
For pixmaps with devicePixelRatio greater than 1,
create a native cursor that has a normal and a high-dpi
representation.
Task-number: QTBUG-34116
Change-Id: I1c014d65749add25f2b828837555a1844ede97c1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Disable the zoom (maximize) button for fixed-size
windows and customized windows with the MaximizeButton
flag not set.
Task-number: QTBUG-37078
Change-Id: I6da88496474713de37b48aa65742203632ba99d6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The assets file engine is created before main() is called, thus
prepopulate was called before main(). In this function, we created
a QDataStream which internally created a QBuffer which inherits
from QObject. This caused the main thread pointer to be initialized
early, and the old "QApplication is not on the main() thread" warning
and crash returned. The fix is to prepopulate the first time the
file engine is used instead.
Task-number: QTBUG-37444
Change-Id: I2c6e5f1a8ca88b5dc7d8e145fffeb7587dc0e623
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
When we scroll, the keyboard will change position relative
to QScreen, even if it appears to stay put. For that
reason we also need to update the keyboard rect after
doing a scroll.
Change-Id: I9bda2ab5b5e4970f488d3e69e44cf58e273f8fcd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
The variant taking x, y, z has been broken in all Qt 5.x releases.
This is now corrected by making the GL2 paint engine capable of applying
a Z translation.
Task-number: QTBUG-31156
Change-Id: I119566e9e9577f6cdf7e8bae56cac1e34995e622
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Implement PdmDevicePixelRatio.
Task-number: QTBUG-36419
Change-Id: I4d2822d01e08c80e9b829d5f524e8e761e694fba
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The POINTBLOCK struct in qregion.cpp is badly defined. By using ints
as the base storage of the internal array it forces not only bad casting
from int to QPoint, but also allocates an array four times too big.
This patch changes to char, since a char pointer may alias anything and
this gives the right size of the array.
Change-Id: I608eaf39ac7306c71314a139bed6e2352249c0ab
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
As soon as we receive an event not related to dragging
a QDockWidget out of its area (or a similar use case),
we no longer need the forward window.
Task-number: QTBUG-37265
Change-Id: I310e9cc2cf099c76e7a88427826d4b97ca0cd9b9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
These internal and obsolete hooks are no longer used. The correct way
to provide platform dialogs in Qt 5.x is to implement a platform theme
plugin, as was done for GTK+ 2.x.
Change-Id: I3f1474fbf760130106b3c47173eaedd2f1a919bf
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Show how use QCommandLineParser with additional
parameter checking for custom options and positional
arguments.
Also explain how to display help in GUI applications.
Change-Id: I03513e09b7dd5b150259593da0af2ef2a281cab2
Reviewed-by: David Faure <david.faure@kdab.com>
It could be that the channel has its reply already reset to 0, while
the protocol handler thinks the reply is still active, which might
lead to weird behavior including hard to reproduce crashes.
Task-number: QTBUG-37424
Change-Id: I89b65d34caaa546a343edc2ee205aa76425de88f
Reviewed-by: Richard J. Moore <rich@kde.org>
Change-Id: Ia2b34e3ee6954342501a805f9e047cb90078e9d5
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
The old code tried to check the 2nd parent for inheritance from
QAbstractItemView. This also triggers for line edits on a QDialog parented
on the item view. Introduce convenience function that checks for
top levels in the chain.
Task-number: QTBUG-37504
Change-Id: I932f8efdb4764e9b1eea84c802bf7e8718338e1d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
By placing debug messages in shared memory, the application can share
debug messages with winrtrunner (or any utility which passes -qdevel
to the app and opens the corresponding shared memory area).
Task-number: QTBUG-37308
Change-Id: Id0e04cfd5f0f701d552a448f780788c7cbf9b438
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
__IPHONE_NA was previously defined to 9999, but with
iPhoneOS7.1.sdk it is now undefined. From Availability.h:
"__IPHONE_NA is not defined to a value but is uses as a
token by macros to indicate that the API is unavailable"
This causes Qt to evaluate QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE
to true when given __IPHONE_NA as argument. And then the
build will fail.
Change-Id: I11f1d0285329d90c633c00c0c4d446ef5cd8089b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This simplifies the compiler control semantics by always using the
packaged compiler if it is available. With no packaged compiler, the
service is assumed to be running if the directory structure is present.
Use of a packaged library can be overridden by setting the environment
variable QT_D3DCOMPILER_DISABLE_DLL to 1.
When the runtime compiler is used, the source will no longer be
logged, and the compilation output will no longer be cached.
Change-Id: Ib07f517e7043d7785bdfa9da55abd34df518eeed
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Following Apple's documentation, the first step to identify a
bundle is to check if it has a known extension. Currently, it's
done using string comparisons ored in an if statement. The list
is not complete and new types, whether provided by a system update
or other means, can't be detected.
The new approach is to use Uniform Type Identifier which queries
the OS directly to check whether the extension conforms to
kUTTypeBundle. That includes e.g. applications, frameworks etc.
Task-number: QTBUG-31884
Change-Id: Ief73a83904adf27ccb71b0070e67cba081d1fd4a
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Migrating this is out of scope for the time being.
Change-Id: Iac4a98d8db8e132a6ffa28075548fe2af76637fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Change-Id: I86341ccbd0251a9c858a5e1a9b7ea291d73cda01
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Based on a patch by Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>,
licensed under CC0 (aka Public Domain) or BSD license.
Change-Id: I60815d6893c7a9d2873864ff626b865881ec5ee9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
A key event with no unicode would get a text of "\0" instead of
the empty string. This would lead to various widgets interpreting
the Key_Back event as text input, meaning that it would be grabbed
by the widget instead of being propagated.
Task-number: QTBUG-35784
Change-Id: Ibdb0e491572e41dd1aaf3b03ae1a780731f0559a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Update the 10 year old FIXME hack to allow Key_Back (which will
close the dialog on Android). Also clean up nearby code that has
been dead for seven years.
Task-number: QTBUG-35784
Change-Id: I609858afb2caefe7025e421406288ae56717fea5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Includes a one-pixel fix for widgets, where the menu item text
would be one pixel too far away from the vertical gutter.
Task-number: QTBUG-37451
Change-Id: I2539233814a427c5bed66a5c07584717eb3df418
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Change the code so that it doesn't force application windows to full
screen when the no-fullscreen parameter is used in the QT_QPA_PLATFORM
environment variable.
Task-number: QTBUG-37456
Change-Id: If9612cc2ca69f829d45e7fd4b83338c3a41cf986
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Use QPointer to make sure that we are not trying to destroy already
deleted object.
Task-number: QTBUG-35702
Change-Id: Ib746996787488e636f25e6ea5be0571607ee2ded
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QXcbDrag inherits QBasicDrag which takes care of calling
updateAction() when needed, we don't need to call it explicitly.
Task-number: QTBUG-33057
Change-Id: I754408f74f56de36ace8ffa40a61bd7c64619899
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Changed clip rectangle handling from bounding rect to region. Now also
sub region rectangles are taken in to account.
Task-number: QTBUG-37199
Change-Id: I9e09376e2c6d3fee8f85db753295a6138a03096f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Add a screenChanged handler slot to QWidgetWindow,
which calls markDirty() on the backing store with
the BufferInvalid and UpdateNow flags set.
Update CocoaBackingStore to create a new buffer on
window devicePixelRatio change. Use the
QCocoaWindow::devicePixelRatio() implementation instead
of a duplicate implementation in the backing store.
The plan is to replace this implementation with one
based on QUpdateWindowRequestEvent for Qt 5.4
Change-Id: I8e521c53df4ac90815613e730fe821996334721f
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
xcb_randr_get_screen_resources() and xcb_randr_get_screen_resources_current()
do basically the same, but for one case: if nothing has queried these
information ever before. So if an application is the very first client ever
to connect to an X server it may just return nothing. A call to
xcb_randr_get_screen_info_reply() will then cause the X server to allocate the
needed information and send an update notification, resulting in a second
QXcbScreen being created, but the other one is still around and probably used.
The behavior I observed with a simple test application was that the application
was not visible on the screen when it was the first client ever on the X
server. Killing the application and starting it again made it work just fine.
Change-Id: Id64f267e8ebcfa5b39d21d98307170a09e5169df
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
As was done in Qt 4, where QFileDialog sets NameFilterDisables() to true
for Q_WS_MAC only.
Task-number: QTBUG-37302
Change-Id: I162f9e79762aa4fa68aba02d1bdfc6322d472a9d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
... and make it independent of QProcess, because we want to use it
from QtNetwork as well.
In addition, move select_msecs() to qcore_unix_p.h as well and rename
it to qt_select_msecs().
Task-number: QTBUG-36144
Change-Id: Ief681b6f6c80e85aa5091a5a04bcedb60f353217
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Being a part of QtGui, HarfBuzz-NG breaks build with -Werror.
Instead of disabling a particular warnings-as-errors,
build a prefixed static library and make it a link-time dependency.
Change-Id: Id0be1f0e0034092d50f83cd364d5c65940fee869
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The correct function is setOptions().
Change-Id: Ife9ff75c409c843b4871804fcfd06b9d2a7733d3
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
When painting to QPixmap with QBlitterPaintEngine and dfb
PaintEngine have PaintDevice (pdev) as QImage. Painter code
uses PaintDevice::paintEngine() to refer to paintEngine.
This will became dangling pointer since QDirectFbBlitter::doLock()
will delete QImage. Instead return QPixmap as PaintDevice.
Change-Id: Idfac919b6438a82b412020e441e0a102e4a2a052
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Some mouse event may result in the window being deleted
so we need to take extra precaution when calling the super
class' 'sendEvent:' method.
Task-number: QTBUG-37287
Change-Id: Idf89ea177c78053bcdef52c54a197409e20bf38e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This comes from QPlatformTheme::defaultThemeHint().
Change-Id: I12a9add3af65e819a06b66d958acb8f21cfe0e13
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Updated BlackBerry specific documentation around QSettings to make the
differences more obvious for developers.
Change-Id: Ib9acc2409379a836713f1a7e9d6189585a35aa61
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Erin Rahnenfuehrer <erahnenfuehrer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
If the GL context cannot be made current in the backing store's
constructor, the framebuffer resources won't be allocated. Fix this
by creating an initialization routine that can be called again if it
fails.
The issue was revealed by the GUI Analog Clock demo, which creates the
backing store before the window has a native handle.
Task-number: QTBUG-36008
Change-Id: I875f8183eff60908fc2b46f441bb553b42ff500d
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Change-Id: I613a737600f85ef90155e3b8647197b4fd092998
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Change-Id: I7afedbf679ae1c8467eea749e79eb10f2516d039
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Correct the tense of send vs sent in comments and documentation.
Change-Id: I1c5ce9a7b1e49b8b0e8dcfde7d732e4c69acf73a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Do not show the popup for unsupported evaluations on every launch of a
QWidget based application. This is causing problems e.g. for applications
that are run by Qt Creator in the background, like qmlpuppet.
Instead, we'll show a similar dialog on Qt Creator startup.
Change-Id: I6b44c24865ed6992a70f8a9dd0bcd08a4744cb28
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Task-number: QTBUG-37042
Change-Id: I7ddcbc315b4b720e7da7880fc00731c28beb4bb2
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Same logic for locaton used as in other Windows variants.
Change-Id: I5f71710d28ea1338748c9bd41d48bba15e674baa
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Until now android developer build was not usable due to missing files.
These files are only available after a make install.
This patch aims to add that copy phase when building.
Task-number: QTBUG-36901
Change-Id: If0a7e982899b8c18495c7cb6508184fa153b239d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Added a missing reference operator to make the code example
compile.
Task-number: QTBUG-37359
Change-Id: Ie52f65ab3b325daf1ee3b368131e54c8a17f92ef
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This manifested itself for some continuous integration machine, all
regular macs have wireless. In case there is no wifi, we would never
emit updateCompleted().
Change-Id: I1c5b0da6e1d73fef2588beb1796207326d430e26
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
The font database and QFont should have normalized font family names,
so using CTFontDescriptorCopyLocalizedAttribute is not a good idea.
If the feature of reporting the localized name of a font family or
style is needed in for example the font selection dropdown or dialog,
it should be exposed as an explicit property of the font.
Change-Id: Iaa15ad861043f4c78a38080608b6fe4d99efee18
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Change-Id: I494c4fdfa49139316efac0f68f8d463c02056372
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Make sure that the correct context is current when freeing GL resources.
Otherwise, on shutdown, QOpenGLVertexArrayObject would try to use the
previously current context, which mmay already have been deleted.
Task-number: QTBUG-37385
Change-Id: Ib2332f54636738a1a4b1041a7dcbffd0af00261d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Make sure the alphamask in the backingstore is updated whenever the
geometry of a QQuickWidget/QOpenGLWidget child changes.
Task-number: QTBUG-37372
Change-Id: I70e94664bd7da774694645f604e1a7277fe563c7
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Check also for rules set in an environment variable QT_LOGGING_RULES.
This makes it even more convenient to set rules e.g. for just one run of an
application, without having to create a logging configuration file. It
is also more in place with the current way we enable/disable debugging
of parts of Qt via environment variables.
Change-Id: I4d05976f2b6c12bca472552ffa22345475cd01de
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
Tell the user from where logging configurations are loaded from if
the QT_LOGGING_DEBUG environment variable is set. This allows 'debugging'
of the logging rules database, because it's very simple to e.g. silence
all debug messages by adding a logging configuration file somewhere, and
forget about it.
Change-Id: Iee34031d531462060b5603e2210e01fd40952c63
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use QStringRef to speed up the parsing of the left side of logging rules.
Change-Id: Idd4d75496e3865d092f2802c45928a414c14c615
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Do not accept rules with wildcards in the middle.
Change-Id: If6fa71629c46bc4127aa8bd475643bc0e8a9f57c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The documentation says that the left side of a logging rule has the syntax
<category>[.<type>]
with optional wildcard '*' as the first or the last character (or at
both positions.
However, so far we didn't allow
qt.*.debug
But what we did allow is implicit dropping of trailing '.', e.g.
qt.* matched also 'qt'
Fix these by splitting up the '.type' in advance, and then do string
matching only on the 'real' category names.
Change-Id: Iab50ad0fc673464e870f5ab8dfb3245d829b3107
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use the QTextStream stream operator for formatting 64 bit numbers,
just like we do for other numbers, too. This ensures all numbers in
a QDebug stream e.g. respect the hex and showbase modifiers.
The original reason for formatting qin64, quint64 with QString::number
is unclear (pre-dates the original qt4 git import). Maybe QTextStream
did lack proper support for 64 bit numbers back then.
Task-number: QTBUG-36841
Change-Id: I049516c2a8394c9c1a708f86c3d950418a20a957
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I213ac1fb2733e675f3641441fe6c621bab06c1f0
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Populating the whole database takes a while, and it's very easy to trigger
the fallback family code path through eg. matching or getting the default
font family from QFont.
Instead of relying on populate to resolve family name to a PostScript name
(which was required when using CTFontCreateWithName), we instead use the
CTFontDescriptorCreateWithAttributes() function to create a descriptor
based on the family name, and then use CTFontCreateWithFontDescriptor().
The other way around, we use CTFontDescriptorCreateWithNameAndSize, and
then pull out the family name from the descriptor. The need for creating
a CTFont for private fonts (eg '.Apple Symbols Fallback') does not seem
necessary anymore, as tested on 10.7-10.9.
The disadvantage of creating font descriptors instead of re-using the
data computed by population is that we're doing the same work twice,
but the end result is making the font database more lazy, and the 80%
use-case is assumed to be that you're only interested in the fallback
of a small number of fonts, which means you don't want to populate all
of the fonts in the system (taking about 1100ms on the test system).
Looking up the fallback of a single family or style now takes about
15-25ms.
Task-number: QTBUG-37165
Change-Id: I6b904dbe796a3f236919d778d0168fdef9a20e69
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>