summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-05-28 23:09:09 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-05-28 23:09:09 +0900
commit04a12485219f38e113932e8aa20b6bc12d8fa715 (patch)
tree68ee6acef9dfadc11fe8bd4d94f52d020cd8b7a1 /kexi/kexidb
parent03eee956313fe6172f719669a1bd3d5739e023ba (diff)
downloadkoffice-04a12485219f38e113932e8aa20b6bc12d8fa715.tar.gz
koffice-04a12485219f38e113932e8aa20b6bc12d8fa715.zip
Adjusted to latest TQVariant::TQVariant(bool) function.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kexi/kexidb')
-rw-r--r--kexi/kexidb/driver_p.cpp8
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxcursor.cpp2
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitecursor.cpp6
-rw-r--r--kexi/kexidb/utils.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/kexi/kexidb/driver_p.cpp b/kexi/kexidb/driver_p.cpp
index 462ce608..fcbadb5c 100644
--- a/kexi/kexidb/driver_p.cpp
+++ b/kexi/kexidb/driver_p.cpp
@@ -55,7 +55,7 @@ DriverPrivate::DriverPrivate()
void DriverPrivate::initInternalProperties()
{
- properties["is_file_database"] = TQVariant(isFileDriver, 1);
+ properties["is_file_database"] = TQVariant(isFileDriver);
propertyCaptions["is_file_database"] = i18n("File-based database driver");
if (isFileDriver) {
properties["file_database_mimetype"] = fileDBDriverMimeType;
@@ -77,11 +77,11 @@ void DriverPrivate::initInternalProperties()
#endif
// properties["transaction_support"] = features & Driver::TransactionsMask;
// propertyCaptions["transaction_support"] = i18n("Transaction support");
- properties["transaction_single"] = TQVariant(features & Driver::SingleTransactions, 1);
+ properties["transaction_single"] = TQVariant(features & Driver::SingleTransactions);
propertyCaptions["transaction_single"] = i18n("Single transactions support");
- properties["transaction_multiple"] = TQVariant(features & Driver::MultipleTransactions, 1);
+ properties["transaction_multiple"] = TQVariant(features & Driver::MultipleTransactions);
propertyCaptions["transaction_multiple"] = i18n("Multiple transactions support");
- properties["transaction_nested"] = TQVariant(features & Driver::NestedTransactions, 1);
+ properties["transaction_nested"] = TQVariant(features & Driver::NestedTransactions);
propertyCaptions["transaction_nested"] = i18n("Nested transactions support");
properties["kexidb_driver_version"] =
diff --git a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
index 048d6685..77746a13 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
+++ b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
@@ -239,7 +239,7 @@ TQVariant pqxxSqlCursor::pValue(uint pos)const
}
else if (f->type() == Field::Boolean )
{
- return QString((*m_res)[at()][pos].c_str()).lower() == "t" ? TQVariant(true, 1) : TQVariant(false, 1);
+ return QString((*m_res)[at()][pos].c_str()).lower() == "t" ? TQVariant(true) : TQVariant(false);
}
else if (f->typeGroup() == Field::BLOBGroup)
{
diff --git a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp
index c8282963..6a80f76d 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp
@@ -151,7 +151,7 @@ class KexiDB::SQLiteCursorData : public SQLiteConnectionInternal
return TQDateTime::fromString( tmp, Qt::ISODate );
}
case Field::Boolean:
- return TQVariant(sqliteStringToBool(GET_sqlite3_column_text), 1);
+ return TQVariant(sqliteStringToBool(GET_sqlite3_column_text));
default:
return TQVariant(); //TODO
}
@@ -166,7 +166,7 @@ class KexiDB::SQLiteCursorData : public SQLiteConnectionInternal
case Field::BigInteger:
return TQVariant( (TQ_LLONG)sqlite3_column_int64(prepared_st_handle, i) );
case Field::Boolean:
- return TQVariant( sqlite3_column_int(prepared_st_handle, i)!=0, 1 );
+ return TQVariant( sqlite3_column_int(prepared_st_handle, i)!=0 );
default:;
}
if (f->isFPNumericType()) //WEIRD, YEAH?
@@ -480,7 +480,7 @@ void SQLiteCursor::storeCurrentRow(RowData &data) const
case Field::BigInteger:
data[i] = TQVariant( TQString::fromLatin1(*col).toLongLong() );
case Field::Boolean:
- data[i] = TQVariant( sqliteStringToBool(TQString::fromLatin1(*col)), 1 );
+ data[i] = TQVariant( sqliteStringToBool(TQString::fromLatin1(*col)) );
break;
case Field::Date:
data[i] = TQDate::fromString( TQString::fromLatin1(*col), Qt::ISODate );
diff --git a/kexi/kexidb/utils.cpp b/kexi/kexidb/utils.cpp
index 4baa0d8b..b7e6a2ed 100644
--- a/kexi/kexidb/utils.cpp
+++ b/kexi/kexidb/utils.cpp
@@ -939,7 +939,7 @@ TQVariant KexiDB::loadPropertyValueFromDom( const TQDomNode& node )
}
}
else if (valueType == "bool") {
- return TQVariant(text.lower()=="true" || text=="1", 1);
+ return TQVariant(text.lower()=="true" || text=="1");
}
//! @todo add more TQVariant types
KexiDBWarn << "loadPropertyValueFromDom(): unknown type '" << valueType << "'" << endl;
@@ -983,7 +983,7 @@ TQVariant KexiDB::emptyValueForType( KexiDB::Field::Type type )
ADD(Field::ShortInteger, 0);
ADD(Field::Integer, 0);
ADD(Field::BigInteger, 0);
- ADD(Field::Boolean, TQVariant(false, 0));
+ ADD(Field::Boolean, TQVariant(false));
ADD(Field::Float, 0.0);
ADD(Field::Double, 0.0);
//! @todo ok? we have no better defaults