minor
This commit is contained in:
parent
d780bf234a
commit
0d8bd9b96b
|
|
@ -328,6 +328,10 @@ Database::Database(const Database &other, QObject *parent)
|
||||||
|
|
||||||
Database::~Database()
|
Database::~Database()
|
||||||
{
|
{
|
||||||
|
Q_D(Database);
|
||||||
|
if (d->db.isOpen())
|
||||||
|
d->db.close();
|
||||||
|
|
||||||
if (d_ptr)
|
if (d_ptr)
|
||||||
delete d_ptr;
|
delete d_ptr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ TableModel *DatabaseModel::model(QString tableName) const
|
||||||
|
|
||||||
qWarning("Table with name '%s' not found in model",
|
qWarning("Table with name '%s' not found in model",
|
||||||
qUtf8Printable(tableName));
|
qUtf8Printable(tableName));
|
||||||
Q_UNREACHABLE();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ TableModel::TableModel(int typeId, QString tableName)
|
||||||
_typeId = typeId;
|
_typeId = typeId;
|
||||||
_name = tableName;
|
_name = tableName;
|
||||||
_className = tableMetaObject->className();
|
_className = tableMetaObject->className();
|
||||||
|
qDebug() << "my name is" << _className;
|
||||||
//#ifdef NUT_NAMESPACE
|
//#ifdef NUT_NAMESPACE
|
||||||
// if(_className.startsWith(QT_STRINGIFY(NUT_NAMESPACE) "::"))
|
// if(_className.startsWith(QT_STRINGIFY(NUT_NAMESPACE) "::"))
|
||||||
// _className = _className.replace(QT_STRINGIFY(NUT_NAMESPACE) "::", "");
|
// _className = _className.replace(QT_STRINGIFY(NUT_NAMESPACE) "::", "");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue