[LyX/master] Fix deprecation warning

Juergen Spitzmueller spitz at lyx.org
Thu Mar 11 18:00:47 UTC 2021


commit 1a35afbe8fb6a9d1495f46ad4cf7f66f1e8e592c
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Thu Mar 11 19:06:03 2021 +0100

    Fix deprecation warning
---
 src/frontends/qt/GuiWorkArea.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index 2ce276d..4050f8c 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -1829,8 +1829,13 @@ public:
 		string const fn = (filename.extension() == "lyx")
 			? filename.onlyFileNameWithoutExt() : filename.onlyFileName();
 		filename_ = QString::fromUtf8(QByteArray::fromPercentEncoding(fn.c_str()));
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
+		postfix_ = toqstr(filename.absoluteFilePath()).
+			split("/", Qt::SkipEmptyParts);
+#else
 		postfix_ = toqstr(filename.absoluteFilePath()).
 			split("/", QString::SkipEmptyParts);
+#endif
 		postfix_.pop_back();
 		abs_ = toqstr(filename.absoluteFilePath());
 		dottedPrefix_ = false;


More information about the lyx-cvs mailing list