forked from qt-creator/qt-creator
Id: Remove redundant const modifiers from by-value arguments
Change-Id: I2f66822b8b8076ed2eb13729bd466e9e2204bccb Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
dd1cbd6ac2
commit
6384ce6d4a
@@ -183,7 +183,7 @@ Key Id::toKey() const
|
||||
\sa toString(), fromSetting()
|
||||
*/
|
||||
|
||||
Id Id::fromString(const QStringView name)
|
||||
Id Id::fromString(QStringView name)
|
||||
{
|
||||
if (name.isEmpty())
|
||||
return Id();
|
||||
@@ -202,7 +202,7 @@ Id Id::fromString(const QStringView name)
|
||||
\sa toString(), fromSetting()
|
||||
*/
|
||||
|
||||
Id Id::fromName(const QByteArrayView name)
|
||||
Id Id::fromName(QByteArrayView name)
|
||||
{
|
||||
return Id(theId(name.data(), name.size()));
|
||||
}
|
||||
@@ -273,7 +273,7 @@ Id Id::withSuffix(int suffix) const
|
||||
/*!
|
||||
\overload
|
||||
*/
|
||||
Id Id::withSuffix(const char suffix) const
|
||||
Id Id::withSuffix(char suffix) const
|
||||
{
|
||||
const QByteArray ba = name() + suffix;
|
||||
return Id(theId(ba.data(), ba.size()));
|
||||
@@ -293,7 +293,7 @@ Id Id::withSuffix(const char *suffix) const
|
||||
\overload
|
||||
*/
|
||||
|
||||
Id Id::withSuffix(const QStringView suffix) const
|
||||
Id Id::withSuffix(QStringView suffix) const
|
||||
{
|
||||
const QByteArray ba = name() + suffix.toUtf8();
|
||||
return Id(theId(ba.data(), ba.size()));
|
||||
|
@@ -34,9 +34,9 @@ public:
|
||||
#if QT_POINTER_SIZE != 4
|
||||
Id withSuffix(int suffix) const;
|
||||
#endif
|
||||
Id withSuffix(const char suffix) const;
|
||||
Id withSuffix(char suffix) const;
|
||||
Id withSuffix(const char *suffix) const;
|
||||
Id withSuffix(const QStringView suffix) const;
|
||||
Id withSuffix(QStringView suffix) const;
|
||||
Id withPrefix(const char *prefix) const;
|
||||
|
||||
QByteArrayView name() const;
|
||||
@@ -54,8 +54,8 @@ public:
|
||||
bool operator>(Id id) const { return m_id > id.m_id; }
|
||||
bool alphabeticallyBefore(Id other) const;
|
||||
|
||||
static Id fromString(const QStringView str); // FIXME: avoid.
|
||||
static Id fromName(const QByteArrayView ba); // FIXME: avoid.
|
||||
static Id fromString(QStringView str); // FIXME: avoid.
|
||||
static Id fromName(QByteArrayView ba); // FIXME: avoid.
|
||||
static Id fromSetting(const QVariant &variant); // Good to use.
|
||||
|
||||
static QSet<Id> fromStringList(const QStringList &list);
|
||||
|
Reference in New Issue
Block a user