mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
NewElementWizard class : remove the use of ElementsCategoriesWidget and ElementsCategory
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4483 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -385,38 +385,6 @@ QList<QChar> QET::forbiddenCharacters() {
|
||||
return(QList<QChar>() << '\\' << '/' << ':' << '*' << '?' << '"' << '<' << '>' << '|');
|
||||
}
|
||||
|
||||
/**
|
||||
@return une chaine listant les caracteres interdits dans les noms de fichiers sous
|
||||
Windows
|
||||
@param escape true pour remplacer les caracteres < et > par leurs entites HTML
|
||||
*/
|
||||
QString QET::forbiddenCharactersString(bool escape) {
|
||||
QString result;
|
||||
foreach(QChar c, QET::forbiddenCharacters()) {
|
||||
if (escape) {
|
||||
if (c == '<') result += "<";
|
||||
else if (c == '>') result += ">";
|
||||
else result += QString(c);
|
||||
} else {
|
||||
result += QString(c);
|
||||
}
|
||||
result += " ";
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
@param string une chaine de caracteres
|
||||
@return true si string contient un caractere interdit dans les noms de
|
||||
fichiers sous Windows
|
||||
*/
|
||||
bool QET::containsForbiddenCharacters(const QString &string) {
|
||||
foreach(QChar c, QET::forbiddenCharacters()) {
|
||||
if (string.contains(c)) return(true);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
/**
|
||||
Cette fonction transforme une chaine de caracteres (typiquement : un nom de
|
||||
schema, de projet, d'element) en un nom de fichier potable.
|
||||
|
||||
Reference in New Issue
Block a user