Fix regex escapes

main
Peter Repukat 3 years ago
parent dac5694aa9
commit e2b0779c7c

@ -1,6 +1,7 @@
#pragma once
#include <QQuickImageProvider>
#include <Windows.h>
#include <QRegularExpression>
class ExeImageProvider : public QQuickImageProvider {
public:
ExeImageProvider()
@ -11,7 +12,7 @@ class ExeImageProvider : public QQuickImageProvider {
QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize) override
{
HICON icon = 0;
std::wstring path = id.toStdWString();
std::wstring path = QString(id).replace(QRegularExpression(("\\%5C")), "\\").toStdWString();
icon = (HICON)LoadImage(
0,
path.data(),

@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,1,003000346323
PRODUCTVERSION 0,0,1,003000346323
FILEVERSION 0,0,2,006008097710
PRODUCTVERSION 0,0,2,006008097710
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Peter Repukat - FlatspotSoftware"
VALUE "FileDescription", "GlosSI - Config"
VALUE "FileVersion", "0.0.1.0-3-ga346323"
VALUE "FileVersion", "0.0.2.0-6-g8d9771f"
VALUE "InternalName", "GlosSIConfig"
VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware"
VALUE "OriginalFilename", "GlosSIConfig.exe"
VALUE "ProductName", "GlosSi"
VALUE "ProductVersion", "0.0.1.0-3-ga346323"
VALUE "ProductVersion", "0.0.2.0-6-g8d9771f"
END
END
BLOCK "VarFileInfo"
@ -230,6 +230,70 @@ END

@ -82,7 +82,7 @@ void UIModel::readConfigs()
json["maxFps"] = filejson["window"]["maxFps"];
json["scale"] = filejson["window"]["scale"];
json["name"] = QString(name).replace(QRegularExpression("\.json"), "");
json["name"] = QString(name).replace(QRegularExpression("\\.json"), "");
targets_.append(json.toVariantMap());
});
@ -178,7 +178,7 @@ bool UIModel::addToSteam(QVariant shortcut)
vdfshortcut.icon.value =
"\"" + (
is_windows_
? QString(maybeLaunchPath).replace(QRegularExpression("\/"), "\\").toStdString()
? QString(maybeLaunchPath).replace(QRegularExpression("\\/"), "\\").toStdString()
: maybeLaunchPath.toStdString()
) + "\"";
}
@ -186,7 +186,7 @@ bool UIModel::addToSteam(QVariant shortcut)
vdfshortcut.icon.value =
"\"" + (
is_windows_
? QString(maybeIcon).replace(QRegularExpression("\/"), "\\").toStdString()
? QString(maybeIcon).replace(QRegularExpression("\\/"), "\\").toStdString()
: maybeIcon.toStdString()
) + "\"";
}

Loading…
Cancel
Save