Fixed Qt-less builds.

This commit is contained in:
Matthias Koefferlein 2021-01-26 23:42:18 +01:00
parent bd9afaf865
commit dce371caaa
1 changed files with 2 additions and 0 deletions

View File

@ -1603,9 +1603,11 @@ Variant::to_bytearray () const
return std::vector<char> (m_var.m_qbytearray->constBegin (), m_var.m_qbytearray->constEnd ());
} else if (m_type == t_bytearray) {
return *m_var.m_bytearray;
#if defined(HAVE_QT)
} else if (m_type == t_qstring) {
QByteArray ba = m_var.m_qstring->toUtf8 ();
return std::vector<char> (ba.constBegin (), ba.constEnd ());
#endif
} else if (m_type == t_stdstring) {
return std::vector<char> (m_var.m_stdstring->begin (), m_var.m_stdstring->end ());
} else {