From f259f49702e9501169593bbc14ccc0d7adf9105c Mon Sep 17 00:00:00 2001
From: Mikhail Zolotukhin <mail@gikari.com>
Date: Sat, 3 Dec 2022 16:38:22 +0100
Subject: [PATCH] fix!: make plugin compatible with QtCreator 5.0.2 (#37)

---
 external/qtcreator/version.cmake | 2 +-
 src/qnvimplugin.cpp              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/external/qtcreator/version.cmake b/external/qtcreator/version.cmake
index 58f3814..0063676 100644
--- a/external/qtcreator/version.cmake
+++ b/external/qtcreator/version.cmake
@@ -1,2 +1,2 @@
-set(QT_CREATOR_VERSION "4.15.2")
+set(QT_CREATOR_VERSION "5.0.2")
 set(QT_CREATOR_SNAPSHOT "")
diff --git a/src/qnvimplugin.cpp b/src/qnvimplugin.cpp
index ded3f58..f63daa3 100644
--- a/src/qnvimplugin.cpp
+++ b/src/qnvimplugin.cpp
@@ -807,7 +807,7 @@ void QNVimPlugin::handleNotification(const QByteArray &name, const QVariantList
             } else if (cmd == "BufWriteCmd") {
                 if (mEditors.contains(buffer)) {
                     QString currentFilename = this->filename(mEditors[buffer]);
-                    if (mEditors[buffer]->document()->save(nullptr, filename)) {
+                    if (mEditors[buffer]->document()->save(nullptr, Utils::FilePath::fromString(filename))) {
                         if (currentFilename != filename) {
                             mEditors.remove(buffer);
                             mChangedTicks.remove(buffer);