diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2023-09-03 19:37:21 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2023-09-04 13:30:46 +0200 |
commit | 38f09f634fc7c66a2ed5857522e3809fc54c656b (patch) | |
tree | f63004c8edd13984b53319e8c3fc3d72375c352c /patches/source/rocs/patch/rocs/97a1f41c4d79f471c36207ec4d86e1a346b8df83.patch | |
parent | 43cd17b912194e89efbd0e3a2877bca81b0abdca (diff) | |
download | current-20230903193721_15.0.tar.gz current-20230903193721_15.0.tar.xz |
Sun Sep 3 19:37:21 UTC 202320230903193721_15.0
patches/packages/rocs-21.12.1-x86_64-2_slack15.0.txz: Rebuilt.
Fix crash on startup. Thanks to Lockywolf and ponce.
Diffstat (limited to 'patches/source/rocs/patch/rocs/97a1f41c4d79f471c36207ec4d86e1a346b8df83.patch')
-rw-r--r-- | patches/source/rocs/patch/rocs/97a1f41c4d79f471c36207ec4d86e1a346b8df83.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/source/rocs/patch/rocs/97a1f41c4d79f471c36207ec4d86e1a346b8df83.patch b/patches/source/rocs/patch/rocs/97a1f41c4d79f471c36207ec4d86e1a346b8df83.patch new file mode 100644 index 000000000..630acd127 --- /dev/null +++ b/patches/source/rocs/patch/rocs/97a1f41c4d79f471c36207ec4d86e1a346b8df83.patch @@ -0,0 +1,29 @@ +From 97a1f41c4d79f471c36207ec4d86e1a346b8df83 Mon Sep 17 00:00:00 2001 +From: Tomaz Canabrava <tcanabrava@kde.org> +Date: Tue, 14 Dec 2021 17:32:12 +0000 +Subject: [PATCH] I hate `auto`. This creates a QStringRref, not a QString, + then crashes. + +We can't pass a QStringRef to QUrl::fromLocalFile, this accepts +a const QString& and then QStringRef will decay to a QString() +but it's UB to hold a const ref to a temporary. +--- + src/project/project.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/project/project.cpp b/src/project/project.cpp +index 42e00bc0c..47d11912c 100644 +--- a/src/project/project.cpp ++++ b/src/project/project.cpp +@@ -205,7 +205,7 @@ QString Project::workingDir() const + + KTextEditor::Document* Project::createCodeDocument(const QString& filePath) + { +- auto path = d->m_workingDirectory.path() + QLatin1Char('/') + filePath + QStringLiteral(".js"); ++ const QString path = d->m_workingDirectory.path() + QLatin1Char('/') + filePath + QStringLiteral(".js"); + + auto doc = KTextEditor::Editor::instance()->createDocument(nullptr); + if (!doc->saveAs(QUrl::fromLocalFile(path))) { +-- +GitLab + |