Adapt coding rules for file names to point to the FileName class.

Change-Id: Ic28c3b0647a353f50c092782ae689ed6173b067b
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
This commit is contained in:
Eike Ziller
2012-05-15 13:41:50 +02:00
parent ab875b72ec
commit f1d3b432d5
+4 -4
View File
@@ -538,11 +538,11 @@
instead of backslashes (\\) even on Windows. To pass a file name from the user
to the API, convert it with QDir::fromNativeSeparators first. To present a file
name to the user, convert it back to native format with
QDir::toNativeSeparators.
QDir::toNativeSeparators. Consider using Utils::FileName::fromUserInput(QString)
and Utils::FileName::toUserOutput() for these tasks.
When comparing file names, consider using DocumentManager::fixFileName which
makes sure that paths are clean and absolute and also takes Windows
case-insensitivity into account (even if it is an expensive operation).
Use Utils::FileName when comparing file names, because that takes case sensitivity into account.
Also make sure that you compare clean paths (QDir::cleanPath()).
\section2 Plugin Extension Points