Commit Graph

1808 Commits

Author SHA1 Message Date
Thiago Macieira
d8ddc8ae89 Add the Q_CORE_EXPORT macros to unit-test-exported code
Change-Id: If21658bd5e4af0fdcc403b054fc1b8f46b5fcfb0
Reviewed-by: David Faure <faure@kde.org>
2012-03-23 19:43:00 +01:00
João Abecasis
accfdc85e5 Fallback implementation of Q_ALIGNOF
For all practical purposes, the fallback introduced here returns the
desired value. Having a fallback enables unconditional use of Q_ALIGNOF.

For compilers that provide native support for it, Q_ALIGNOF is otherwise
 #defined in qcompilerdetection.h.

Change-Id: Ie148ca8936cbbf8b80fe87771a14797c39a9d30c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-23 19:43:00 +01:00
Jędrzej Nowacki
98c3b8a442 Add test cases to tst_QByteArray
Internally we construct QByteArrays from QStaticByteArrays. For example
moc is generating QStaticByteArray structure for every string it saves.
New test cases check if a QByteArray constructed from a QStaticByteArray
behaves as a not statically constructed one.

Change-Id: Ia4aa9a1a5bc0209507636c683a782dda00eae85c
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-23 16:43:43 +01:00
Kent Hansen
425b38ef95 Merge "Merge master into api_changes" into refs/staging/api_changes 2012-03-23 14:31:28 +01:00
Kent Hansen
3b512ae142 Merge master into api_changes
Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
2012-03-23 14:10:58 +01:00
Debao Zhang
2f2b783214 Remove QWorkspace.
QWorkspace had been called Q3Workspace before Qt4.0 finally released.
In a sense, it is a Qt3 support Widget. And QWorkspace has been
deprecated and replaced by QMdiArea at Qt4.3.

Change-Id: Iea1bf831c9960c23c2b21d51fdc7c13b303642ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-23 13:22:10 +01:00
Debao Zhang
f31e614245 Cleanup Q3* items
Cleanup Q3* items from QtCore and QtGui modules.

Change-Id: Id214a077a50e99d820c84e96e34866492a0130d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-23 13:21:57 +01:00
Thiago Macieira
e20c473019 Move the UTF-8 data into a separate .cpp so I can use later
This allows me to keep the UTF-8 invalid data in one safe place. I
won't need to copy & paste it.

Change-Id: Icb909d08b7f8d0e1ffbc28e01a0ba0c1fa9dccf0
Reviewed-by: David Faure <faure@kde.org>
2012-03-23 11:22:40 +01:00
Marc Mutz
0defa2782f tst_qsslsocket*: don't inherit from QSharedPointer
QSharedPointer is about to become final.

Instead of inheriting from it to add implicit
conversions to and from QSslSocket*, make
QSslSocketPtr a typedef, and make the
conversions explicit.

Change-Id: I4eebb262ab5aef348f4d676f9e839325d4ed13da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-23 11:22:40 +01:00
Marc Mutz
e5ef496b5b tst_qsharedpointer: don't inherit from QSharedPointer
QSharedPointer is about to be made final. Instead
of inheriting from it to gain access to the
d-pointer, cast it to a layout-compatible struct
and access the pointer from there.

Assert liberally to ensure layout compatibility.

Change-Id: Ifc0fa6a6608e861469286673844325663f4f7fcc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-23 11:22:40 +01:00
Marc Mutz
167af3b6ca tst_qnetworkreply: don't inherit from QSharedPointer
QSharedPointer isn't meant to be used as a
base class.

Instead of inheriting from it to add implicit
conversions to and from QNetworkReply*, make
QNetworkReplyPtr a typedef, overload two
oft-used functions to take a QNetworkReplyPtr
in addition to QNetworkReply*, and otherwise
make the conversions explicit.

Change-Id: I1eff1793a19f2d5bad1cce8de74c0786675a50f3
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-23 11:22:40 +01:00
Lars Knoll
5cb0368516 Rewrite QMap to use a RB tree
QMap used to use a skiplist in Qt 4.x, which has variable
sized nodes and we can thus not optimise using custom
allocators.

The rewrite now uses a red-black tree, and all allocations
and tree operations happen in the cpp file. This will allow
us to introduce custom allocation schemes in later versions
of Qt.

Added some more tests and a benchmark. Memory consumption
of the new QMap implementation is pretty much the same as before.
Performance of insertion and lookup has increased by 10-30%. iteration
is slower, but still extremely fast and should not matter compared
to the work usually done when iterating.

Change-Id: I8796c0e4b207d01111e2ead7ae55afb464dd88f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-23 09:31:09 +01:00
Pekka Vuorela
337eedb316 Fixed QLineEdit to emit selectionChanged
Was not emitted when removed by input method event.

Change-Id: Ia2c0dcb09d42826188d4612f4c1705a41874a31d
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-03-23 00:41:38 +01:00
Miikka Heikkinen
b188221fee Fix QPrinter test in Windows
Fixed Q_WS_WIN flagging to Q_OS_WIN in QPrinter API and related
implementation to make API match the documentation and Qt 4.8.
Also Removed the unused internal HDC related functions from the API,
that were previously behind Q_WS_WIN flag.

Some of the properties tested are documented to be valid for native
print engine only in X11 environment, so skipped testing those in
non-xcb environments.

Copy collation is also apparently not supported in Windows native print
engine, though this seems to be undocumented, so skipped that only in
Windows.

At least one of the test blocks in tst_QPrinter::valuePreservation()
failed due to default printer not getting set properly, so fixed that,
too.

Task-number: QTBUG-24191
Task-number: QTBUG-22927
Change-Id: I44a5e3d647a1279fcc7f1e99de6881f9be330246
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-23 00:41:34 +01:00
aavit
b492f54b98 More UTF8 fix of raster autotest
This completes 6c98fd2, for systems where default codec is not UTF8.

Change-Id: I94795785d5d172558c40c06bd3ef4ffaba1624c5
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-03-22 18:59:45 +01:00
Shane Kearns
cae5299f48 Allow autobound UDP sockets to send to IPv4 and IPv6
When writeDatagram is called without first binding the UDP socket,
then bind it as QHostAddress::Any.
This allows the same socket to be used to sent to both IPv4 and
IPv6 destination addresses.

Allowing the OS to autobind the socket inside sendTo() may
result in a single protocol socket.

Task-number: QTBUG-5275
Change-Id: I2b76507e8a8a38369c6eafb61ce4191d1d6cc930
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-03-22 18:59:45 +01:00
Thiago Macieira
bd112dab56 Make tst_qmovie work in shadow builds
Change-Id: I8fe4b5e98ce2fb1ac8420bf568f5c9c973165fbf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Joerg Bornemann
1a414cbc26 Fix QSysInfo::WindowsVersion checking (QSysInfo::WV_NT_based is a mask)
Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo.

Task-number: QTBUG-20480
Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-22 16:13:21 +01:00
Samuel Rødal
787da35eb8 Fixed QInputMethod API to use isVisible() instead of visible().
Deprecate the old API for now as not to break existing usages.

Change-Id: I7abbbbe8a34951282537a9d74cded03743f44df7
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-22 16:13:21 +01:00
Pekka Vuorela
7e90df7bf5 FocusAboutToChange event to be send before focus changes
Focus change happen as: FocusAboutToChange event -> focus change
-> FocusOut event -> FocusIn event.

Input method need to have focus when calling commit(). Notification
on focus about to be lost allows QWindow implementations to commit in
time.

Also changes QWidget documentation to match code reality.

Change-Id: I17a8a374a33dd700909f79e370b42348869261a6
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-03-22 16:13:21 +01:00
David Faure
f89bf2c153 Make comment() work in the C locale too.
The parser makes the default language en_US, and no mimetype xml says
<comment xml:lang="C">, so use the en_US string for the C locale,
rather than returning an empty string.

Change-Id: Iad7c142e8078abe357773249416e7ce9b3e29a92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 13:29:50 +01:00
David Faure
5ec5ce3549 Return all expected paths in QStandardPaths::standardLocations
ApplicationsLocation and DataLocation were returning only the local path,
rather than system paths + local path.

Change-Id: I653d14e5bbe1e08c5fa1ecd5a6106336d1cd0369
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 13:29:27 +01:00
Teemu Katajisto
89b5244310 Cocoa: fix setting color with alpha channel value for color dialog
Make sure that if ShowAlphaChannel option is set then also setShowsAlpha
needs to be set for the panel before setting the current color, otherwise
alpha channel value is omitted.

Task-number: QTBUG-24320

Change-Id: Ifb3822711af8ffd0cf6cb4c8aab2b0020d296663
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-22 13:22:10 +01:00
Jędrzej Nowacki
5ea56e93f7 Reserve more space for built-in types in id space.
We are running out of type ids for built-in types, 255 is not enough.
QMetaType already contains about ~70 types, situation is maybe not
tragic now, but there is a great chance that we will want to add more
built-in types from different modules like jsondb or declarative. Then
it might be tight, because we are not allowed to reorganize type ids
(it would be a binary incompatible change).

This change was not possible up to now. Old moc generated code assumes
that type id can be safely stored in 8 bits.

This is source compatible change.

Change-Id: Iec600adf6b6196a9f3f06ca6d865911084390cc2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-03-22 11:52:23 +01:00
Samuel Rødal
55fa3c189f Got rid of Map / Unmap events in favor of Expose event.
Since change 2e4d8f67a8 the need for Map and Unmap events has
gone away, as now the Expose event is used to notify the application
about when it can start rendering.

The Map and Unmap events weren't really used except by QWidget to set
the WA_Mapped flag, which we now set based on the expose / unexpose.

Also guarantee that a Resize event is always sent before the first
Expose, by re-introducing an asynchronous expose event handler. Since
an expose is required before rendering to a QWindow, show a warning if
QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a
window that has not received its first expose.

Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-22 11:43:36 +01:00
Kurt Korbatits
d6d77d54aa Fixed path in qobject unittest
- Fixed path was failing to find sub program.

Change-Id: I86f1a6941e244c9bc25ad0441cc7a441607560b7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-22 06:49:08 +01:00
Kent Hansen
e1e0e83c5e Remove support for meta-object revisions < 7
For Qt5 we no longer want to support the older revisions due to the
dual codepaths that must be maintained, and because the format of the
meta-object data is quite different in revision 7.

The dual codepaths have been replaced by asserts that indicate the
revision in which the feature was introduced, and the older-revision
fallbacks have been removed.

It's not possible to build code generated by moc that has
revision <= 6 with Qt5 because the type of the
QMetaObject::stringdata member changed from const char * to const
QByteArrayData *. For the same reason it's not possible to build a
dynamic meta-object generator targeting revision <= 6 with Qt5.
Hence, too old meta-objects will be caught at compile time, and the
code will have to be ported to generate revision 7 (e.g., by running
Qt5's moc on the original class declaration).

Change-Id: I33f05878a2d3ee3de53fc7009f7a367f55c25e36
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-22 06:37:26 +01:00
Kent Hansen
22d621dd99 QMetaMethod::typeName() should return "void" if the return type is void
QMetaMethod::typeName() is documented to return an empty string if
the return type is void. But after the introduction of
QMetaType::UnknownType (where void was made a distinct type),
returning an empty string causes the idiom

   QMetaType::type(method.typeName())

to break; the result will be QMetaType::UnknownType rather than
the expected QMetaType::Void for methods that return void.

New code should use the new function QMetaMethod::returnType()
instead, but it would be good if existing code still did the right
thing.

The consequence of returning "void" instead of an empty string is
that it breaks existing logic that uses the typeName() length to
determine whether a method returns void. But we judge this as the
lesser of the two evils; it's better to have a typeName() function
that is consistent and keeps the QMetaType::type(method.typeName())
idiom working, than to force the typeName() inconsistency for void
only to keep code that does "strlen(method.typeName()) == 0"
working.

The places in Qt that were relying on a zero-length typeName()
(testlib, dbus, declarative) have already been changed to use
returnType().

Also adapt QMetaObjectBuilder, which is internal API.

Change-Id: I70249174029811c5b5d2a08c24b6db33b3723d19
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-21 18:55:51 +01:00
Kent Hansen
b8d71ed60b Fix QMetaObject::normalizedType() for "void" argument
Since the introduction of QMetaType::UnknownType, void is a proper
meta-type, and the normalized form of "void" should be "void", not
an empty string.

Add more tests to ensure that we do remove "void" in the one case
where it actually should be removed (e.g. "foo(void)").

Change-Id: I72dc2d24da67cf52da00c678f50213cff1b92e25
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-21 18:55:27 +01:00
Robin Burchell
0f9e98a586 Fix directories never being unwatched after deletion on Windows.
This causes all sorts of problems, but is also blocking the introduction of new,
more detailed signals, because the backend never correctly identified the removal.

The object handle appears to be woken up before the directory is actually
deleted, thus causing QFileInfo::exists() to return true, and not doing the
removal dance. This behaviour isn't exactly documented (as far as I was able to
find out), but also seems to happen consistently, and Chromium also contains
a comment noting a similar issue.

Task-number: QTBUG-2331
Change-Id: Icfb6219b78e688852d7863a666a0ffc31bb4d573
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-21 12:32:16 +01:00
Giuseppe D'Angelo
cb32450c47 QRegularExpression: add QObject::findChildren overload
This actually involved tiding up QObject sources a little bit
to clearly separate QString / QRegExp overloads of findChildren.

The corresponding qFindChildren overload for MSVC 6 compatibiltiy
was *not* added.

Change-Id: I84826b3df9275a9bda03608a5b66756890eda6f8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-21 11:43:38 +01:00
Giuseppe D'Angelo
8659495202 QRegularExpression: support for QStringList overloads
Change-Id: Ia9017348742e41187684185d04b56d27edd383b5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-21 11:43:30 +01:00
Jędrzej Nowacki
bfd2b30faf Crash fix in ~QVariant
QVariant handlers can not be unregistered. We are not able to guarantee
that such operation is safe and we do not want to.

Change-Id: Id9a12e6a8c750110e4a08eab1de3e07e5c408675
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-21 11:43:14 +01:00
Jiang Jiang
2cc5442b02 Remove hardcoded font names in QFont::defaultFamily()
QFont::defaultFamily() should not use any hardcoded font names like
"Helvetica" or "Times" as they might not be present in certain systems,
it should rather use abstract names like "sans-serif", "serif" and
"monospace" then let the platform plugin to decide which font map to
them.

Change-Id: I5aafb103a5238c17b10773711ad504806c6fc3ce
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-21 09:00:22 +01:00
Jędrzej Nowacki
37b0a8e7e6 Fix qDebug stream for an invalid QVariant.
This patch changes invalid QVariant qDebug stream value from
"QVariant(, QVariant::Invalid)" to "QVariant(Invalid)"

New tests were added.

Change-Id: Ia57d4fc2d775cc9fce28e03eba402c2173845b35
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-03-21 06:55:33 +01:00
Donald Carr
b936b95965 EGLFS: Integrate building into configure.
With the move to the QPA architecture EGL is now only required by
individual platform plugins and the configure script has been adjusted to
reflect this.

Change-Id: Ieadacef0b970f29752d9e3e36a007e5cbb005b0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-03-21 03:03:29 +01:00
Kent Hansen
83e055424a Add QtJson types to meta-type system
Make QJsonValue, QJsonObject, QJsonArray and QJsonDocument
first-class meta-types.
This is an enabler for a lightweight integration with QML.

Change-Id: I4725efdd2746cf97fd26d3632a99e8eee849f834
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-20 22:22:41 +01:00
Marius Storm-Olsen
e67066eff6 Remove old bic test data
We will not be testing BIC of Qt5 against Qt4

Change-Id: I6f0eea3dd60eea1535749240a178a19605c981d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-20 15:24:48 +01:00
Thorbjørn Lund Martsum
fcc01e6c37 QHeaderView - minor fix to setDefaultSectionSize
This fixes a situation where we (wrongly) assume that
a section with size 0 is hidden. However a hidden
section should be one that we have called hideSection
(or setSectionHidden) on.

Change-Id: Ic14eded2666022f27434dc55927323a74910549c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-20 11:44:09 +01:00
aavit
6c98fd2e6c Fix raster autotest: consistently assume scripts in UTF8, not latin1
The Lancelot raster painting autotest assumed latin1 encoding of the
QPS scripts files, while the script engine would import subscripts
as UTF8. This fix standardizes on UTF8.

Change-Id: I9e7c1ee7b6ffe77ff68edc8423f00dfb9ab3e95b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-03-20 11:44:09 +01:00
Frederik Gladhorn
c2e8db5841 Remove QAccessibleEvent child parameter.
This makes the api cleaner and generally the child should not be there.
It is only sometimes more convenient not to create a QAccessibleInterface
instance, so the functionallity is kept.

Change-Id: I26018a6d3e0549f4d79856775b4167c5660e229d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-19 23:00:10 +01:00
Jędrzej Nowacki
10df7967d9 Disable some tests and examples when --no-widgets is specified
There are many tests, examples that depends on widgets. This patch
disables some of them if Qt is configured without widgets.

Change-Id: I5460dadca736c54221874adcd518a7021725d90a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-19 20:16:04 +01:00
Frederik Gladhorn
477c43260e Accessibility: add text update events
Change-Id: Iece9d100b3f5a379d7d8e29dea67a10d0c918c06
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-19 18:07:30 +01:00
Miikka Heikkinen
4bcd8fc2de Fix infinite recursion crash in QPrinterInfo::supportedPaperSizes()
This function calls platform specific function
QWindowsPrinterSupport::supportedPaperSizes(), which then called back
to QPrinterInfo::supportedPaperSizes(), causing infinite recursion.

Fixed by providing a proper implementation for querying supported
paper sizes in QWin32PrintEngine - the same implementation was used in
Qt 4.8.

Task-number: QTBUG-24190
Change-Id: I64a2773d83596df19818bf2636f1255943d7851d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-19 18:02:39 +01:00
Kent Hansen
95d6f8a4cf Merge master into api_changes
Conflicts:
	src/corelib/tools/qvector.h
	tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp

Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
2012-03-19 10:03:48 +01:00
Frederik Gladhorn
36513264da Make copy and assign private for QAccessibleEvent.
Also make the handling of events in the test pointer
based since mac-g++ doesn't seem to like const
references the way they were before.

Change-Id: I7fe39978d4729b8e586be30978b74aa51ca7cfe6
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-18 21:42:38 +01:00
Kent Hansen
3f64a7b67b Add autotests for QMetaType::load() and save()
These were not covered at all by tst_qmetatype.

Change-Id: Ic957470ac78b2c15fe449efe17e1f178a41c3690
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-18 21:06:57 +01:00
Stephen Kelly
72367b1679 Bootstrap qdbuscpp2xml.
This involves invoking the Moc classes directly and using the data
structures it provides instead of invoking the moc exectutable and
parsing the generated code.

Change-Id: Ia5c654e8ef58d52d0d3376252c13e13885f80da3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-18 14:14:42 +01:00
Jędrzej Nowacki
5e497111db Add new test cases to tst_QMetaType.
Change-Id: I405ab5df9d9de3a0a0a71276b172a27ee01392e3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-18 12:35:09 +01:00
Marc Mutz
d823646db3 containers: add C++11-style c{begin,end}() as alias for const{Begin,End}()
C++11 adds cbegin()/cend() functions for the same reason Qt has
constBegin()/constEnd(). This patch adds these functions to the
Qt containers with the same implementation as constBegin()/constEnd().

It also fixes the return types in the documentation of existing
constFind() functions (documentation only).

C++11 only adds cbegin()/cend() (and crbegin()/crend(), which Qt doesn't have).
In particular, it doesn't add cfind(), so I didn't supply these, even though
Qt comes with constFind().

This is a forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1365.

Change-Id: Ida086b64246b24e25254eafbcb06c8e33388502b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-17 09:10:57 +01:00