QStringBuilder: add support for (non-const) char*
There's support for const char[] and char[], so it seems this was simply forgotten. [ChangeLog][QtCore][QStringBuilder] Added support for (non-const) char*. Change-Id: I4b5d9039632da7721256579b7741816027321a7e Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
a433614bec
commit
89302436cb
@ -303,7 +303,7 @@ template <int N> struct QConcatenable<char[N]> : QConcatenable<const char[N]>
|
|||||||
|
|
||||||
template <> struct QConcatenable<const char *> : private QAbstractConcatenable
|
template <> struct QConcatenable<const char *> : private QAbstractConcatenable
|
||||||
{
|
{
|
||||||
typedef char const *type;
|
typedef const char *type;
|
||||||
typedef QByteArray ConvertTo;
|
typedef QByteArray ConvertTo;
|
||||||
enum { ExactSize = false };
|
enum { ExactSize = false };
|
||||||
static int size(const char *a) { return qstrlen(a); }
|
static int size(const char *a) { return qstrlen(a); }
|
||||||
@ -320,6 +320,11 @@ template <> struct QConcatenable<const char *> : private QAbstractConcatenable
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <> struct QConcatenable<char *> : QConcatenable<const char*>
|
||||||
|
{
|
||||||
|
typedef char *type;
|
||||||
|
};
|
||||||
|
|
||||||
template <> struct QConcatenable<QByteArray> : private QAbstractConcatenable
|
template <> struct QConcatenable<QByteArray> : private QAbstractConcatenable
|
||||||
{
|
{
|
||||||
typedef QByteArray type;
|
typedef QByteArray type;
|
||||||
|
Loading…
Reference in New Issue
Block a user