]> git.lyx.org Git - features.git/commitdiff
Address deprecation
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 3 Mar 2023 10:37:39 +0000 (11:37 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 3 Mar 2023 10:37:39 +0000 (11:37 +0100)
See https://doc.qt.io/qt-6/qbytearray-obsolete.html

src/frontends/qt/GuiClipboard.cpp

index 37cda23a15c057b5b8c4a3253417967aca206bf4..60c8088f3732d1dbfefacee0bcd49ac6b336c2f9 100644 (file)
@@ -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));
 }