forked from qt-creator/qt-creator
Revert "Reduce allocations patches"
This reverts commit4580a3b222. This reverts commite852173484. We still have to support old gcc. (🍒 picked from commit e9c6944479fad2288060c72bb4df8dcbab9e0b2c) Change-Id: Ia8b198390a0f82c2104991900a3091c96d6e7f24 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -44,9 +44,6 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <array>
|
||||
#include <charconv>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
namespace Internal {
|
||||
@@ -714,22 +711,9 @@ PropertyName NodeMetaInfoPrivate::defaultPropertyName() const
|
||||
return PropertyName("data");
|
||||
}
|
||||
|
||||
static void addNumber(TypeName &id, int number)
|
||||
static inline TypeName stringIdentifier( const TypeName &type, int maj, int min)
|
||||
{
|
||||
char text[std::numeric_limits<int>::digits10 + 1];
|
||||
auto [end, error] = std::to_chars(std::begin(text), std::end(text), number);
|
||||
id.append(std::data(text), static_cast<int>(end - std::begin(text)));
|
||||
}
|
||||
|
||||
static TypeName stringIdentifier(const TypeName &type, int majorVersion, int minorVersion)
|
||||
{
|
||||
TypeName id = type;
|
||||
id.reserve(id.size() + 5);
|
||||
addNumber(id, majorVersion);
|
||||
id.append('_');
|
||||
addNumber(id, minorVersion);
|
||||
|
||||
return id;
|
||||
return type + QByteArray::number(maj) + '_' + QByteArray::number(min);
|
||||
}
|
||||
|
||||
NodeMetaInfoPrivate::Pointer NodeMetaInfoPrivate::create(Model *model, const TypeName &type, int major, int minor)
|
||||
|
||||
Reference in New Issue
Block a user