diff options
Diffstat (limited to 'kexi/kexidb/dbproperties.cpp')
-rw-r--r-- | kexi/kexidb/dbproperties.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kexi/kexidb/dbproperties.cpp b/kexi/kexidb/dbproperties.cpp index 490a7390..44b69192 100644 --- a/kexi/kexidb/dbproperties.cpp +++ b/kexi/kexidb/dbproperties.cpp @@ -38,31 +38,31 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value bool ok; //we need to know whether update or insert bool exists = m_conn->resultExists( - TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") - .arg(m_conn->driver()->escapeString(name)), ok); + TQString::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") + .tqarg(m_conn->driver()->escapeString(name)), ok); if (!ok) { - setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name)); + setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name)); return false; } if (exists) { if (!m_conn->executeSQL( - TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") - .arg(m_conn->driver()->escapeString(value.toString())) - .arg(m_conn->driver()->escapeString(name)))) + TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") + .tqarg(m_conn->driver()->escapeString(value.toString())) + .tqarg(m_conn->driver()->escapeString(name)))) { - setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name)); + setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name)); return false; } return true; } if (!m_conn->executeSQL( - TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") - .arg(m_conn->driver()->escapeString(name)) - .arg(m_conn->driver()->escapeString(value.toString())))) + TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") + .tqarg(m_conn->driver()->escapeString(name)) + .tqarg(m_conn->driver()->escapeString(value.toString())))) { - setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name)); + setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name)); return false; } return true; @@ -76,31 +76,31 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt bool ok; //we need to know whether update or insert bool exists = m_conn->resultExists( - TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") - .arg(m_conn->driver()->escapeString(name)), ok); + TQString::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") + .tqarg(m_conn->driver()->escapeString(name)), ok); if (!ok) { - setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name)); + setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name)); return false; } if (exists) { if (!m_conn->executeSQL( - TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") - .arg(m_conn->driver()->escapeString(caption)) - .arg(m_conn->driver()->escapeString(name)))) + TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") + .tqarg(m_conn->driver()->escapeString(caption)) + .tqarg(m_conn->driver()->escapeString(name)))) { - setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name)); + setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name)); return false; } return true; } if (!m_conn->executeSQL( - TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") - .arg(m_conn->driver()->escapeString(name)) - .arg(m_conn->driver()->escapeString(caption)))) + TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") + .tqarg(m_conn->driver()->escapeString(name)) + .tqarg(m_conn->driver()->escapeString(caption)))) { - setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name)); + setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name)); return false; } return true; @@ -111,9 +111,9 @@ TQVariant DatabaseProperties::value( const TQString& _name ) TQString result; TQString name(_name.stripWhiteSpace()); if (true!=m_conn->querySingleString( - TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + m_conn->driver()->escapeString(name), result)) { - m_conn->setError(ERR_NO_DB_PROPERTY, i18n("Could not read database property \"%1\".").arg(name)); + m_conn->setError(ERR_NO_DB_PROPERTY, i18n("Could not read database property \"%1\".").tqarg(name)); return TQVariant(); } return result; @@ -126,9 +126,9 @@ TQString DatabaseProperties::caption( const TQString& _name ) //captions have ' ' prefix name.prepend(" "); if (true!=m_conn->querySingleString( - TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + m_conn->driver()->escapeString(name), result)) { - setError(m_conn, i18n("Could not read database property \"%1\".").arg(name)); + setError(m_conn, i18n("Could not read database property \"%1\".").tqarg(name)); return TQString(); } return result; @@ -138,8 +138,8 @@ TQStringList DatabaseProperties::names() { TQStringList result; if (true!=m_conn->queryStringList( - TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ") - + m_conn->driver()->escapeString(TQString::fromLatin1(" %%")), result, 0 /*0-th*/)) { + TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ") + + m_conn->driver()->escapeString(TQString::tqfromLatin1(" %%")), result, 0 /*0-th*/)) { // ^^ exclude captions setError(m_conn, i18n("Could not read database properties.")); return TQStringList(); |