Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

Compatibility Members for QDir

The following class members are part of the Qt 3 compatibility layer. They are provided to help you port old code to Qt 4. We strongly advise against using them in new code.

QDir class reference

Public Functions

Static Public Members


Member Function Documentation

QString QDir::absFilePath ( const QString & fileName, bool acceptAbsPath = true ) const

Use absoluteFilePath() instead.

QString QDir::absPath () const

Use absolutePath() instead.

QString QDir::cleanDirPath ( const QString & name )   [static]

Use cleanPath() instead.

void QDir::convertToAbs ()

Use makeAbsolute() instead.

QString QDir::currentDirPath ()   [static]

Returns the current working directory or "/" if the current directory cannot be determined.

See also homeDirPath() and rootDirPath().

QFileInfoList QDir::entryInfoList ( const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use the overload that takes a name filter string list as first argument instead.

QStringList QDir::entryList ( const QString & nameFilter, Filters filters = NoFilter, SortFlags sort = NoSort ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use the overload that takes a name filter string list as first argument instead.

QString QDir::homeDirPath ()   [static]

Returns the user's home directory or an empty string if it cannot be determined.

See also currentDirPath() and rootDirPath().

bool QDir::matchAllDirs () const

Use filter() & AllDirs instead.

bool QDir::mkdir ( const QString & dirName, bool acceptAbsPath ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Tries to create a directory called dirName. Returns true on success; otherwise returns false. If acceptAbsPath is false dirName must be relative to the current working directory.

See also currentDirPath().

QString QDir::nameFilter () const

Use nameFilters() instead.

bool QDir::rmdir ( const QString & dirName, bool acceptAbsPath ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Tries to delete the directory specified by dirName. Returns true on success; otherwise returns false. If acceptAbsPath is false dirName must be relative to the current working directory.

See also currentDirPath().

QString QDir::rootDirPath ()   [static]

Returns "/".

See also homeDirPath() and currentDirPath().

void QDir::setMatchAllDirs ( bool on )

Use setFilter() instead.

void QDir::setNameFilter ( const QString & nameFilter )

Use setNameFilters() instead.

For example, if you have code like

    QString filter = "*.cpp *.cxx *.cc";
    dir.setNameFilter(filter);

you can rewrite it as

    QString filter = "*.cpp *.cxx *.cc";
    dir.setNameFitlers(filter.split(' '));


Copyright © 2004 Trolltech Trademarks
Qt 4.0.0-b1