[libraries/ktextaddons/2.1] textaddonswidgets/misc: On windows : is not autorized. Replace by _

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 0e81531919593d56d06ea3ee52a6614f980f3471 by Laurent Montel.
Committed on 13/08/2026 at 18:46.
Pushed by mlaurent into branch '2.1'.

On windows : is not autorized. Replace by _

(cherry picked from commit 4b2a8772e609db156f6eb20837b90a0b6a7166fc)

M  +3    -0    textaddonswidgets/misc/savefileutils.cpp

https://invent.kde.org/libraries/ktextaddons/-/commit/0e81531919593d56d06ea3ee52a6614f980f3471

diff --git a/textaddonswidgets/misc/savefileutils.cpp b/textaddonswidgets/misc/savefileutils.cpp
index 30fd5c8fc..55b50e776 100644
--- a/textaddonswidgets/misc/savefileutils.cpp
+++ b/textaddonswidgets/misc/savefileutils.cpp
@@ -43,6 +43,9 @@ QString SaveFileUtils::querySaveFileName(QWidget *parent, const QString &title,
             }
         }();
     }
+#ifdef Q_OS_WIN
+    fileName.replace(u':', u"_"_s);
+#endif
     const QUrl localUrl = QUrl::fromLocalFile(startUrl.path() + u'/' + fileName);
     const QString fileStr = QFileDialog::getSaveFileName(parent, title, localUrl.path());
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.