No free json string
This commit is contained in:
@@ -56,7 +56,9 @@ void DeviceManager::initDevice() {
|
|||||||
connect(EventCenter::Default(),&EventCenter::RequestEmptyScan,[=](QObject* sender, QObject* detail){
|
connect(EventCenter::Default(),&EventCenter::RequestEmptyScan,[=](QObject* sender, QObject* detail){
|
||||||
std::string json= getJsonFromPatInf(detail);
|
std::string json= getJsonFromPatInf(detail);
|
||||||
qDebug()<<json.c_str();
|
qDebug()<<json.c_str();
|
||||||
processScan(json.c_str(), true);
|
void * jss = malloc(json.size());
|
||||||
|
memcpy(jss,json.c_str(),json.size());
|
||||||
|
processScan((char*)jss,true);
|
||||||
});
|
});
|
||||||
// Patient scan
|
// Patient scan
|
||||||
connect(EventCenter::Default(),&EventCenter::RequestPatientScan,[=](QObject* sender, QObject* detail){
|
connect(EventCenter::Default(),&EventCenter::RequestPatientScan,[=](QObject* sender, QObject* detail){
|
||||||
@@ -64,7 +66,9 @@ void DeviceManager::initDevice() {
|
|||||||
qDebug()<<json.c_str();
|
qDebug()<<json.c_str();
|
||||||
if (!json.empty())
|
if (!json.empty())
|
||||||
{
|
{
|
||||||
processScan(json.c_str());
|
void * jss = malloc(json.size());
|
||||||
|
memcpy(jss,json.c_str(),json.size());
|
||||||
|
processScan((char*)jss);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// stop
|
// stop
|
||||||
|
|||||||
Reference in New Issue
Block a user