src/writely/WriterUI.cpp
/**
 * Fix windows/osx/linux filename by replacing forbidden characters with spaces
 */
Fix windows/osx/linux filename by replacing forbidden characters with spaces
Fix windows / osx / linux filename by replacing forbidden characters with spaces
QString WriterUI::correctFileName(const QString& fileName) {
    QString forbiddenChars = "\\:*?\"<>|/";
    QString name = fileName;
    for (int i = 0; i < forbiddenChars.size();i++) {
        QChar c = forbiddenChars.at(i);
        name = name.replace( c, '-' );
    }
    name = name.replace( "\n", "");
    return name.trimmed();
}
QString WriterUI :: correctFileName ( const QString & fileName ) { QString forbiddenChars = " \\ \" " ; QString name = fileName ; for ( int i = 0 ; i < forbiddenChars . size ( ) ; i ++ ) { QChar c = forbiddenChars . at ( i ) ; name = name . replace ( c , ' ' ) ; } name = name . replace ( " \n " , " " ) ; return name . trimmed ( ) ; }
Fix windows/osx/linux filename by replacing forbidden characters with spaces
Fix windows / osx / linux filename by replacing forbidden characters with spaces