summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/kexidb/utils.cpp')
-rw-r--r--kexi/kexidb/utils.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kexi/kexidb/utils.cpp b/kexi/kexidb/utils.cpp
index 594773af..9fa9ca01 100644
--- a/kexi/kexidb/utils.cpp
+++ b/kexi/kexidb/utils.cpp
@@ -138,7 +138,7 @@ void KexiDB::getHTMLErrorMesage(Object* obj, TQString& msg, TQString &details)
if (!obj->serverErrorMsg().isEmpty())
details += "<p><b><nobr>" +i18n("Message from server:") + "</nobr></b><br>" + obj->serverErrorMsg();
if (!obj->recentSQLString().isEmpty())
- details += "<p><b><nobr>" +i18n("SQL statement:") + TQString("</nobr></b><br><tt>%1</tt>").arg(obj->recentSQLString());
+ details += "<p><b><nobr>" +i18n("SQL statement:") + TQString("</nobr></b><br><tt>%1</tt>").tqarg(obj->recentSQLString());
int serverResult;
TQString serverResultName;
if (obj->serverResult()!=0) {
@@ -159,9 +159,9 @@ void KexiDB::getHTMLErrorMesage(Object* obj, TQString& msg, TQString &details)
if (!details.isEmpty() && !details.startsWith("<qt>")) {
if (details.startsWith("<p>"))
- details = TQString::fromLatin1("<qt>")+details;
+ details = TQString::tqfromLatin1("<qt>")+details;
else
- details = TQString::fromLatin1("<qt><p>")+details;
+ details = TQString::tqfromLatin1("<qt><p>")+details;
}
}
@@ -179,7 +179,7 @@ int KexiDB::idForObjectName( Connection &conn, const TQString& objName, int objT
{
RowData data;
if (true!=conn.querySingleRecord(TQString("select o_id from kexi__objects where lower(o_name)='%1' and o_type=%2")
- .arg(objName.lower()).arg(objType), data))
+ .tqarg(objName.lower()).tqarg(objType), data))
return 0;
bool ok;
int id = data[0].toInt(&ok);
@@ -387,7 +387,7 @@ ConnectionTestDialog::ConnectionTestDialog(TQWidget* parent,
KexiDB::MessageHandler& msgHandler)
: KProgressDialog(parent, "testconn_dlg",
i18n("Test Connection"), i18n("<qt>Testing connection to <b>%1</b> database server...</qt>")
- .arg(data.serverInfoString(true)), true /*modal*/)
+ .tqarg(data.serverInfoString(true)), true /*modal*/)
, m_thread(new ConnectionTestThread(this, data))
, m_connData(data)
, m_msgHandler(&msgHandler)
@@ -441,13 +441,13 @@ void ConnectionTestDialog::slotTimeout()
else if (notResponding) {
KMessageBox::sorry(0,
i18n("<qt>Test connection to <b>%1</b> database server failed. The server is not responding.</qt>")
- .arg(m_connData.serverInfoString(true)),
+ .tqarg(m_connData.serverInfoString(true)),
i18n("Test Connection"));
}
else {
KMessageBox::information(0,
i18n("<qt>Test connection to <b>%1</b> database server established successfully.</qt>")
- .arg(m_connData.serverInfoString(true)),
+ .tqarg(m_connData.serverInfoString(true)),
i18n("Test Connection"));
}
// slotCancel();
@@ -493,7 +493,7 @@ void KexiDB::connectionTestDialog(TQWidget* parent, const KexiDB::ConnectionData
int KexiDB::rowCount(Connection &conn, const TQString& sql)
{
int count = -1; //will be changed only on success of querySingleNumber()
- TQString selectSql( TQString::fromLatin1("SELECT COUNT() FROM (") + sql + ")" );
+ TQString selectSql( TQString::tqfromLatin1("SELECT COUNT() FROM (") + sql + ")" );
conn.querySingleNumber(selectSql, count);
return count;
}
@@ -507,7 +507,7 @@ int KexiDB::rowCount(const KexiDB::TableSchema& tableSchema)
}
int count = -1; //will be changed only on success of querySingleNumber()
tableSchema.connection()->querySingleNumber(
- TQString::fromLatin1("SELECT COUNT(*) FROM ")
+ TQString::tqfromLatin1("SELECT COUNT(*) FROM ")
+ tableSchema.connection()->driver()->escapeIdentifier(tableSchema.name()),
count
);
@@ -523,7 +523,7 @@ int KexiDB::rowCount(KexiDB::QuerySchema& querySchema)
}
int count = -1; //will be changed only on success of querySingleNumber()
querySchema.connection()->querySingleNumber(
- TQString::fromLatin1("SELECT COUNT(*) FROM (")
+ TQString::tqfromLatin1("SELECT COUNT(*) FROM (")
+ querySchema.connection()->selectStatement(querySchema) + ")",
count
);
@@ -807,7 +807,7 @@ bool KexiDB::setFieldProperty( Field& field, const TQCString& propertyName, cons
else {
if (!field.table()) {
KexiDBWarn << TQString("KexiDB::setFieldProperty() Cannot set \"%1\" property - no table assinged for field!")
- .arg(propertyName.data()) << endl;
+ .tqarg(propertyName.data()) << endl;
}
else {
LookupFieldSchema *lookup = field.table()->lookupFieldSchema(field);
@@ -965,7 +965,7 @@ TQDomElement KexiDB::saveBooleanElementToDom(TQDomDocument& doc, TQDomElement& p
TQDomElement numberEl( doc.createElement("bool") );
el.appendChild( numberEl );
numberEl.appendChild( doc.createTextNode(
- value ? TQString::fromLatin1("true") : TQString::fromLatin1("false") ) );
+ value ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("false") ) );
return el;
}
@@ -998,9 +998,9 @@ TQVariant KexiDB::emptyValueForType( KexiDB::Field::Type type )
return val;
else { //special cases
if (type==Field::Date)
- return TQDate::currentDate();
+ return TQDate::tqcurrentDate();
if (type==Field::DateTime)
- return TQDateTime::currentDateTime();
+ return TQDateTime::tqcurrentDateTime();
if (type==Field::Time)
return TQTime::currentTime();
}
@@ -1047,9 +1047,9 @@ TQVariant KexiDB::notEmptyValueForType( KexiDB::Field::Type type )
return val;
else { //special cases
if (type==Field::Date)
- return TQDate::currentDate();
+ return TQDate::tqcurrentDate();
if (type==Field::DateTime)
- return TQDateTime::currentDateTime();
+ return TQDateTime::tqcurrentDateTime();
if (type==Field::Time)
return TQTime::currentTime();
}
@@ -1076,11 +1076,11 @@ TQString KexiDB::escapeBLOB(const TQByteArray& array, BLOBEscapingType type)
return TQString();
}
if (type == BLOBEscapeXHex)
- str = TQString::fromLatin1("X'");
+ str = TQString::tqfromLatin1("X'");
else if (type == BLOBEscape0xHex)
- str = TQString::fromLatin1("0x");
+ str = TQString::tqfromLatin1("0x");
else if (type == BLOBEscapeOctal)
- str = TQString::fromLatin1("'");
+ str = TQString::tqfromLatin1("'");
int new_length = str.length(); //after X' or 0x, etc.
if (type == BLOBEscapeOctal) {
@@ -1228,7 +1228,7 @@ void KexiDB::getLimitsForType(Field::Type type, int &minValue, int &maxValue)
void KexiDB::debugRowData(const RowData& rowData)
{
- KexiDBDbg << TQString("ROW DATA (%1 columns):").arg(rowData.count()) << endl;
+ KexiDBDbg << TQString("ROW DATA (%1 columns):").tqarg(rowData.count()) << endl;
foreach(RowData::ConstIterator, it, rowData)
KexiDBDbg << "- " << (*it) << endl;
}