Commit Graph

19724 Commits

Author SHA1 Message Date
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
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
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
Laszlo Agocs
5621a7c501 Fix composition for windows with alpha
While we will cover the entire surface with our textured quads, the clear
is still necessary in order to make top-levels with TranslucentBackground
render correctly: We don't want to blend transparent areas with undefined
content that is in the surface's framebuffer.

Blending is problematic for alpha values. We now prevent the blended alpha
from being written out. This ensures that in examples like qquickviewcomparison,
where the backingstore image contains an alpha of 0.5 while the QQuickWidget
texture 1.0, the result is still an alpha value of 1.0 in the final image.
Writing out an alpha of 0.5 would break on systems where windows get an alpha
buffer by default.

hellogl2 can now take a --transparent parameter which makes the QOpenGLWidget
being cleared to transparent in order to verify it works in combination
with Qt::WA_TranslucentBackground.

The swapped red and blue problem is also corrected. RGBA8888 does not need
swizzling. The only format that needs this is RGB32.

Task-number: QTBUG-40716
Change-Id: I54a9fd3a91a1b59575b38cdb908835315514e40f
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-13 16:14:19 +02:00
Ivan Komissarov
6c3c1a4cb8 Add the QStorageInfo class
Allows to retrieve information about mounted volumes such as label,
total/available size, filesystem type and so on.
Possible use cases are:
- allows to do checks about filesystem before performing actual
  operation (such as available/maximum volume size)
- allows to retrive information about volume that can be shown in file
  dialogs
- allows to retrieve volume for specific path and check if two or more
  paths belong to the same volume or not

[ChangeLog][QtCore] Added QStorageInfo class to retrive information
about mounted volumes and drives

Change-Id: Ibf9c2e6b53ef39c5605894a4422acdbbca4030c4
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-13 16:09:58 +02:00
Maurice Kalinowski
091653e9e7 Implement native settings format for WinRT
WinRT stores settings inside the app bundle, not in the registry.
Some tests are not fully functional due to errors in the file
implementation (See QTBUG-40588).

QSettings::SystemScope translates to a roaming container on WinRT,
meaning that settings stored inside there should be uploaded and
shared among devices. However, this is untested so far.

The tests have been updated for those platforms which do not store
the order of keys. This has been done on some locations only so
far, but needed to be done on more places for WinRT.

Task-number: QTBUG-33498
Change-Id: Ifd0194387b09c220d31812b4b6fd0ce9a7d84d24
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-13 09:40:56 +02:00
David Edmundson
7487592cce Create.tag entries for QML classes
This patch makes Qml Classes get written to tag files the same as C++
tags.

Task-number: QTBUG-40551
Change-Id: I4a1973eeed6f7c2fdb65686c50e6ae4d273c9d7a
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-08-13 09:22:30 +02:00
Paul Olav Tvete
c0556d92f3 Android: don't kill the app without warning
If the back key was pressed when no window was
visible, such as during startup, the app would be
killed without notice. This change makes sure that
we always give the app a chance to intercept the
back key before killing the application.

[ChangeLog][Android] Back key no longer kills the application
when no window is visible.

Task-number: QTBUG-39688
Change-Id: If9373e8d26ff323d8c8a274fb30820ecc4ca66ab
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-08-13 09:16:53 +02:00
Thiago Macieira
4e6ebabb30 Replace the const QString global static with a QStringLiteral
It was originally created to avoid allocating memory for the QString at
every turn, but we have QStringLiteral for that today. It has also
served a very good run by catching qatomic.h implementations that had
bad cv qualifications.

Change-Id: Id6d952b8cce363015ec2611d346b4cccedecf137
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-08-13 09:07:38 +02:00
Frederik Gladhorn
d2c1a6cbb4 Add accessible roles
Change-Id: Ic5465687f51c441235ec23cb88045e14644f1d2a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-13 09:07:15 +02:00
Frederik Gladhorn
fc36b834a6 Remove invalid assert
The table interface may be implemented without having a QObject.

Change-Id: I59b9bef29494296149bc1023db933b7c5d762cac
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-13 09:07:10 +02:00
Frederik Gladhorn
fc931e5595 Accessibility: Fix boundaries for text functions in QLineEdit
Make the functions work consistently. For example asking for the line at
the cursor position when the cursor was at the end returned an empty
line before.

Task-number: QTBUG-38500
Change-Id: I60fc78c7be129a59c83efcfce6d8fdd16f2c3f65
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-13 09:07:04 +02:00
Olivier Goffart
135a286844 Fix error reported by address sanitizer
It is not valid to dereference a null pointer, even if it's just in order
to access enum constants

Change-Id: Id404c308ae7ffd879afdd678302e3ac4e0c69001
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-13 00:00:03 +02:00
Olivier Goffart
7ca5af28d0 Fix error reported by address sanitizer
One can't dereference the null pointer value. Even to access a static member.

Change-Id: I5edc92d7886ccc7029d1f3c00a12de78b439f080
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-12 23:59:59 +02:00
Laszlo Agocs
b08cc0ec6f Make the expose region local on all platforms
QExposeEvent::region() reports a region in a random coordinate system.
The behavior is undocumented and the platform plugins do different things.

xcb, offscreen and ios are correct. These set the region in local coordinates,
which is the most logical interpretation of the expose region.

windows is almost correct, except for one occurrence.

cocoa and others need changes: passing in geometry() as the exposed region is
always wrong.

The patch documents the expected behavior both for QExposeEvent and
internally in QWindowSystemInterface. The problematic plugins are fixed to
use local coordinates.

Task-number: QTBUG-40470
Change-Id: I6ded3154d14254fa71d4292d8e1b5e6cf696c81a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-12 07:47:32 +02:00
Laszlo Agocs
611558d877 Modernize the OpenGL examples
Change them to use QOpenGLWidget and QOpenGLTexture.
Advocate also the usage of VBOs.

Hopeless examples, that rely on the fixed pipeline and will
not compile or work in ES and dynamic builds, are moved to
a "legacy" directory. The documentation pages for these are
removed. This long due change avoids the confusion newcomers
experience when trying to get started with Qt 5 and OpenGL.

hellowindow's behavior is changed to open a single window only
by default. The old default behavior, that opened three windows
on platforms that supported both MultipleWindows & ThreadedOpenGL,
can be requested by passing --multiple. --single is removed since it
is the default now. This plays much nicer with drivers that have
issues with threading.

In addition, say hello to hellogl2.

This is the old hellogl example updated to use QOpenGLWidget and
OpenGL 2. It also has a mainwindow with multiple (un)dockable widgets
containing the OpenGL widgets. This helps testing the behavior when
the top-level of the QOpenGLWidget changes and provides a very
important example of how to do proper resource management in this case.
(must use aboutToBeDestroyed() of the context, since the context goes
away and is replaced by a new one on every dock/undock)

As a bonus, the logo is now real 3D, no more orthographic nonsense.

Launch with --multisample to request 4x MSAA.

Launch with --coreprofile to request 3.2 Core. In this particular example
the shaders are present in both versions and there is a VAO so the application
is functional with core profile contexts.

Change-Id: Id780a80cb0708ef164cc172450ed74050f065596
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-12 07:47:23 +02:00
Topi Reinio
338f9c4f7c qdoc: Distinguish between QML property and attached property
A recent change in qtdeclarative (60ed6a43) added an attached
property 'Window' to Item type, with property names identical
to the ones already available in Window. This caused QDoc to
report warnings for duplicate documentation for QML properties,
because there was no distiction between a QML property and an
attached property.

This change fixes the issue by:
    - Allowing identical names for \qmlproperty and
      \qmlattachedproperty
    - Using distinct URLs/UUIDs/anchor references for them
    - Marking attached properties with '[attached]' qualifier
      in 'All Members' page.

This doesn't solve the issue of disambiguating between a
similarly named QML property and attached property when
linking from an external location. However, these can be
solved with the help of the \target command.

Task-number: QTBUG-40674
Change-Id: Icc74de237366e9897334689fe354ab83e4af0356
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-12 07:27:45 +02:00
Andrew Knight
34198cedbe winrt: Fix core dispatcher lookup
The core dispatcher lookup should be performed from the constructor
in all cases but the first (WinMain) thread, and only rechecked if the
thread changes.

Change-Id: I05f0c15b3e199994aa5d740b2092b42fb8d2f596
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-08-11 23:29:27 +02:00
Andrew Knight
57d9eb2b77 SSL backend: Fix pem header/footer utility methods
These methods assumed incoming data would have LF line endings, and
therefore broke when parsing files with CRLF line endings. This
simply removes the line feed from the header/footer strings, and switches
to QByteArrayLiteral while doing so.

Change-Id: I0c14634243c4bd7d19a6b5ef718b6ed1cc6bcdb2
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-11 23:29:25 +02:00
Andrew Knight
259cf68e06 SSL backend: Add a decodeDer() method to the private API
This allows QSslKey to avoid converting to pem format if the backend
supports native der decoding.

Change-Id: I0822a21401ad0ca81c6eeb6c7d53c421e1e2e93a
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-11 23:29:22 +02:00
Andrew Knight
2fe8efbefe winrt: Fix theme palette
Windows Phone didn't handle the base color enums well, and ARM was
getting incorrect colors due to different byte ordering. So, use the
Phone-specific enums where applicable and pass in the proper char sequence
for the color.

Change-Id: I7ffbc383c07d2160974560110fea221a204577ea
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-08-11 23:29:20 +02:00
Andrew Knight
3846aec83b winrt: Fix backing store blit
The calculation forgot to take the mirrored texture upload into account.

Change-Id: Ia69c9c4b9d852d9ac652e71aaa466c5387ff5bca
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-08-11 23:29:18 +02:00
Laszlo Agocs
00f3f5c0a6 Fix msaa in QOpenGLWidget
Take the correct number of samples from the widget's context, not the
tlw's context.

The original implementation did the blit only after paintGL(). This is
not sufficient for applications that override paintEvent() and do QPainter
calls in there (e.g. the 2dpainting example). Therefore the approach is
changed to perform the resolving of the samples in a function that is
invoked by QWidgetPrivate every time a paint event is sent.

Change-Id: Iae0b2c30f6070ec75201339a848854e4582a9c0c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-11 13:19:53 +02:00
Frederik Gladhorn
9ba3145f79 Add QAccessible::ActivationObserver
Makes it possible to follow changes in activation an deactivation of a11y.
Needed for WebEngine to know when to activate a11y.

Change-Id: Ia264a76974224d1baad3e88c34a4b8a9f1a3695d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-11 13:16:51 +02:00
Jędrzej Nowacki
9d19be5994 Remove unused property from moc
Change-Id: Ia09ce83b23d1d9eb54ab5fac1fee4755913f5a33
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-09 15:38:07 +02:00
Adam Strzelecki
6545acdf68 Enable rpath support on OS X and iOS platform
This is done by defining QMAKE_LFLAGS_RPATH for compilers for Apple platform.

Task-number: QTBUG-31814
Change-Id: I9040df341ad46395d6ab71bc760ba7a5ee5ff291
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-08-09 15:37:39 +02:00
Adam Strzelecki
dbb0d54699 qmake: Don't make rpaths starting with @ or $ absolute
Defaults qmake behavior is to make all project RPATHDIR paths absolute prior
passing them to linker. We need to make an exception for paths starting with @
such as @executable_path (Apple platforms) or $ such as $ORIGIN (Linux).

Task-number: QTBUG-31814
Change-Id: Ie9887c0046c5030c4128dda945b491a5d389ba34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-08-09 15:37:32 +02:00
Jędrzej Nowacki
8f22f242a2 Micro-optimize QUrl::topLevelDomain
Using QStringRef saves few instructions

Change-Id: I0d67a1f6a1c1385c88a8b21cb98b9c7dbdfb66e5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-09 15:37:11 +02:00
Andrew Knight
5dd7164c97 winrt: Use native file dialog
The native Windows Runtime file picker is required to support picking
of any file/folder from the system. Due to platform security restrictions,
the non-native file dialog is effectively useless when outside of the
application's installation or local storage directories.

This adds a QPA implementation for the WinRT file picker, as well as
a simple file system engine to handle files which were opened by the
picker. This necessary for platform security reasons, as it is not
possible to open files from arbitrary paths - only file handles opened by
the picker can be used, so these are kept inside this file system engine
and acted upon when a known path is observed.

The file system engine is only instantiated when needed, and may prove
useful for other areas of Qt (such as known folders/standard paths) which
must operate on a virtual file rather than an absolute path.

Task-number: QTBUG-37748
Change-Id: Ia4fd6c5065ac92101ce34adcb6c9026fbcff56df
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-08-09 15:37:09 +02:00
Jędrzej Nowacki
4413254ff6 Micro-optimize QDir::relativeFilePath
Use QString::splitRef on platforms with case sensitive paths, to
avoid unnecessary allocations.

Change-Id: Iff331a5eb67c4cbaf1333e663e77290261c5b013
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-08-09 15:37:04 +02:00
Thiago Macieira
b1202e0234 Update the handling of the -xkbcommon configure option
If the user requested the system xkbcommon with -system-xkbcommon, then
don't silently fall back to the bundled version if the functionality
test fails. Instead, print the an error notice.

Also note that the -xkbcommon argument didn't do anything, since it set
the variable to "yes".

Change-Id: I2c9e820bd076995aaaad987ecce76ebddcd79b4a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-08-09 15:37:01 +02:00
Thiago Macieira
db851ed5d1 Trim the QString benchmark test
The comparison, Latin 1 and UTF-8 benchmarks contained in this file are
stale. The implementation changed in Qt 5.3 and this benchmark couldn't
be updated (test data too large for Qt).

Please contact Thiago Macieira to obtain the benchmarks and test data.

Change-Id: I48c19b1f1711eb73c953a30ed4da510e97a62472
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-09 15:36:36 +02:00
Thiago Macieira
e319196f76 Ensure that qCleanupFuncinfo works with some C++11 new constructs
This commit adds tests for ref-qualified member functions, the new
syntax for functions and decltype.

__PRETTY_FUNCTION__ for lambdas varies wildly between compilers and will
produce really bizarre results after cleanup. It's not tested and is
known to be broken.

Change-Id: I70c8dbcba54790357cecba35aa45c5cc672f29d1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-09 15:35:59 +02:00
Thiago Macieira
65ade55c8c Add QtPrivate::is_const and is_volatile
And correct the comment by listing more types that are available

Change-Id: I9cb4b664f97300357a55d81bc99dd542a29e933b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-09 15:35:56 +02:00
Marc Mutz
d1ede822d8 QOpenGLVersionStatus: add constexpr
Also dropped two redundant qMakePair() calls.

Change-Id: I7266ac9a3354ef4f60bf921fc0cd5d5a33c75b93
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-09 09:06:29 +02:00
Marc Mutz
e41b45f1ae QPair: add constexpr liberally
On templates, adding constexpr makes a given instantiation constexpr
if it can be.

This turns qMakePair(0,0), say, into a compile-time constant.

The effects on existing code are small, but exist:

  $ size lib/*{-baseline,-paircexp} | sort -nr
  6516727  211192    2608 6730527  66b31f lib/libQt5Widgets.so.5.4.0-baseline
  6516711  211192    2608 6730511  66b30f lib/libQt5Widgets.so.5.4.0-paircexp
  5373720   44492   15976 5434188  52eb4c lib/libQt5Core.so.5.4.0-baseline
  5373504   44492   15976 5433972  52ea74 lib/libQt5Core.so.5.4.0-paircexp
  5107206  125072    6080 5238358  4fee56 lib/libQt5Gui.so.5.4.0-baseline
  5107030  125072    6080 5238182  4feda6 lib/libQt5Gui.so.5.4.0-paircexp
  1341290   30180    2600 1374070  14f776 lib/libQt5Network.so.5.4.0-baseline
  1341210   30180    2600 1373990  14f726 lib/libQt5Network.so.5.4.0-paircexp
  # no other libraries benefit

[ChangeLog][QtCore][QPair] Can now be used in C++11 constexpr contexts.

Change-Id: I3872e6aa33a7d02a168516f4dfa7119efcac8c40
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-09 09:06:16 +02:00
Marc Mutz
31f2b7e591 Use NAmE spelling of grey (gray)
These occurrences are only in docs or code comments.

Change-Id: Ia114466a85c01e2b978396c329153044921fb20b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-08-09 09:05:57 +02:00
Marc Mutz
28bb18c0c0 QStringRef: add missing \since 5.4
{,c}{begin,end}() were added post-5.3, in 1a6f490b, but weren't marked with \since 5.4.

Add it.

Change-Id: Ide743833144f784c7d09b125e7a22f9b184ed823
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-09 09:05:51 +02:00