diff options
Diffstat (limited to 'kexi/widget/tableview/kexibooltableedit.cpp')
-rw-r--r-- | kexi/widget/tableview/kexibooltableedit.cpp | 16 |
1 files changed, 7 insertions, 9 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(); } |