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

Go to the source code of this file.

Classes

class  QSqlField
 The QSqlField class manipulates the fields in SQL database tables and views. More...
 

Functions

Q_SQL_EXPORT QDebug operator<< (QDebug, const QSqlField &)
 

Function Documentation

◆ operator<<()

Q_SQL_EXPORT QDebug operator<< ( QDebug  ,
const QSqlField  
)

Definition at line 523 of file qsqlfield.cpp.

524 {
525 #ifndef Q_BROKEN_DEBUG_STREAM
526  dbg.nospace() << "QSqlField(" << f.name() << ", " << QVariant::typeToName(f.type());
527  if (f.length() >= 0)
528  dbg.nospace() << ", length: " << f.length();
529  if (f.precision() >= 0)
530  dbg.nospace() << ", precision: " << f.precision();
531  if (f.requiredStatus() != QSqlField::Unknown)
532  dbg.nospace() << ", required: "
533  << (f.requiredStatus() == QSqlField::Required ? "yes" : "no");
534  dbg.nospace() << ", generated: " << (f.isGenerated() ? "yes" : "no");
535  if (f.typeID() >= 0)
536  dbg.nospace() << ", typeID: " << f.typeID();
537  if (!f.defaultValue().isNull())
538  dbg.nospace() << ", auto-value: \"" << f.defaultValue() << '\"';
539  dbg.nospace() << ')';
540  return dbg.space();
541 #else
542  qWarning("This compiler doesn't support streaming QSqlField to QDebug");
543  return dbg;
544  Q_UNUSED(f);
545 #endif
546 }
static const char * typeToName(Type type)
Converts the enum representation of the storage type, typ, to its string representation.
Definition: qvariant.cpp:2008
Q_CORE_EXPORT void qWarning(const char *,...)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729