Commit Graph

17284 Commits

Author SHA1 Message Date
Thiago Macieira
4c9db39896 Improve the QString/QLatin1String ucstrncmp with SSE2
Change-Id: I6a7ce281096bb99352132f775ae32fcaf55bd32c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-31 21:51:25 +01:00
Thiago Macieira
3bae7b0a28 Centralize the UTF16-Latin1 comparisons in one place
We have quite a few versions of this code in qstring.cpp, which means
that it's hard to optimize them all. Instead, create two functions to
do the comparisons, one case-sensitive (ucstrncmp & ucstrcmp) and one
case-insensitive (ucstricmp).

Change-Id: I55c6588ade160bc8d16e19727b8f3dca523b38bf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-31 21:51:23 +01:00
Thiago Macieira
8b77fe9f64 Improve qstring.cpp:findChar with SSE2
This updates only the case-sensitive searching. The case-insensitive
part requires quite a few Unicode transformations.

The benchmarks tried are the plain word-by-word comparison used in Qt
5.2 and in builds without SSE2; the SSE2 benchmark; a benchmark using
the SSE4.2 "strchr" instruction. I've run the benchmark both for CPU
cyles used as well as bytes/sec scanning strings.

Improvement over the Qt 5.2 code:

            GCC 4.7         GCC 4.9        Clang 3.4        ICC 14
          cycles  MB/s    cycles  MB/s    cycles  MB/s    cycles  MB/s
SSE2       2.1x   2.9x     2.2x   2.9x     2.1x   3.1x     2.2x   3.1x
SSE4.2     1.5x   1.7x     1.5x   1.7x     1.5x   1.7x     1.6x   1.8x

Once again, the SSE4.2 instruction wasn't as effective as I'd hoped
(not to mention that Clang seems to have some bugs emitting it).

Change-Id: I57c6e65e91791bb5265965cbd1af7fbd8fe7f588
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-31 21:51:19 +01:00
Thiago Macieira
2cfdb35269 Merge qMemEquals and ucstrncmp
qMemEquals is the same as ucstrncmp and checking that the comparison
was 0, so implement it like that. Meanwhile, it already had code for
doing 32-bit comparisons in the absence of higher SIMD optimizations,
which we can now make use of.

Change-Id: If26b446856e3b756efabc98b471fcdc344a8e732
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-31 21:51:14 +01:00
Thiago Macieira
f32a5b158f Improve ucstrncmp with SSE2
The benchmarks showed that the basic SSE2-based building block
improves performance by about 50% with data extracted from a Qt
Creator run. None of the other alternatives provide clear better
results -- the best was 3.8% and with only one compiler.

Change-Id: I77314785afecfacaf21c41fd79c97cadf357f895
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-31 21:51:11 +01:00
Thiago Macieira
34821e226a Add support for UTF-8 encoding/decoding with SIMD
Decoding from UTF-8 is easy: if the high bit is set, we fall back to
the byte-by-byte decoding. Encoding to UTF-8 requires a little bit
more work: to detect anything between 0x0080 and 0xffff, we have
several options but none as easy as above. Multiple alternatives are
in the benchmark code.

In both loops, we do two things once we run into a non-ASCII
character: first, we continue the loop for the remainder of ASCII
characters in the buffer (which we can tell by checking the bits set
in the mask), then we find the last non-ASCII character in that
16-character group, so we don't reenter the SSE code too soon.

For the UTF-8 encoding, I have chosen the alternative that results in
the best performance. It's closely tied to the alternative running the
PMIN instruction, but that requires SSE 4.1. It's not worth the
complexity. And quite counter-intuitively, the dedicated string
instruction from SSE 4.2 performs most poorly of all solutions. This
begs re-visiting the performance of the toLatin1 encoder.

The best of 10 benchmark runs of this code were measured on my
SandyBridge CPU @ 2.66 GHz (turbo @ 3.3 GHz), both as CPU cycles and
as CPU ticks:

  Compared to:        ICU             Qt 4.7      non-SSE Qt 5.3
  Data set     fromUtf8  toUtf8  fromUtf8 toUtf8  fromUtf8 toUtf8
 ASCII only      7.50x    6.22x    6.94x   7.60x    4.45x   4.90x
2-char UTF-8     1.17x    1.33x    1.64x   1.56x    1.01x   1.02x
3-char UTF-8     1.08x    1.18x    1.48x   1.33x    0.97x   0.92x
4-char UTF-8     1.05x    1.19x    1.20x   1.21x    0.97x   0.97x
Creator data     3.62x    2.16x    2.60x   1.25x    1.78x   1.23x

As shown by the numbers, the SSE-based code is slightly worse than the
non-SSE code for dense non-ASCII strings. However, as evident in the
Qt Creator data, most strings manipulated by applications are either
pure ASCII or mostly so, so there's a net gain.

Done-with: H. Peter Anvin <hpa@linux.intel.com>
Change-Id: Ia74fbdfdcd7b088f6cba5048c03a153c01f5dbc1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-31 21:51:08 +01:00
Giuseppe D'Angelo
bc91dc4895 QOpenGLTexture: avoid a QImage detach when uploading texture data from it
If the image is already in the right format, converting it to RGBA8888
will be just a refcount increment; but calling bits() will then cause
an unnecessary detach.

Change-Id: I3b06139cd86b74a9082bd0b401a9a14bd4992a10
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-01-31 18:57:50 +01:00
Giuseppe D'Angelo
c5ee652278 QOpenGLTexture: Introduce const void * image upload methods
An API oversight caused the image upload methods to take a "void *",
which is not necessary at all. The underlying texture uploading calls
(i.e. the gl(Compressed)Tex(Sub)Image<N>D family) all take a "const void *".
The methods taking a "void *" get deprecated.

Change-Id: Idfda58d4d7d0af1f335e5cbad7d700f4ccad652c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-01-31 18:57:43 +01:00
Friedemann Kleint
b18779b61f QWizard: Fix QWizardPrivate::QWizardPrivate()
Initialize wizStyle and other variables, silencing a purify warning
about uninitialized memory read; use std::fill to initialize the
button array.

Change-Id: I29ad90a29d406be62179fd33688f05bb5f6b7368
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-31 18:28:40 +01:00
Friedemann Kleint
65b26acb7c Prevent crash and emit warning when receiving bogus drop events.
Task-number: QTBUG-33635

Change-Id: I6d436bc4d47d1d6b063fc2cf27d67fe4684e7491
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-31 18:28:11 +01:00
Friedemann Kleint
4dcb607aa9 QColorDialog: Emit done after setting the selected color.
Task-number: QTBUG-35859
Change-Id: I8b23d0283e9678c6698c174d0362cf8d85b2f813
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-01-31 18:27:43 +01:00
Mitch Curtis
1d5ee90969 Update some more screenshots in qtbase/examples/widgets.
The screenshots were taken on Windows 7 with the Aero theme.

Change-Id: I2517664e25389f4fb87408daec7b720dfb785bf0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-01-31 16:18:07 +01:00
Nico Vertriest
0b26ad05bb Doc: corrected link/example errors
Update pro files after move gestures folder
Update snippet statements
Corrected path in imagegestures.pro

Task-number: QTBUG-34749

Change-Id: Icc19908914e36507e412ab63bf0cc2809aa48e17
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-01-31 16:18:07 +01:00
Louai Al-Khanji
8d38c0f6d6 Move Direct2D paint engine on top of QPaintEngineEx
Make QWindowsDirect2DPaintEngine a subclass of QPaintEngineEx instead of
QPaintEngine like the other paint engines inside Qt. This should both be
faster and better supported, as the code paths handling QPaintEngineEx in
QPainter are tested more.

Additionally the visual output is closer to the raster engine, as all
primitives are drawn using the same mechanism, resulting in fewer
off-by-one-pixel errors.

This change also makes designer work mostly correctly, apart from some
remaining clipping bugs.

Change-Id: I53d36c08e73883ff35e389d57f9d30b482fc6721
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-01-31 14:51:48 +01:00
Mitch Curtis
14addd2cbb Update some screenshots in qtbase/examples/widgets.
The screenshots were taken on Windows 7 with the Aero theme.

Change-Id: Ief04c3a9c0084a778606ba72f1f3199119d5c64e
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-01-31 14:46:31 +01:00
Gabriel de Dietrich
79fb39a87c Cocoa: Merge QNSWindow and QNSPanel, inherit NSPanel
Since we will later have frameless NSWindow child QWindows, it makes
sense to be able to keep and reuse the instantiated NSWindows in cases
like QDockWidgets. If we keep these 2 different classes, it becomes
impossible to morph one into the other.

Task-number: QTBUG-33082
Change-Id: I351c628b887101b1cfd67689afbf689f119554de
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-01-31 14:43:54 +01:00
Samuel Gaist
85ff4e8fe4 Upgrade Window Level for stay on top widget on OS X
Currently setting the WindowStaysOnTopHint makes the window appear over
its children e.g. a QMessageBox.

This patch aims to provide a more sensible level for stay on top widget

[ChangeLog][QtWidget][OS X] Fixes an issue where stay on top widgets
would cover their own children

Task-number: QTBUG-36178
Change-Id: Ie86b0e0244d2fdee3638d4ab576445ef190d4bc6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-01-31 12:24:10 +01:00
Konstantin Ritt
2d576f79f7 Make HarBuzz-NG the default shaper on Mac
Since we dropped all platform-related shapers during the
QPA refactoring, thus making HarfBuzz the only shaper on all
platforms, we can not deal with AAT-capable fonts anymore.
HarBuzz-NG now supports it's own shaper backend infrastructure,
so the decision was to enable HB's CoreText shaper backend on Mac
and simply make HB-NG the default shaper there.

Task-number: QTBUG-36056

Change-Id: If22e24fd5cc00c25952934332a2f4123f38135a4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
Christian Strømme
8c9a587ed3 Android: Export QtAndroidPrivate::androidSdkVersion()
Prerequisite for making the SDK version (API level) available through
QtAndroidExtras and to other modules.

Change-Id: Iffd7540c1a85f60d6b6a3e658faa69e095d87afa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
Friedemann Kleint
de27b71c19 Windows: Fixed alert sound of QMessageBox.
Task-number: QTBUG-33303

Change-Id: I184f169a2ae0e1fa5e21b906c1f7659316030b34
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-01-31 12:07:59 +01:00
Laszlo Agocs
6953f3a501 eglfs: Mouse hotplugging support
On Embedded Linux with libudev support hotplugging was already working,
except that the mouse cursor was not shown and hidden. This is now
corrected so that the cursor disappears when all mice become disconnected
and reappears if a mouse gets plugged in later on.

[ChangeLog][QtGui] Mouse hotplugging is now fully supported in eglfs
when running on Embedded Linux systems with libudev support enabled.

Task-number: QTBUG-36374
Change-Id: Iec7c1557ba6085e3958dd357460cc032896fb174
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-01-31 12:07:59 +01:00
BogDan Vatra
231cac6119 Disable the rendering profiling
Change-Id: Ia2d6216104c66a4b2e7bfb36418c13eaa51f55e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
BogDan Vatra
25d5b2e07b Fix the repaint position.
The geometry is used to set the dirty region of the screen, so it must be
translated in screen coordinates.

Change-Id: Ic559a0a0d0e840cb2aa27ae1b02dcc140b29556f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
BogDan Vatra
630d74a40c Don't add/remove/lower/raise children windows to the TLW stack.
Change-Id: I4fe6b05fe2a7d6de7c8ecaf9934fd8e285b2c64e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
BogDan Vatra
37355965c2 Fix repaint of transparent images.
Remove the native bitmap and paint directly on the surface instead.

Change-Id: Ie7010d97aa934a170c079de549903fc3391df4d9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
BogDan Vatra
5096355f0a Fix surface leak, cleanup opengl window.
ANativeWindow_fromSurface already acquires the surface, no need to
call ANativeWindow_acquire.

Remove unused variables.

Change-Id: I563573072687927256aef76fab20f645f35778a2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
BogDan Vatra
b86f7c1c8e Sort include headers
Change-Id: Ib987ee7c6e2cfcabd725fde4399c968a11dc0868
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
BogDan Vatra
398f029f62 Shut up setParent warning.
Change-Id: I43af8bf83d3071f7c1d2eff082df5b1414f553b8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
BogDan Vatra
6fe4deca3f Only Android API < 11 needs o set the surface type.
Change-Id: I290d7273624ce4853a137c00263fa9a169ea0cf9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
BogDan Vatra
fc43748893 Remove unused variable.
Change-Id: I30c6bea769df436f41275df60552b9616e8d5547
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-01-31 12:07:59 +01:00
Friedemann Kleint
62a3aaf3f1 Fix MSVC-warning about unused variable eventdispatcher.
Change-Id: Ic7c12f16c310cc681bba39a7969de235afcf0f44
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-31 10:21:50 +01:00
Andy Shaw
8cf666e10c Build on Windows Embedded when -qtlibinfix is used
The resource file that needs to be included is hardcoded whereas qmake
generates one that is based on the target name (which includes the
libinfix). So to ensure the right one is available, a copy of the
generated rc file is done to the name it expects.

[ChangeLog][Platform Specific Changes][Windows Embedded] Fixed building
issue when configuring Qt with -qtlibinfix

Change-Id: I46ddbc5d22424bf63c54423618385e4268790eeb
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
2014-01-31 09:02:30 +01:00
Maurice Kalinowski
10a6e4d22b remove doubled specification
DLLDESTDIR is set in config.pri already, hence no need to set it twice

Change-Id: I84a5ecd0a3db41ff3920a295644e3d169deed264
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-01-31 07:58:39 +01:00
Maurice Kalinowski
e196b9a5a0 Add install rules
Otherwise d3dcompiler will not be installed using -prefix in configure

Change-Id: I3054969cc5d8b7c2378b12bbaef3dc4ca0194711
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-01-31 07:58:31 +01:00
Bastiaan Veelo
fed63d4394 Documentation: a singular subject takes a singular verb.
Change-Id: I75762cd0f2c25eeeeb1283800c21393637bdff56
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-01-31 02:03:56 +01:00
Allan Sandfeld Jensen
5f59207bd3 Optimize drawing to and from generic formats
When drawing to and from the less common formats most of the cpu time
is spend in conversion. The conversion method is rather slow due to
using variable shifts and masks that the compiler does not have a chance
to optimize.

This patch changes the conversion methods to being templates fed by
constexpr methods. This allows the compiler to fully optimize the methods
yielding 2x->5x speedups.

The reliance on constexpr however means the optimized methods are only
used under C++11.

Change-Id: I2ec77c4c1c03f12ee463a694a2b59db0f0b52db1
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-31 00:24:48 +01:00
Konstantin Ritt
16af55dda1 QTextEngine: Make FontEngineCache inaccessible from outside
This is really an implementation detail
and shouldn't be accessible in any way.

Change-Id: Icd9f2ea6f9a1d5ebd613ce65eebe2823301f87ea
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-31 00:24:48 +01:00
Konstantin Ritt
f26928cccf Allow QTextCharFormat::setFont() to skip unresolved font props
This makes the font merging possible and solves an issue
with the default font properties inheritance when used
in conjunction with QTextFormatCollection.

Change-Id: If8b543c011122dde9f086f5d696df3b042f7b90c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-31 00:24:48 +01:00
Thiago Macieira
15f8bc1f6e Also register complex D-Bus types when running under qdbus
When running inside qdbus, we generate the meta objects a little
differently. Previously, for unknown types we'd simply have a -1 as the
type ID in the meta object, but this doesn't work in Qt 5 (has
apparently never worked). So simply register a type with the metatype
system and let QMetaObject do its thing.

[ChangeLog][qdbus]Fixed a bug that caused the qdbus tool to crash
when trying to display remote interfaces that had complex types
without a matching base Qt type.

Task-number: QTBUG-36524
Change-Id: Ifef65b340dc89d3295ed6ef00f2dcc60849ecb02
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-31 00:15:51 +01:00
Friedemann Kleint
f6723cf0d4 tst_qpauseanimation: Fix condition in QEXPECT_FAIL.
introduced by  b0b22e8d49 .

Change-Id: Ia57331ce9373a414f2bc56962412f20ef83bd7ca
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-30 22:10:22 +01:00
Andrew Knight
f3df57e7b8 WinRT winmain: handle -qdevel parameter for additional debugging tooling
This adds an additional command line argument, -qdevel, for tooling
support. Since Windows Phone deployment APIs don't return the PID, this
writes the PID to a lock file that can be read by deployment tools.
Since arguments may be passed from one of several entry points, the
special argument checks are now done in Run() instead of onActivated().

Change-Id: Ib3af157ccf687769d43d60adef9a0ab480e835b7
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-01-30 22:09:55 +01:00
Andrew Knight
604849018d qmake: Add DISTCLEAN_DEPS variable
This variable works like CLEAN_DEPS, but applies to the distclean target.

Change-Id: Ia30e8932b9acd6529298728dd5d0e038b0208d66
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-30 22:09:42 +01:00
Andrew Knight
8e1cc7043f Fix WinRT timer dispatch
This fixes the event dispatcher lookup on timer callbacks, which was
incorrectly using only the gui event dispatcher to look up timers.

Change-Id: Ia01a07f6505afd0adfc0641e9c60199f258138a1
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-01-30 22:09:38 +01:00
David Faure
cc8e0d85e2 Doc: argument(s) was renamed to value(s), adjust QCommandLineOption docs
Task-number: QTBUG-36264
Change-Id: I132270f35b93b2b1c5230459f48bf9d047f42ab9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-01-30 21:47:34 +01:00
Wolfgang Bremer
83977d47c1 QNX: Fix build on Win32 when linking against sqlite libs
Previously the linker options were overquoted which resulted in
a broken Makefile.

Change-Id: I2a77ad07564fc75533d6e8f29b5cbe52389bcce5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-30 19:20:43 +01:00
Thiago Macieira
8e26730fb7 Use full-barrier in the "non-atomic" API in QAtomic{Int,Integer,Pointer}
This is more in line with what std::atomic does.

Change-Id: I6fe96102995a3fda8f82475758995593358735bc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-30 18:06:31 +01:00
Thiago Macieira
aba30f0234 Replace the type-based QAtomicIntegerTraits with a size-based one
This simplifies the code a lot and avoids silly mistakes where a
specific integer type is missing (such as char16_t).

Change-Id: Id91dfd1919e783e0a9af7bfa093ca560a01b22d1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-30 18:06:27 +01:00
Thiago Macieira
fd0d576709 Centralize support for QBasicAtomic for ints and longs
No need to redefine everywhere, since they're required to be supported.

Change-Id: I2bdbbd0b0c44871e3bd0edcf0289fc58dd50ff31
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-30 18:06:23 +01:00
Thiago Macieira
8d2a9bcf1d Ensure that the pointer-sized QAtomicInteger specialization exists
This is already implemented in qatomic_x86.h, qatomic_ia64.h,
qatomic_mips.h, qatomic_armv6.h, and qatomic_cxx11.h. For
qatomic_msvc.h, we've just fixed it.

For qatomic_gcc.h, we know that the compiler supports it, so just add
it. According to the GCC manual, it might print a warning on some
platforms, so we only enable that on 64-bit builds.

For qatomic_unix.h, the support was missing (along with support for
unsigned 32-bit), so this commits adds it.

For qatomic_armv5.h, the platform does not always support 64-bit
atomics, but ARMv5 cannot compile in 64-bit mode anyway.

Change-Id: Ia8b3b5c641f11e5df05937fe7442be0a223174ef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-30 18:06:17 +01:00
Thiago Macieira
e4533e3aeb Introduce QAtomicInteger<T> and derive QAtomicInt from it
QAtomicInteger<T> is to QBasicAtomicInteger<T> what QAtomicInt was to
QBasicAtomicInt: just a little more syntactic sugar. The Basic classes
do not always have a constructor, since they depend on compiler
support. The constructor is always present in the non-Basic class, at
the expense of making it non-POD for C++98 code.

This commit also repurposes most of QAtomicInt's documentation for
QAtomicInteger. It adds only the Q_ATOMIC_INTnn_IS_SUPPORTED macro
that explains whether the given type is supported on this platform.

Change-Id: I58886d6fa49fea4de24015c40dae29c9fa534e00
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
2014-01-30 18:05:38 +01:00