Qt 4.8
Classes | Functions
qiodevice.h File Reference
#include <QtCore/qobject.h>
#include <QtCore/qstring.h>

Go to the source code of this file.

Classes

class  QIODevice
 The QIODevice class is the base interface class of all I/O devices in Qt. More...
 

Functions

Q_CORE_EXPORT QDebug operator<< (QDebug debug, QIODevice::OpenMode modes)
 

Function Documentation

◆ operator<<()

Q_CORE_EXPORT QDebug operator<< ( QDebug  debug,
QIODevice::OpenMode  modes 
)

Definition at line 1933 of file qiodevice.cpp.

Referenced by QIODevice::write().

1934 {
1935  debug << "OpenMode(";
1936  QStringList modeList;
1937  if (modes == QIODevice::NotOpen) {
1938  modeList << QLatin1String("NotOpen");
1939  } else {
1940  if (modes & QIODevice::ReadOnly)
1941  modeList << QLatin1String("ReadOnly");
1942  if (modes & QIODevice::WriteOnly)
1943  modeList << QLatin1String("WriteOnly");
1944  if (modes & QIODevice::Append)
1945  modeList << QLatin1String("Append");
1946  if (modes & QIODevice::Truncate)
1947  modeList << QLatin1String("Truncate");
1948  if (modes & QIODevice::Text)
1949  modeList << QLatin1String("Text");
1950  if (modes & QIODevice::Unbuffered)
1951  modeList << QLatin1String("Unbuffered");
1952  }
1953  qSort(modeList);
1954  debug << modeList.join(QLatin1String("|"));
1955  debug << ')';
1956  return debug;
1957 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
void qSort(RandomAccessIterator start, RandomAccessIterator end)
Definition: qalgorithms.h:177
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