diff options
author | Timothy Pearson <[email protected]> | 2012-01-13 13:15:14 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-01-13 13:15:14 -0600 |
commit | 735d75d6ce19269dc5faa00abc8f88ff30ce2f23 (patch) | |
tree | 4e85ad9cc0479892232125234c6b71c4f17ac611 /kexi/kexidb/connection.cpp | |
parent | b180811d9a814c638032f77aaf02e84a3126328c (diff) | |
download | koffice-735d75d6ce19269dc5faa00abc8f88ff30ce2f23.tar.gz koffice-735d75d6ce19269dc5faa00abc8f88ff30ce2f23.zip |
Fix inadvertent TQt string conversions
This closes Bug 782
Diffstat (limited to 'kexi/kexidb/connection.cpp')
-rw-r--r-- | kexi/kexidb/connection.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kexi/kexidb/connection.cpp b/kexi/kexidb/connection.cpp index a5b962da..9037b041 100644 --- a/kexi/kexidb/connection.cpp +++ b/kexi/kexidb/connection.cpp @@ -671,7 +671,7 @@ TQString Connection::currentDatabase() const bool Connection::useTemporaryDatabaseIfNeeded(TQString &tmpdbName) { - if (!m_driver->isFileDriver() && m_driver->beh->USING_DATABASE_RETQUIRED_TO_CONNECT + if (!m_driver->isFileDriver() && m_driver->beh->USING_DATABASE_REQUIRED_TO_CONNECT && !isDatabaseUsed()) { //we have no db used, but it is required by engine to have used any! tmpdbName = anyAvailableDatabaseName(); @@ -884,8 +884,8 @@ TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchem sql += ", "; TQString v = escapeIdentifier(field->name()) + " "; const bool autoinc = field->isAutoIncrement(); - const bool pk = field->isPrimaryKey() || (autoinc && m_driver->beh->AUTO_INCREMENT_RETQUIRES_PK); -//TODO: warning: ^^^^^ this allows only one autonumber per table when AUTO_INCREMENT_RETQUIRES_PK==true! + const bool pk = field->isPrimaryKey() || (autoinc && m_driver->beh->AUTO_INCREMENT_REQUIRES_PK); +//TODO: warning: ^^^^^ this allows only one autonumber per table when AUTO_INCREMENT_REQUIRES_PK==true! if (autoinc && m_driver->beh->SPECIAL_AUTO_INCREMENT_DEF) { if (pk) v += m_driver->beh->AUTO_INCREMENT_TYPE + " " + m_driver->beh->AUTO_INCREMENT_PK_FIELD_OPTION; @@ -918,7 +918,7 @@ TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchem if (pk) v += " PRIMARY KEY"; if (!pk && field->isUniqueKey()) - v += " UNITQUE"; + v += " UNIQUE"; ///@todo IS this ok for all engines?: if (!autoinc && !field->isPrimaryKey() && field->isNotNull()) if (!autoinc && !pk && field->isNotNull()) v += " NOT NULL"; //only add not null option if no autocommit is set @@ -2481,7 +2481,7 @@ bool Connection::resultExists(const TQString& sql, bool &success, bool addLimitT { KexiDB::Cursor *cursor; //optimization - if (m_driver->beh->SELECT_1_SUBTQUERY_SUPPORTED) { + if (m_driver->beh->SELECT_1_SUBQUERY_SUPPORTED) { //this is at least for sqlite if (addLimitTo1 && sql.left(6).upper() == "SELECT") m_sql = TQString("SELECT 1 FROM (") + sql + ") LIMIT 1"; // is this safe?; @@ -3279,7 +3279,7 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf if (b.isEmpty()) { // empty row inserting requested: if (!getROWID && !pkey) { - KexiDBWarn << "MASTER TABLE's PKEY RETQUIRED FOR INSERTING EMPTY ROWS: INSERT CANCELLED" << endl; + KexiDBWarn << "MASTER TABLE's PKEY REQUIRED FOR INSERTING EMPTY ROWS: INSERT CANCELLED" << endl; setError(ERR_INSERT_NO_MASTER_TABLES_PKEY, i18n("Could not insert row because master table has no primary key defined.")); return false; |