comparison data/fileio/TextTest.cpp @ 1859:4c5736a517e0

Avoid more recent Qt api, for older platform package builds
author Chris Cannam
date Mon, 18 May 2020 14:06:30 +0100
parents db489a1ece9b
children
comparison
equal deleted inserted replaced
1858:14747f24ad04 1859:4c5736a517e0
38 return false; 38 return false;
39 } 39 }
40 40
41 QByteArray bytes = file.read(200); 41 QByteArray bytes = file.read(200);
42 42
43 if (StringBits::isValidUtf8(bytes.toStdString(), true)) { 43 if (StringBits::isValidUtf8(std::string(bytes.data()), true)) {
44 SVDEBUG << "NOTE: TextTest::isApparentTextDocument: Document appears to be UTF-8" << endl; 44 SVDEBUG << "NOTE: TextTest::isApparentTextDocument: Document appears to be UTF-8" << endl;
45 return true; // good enough to be worth trying to parse 45 return true; // good enough to be worth trying to parse
46 } 46 }
47 47
48 QXmlInputSource xmlSource; 48 QXmlInputSource xmlSource;