mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-21 06:45:32 -06:00
29 lines
508 B
C++
29 lines
508 B
C++
#include <QmlNetUtilities.h>
|
|
|
|
extern "C" {
|
|
|
|
QmlNetStringContainer* createString(const QString& value)
|
|
{
|
|
if(value.isNull()) {
|
|
return nullptr;
|
|
}
|
|
|
|
QmlNetStringContainer* result = new QmlNetStringContainer();
|
|
result->container = new QString(value);
|
|
result->data = result->container->utf16();
|
|
|
|
return result;
|
|
}
|
|
|
|
void freeString(QmlNetStringContainer* container)
|
|
{
|
|
if(container) {
|
|
|
|
delete container->container;
|
|
|
|
delete container;
|
|
}
|
|
}
|
|
|
|
}
|
|
|