Fixed lamexp_clean_filename() to also handle double-quote characters.

This commit is contained in:
LoRd_MuldeR 2013-04-16 22:43:52 +02:00
parent 4e7859def5
commit 9c83fd4b68
2 changed files with 7 additions and 3 deletions

View File

@ -29,8 +29,8 @@
#define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 7 #define VER_LAMEXP_MINOR_LO 7
#define VER_LAMEXP_TYPE RC #define VER_LAMEXP_TYPE RC
#define VER_LAMEXP_PATCH 1 #define VER_LAMEXP_PATCH 2
#define VER_LAMEXP_BUILD 1273 #define VER_LAMEXP_BUILD 1274
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!) // Tool versions (minimum expected versions!)

View File

@ -2177,7 +2177,9 @@ void lamexp_blink_window(QWidget *poWindow, unsigned int count, unsigned int del
const QString lamexp_clean_filename(const QString &str) const QString lamexp_clean_filename(const QString &str)
{ {
QString newStr(str); QString newStr(str);
QRegExp rx("\"(.+)\"");
rx.setMinimal(true);
newStr.replace("\\", "-"); newStr.replace("\\", "-");
newStr.replace(" / ", ", "); newStr.replace(" / ", ", ");
newStr.replace("/", ","); newStr.replace("/", ",");
@ -2187,6 +2189,8 @@ const QString lamexp_clean_filename(const QString &str)
newStr.replace("<", "["); newStr.replace("<", "[");
newStr.replace(">", "]"); newStr.replace(">", "]");
newStr.replace("|", "!"); newStr.replace("|", "!");
newStr.replace(rx, "`\\1´");
newStr.replace("\"", "'");
return newStr.simplified(); return newStr.simplified();
} }