Mark behavior of QFileInfo::absoluteFilePath as undefined in corner cases
The current description was misleading, since e.g. QFileInfo().absoluteFilePath() will always return an empty string. QFileInfo("").absoluteFilePath() however will return the current working directory ... Instead of documenting these small quirks we should rather mark the exact behavior as undefined, like we already do for absolutePath(). Change-Id: I70358413528429c2c2dee37480ad018aae26e6cb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
parent
51d6df1d18
commit
1e303a286e
@ -530,7 +530,8 @@ void QFileInfo::setFile(const QDir &dir, const QString &file)
|
||||
is true. In contrast to canonicalFilePath(), symbolic links or
|
||||
redundant "." or ".." elements are not necessarily removed.
|
||||
|
||||
If the QFileInfo is empty it returns QDir::currentPath().
|
||||
\warning If filePath() is empty the behavior of this function
|
||||
is undefined.
|
||||
|
||||
\sa filePath(), canonicalFilePath(), isRelative()
|
||||
*/
|
||||
@ -572,8 +573,8 @@ QString QFileInfo::canonicalFilePath() const
|
||||
In contrast to canonicalPath() symbolic links or redundant "." or
|
||||
".." elements are not necessarily removed.
|
||||
|
||||
\warning If the QFileInfo object was created with an empty QString,
|
||||
the behavior of this function is undefined.
|
||||
\warning If filePath() is empty the behavior of this function
|
||||
is undefined.
|
||||
|
||||
\sa absoluteFilePath(), path(), canonicalPath(), fileName(), isRelative()
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user