Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

bool QFile::remove (  ) [inherited]

Removes the file specified by fileName(). Returns true if successful; otherwise returns false.

The file is closed before it is removed.

See also:

Definition at line 646 of file qfile.cpp.

References QFile::close(), QFile::error(), QFile::fileEngine(), and QFile::unsetError().

Referenced by SaveFormAsTemplate::accept(), QSystemSemaphorePrivate::cleanHandle(), QDirModel::dropMimeData(), QNetworkDiskCache::expire(), QFile::remove(), QNetworkDiskCachePrivate::removeFile(), and QFile::rename().

    if (d->fileName.isEmpty()) {
        qWarning("QFile::remove: Empty or null file name");
        return false;
    if(error() == QFile::NoError) {
        if(fileEngine()->remove()) {
            return true;
#if defined(Q_OS_WIN)
        d->setError(QFile::RemoveError, GetLastError());
        d->setError(QFile::RemoveError, errno);
    return false;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index