From 739905862f208fea67cc6e755abed9af271f18b7 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 3 Mar 2023 11:37:39 +0100 Subject: [PATCH] Address deprecation See https://doc.qt.io/qt-6/qbytearray-obsolete.html --- src/frontends/qt/GuiClipboard.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt/GuiClipboard.cpp b/src/frontends/qt/GuiClipboard.cpp index 37cda23a15..60c8088f37 100644 --- a/src/frontends/qt/GuiClipboard.cpp +++ b/src/frontends/qt/GuiClipboard.cpp @@ -130,7 +130,7 @@ string const GuiClipboard::getAsLyX() const if (cache_.hasFormat(lyxMimeType())) { // data from ourself or some other LyX instance QByteArray const ar = cache_.data(lyxMimeType()); - string const s(ar.data(), ar.count()); + string const s(ar.data(), ar.size()); LYXERR(Debug::CLIPBOARD, s << "'"); return s; } @@ -307,7 +307,7 @@ FileName GuiClipboard::getAsGraphics(Cursor const & cur, GraphicsType type) cons // data from ourself or some other LyX instance QByteArray const ar = cache_.data(mime); LYXERR(Debug::CLIPBOARD, "Getting from clipboard: mime = " << mime.constData() - << "length = " << ar.count()); + << "length = " << ar.size()); QFile f(toqstr(filename.absFileName())); if (!f.open(QIODevice::WriteOnly | QIODevice::Truncate)) { @@ -534,7 +534,7 @@ bool GuiClipboard::isInternal() const // We are running on OS X: Check whether clipboard data is from // ourself by comparing its checksum with the stored one. QByteArray const ar = cache_.data(lyxMimeType()); - string const data(ar.data(), ar.count()); + string const data(ar.data(), ar.size()); return checksum == static_cast(support::checksum(data)); }