Uses QByteArray instead of QString to avoid data copy.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
This commit is contained in:
parent
090e4a6525
commit
71d279c040
1 changed files with 5 additions and 11 deletions
|
|
@ -136,20 +136,14 @@ static bool isQRealType(const char *type)
|
||||||
/*
|
/*
|
||||||
* Avoid API break keep this on cpp
|
* Avoid API break keep this on cpp
|
||||||
*/
|
*/
|
||||||
static int maxSlotsCount(const QString& className)
|
static int maxSlotsCount(const QByteArray& className)
|
||||||
{
|
{
|
||||||
int maxSlots = MAX_SLOTS_COUNT;
|
return className == GLOBAL_RECEIVER_CLASS_NAME ? MAX_GLOBAL_SIGNALS_COUNT : MAX_SLOTS_COUNT;
|
||||||
if (className == GLOBAL_RECEIVER_CLASS_NAME)
|
|
||||||
maxSlots = MAX_GLOBAL_SIGNALS_COUNT;
|
|
||||||
return maxSlots;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int maxSignalsCount(const QString& className)
|
static int maxSignalsCount(const QByteArray& className)
|
||||||
{
|
{
|
||||||
int maxSignals = MAX_SIGNALS_COUNT;
|
return className == GLOBAL_RECEIVER_CLASS_NAME ? MAX_GLOBAL_SIGNALS_COUNT : MAX_SIGNALS_COUNT;
|
||||||
if (className == GLOBAL_RECEIVER_CLASS_NAME)
|
|
||||||
maxSignals = MAX_GLOBAL_SIGNALS_COUNT;
|
|
||||||
return maxSignals;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint PropertyData::flags() const
|
uint PropertyData::flags() const
|
||||||
|
|
@ -296,7 +290,7 @@ DynamicQMetaObject::DynamicQMetaObject(const char* className, const QMetaObject*
|
||||||
d.stringdata = 0;
|
d.stringdata = 0;
|
||||||
d.data = 0;
|
d.data = 0;
|
||||||
d.extradata = 0;
|
d.extradata = 0;
|
||||||
m_d->m_className = QByteArray(className);
|
m_d->m_className = className;
|
||||||
m_d->updateMetaObject(this);
|
m_d->updateMetaObject(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue