Commit Graph

19759 Commits

Author SHA1 Message Date
Marc Mutz
036cc9cb04 QLineEdit: mark a comment with ### Qt6
Change-Id: Ia4b37e0fd88a02f3d79be9cac99018b8bb8e10cb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-28 22:53:11 +02:00
Marc Mutz
2506c7c7cc QGradient: note to unwrap 'void *dummy' in Qt 6
It was already forgotten for 5.0, let's not continue
to use Qt 4 BC hacks in Qt 6, too.

Change-Id: Ifa798115562ebd15dd9beade73a49dfbc23a208f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-28 22:53:05 +02:00
Li Qiu
400f8a49b8 Fix font family name mismatch between localized and non-localized version
Localized font family names and their aliases are stored in font database.
However, fallbacksForFamily gets non-localized family names which results
in family name mismatch.

Change-Id: Iddf9101e15a0e49c5ba4c049969fc90cb7853443
Task-number: QTBUG-40978
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-28 05:04:26 +02:00
Samuel Gaist
21d9ad8b11 QString:add (last)indexOf overload with QRegularExpressionMatch output
This patch adds indexOf and lastIndexOf with QRegularExpressionMatch
output overloads to QString. This allows to get the match corresponding
to the index returned.

[ChangeLog][QtCore][QString] Added support for retrieving the
QRegularExpressionMatch to indexOf and lastIndexOf.

Change-Id: Ia0ae2d3ff78864c7053ffa397874aca1d2b1c35c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-27 15:38:00 +02:00
Samuel Gaist
a8a8a3bfbd tst_QString: Use a non-empty string for lastIndexOfInvalidRegex
Testing using an empty string doesn't ensure that the regexp
gets validated. The function may return earlier thus making
the test useless. This patch adds a text to search in so that
no early optimization avoids the regexp validation part

Change-Id: If24b77385dde44a922d43e5ae1d7a5393d24f640
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-27 15:37:51 +02:00
Jørgen Lind
23a2ad6f61 Fail early when creating QOpenGLVertexArrayObject
There is a significant performance regression with using
QOpenGLVertexArrayObject::Binder on platforms not supporting VAOs. This
is because of the function resolving/initialization in create which is
called once pr bind if d->vao == 0.

Change-Id: I74e77f50921116c306247dc371c68b287a2e22d7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-08-26 20:55:17 +02:00
Samuel Gaist
76b4493595 Add test case for indexOf using an invalid QRegularExpression
Change-Id: I3677d0ecd406388a8f1eb65ec013595904da4c2d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-26 00:36:59 +02:00
Giuseppe D'Angelo
4cd53ad3a6 Refactor QString::contains(QRegularExpression)
Unify the code of the two overloads; fix a typo in a warning;
and use an opportunity to insert a move.

Change-Id: I85eef86d35f0d1e2da25f09d92204e32abf6d7d3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-24 18:23:33 +02:00
Frederik Gladhorn
4cceceff15 Compile with -no-feature-accessibility
Task-number: QTBUG-38045
Change-Id: Id436b70aa6161bdf2428ca0a605212b278c71849
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-21 15:17:56 +02:00
Marc Mutz
d807a16e7f QString: replace an inefficient QList with QVector
qt_section_chunk s larger than a pointer and wasn't marked as movable,
so holding it in a QList is horribly inefficient.

Change-Id: I32162b4960d32674a1f3b05bc24ac8813f16638d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-19 10:50:07 +02:00
Thiago Macieira
54da2b2911 Simplify and unify Q{ByteArray,String{,Ref}}::{simplify,trimmed}
As a side effect, QString::simplified() will always return a detached
copy, even if it's the same contents.

QStringRef::trimmed() can use the same calculation algorithm but can't
use the trimmed_helper() template function due to its lack of a
constructor taking begin pointer and size (std::string_view could do
it). That constructor can't be added because QStringRef always refers to
an existing QString, not to data in memory.

Change-Id: Ib966c1741819c68c6bac5fcbb00f8ac818b3ccab
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-19 03:39:57 +02:00
Thiago Macieira
19dd9a0ebd Add rvalue-ref qualified QString::to{Upper,Lower,CaseFolded}
This is even more common than the QByteArray equivalents.

                Qt                   Qt Creator
        const &         &&      const &         &&
toLower      71         50           45         26
toUpper      35          8           46         35

Change-Id: I8b797d2321b22ce414c23656c5f1709ac649c423
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-19 03:39:47 +02:00
Thiago Macieira
3888f5a251 Unify and refactor QString::to{Upper,Lower,CaseFolded}
This unifies the code for those three functions in one refactored
template function, using QStringIterator. I don't think there's any loss
of performance by doing that refactoring -- this is based on my reading
of the disassembly, without running any benchmarks.

Change-Id: I5893c6ed47462c473886c722a21577b1e8a23841
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-19 03:39:39 +02:00
Thiago Macieira
55c1f54c55 Add rvalue-ref qualified overload of QByteArray::to{Upper,Lower}
Those operations aren't very common with QByteArray but this is easy to
optimize.

                Qt                   Qt Creator
        const &         &&      const &         &&
toLower      34         10            0          1
toUpper       3          1            0          0

Change-Id: I2097955f4c889ea5a21903c35ddbc0ff27bf62c5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-19 03:39:30 +02:00
Marc Mutz
6dd759c8e9 Optimize qstricmp()/qstrnicmp()
The latin1 conversion tables that were recently introduced to qbytearray.cpp
to speed up QByteArray::to{Upper,Lower}() can also be used in qstr(n)icmp.

This results in speedups between ~2 for strings with differences in the
first char, to almost 10x for strings with differences only after 8k of
data.

Change-Id: I878ddb4c01c798069d439a9d33e24351fe1039d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-19 03:39:27 +02:00
Thiago Macieira
c250a0ec3a Unify and optimize QByteArray::to{Upper,Lower}
Do a check first if we need to transform before doing the transform.
This means we won't detach when transforming data that is already
correct.

And instead of using QChar, use our own hand-rolled table. In a proper
LTO build, the QChar calls would be resolved to a lookup of the Unicode
data, but not many people do LTO builds, Therefore, this means a great
speed-up is achieved by simply avoiding the function call. The extra
gain in performance comes from the simpler translation table instead of
the more complex full-Unicode data.

Also as a consequence, this changes the handling of two characters in
Latin 1: 'ß' should be uppercased to "SS" but we won't do it, and 'ÿ'
can't be uppercased in Latin 1 ('Ÿ' is outside the range).

Benchmarking is included. Comparing the Qt 5.4 algorithm to the new code
is almost 20x faster. Other alternatives are included in the benchmark
and are all faster than the current code, though slower than the new
one. While all of them could compress the tables to be smaller or shared
between uppercasing and lowercasing, they would also expand to more code
(though probably less than the extra bytes required in the full
translation table). In the trade-off, I decided to go with simplicity
and most efficient code.

Change-Id: I002d98318d236de0d27ffbea39d662cbed359985
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-19 03:39:05 +02:00
Frederik Gladhorn
f7af3e6171 Update 3rdparty/atspi2 constants
Change-Id: I2c3db774ae706936be59afefe3577ba685b4b251
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-18 15:29:24 +02:00
Frederik Gladhorn
d5bf787fc0 Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: Ia03a010d1fbfc89c04144c1c106336f0e1c45ec1
2014-08-18 15:25:11 +02:00
Robin Burchell
20c14d87f2 eglfs/stub: Die fatally if the framebuffer can't be opened.
There's no point trying to continue, everything graphical is not going to work.

Change-Id: I4c85de63746618ddf73435b491a3244b7e53a76c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-17 12:37:34 +02:00
Robin Burchell
6af327216b kms: Also initialize in resize(), if required.
It appears to have been an incorrect assumption that flush always comes before
resize. At least for me, that is not the case. It also strikes me as being more
robust this way.

Change-Id: Iafd2cfe7b89802899e844152e0901e588ff0d8a6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-17 12:36:44 +02:00
Allan Sandfeld Jensen
2a33bfcfd1 GTK2 theme should use GTK configured font variant
This patch makes the GTK2 theme read the font configuration and use
that as the default system font.

Task-number: QTBUG-39643
Change-Id: Ieacf8968e54f34c6d44669350d349c9a96ed6cc5
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-17 03:46:30 +02:00
Eskil Abrahamsen Blomfeldt
3e0a6c1b36 Android: Also support android style for debug deployment
Both bundling and debug deployment can use the local cache for
the Android style assets, since Ministro is not necessarily
available in these cases.

Change-Id: I33367aceec1829f27377fcb6793ca95ecf5cc434
Task-number: QTBUG-40676
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-08-16 23:27:40 +02:00
Allan Sandfeld Jensen
b35176f43a Support autohint and lcdfilter fontconfig configuration
This patch adds support for reading autohint and lcdfilter settings
from fontconfig and pass them on to freetype.

Task-number: QTBUG-32254
Change-Id: Iaa69b70f7005ee7f21126a8d984c07b3a46a3e7f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-16 19:09:29 +02:00
BogDan Vatra
ef4a999a9f Forward menu button events to Qt if there is no visible menubar.
Task-number: QTBUG-32334
Change-Id: If1b4517f233b04d4c6c165cbfe62c8cf7b624c60
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-08-16 13:41:01 +02:00
Allan Sandfeld Jensen
eb5ef33122 Handle 10-bit per color formats in qt_mac_toCGImage
Add support for the four new RGB30 formats to qt_mac_toCGImage so
that they get converted to ARGB32_Premultiplied instead of potentially
misinterpreted.

Change-Id: I0921edaef7509c1db9bd547b454dade03d289ea3
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-16 09:50:01 +02:00
Allan Sandfeld Jensen
04c42d2d09 Compile on Android without statfs.f_flags
Not all Android versions appear to have f_flags in statfs, but we
can check for the presence using a feature define.

Change-Id: Ib2acf6063d6211b871f462ee491459ac8675aa37
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-16 09:49:53 +02:00
Marc Mutz
09d6bbebc2 QMimeData: replace an inefficient QList with a QVector
QMimeDataStruct is larger than a pointer, so holding it in a
QList is horribly inefficient.

Fix by marking as movable and holding in a QVector instead.

Change-Id: If285dd31546066db0b240ea0d4d30668f50b5f2c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-15 19:19:20 +02:00
Giuseppe D'Angelo
e60079a55c GLX: request up to OpenGL 4.5 / ES 3.1 by default
Change-Id: I55fd53a8f7f81708a103e24e35c09894b939f245
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-15 18:45:06 +02:00
Frederik Gladhorn
a9fa9b80f5 Fix compilation of QPixelFormat with old clang
The enum would break on old clang trying to cast it to strings when
building webkit.

 In file included from /work/build/qt/qtbase/lib/QtGui.framework/Versions/5/Headers/qimage.h:48:
/work/build/qt/qtbase/lib/QtGui.framework/Headers/qpixelformat.h:78:33: error: use of overloaded operator '+' is ambiguous (with operand types 'int' and 'QPixelFormat::FieldWidth')

Change-Id: I614cf89d0832dea505001d55188b4c748e948ef9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-15 18:34:49 +02:00
Simon Hausmann
258d35ceb3 Add support for accelerated glyph rendering in the directfb plugin
Change-Id: I44ae087c900e5cffdada45845cb7f34aab89b8ab
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-08-15 18:28:37 +02:00
Jerome Pasion
c8e7fe7f35 Doc: Removed minor version from the doc URL.
-The online URL doesn't use the minor version
anymore and this makes the non-Qt projects
depend on the existence of redirects.

Change-Id: I5b2bef16957ca307060600b7bf25eb1d55f2c998
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-08-15 13:09:02 +02:00
Andy Nichols
b0781780ff DirectFB fix build error in QDirectFBWindow
This error was introduced by the Make the expose region local on all
platforms fix.

Change-Id: I961a53cb81c400471dff112664aa6d56e445d21c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-15 13:01:04 +02:00
Andy Nichols
63ec4d42c0 DirectFB define platform integration capabilities
Make sure that the DirectFB plugin defines that it is capable of using
Threaded Pixmaps, Multiple Windows, and OpenGL when available.

Change-Id: I68a0a69568af8e00e47cd2c59bbf6a301df6ec34
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-08-15 13:01:00 +02:00
Laszlo Agocs
6f7bc2a707 Avoid transparency in qopenglwindow example
On systems that give alpha configs by default writing alpha values of
less than 1.0 is a bad idea since it will lead to the content behind the
window becoming visible, even though this is not the example's intention.

Change-Id: I23cdfc1fb78d77b1cbc192d2aba5d6665a7acfcc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-14 11:02:45 +02:00
Laszlo Agocs
0b153bc93a Make sure to have a pbuffer-capable config for the temp pbuffer
The temporary pbuffer has to have a config that is pbuffer capable.
Otherwise the makeCurrent() can potentially fail with drivers that
strictly differentiate between the different configurations.

Change-Id: Id63f52da5c5a1308072b1f1bb4b297ea6a547166
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-14 11:02:42 +02:00
Allan Sandfeld Jensen
12ce167a96 Fix documentation and memrotate of new RGB30 QImage formats
This patch contains two changes that were lost when RGB30 support was
merged. Documentation of the formats being added, and corrected
memrotate methods.

Change-Id: Ia3c87d7c984134576badbba92c421f832896cf97
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-14 10:57:43 +02:00
Allan Sandfeld Jensen
9e1d6eec8e Move SubpixelAntialiasingType from QFontEngineFT to QFontEngine
To be able to use the SubpixelAntialiasingType enum without depending
on QFontEngineFT we need to move it to QFontEngine.

The patch also cleans up the left-overs of other enums moved the same
way.

Change-Id: I025bc8a5b429d376cfab0a643121ed6f99204988
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-08-14 10:49:33 +02:00
Laszlo Agocs
d147535322 Update qopenglext.h and qopengles2ext.h
The current one is from 2012 and is based on the obsolete spec files.
Replace it with the new one generated from the XML specs.

At the same time fix the callback function signature for QOpenGLDebugLogger
since it would not build otherwise. The user parameter is const GLvoid *
according to the specification.

Task-number: QTBUG-39773
Change-Id: If2153198373eeebc587c41b2dbf6bed5bcb26761
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-08-14 10:23:41 +02:00
Oswald Buddenhagen
6e5e1f16eb Bump version to 5.5
Change-Id: I8fd9ec2ea1138a94478b73a284ea1b550b62bd5a
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-14 09:39:34 +02:00
Topi Reinio
d06c060de4 qdoc: Stop outputting duplicate \brief for QML type and module pages
When generating the body of a documentation page, QDoc omits
the brief description for nodes of type DocNode. Since Qt 5.4,
a number of nodes are promoted from subnode types of DocNode
to top-level nodes -specifically,
    - QML types
    - Modules
    - QML modules
    - Groups

As a result we now see a duplicate or unintentional brief
description on pages of the above type.

This change instructs qdoc to skip generation of the brief
for also above node types, as it was on 5.3.

Task-number: QTBUG-40741
Change-Id: Id92dce27b13c68be0958225e04ed61813fdc91ee
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-08-14 09:28:43 +02:00
Jędrzej Nowacki
805b88a997 Optimize qdatetime string parsing
Replacing usage QString::split by QString::splitRef saves a few
allocations.

Change-Id: I1cadca296279248b75af6f9f8394c54f13c37c55
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-08-14 09:24:14 +02:00
Jędrzej Nowacki
b3f4e5cbe2 Use QString::splitRef in customtype example
There is no need to allocate all these strings

Change-Id: I398e1cc05bd3ad24df067a967a5e24fbc6d452ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-08-14 09:24:05 +02:00
Jędrzej Nowacki
8f8c7e8a2b Remove redundant code from QMetaProperty.
The code contained old Qt4 logic. There is no point in checking values
of QVariant as they are in sync with QMetaType.

Change-Id: I58ace52f69939488e6ea7e7bab98df38419420a8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-14 09:23:25 +02:00
Ivan Komissarov
b9d0116356 Add the StorageView example
The StorageView example demonstrates the QStorageInfo API.

Change-Id: Ifaabadbe64fdf26d13a4ce4690e6b54514667c9f
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-14 08:20:45 +02:00
Andreas Holzammer
2635b94607 Fix compile for harfbuzz-ng for wince
CRITICAL_SECTION has different members, so adjust that

strdup is only there as _strdup so use that

There is no MemoryBarrier()

There is no environment so dont use getenv

There is no locale so dont use it

There is no errno so just fake it

Change-Id: Ia7197c4f0df50513078c906ed503aec33ee42b82
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-08-14 02:08:57 +02:00
Andrew Knight
8c864ac498 winrt: Add partial SSL key support
This allows for opening of public key files. It does not, however,
support opening private keys (or decrypting/encrypting them). This is
due to limitations in the native API.

Nearly all public key tests pass (the native API doesn't support the
40-bit key in the test set). The private key tests are expected to fail.

Task-number: QTBUG-40688
Change-Id: Id8f2f1ae6526540736ceb2e5371f6a5d80c4ba7b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-08-13 21:09:51 +02:00
Oliver Wolff
cec893e4f0 Introduce secure transport backend for Windows Runtime
The change creates a stub implementation for WinRT, adding the needed
files and classes to build SSL support on that platform.

Task-number: QTBUG-37497
Change-Id: Idc3e8aa91c5eb8a938705f2385d1074fe6c1d83e
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-13 21:09:48 +02:00
Andrew Knight
2be0bf0765 winrt: Fix deadlock in thread dispatcher access
An event dispatcher fetching the core dispatcher can deadlock when
looking up the window. Simplify this by only looking up the view, and
treating the event dispatcher as one which will never obtain the core
dispatcher. This fixes a deadlock which occurs when starting network
delegates.

Change-Id: Ic27f4ab6f168eb95f3de70d78d64f035c331a7f5
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-08-13 21:09:45 +02:00
Olivier Goffart
72c99dd446 QMetaType: disallow automatic registration of reference type
The automatic registration code that would be added will break
with a reference type.

QObject's template code calls QMetaTypeId2 on the arguments of the
signal. Including on references.

Reference type cannot be register as metatype. They are not supported
in QVariant, or in QueuedConnection.

Change-Id: I83f2e50f9f886909dc24f3809c990e5763012cc2
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-13 17:23:24 +02:00
Frederik Gladhorn
b2a7d865b2 Update IAccessible2 to 1.3.0
In addition change to the one in all file instead of individual
interfaces. Future updates only have to copy the new version of
ia2_api_all.idl and run nmake.

Change-Id: Ie7a1e65c8dd0c73809ac97aae2d586f425337f18
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-08-13 16:51:27 +02:00