summaryrefslogtreecommitdiffstats
path: root/kexi/widget/tableview
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/widget/tableview
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/widget/tableview')
-rw-r--r--kexi/widget/tableview/kexibooltableedit.cpp16
-rw-r--r--kexi/widget/tableview/kexitextformatter.cpp2
2 files changed, 8 insertions, 10 deletions
diff --git a/kexi/widget/tableview/kexibooltableedit.cpp b/kexi/widget/tableview/kexibooltableedit.cpp
index 2bc14f4a..f0527a95 100644
--- a/kexi/widget/tableview/kexibooltableedit.cpp
+++ b/kexi/widget/tableview/kexibooltableedit.cpp
@@ -71,7 +71,7 @@ TQVariant KexiBoolTableEdit::value()
void KexiBoolTableEdit::clear()
{
if (field()->isNotNull())
- m_currentValue = TQVariant(false, 0);
+ m_currentValue = TQVariant(false);
else
m_currentValue = TQVariant();
}
@@ -120,13 +120,13 @@ void KexiBoolTableEdit::setupContents( TQPainter *p, bool focused, const TQVaria
void KexiBoolTableEdit::clickedOnContents()
{
if (field()->isNotNull())
- m_currentValue = TQVariant( !m_currentValue.toBool(), 0 );
+ m_currentValue = TQVariant( !m_currentValue.toBool() );
else {
// null allowed: use the cycle: true -> false -> null
if (m_currentValue.isNull())
- m_currentValue = TQVariant( true, 1 );
+ m_currentValue = TQVariant( true );
else
- m_currentValue = m_currentValue.toBool() ? TQVariant( false, 1 ) : TQVariant();
+ m_currentValue = m_currentValue.toBool() ? TQVariant( false ) : TQVariant();
}
}
@@ -137,12 +137,11 @@ void KexiBoolTableEdit::handleAction(const TQString& actionName)
bool ok;
const int value = tqApp->clipboard()->text( TQClipboard::Clipboard ).toInt(&ok);
if (ok) {
- m_currentValue = (value==0) ? TQVariant(false, 0) : TQVariant(true, 1);
+ m_currentValue = (value==0) ? TQVariant(false) : TQVariant(true);
}
else {
m_currentValue = field()->isNotNull()
- ? TQVariant(0, false)/*0 instead of NULL - handle case when null is not allowed*/
- : TQVariant();
+ ? TQVariant(false) : TQVariant();
}
repaintRelatedCell();
}
@@ -150,8 +149,7 @@ void KexiBoolTableEdit::handleAction(const TQString& actionName)
emit editRequested();
//! @todo handle defaultValue...
m_currentValue = field()->isNotNull()
- ? TQVariant(0, false)/*0 instead of NULL - handle case when null is not allowed*/
- : TQVariant();
+ ? TQVariant(false) : TQVariant();
handleCopyAction(m_origValue, TQVariant());
repaintRelatedCell();
}
diff --git a/kexi/widget/tableview/kexitextformatter.cpp b/kexi/widget/tableview/kexitextformatter.cpp
index 5ff28920..b9208d43 100644
--- a/kexi/widget/tableview/kexitextformatter.cpp
+++ b/kexi/widget/tableview/kexitextformatter.cpp
@@ -157,7 +157,7 @@ TQVariant KexiTextFormatter::textToValue(const TQString& text) const
return text.toLongLong();
case KexiDB::Field::Boolean:
//! @todo temporary solution for booleans!
- return text == "1" ? TQVariant(true,1) : TQVariant(false,0);
+ return text == "1" ? TQVariant(true) : TQVariant(false);
case KexiDB::Field::Date:
return d->dateFormatter->stringToVariant( text );
case KexiDB::Field::Time: