Mercurial > hg > svcore
changeset 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 | 14747f24ad04 |
children | 9219834e39a4 166d7a4c2cd6 |
files | data/fileio/TextTest.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/data/fileio/TextTest.cpp Thu May 14 16:36:48 2020 +0100 +++ b/data/fileio/TextTest.cpp Mon May 18 14:06:30 2020 +0100 @@ -40,7 +40,7 @@ QByteArray bytes = file.read(200); - if (StringBits::isValidUtf8(bytes.toStdString(), true)) { + if (StringBits::isValidUtf8(std::string(bytes.data()), true)) { SVDEBUG << "NOTE: TextTest::isApparentTextDocument: Document appears to be UTF-8" << endl; return true; // good enough to be worth trying to parse }