As replacement for functionality that's being deprecated
in Qt but still useful or needed, or that cannot easily be handled
without resorting to #if QT_VERSION checks in user code.
Change-Id: Id3575a54ff944bf0e89d452d13944fcaee270208
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It is often possible to user (member) functions or members directly.
That improves readablility and potentially reduces the total number of
symbols.
Also use qobject_container_cast at places where it is appropriate.
Change-Id: Ia2591bca356591e001e2c53eeebcf753e5bc3c37
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This switches internal storage from an (signed) int to an quintptr,
making it possible for client code to use Ids directly based on
pointers using Id::fromUniqueIdentifier().
Ids generated by existing code will keep using the low 32 bits only
for now, so the change effectively only affects 64 bit systems.
The patch also moves the rarely used fromUniqueIdentifier code
path out-of-line and replaces the Id::IdsPerPlugin and
Id::ReservedPlugins enums in the only place where they have been
used (setting a lower limit for ids). The limit itself not really
useful, but unchanged by this patch.
Change-Id: Ieabc7d9d72f3c5dd749fb49b7193a0c8629c186e
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Return Id() in that case. Currently we can convert the invalid Id
to a string, but when we try to convert that string back to an Id
there is a soft assert.
Change-Id: Iad8443ff65a643030bd47446ec2dcf2889d2e4eb
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
There are no more users that use this without giving at least a
major version.
Change-Id: I4ed3c41eb87811435b9e354aa4b2ae8cc1979681
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Use Core::Id for Feature and QSet<Core::Id> for FeatureSet.
Change-Id: I12341036bd9eaa82589d92bd3f7d21f2e6b737bd
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Convert a QSet<Id> to/from a stringlist and add the methods to create
versioned ids and id sets.
Most of the code goes into Core::Id, but the code to generate sets of
versioned ids moves into BaseQtVersion which is the only user.
Change-Id: Id52474fac2aa0563e48b2b714dcfef533350c729
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This was intended to avoid the char * -> int mapping at all, but
was never actively used.
Change-Id: Ief119cc2ff2c8b4ed404c9eb534e17265a3562e6
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
Remove \brief commands for functions.
Use standard wording for QDoc commands.
Fix style and grammar issues.
Use the \a command instead of the \c command for attributes
in function descriptions.
Do not use \returns, because it does not exist.
Change-Id: Icd32b519670cb376e246bab3a58fe7e98d2529ea
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
QDoc does some magic with the \class and \namespaces
and \brief commands, so the following wording must be used:
"The xxx class yyy ..."
Change-Id: Id231f30e8464898b776888d5423523de404aae34
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
QDoc cannot find functions if the signature in the \fn command
is not identical to the declaration, including 'const' qualifiers.
Removed the \fn where the documentation comes immediately before the
function, as qdoc does not need it in that case.
Change-Id: If6a2a2e2d58b394905c803787d2a93489049e4ca
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This was mostly used to disambiguate the char * and the QString
constructors.
Change-Id: Ib6923ef8e8c0e5d514a883e73aa001a1cd9fb534
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Only used once so far, but makes intended usage clear.
Change-Id: Ia628f5356dd02282e233846268d6c0629e93e3fe
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Pure convenience for the decomposition of ids constructed wit suffix().
This will help centralizing repeated code in the qnx, blackberry, android
and cmake plugins.
Change-Id: Ibc9ca21f8da1d15578f4553da97212cc99a5c5b9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Use data members instead of virtual functions for id, displayName and
priority, use Core::Id, not QStrings for id, de-pimpl CommandLocator.
Change-Id: Id8b41f184cb995138b2d76c923d6d3ae02b7e3f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
These are meant to help the outphasing of the Id(QString) constructor
and generally split the interface into "persistent" and "non-persistent".
Change-Id: Id23f613c304e020044e4996448d68164725c898c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This enables using integral values in addition to strings as key.
Change-Id: I0d03441eab4172b31f813d478bdd2946d7056117
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Distinguish from const char * one.
QString ctor is yet to be removed
Change-Id: I2da231036c6417353b0566d39666d918ad141c6d
Reviewed-by: hjk <qthjk@ovi.com>
Fix
warning: C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup.
By just using qstrdup.
Change-Id: I40664b6ed763b27951d983ec13dcc638270a1beb
Reviewed-by: hjk <qthjk@ovi.com>
Saves code on caller side and cycles for the hashing.
Change-Id: I9d0c739b44a4611a4d70d33cf2798e0b078a72b5
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>