summaryrefslogtreecommitdiff
path: root/src/sql/kernel/qsqlfield.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-27 13:22:37 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-10-28 10:32:06 +0100
commitaf3bd5037aeb9b842193f0e21cd5c03572b6dac6 (patch)
tree7ce55202a0d40b75b18da24722d373376142d206 /src/sql/kernel/qsqlfield.cpp
parent5adbb9cc576546c42249099e549f1947cca54610 (diff)
parent2eb26c170920d28213b71e549d5dac4663febb14 (diff)
downloadqtbase-af3bd5037aeb9b842193f0e21cd5c03572b6dac6.tar.gz
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev
Diffstat (limited to 'src/sql/kernel/qsqlfield.cpp')
-rw-r--r--src/sql/kernel/qsqlfield.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp
index 2022871432..a76e38b6f1 100644
--- a/src/sql/kernel/qsqlfield.cpp
+++ b/src/sql/kernel/qsqlfield.cpp
@@ -509,21 +509,24 @@ bool QSqlField::isValid() const
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QSqlField &f)
{
- dbg.nospace() << "QSqlField(" << f.name() << ", " << QMetaType::typeName(f.type());
+ QDebugStateSaver saver(dbg);
+ dbg.nospace();
+ dbg << "QSqlField(" << f.name() << ", " << QMetaType::typeName(f.type());
if (f.length() >= 0)
- dbg.nospace() << ", length: " << f.length();
+ dbg << ", length: " << f.length();
if (f.precision() >= 0)
- dbg.nospace() << ", precision: " << f.precision();
+ dbg << ", precision: " << f.precision();
if (f.requiredStatus() != QSqlField::Unknown)
- dbg.nospace() << ", required: "
- << (f.requiredStatus() == QSqlField::Required ? "yes" : "no");
- dbg.nospace() << ", generated: " << (f.isGenerated() ? "yes" : "no");
+ dbg << ", required: "
+ << (f.requiredStatus() == QSqlField::Required ? "yes" : "no");
+ dbg << ", generated: " << (f.isGenerated() ? "yes" : "no");
if (f.typeID() >= 0)
- dbg.nospace() << ", typeID: " << f.typeID();
+ dbg << ", typeID: " << f.typeID();
if (!f.defaultValue().isNull())
- dbg.nospace() << ", auto-value: \"" << f.defaultValue() << '\"';
- dbg.nospace() << ')';
- return dbg.space();
+ dbg << ", defaultValue: \"" << f.defaultValue() << '\"';
+ dbg << ", autoValue: " << f.isAutoValue()
+ << ", readOnly: " << f.isReadOnly() << ')';
+ return dbg;
}
#endif