diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/kexiutils/validator.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/kexiutils/validator.cpp')
-rw-r--r-- | kexi/kexiutils/validator.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kexi/kexiutils/validator.cpp b/kexi/kexiutils/validator.cpp index e27077ec..54af4ccd 100644 --- a/kexi/kexiutils/validator.cpp +++ b/kexi/kexiutils/validator.cpp @@ -21,8 +21,8 @@ using namespace KexiUtils; -Validator::Validator(QObject * parent, const char * name) -: QValidator(parent,name) +Validator::Validator(TQObject * tqparent, const char * name) +: TQValidator(tqparent,name) , m_acceptsEmptyValue(false) { } @@ -31,12 +31,12 @@ Validator::~Validator() { } -Validator::Result Validator::check(const QString &valueName, const QVariant& v, - QString &message, QString &details) +Validator::Result Validator::check(const TQString &valueName, const TQVariant& v, + TQString &message, TQString &details) { - if (v.isNull() || v.type()==QVariant::String && v.toString().isEmpty()) { + if (v.isNull() || v.type()==TQVariant::String && v.toString().isEmpty()) { if (!m_acceptsEmptyValue) { - message = Validator::msgColumnNotEmpty().arg(valueName); + message = Validator::msgColumnNotEmpty().tqarg(valueName); return Error; } return Ok; @@ -44,46 +44,46 @@ Validator::Result Validator::check(const QString &valueName, const QVariant& v, return internalCheck(valueName, v, message, details); } -Validator::Result Validator::internalCheck(const QString & /*valueName*/, - const QVariant& /*v*/, QString & /*message*/, QString & /*details*/) +Validator::Result Validator::internalCheck(const TQString & /*valueName*/, + const TQVariant& /*v*/, TQString & /*message*/, TQString & /*details*/) { return Error; } -QValidator::State Validator::validate ( QString & , int & ) const +TQValidator::State Validator::validate ( TQString & , int & ) const { - return QValidator::Acceptable; + return TQValidator::Acceptable; } //----------------------------------------------------------- -MultiValidator::MultiValidator(QObject* parent, const char * name) - : Validator(parent, name) +MultiValidator::MultiValidator(TQObject* tqparent, const char * name) + : Validator(tqparent, name) { m_ownedSubValidators.setAutoDelete(true); } -MultiValidator::MultiValidator(QValidator *validator, - QObject * parent, const char * name) - : Validator(parent, name) +MultiValidator::MultiValidator(TQValidator *validator, + TQObject * tqparent, const char * name) + : Validator(tqparent, name) { addSubvalidator(validator); } -void MultiValidator::addSubvalidator( QValidator* validator, bool owned ) +void MultiValidator::addSubvalidator( TQValidator* validator, bool owned ) { if (!validator) return; m_subValidators.append(validator); - if (owned && !validator->parent()) + if (owned && !validator->tqparent()) m_ownedSubValidators.append(validator); } -QValidator::State MultiValidator::validate( QString & input, int & pos ) const +TQValidator::State MultiValidator::validate( TQString & input, int & pos ) const { State s; - foreach( QValueList<QValidator*>::ConstIterator, it, m_subValidators ) { + foreach( TQValueList<TQValidator*>::ConstIterator, it, m_subValidators ) { s = (*it)->validate(input, pos); if (s==Intermediate || s==Invalid) return s; @@ -91,19 +91,19 @@ QValidator::State MultiValidator::validate( QString & input, int & pos ) const return Acceptable; } -void MultiValidator::fixup ( QString & input ) const +void MultiValidator::fixup ( TQString & input ) const { - foreach( QValueList<QValidator*>::ConstIterator, it, m_subValidators ) + foreach( TQValueList<TQValidator*>::ConstIterator, it, m_subValidators ) (*it)->fixup(input); } Validator::Result MultiValidator::internalCheck( - const QString &valueName, const QVariant& v, - QString &message, QString &details) + const TQString &valueName, const TQVariant& v, + TQString &message, TQString &details) { Result r; bool warning = false; - foreach( QValueList<QValidator*>::ConstIterator, it, m_subValidators ) { + foreach( TQValueList<TQValidator*>::ConstIterator, it, m_subValidators ) { if (dynamic_cast<Validator*>(*it)) r = dynamic_cast<Validator*>(*it)->internalCheck(valueName, v, message, details); else |