2012/7/22, Арсений Заостровных <necto...@gmail.com>: > std::string outStr = (char*)princed->base_string.
This code is taken from "EQL" and converts from/to a QString. (But maybe there's a better way.) cl_object from_qstring(const QString& s) { cl_object l_s = ecl_alloc_simple_extended_string(s.length()); ecl_character* l_p = l_s->string.self; for(int i = 0; i < s.length(); ++i) { l_p[i] = s.at(i).unicode(); } return l_s; } QString toQString(cl_object l_str) { QString s; if(ECL_STRINGP(l_str)) { if(ECL_BASE_STRING_P(l_str)) { s = QString::fromLatin1((char*)l_str->base_string.self, l_str->base_string.fillp); } else { uint l = l_str->string.fillp; s.reserve(l); ecl_character* l_s = l_str->string.self; for(uint i = 0; i < l; ++i) { s[i] = QChar(l_s[i]); } } } return s; } ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list