Qt 4.8
Classes | Functions
qdir.h File Reference
#include <QtCore/qstring.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qshareddata.h>

Go to the source code of this file.

Classes

class  QDir
 The QDir class provides access to directory structures and their contents. More...
 

Functions

Q_CORE_EXPORT QDebug operator<< (QDebug debug, QDir::Filters filters)
 
Q_CORE_EXPORT QDebug operator<< (QDebug debug, const QDir &dir)
 

Function Documentation

◆ operator<<() [1/2]

Q_CORE_EXPORT QDebug operator<< ( QDebug  debug,
QDir::Filters  filters 
)

Definition at line 2476 of file qdir.cpp.

Referenced by QDir::temp().

2477 {
2478  QStringList flags;
2479  if (filters == QDir::NoFilter) {
2480  flags << QLatin1String("NoFilter");
2481  } else {
2482  if (filters & QDir::Dirs) flags << QLatin1String("Dirs");
2483  if (filters & QDir::AllDirs) flags << QLatin1String("AllDirs");
2484  if (filters & QDir::Files) flags << QLatin1String("Files");
2485  if (filters & QDir::Drives) flags << QLatin1String("Drives");
2486  if (filters & QDir::NoSymLinks) flags << QLatin1String("NoSymLinks");
2487  if (filters & QDir::NoDotAndDotDot) flags << QLatin1String("NoDotAndDotDot"); // ### Qt5: remove (because NoDotAndDotDot=NoDot|NoDotDot)
2488  if (filters & QDir::NoDot) flags << QLatin1String("NoDot");
2489  if (filters & QDir::NoDotDot) flags << QLatin1String("NoDotDot");
2490  if ((filters & QDir::AllEntries) == QDir::AllEntries) flags << QLatin1String("AllEntries");
2491  if (filters & QDir::Readable) flags << QLatin1String("Readable");
2492  if (filters & QDir::Writable) flags << QLatin1String("Writable");
2493  if (filters & QDir::Executable) flags << QLatin1String("Executable");
2494  if (filters & QDir::Modified) flags << QLatin1String("Modified");
2495  if (filters & QDir::Hidden) flags << QLatin1String("Hidden");
2496  if (filters & QDir::System) flags << QLatin1String("System");
2497  if (filters & QDir::CaseSensitive) flags << QLatin1String("CaseSensitive");
2498  }
2499  debug << "QDir::Filters(" << qPrintable(flags.join(QLatin1String("|"))) << ')';
2500  return debug;
2501 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
QString join(const QString &sep) const
Joins all the string list&#39;s strings into a single string with each element separated by the given sep...
Definition: qstringlist.h:162
static const char *const filters[3]
#define qPrintable(string)
Definition: qglobal.h:1750

◆ operator<<() [2/2]

Q_CORE_EXPORT QDebug operator<< ( QDebug  debug,
const QDir dir 
)

Definition at line 2527 of file qdir.cpp.

2528 {
2529  debug.maybeSpace() << "QDir(" << dir.path()
2530  << ", nameFilters = {"
2531  << qPrintable(dir.nameFilters().join(QLatin1String(",")))
2532  << "}, "
2533  << dir.sorting()
2534  << ','
2535  << dir.filter()
2536  << ')';
2537  return debug.space();
2538 }
SortFlags sorting() const
Returns the value set by setSorting()
Definition: qdir.cpp:1184
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QStringList nameFilters() const
Returns the string list set by setNameFilters()
Definition: qdir.cpp:945
QDebug & maybeSpace()
Writes a space character to the debug stream, depending on the last character sent to the stream...
Definition: qdebug.h:93
QString join(const QString &sep) const
Joins all the string list&#39;s strings into a single string with each element separated by the given sep...
Definition: qstringlist.h:162
Filters filter() const
Returns the value set by setFilter()
Definition: qdir.cpp:1085
QString path() const
Returns the path.
Definition: qdir.cpp:605
QDebug & space()
Writes a space character to the debug stream and returns a reference to the stream.
Definition: qdebug.h:91
#define qPrintable(string)
Definition: qglobal.h:1750