The orientations involved here can be easy to mix up,
so don't make it more confusing.
Change-Id: I73c4765ebbc89feced12898ac6001eb68db0e21c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
There is potential trouble and no point in registering a QSocketNotifier
on an invalid file descriptor. This is prevented now in addition to the
existing warning.
Change-Id: I6fc3c639b167ea98d09a2738986360cc4b3fc210
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This adds Q_DECL_OVERRIDE to the virtual functions in the test.
Change-Id: If1b7646c9a6f50c6efe2d03d253bd8e0b4c09716
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Check if the sequence is really a mnemonic and emulate grapheme cluster if so,
rather than blindly reset the next character's attributes.
This covers cases like "& ", "&<U+034F>", etc.
Change-Id: Ibb063a2d258aff6455b9bb41bbe1a58a5036d0d6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
In particular, set online state right upon construction of the
QNetworkAccessManager instance. Therefor, QNAM needs an instance of a
QNetworkConfigurationManager internally.
Before, this would only work properly if a network session was created.
Now, networkAccessible() returns the correct status.
Change-Id: I7ff9ccfd18ad376a131fc5977843b55bf185fba0
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
In case a network session is not required, we need access to the
configuration object rather than to the QString.
Change-Id: I05945525ce8247e343d0bebd7ec15e0e162ed826
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Change-Id: Iab4b28997d9d13645375284083e4e603e02cec5c
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Remove a leftover #endif from the merge with stable
Change-Id: Idd0509d2ddcc3e8e7914aaa59beabc8036f45fff
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Move non-specific code to shapeText();
* Make shapeTextWithHarfbuzz() re-use variables obtained in shapeText();
* Make shapeTextWithHarfbuzz() return amount of shaped glyphs
instead of nothing. Right now, this is not about error reporting,
since failed shaping causes assertion/crash in most cases.
Change-Id: I2e0c91b9e5de8b19e0bc22ca60add1b1fc6ebdb0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Also move stringToGlyphs() helper closer to shapeTextWithHarfbuzz(),
where it is only used.
As of now, Harfbuzz-old dependency in QTextEngine can be disabled
by simply if-defing a single piece of code.
Change-Id: Ic6f7d9b64bf9201d7540c58db46e20f28de8120d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Instead of unconditionally linking to Foundation, UIKit, and QuartzCore,
we leave the dependencies for the iOS platform plugin, where the libs
are actually used.
Change-Id: Ie8cfad2c8230d1f1af6933b831e443fecb0c93f1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Low memory warning has been added for debug purposes.
Change-Id: I3ca4f1e68cec0914ce8d77b5bed4cde210c031fa
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
491dcbfac8 accidentally removed the y-axis inversion
for the widget case. Move it back to the common
code path.
Change-Id: Ie6bbe6f442ca342347af77071da3a743b5655159
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Change-Id: If2ad1af096787e3e1dc424c096566f382ba7a3b5
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Replace all tabs with proper space characters and consistently align
the '=' characters. The default alignment for the '=' of 25 characters
has been left as is to get a minimal diff. Lines with the '=' further
to the right and those belonging to 'proper code (TM)' have not been
touched.
The work was mostly done using the following python script (might
come in handy again...):
import sys, re
indent_eq = 25 + 0*4 # 25 characters was the most widely used indentation for the '=' character
p = re.compile(r'(\w+)[ \t]*([\-\+]?)(=$|= )[ \t]*(.*$)')
for fn in sys.argv[1:]:
with open(fn, 'r+') as f:
lines = []
nl_count = 0
continuity_indent = None
for l in f:
m = p.match(l)
nl = l
if m:
n_spaces = max(m.start(3), indent_eq - 1) - len(m.group(2)) - len(m.group(1))
if m.group(2) and m.start(2) >= indent_eq-1 and m.start(2) % 4 == 0:
n_spaces -= 1 # left-shift '+=' by one if the '+' is aligned to a multiple of 4
n_spaces = max(1, n_spaces) # we want at least one space before '='/'+='
nl = m.group(1) + ' '*n_spaces + ''.join(m.group(2,3,4)) + '\n'
continuity_indent = nl.find('= ') + 2 if l[-2] == '\\' else None # remember indent on '\\$'
elif continuity_indent:
nl = ' '*continuity_indent + l.lstrip()
if l[-2] != '\\': # check when to stop the continuation
continuity_indent = None
elif l.startswith('#'):
nl = l.expandtabs(2)
if l != nl:
nl_count += 1
lines.append(nl)
if nl_count > 0:
print fn, nl_count, len(lines)
f.seek(0)
f.writelines(lines)
f.truncate()
Change-Id: I1d2870d0a2fe2e30d398c140fe523e69dd20c81b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
When using different resolution screens, one can arrange them around
the primary screen. However, the vertical offset has to take into account
the fact that NSScreen origin is bottom-left, whereas QScreen origin is
top-left. This usualy impacts the geometry's y coordinate, and can result
in popups showing in the wrong screen.
Task-number: QTBUG-30348
Change-Id: I159e6be2b590bd2d9a31f3f36c3785afcc62123e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Used by features in CMake 2.8.11.
This matches the features in FindQt4 in that version of CMake,
namely that the IMPORTED targets contain the appropriate
INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS
and that the qtmain.lib static library is automatically linked to
on Windows by executables. Additionally, the
INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately
if Qt requires users to use position independent code.
Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Went from taking 30 seconds to 2 seconds, on a SDCard with 10k files.
Windows file dialog does not resolve NTFS symlinks,
it just shows an empty icon, and the link name, not the target.
This allows for a big performance gain by reducing the number of
calls to GetFileAttributesEx() by checking the extension directly.
This also fixes the problems with the native file dialog, which
for some reason, is creating a QFileSystemModel too.
Task-number: QTBUG-13182
Change-Id: Ie2739765fd6c7daea64e3cf1d208ba9720bd39f2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This matches upstream changes on https://github.com/raspberrypi/firmware/
Change-Id: Ie28c2fa574d5cd097c033926970db40e8904e42e
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
The undocumented feature of linking the library with the highest
version number is more confusing than helpful.
We're changing the default from on to off now.
Users who still need this feature can turn it on with:
CONFIG += link_highest_lib_version
Task-number: QTBUG-15596
Change-Id: Ic998c1685003caa6f57e27dccf83c8b4a2a09553
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
When Qt::AA_UseHighDPIImages is set images and pixmaps
may be of the high-dpi type.
Account for this when calculating layout sizes by
clamping the size or dividing by devicePixelRatio()
to go from device pixels to device-independent pixels.
Change-Id: I7b7f4c36ebd83d72ecdf6fbe0ae20e20ed6540bb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Scale non-widget paint devices as well.
Change-Id: Ic68fb166058e9b162f8baeab81196ee254f30b2e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
evdev support in eglfs is now guarded by QT_NO_EVDEV, so this
check is no longer required. This allows eglfs + tslib to be
a supported combination.
This reverts commit a95e396a83.
Change-Id: Icf7c15121b7eca1131d412b05b956cd5d7f189ae
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Since qCpuHasFeature() checks the static qCompilerCpuFeatures variable
and that variable's value might change depending on the compiler flags,
it's best to ensure that the function is not subject to link-time
merging. That would be bad if it happened when qCpuHasFeature() was used
from a file with higher CPU compiler settings than the default, as it
would incorrectly conclude that certain features are always available.
Change-Id: I8bacde056fb89869ec1d306a163742e72522315e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This patch reduces the number of calls to GetFileAttributesEx()
when icon lookup is being done.
The second bottleneck is a couple of isSymLink() calls. Will fix
that next.
Task-number: QTBUG-13182
Change-Id: Ife3ff6cfb49d2294c501253ccc55d8c26036be94
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Bring back the ref-counted enable on enter/leave
workaround we had in Qt 4: If any widget in a
window sets WA_AcceptTouchEvents then that window
will start processing touch events.
Enabling touch events has implications for delivery
of other events, for example by causing scrolling
event lag.
Change-Id: I307488937f417612eff624bf9892b82a7f69c1b7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Make top-level windows generate enter/leave events
for sub-windows. Keep track of the current "under mouse"
window in mouseMoved and send EnterLeave events when
it changes.
mouseEntered/mouseExited handles enters and leaves
from the top-level window.
Add tests/manual/cocoa/nativewidgets.
Task-number: QTBUG-27550
Task-number: QTBUG-29751
Change-Id: If4b9f9e0f39d9fb05fdab45a100ffdcf107965ad
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
We're treating fontDef.pixelSize as a box height everywhere but in
harfbuzzFont initialization code the logic was opposite.
Change-Id: I4eecf7861a6084c7f2dbe1df85a71f2e251da845
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Call qt_safe_open in the constructor
to avoid opening the pps files several times.
Change-Id: I1bf79284850353a47ee1fc17797cd667536e17b1
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Always use "if defined" instead of "ifdef". The same is valid for
"ifndef" macros
Change-Id: I8e8f65e36dc636c10b3d656ce9a89ab3a664a80b
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>