|
|
@ -568,11 +568,10 @@ QString misc::updateLabelInSavePath(QString defaultSavePath, QString save_path, |
|
|
|
|
|
|
|
|
|
|
|
QString misc::toValidFileSystemName(QString filename) { |
|
|
|
QString misc::toValidFileSystemName(QString filename) { |
|
|
|
qDebug("toValidFSName: %s", qPrintable(filename)); |
|
|
|
qDebug("toValidFSName: %s", qPrintable(filename)); |
|
|
|
filename.replace("\\", "/").trimmed(); |
|
|
|
const QRegExp regex("[\\\\/:?\"*<>|]"); |
|
|
|
const QRegExp regex("[/:?\"*<>|]"); |
|
|
|
filename.replace(regex, " "); |
|
|
|
filename.replace(regex, " ").trimmed(); |
|
|
|
|
|
|
|
qDebug("toValidFSName, result: %s", qPrintable(filename)); |
|
|
|
qDebug("toValidFSName, result: %s", qPrintable(filename)); |
|
|
|
return filename; |
|
|
|
return filename.trimmed(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool misc::isValidFileSystemName(const QString& filename) { |
|
|
|
bool misc::isValidFileSystemName(const QString& filename) { |
|
|
|