summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/dbproperties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/kexidb/dbproperties.cpp')
-rw-r--r--kexi/kexidb/dbproperties.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/kexi/kexidb/dbproperties.cpp b/kexi/kexidb/dbproperties.cpp
index 44b69192..27b6a5b2 100644
--- a/kexi/kexidb/dbproperties.cpp
+++ b/kexi/kexidb/dbproperties.cpp
@@ -38,7 +38,7 @@ 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::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1")
+ TQString::fromLatin1("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\".").tqarg(name));
@@ -47,7 +47,7 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value
if (exists) {
if (!m_conn->executeSQL(
- TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
+ TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
.tqarg(m_conn->driver()->escapeString(value.toString()))
.tqarg(m_conn->driver()->escapeString(name))))
{
@@ -58,7 +58,7 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value
}
if (!m_conn->executeSQL(
- TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
+ TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
.tqarg(m_conn->driver()->escapeString(name))
.tqarg(m_conn->driver()->escapeString(value.toString()))))
{
@@ -76,7 +76,7 @@ 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::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1")
+ TQString::fromLatin1("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\".").tqarg(name));
@@ -85,7 +85,7 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt
if (exists) {
if (!m_conn->executeSQL(
- TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
+ TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
.tqarg(m_conn->driver()->escapeString(caption))
.tqarg(m_conn->driver()->escapeString(name))))
{
@@ -96,7 +96,7 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt
}
if (!m_conn->executeSQL(
- TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
+ TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
.tqarg(m_conn->driver()->escapeString(name))
.tqarg(m_conn->driver()->escapeString(caption))))
{
@@ -111,7 +111,7 @@ TQVariant DatabaseProperties::value( const TQString& _name )
TQString result;
TQString name(_name.stripWhiteSpace());
if (true!=m_conn->querySingleString(
- TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=")
+ TQString::fromLatin1("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\".").tqarg(name));
return TQVariant();
@@ -126,7 +126,7 @@ TQString DatabaseProperties::caption( const TQString& _name )
//captions have ' ' prefix
name.prepend(" ");
if (true!=m_conn->querySingleString(
- TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=")
+ TQString::fromLatin1("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\".").tqarg(name));
return TQString();
@@ -138,8 +138,8 @@ TQStringList DatabaseProperties::names()
{
TQStringList result;
if (true!=m_conn->queryStringList(
- TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ")
- + m_conn->driver()->escapeString(TQString::tqfromLatin1(" %%")), result, 0 /*0-th*/)) {
+ TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ")
+ + m_conn->driver()->escapeString(TQString::fromLatin1(" %%")), result, 0 /*0-th*/)) {
// ^^ exclude captions
setError(m_conn, i18n("Could not read database properties."));
return TQStringList();