本文整理汇总了C++中QSqlRecord::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ QSqlRecord::clear方法的具体用法?C++ QSqlRecord::clear怎么用?C++ QSqlRecord::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSqlRecord
的用法示例。
在下文中一共展示了QSqlRecord::clear方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: quote
// called on first fetch
void QSQLite2ResultPrivate::init(const char **cnames, int numCols)
{
if (!cnames)
return;
rInf.clear();
if (numCols <= 0)
return;
q->init(numCols);
for (int i = 0; i < numCols; ++i) {
const char* lastDot = strrchr(cnames[i], '.');
const char* fieldName = lastDot ? lastDot + 1 : cnames[i];
//remove quotations around the field name if any
QString fieldStr = QString::fromAscii(fieldName);
QLatin1Char quote('\"');
if ( fieldStr.length() > 2 && fieldStr.startsWith(quote) && fieldStr.endsWith(quote)) {
fieldStr = fieldStr.mid(1);
fieldStr.chop(1);
}
rInf.append(QSqlField(fieldStr,
nameToType(QString::fromAscii(cnames[i+numCols]))));
}
}
示例2: cleanup
void QSpatiaLiteResultPrivate::cleanup()
{
finalize();
rInf.clear();
skippedStatus = false;
skipRow = false;
q->setAt(QSql::BeforeFirstRow);
q->setActive(false);
q->cleanup();
}
示例3: finalize
void QSQLite2ResultPrivate::cleanup()
{
finalize();
rInf.clear();
currentTail = 0;
currentMachine = 0;
skippedStatus = false;
skipRow = false;
q->setAt(QSql::BeforeFirstRow);
q->setActive(false);
q->cleanup();
}
示例4: clear
void QSqlRecordProto::clear()
{
QSqlRecord *item = qscriptvalue_cast<QSqlRecord*>(thisObject());
if (item)
item->clear();
}