equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtCore module of the Qt Toolkit. |
7 ** This file is part of the QtCore module of the Qt Toolkit. |
8 ** |
8 ** |
571 */ |
571 */ |
572 |
572 |
573 QString QFileInfo::absolutePath() const |
573 QString QFileInfo::absolutePath() const |
574 { |
574 { |
575 Q_D(const QFileInfo); |
575 Q_D(const QFileInfo); |
576 if(!d->data->fileEngine) |
576 |
577 return QLatin1String(""); |
577 if (!d->data->fileEngine) { |
|
578 return QLatin1String(""); |
|
579 } else if (d->data->fileName.isEmpty()) { |
|
580 qWarning("QFileInfo::absolutePath: Constructed with empty filename"); |
|
581 return QLatin1String(""); |
|
582 } |
578 return d->getFileName(QAbstractFileEngine::AbsolutePathName); |
583 return d->getFileName(QAbstractFileEngine::AbsolutePathName); |
579 } |
584 } |
580 |
585 |
581 /*! |
586 /*! |
582 Returns the file's path canonical path (excluding the file name), |
587 Returns the file's path canonical path (excluding the file name), |