[LyX/master] Address deprecation

Juergen Spitzmueller spitz at lyx.org
Fri Mar 3 09:38:06 UTC 2023


commit 739905862f208fea67cc6e755abed9af271f18b7
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Fri Mar 3 11:37:39 2023 +0100

    Address deprecation
    
    See https://doc.qt.io/qt-6/qbytearray-obsolete.html
---
 src/frontends/qt/GuiClipboard.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt/GuiClipboard.cpp b/src/frontends/qt/GuiClipboard.cpp
index 37cda23..60c8088 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<std::uint32_t>(support::checksum(data));
 }
 


More information about the lyx-cvs mailing list