From a21c1c9b1dca09b9ab3a56d60e6f4c7a253689f8 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 24 Feb 2011 07:08:32 +0000 Subject: Fix a number of runtime object identification problems which led to an even larger array of minor glitches NOTE: kdevelop and kdewebdev still need to be fully repaired git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1222475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kaddressbook/customfieldswidget.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'kaddressbook') diff --git a/kaddressbook/customfieldswidget.cpp b/kaddressbook/customfieldswidget.cpp index 3d992be1e..44b0294ac 100644 --- a/kaddressbook/customfieldswidget.cpp +++ b/kaddressbook/customfieldswidget.cpp @@ -227,13 +227,13 @@ void FieldWidget::clearFields() { FieldRecordList::ConstIterator fieldIt; for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) { - if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) { + if ( (*fieldIt).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) { TQLineEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setText( TQString() ); - } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) { + } else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { TQSpinBox *wdg = static_cast( (*fieldIt).mWidget ); wdg->setValue( 0 ); - } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) { + } else if ( (*fieldIt).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { TQCheckBox *wdg = static_cast( (*fieldIt).mWidget ); wdg->setChecked( true ); } else if ( (*fieldIt).mWidget->isA( "QDateEdit" ) ) { @@ -265,13 +265,13 @@ void FieldWidget::loadContact( KABC::Addressee *addr ) FieldRecordList::ConstIterator fieldIt; for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) { if ( (*fieldIt).mIdentifier == name ) { - if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) { + if ( (*fieldIt).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) { TQLineEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setText( value ); - } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) { + } else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { TQSpinBox *wdg = static_cast( (*fieldIt).mWidget ); wdg->setValue( value.toInt() ); - } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) { + } else if ( (*fieldIt).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { TQCheckBox *wdg = static_cast( (*fieldIt).mWidget ); wdg->setChecked( value == "true" || value == "1" ); } else if ( (*fieldIt).mWidget->isA( "QDateEdit" ) ) { @@ -294,22 +294,22 @@ void FieldWidget::setReadOnly( bool readOnly ) FieldRecordList::ConstIterator it; for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) { TQString value; - if ( (*it).mWidget->isA( "TQLineEdit" ) ) { + if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) { TQLineEdit *wdg = static_cast( (*it).mWidget ); wdg->setReadOnly(readOnly); - } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) { + } else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { TQSpinBox *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); - } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) { + } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { TQCheckBox *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); - } else if ( (*it).mWidget->isA( "TQDateEdit" ) ) { + } else if ( (*it).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) { TQDateEdit *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); - } else if ( (*it).mWidget->isA( "TQTimeEdit" ) ) { + } else if ( (*it).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) { TQTimeEdit *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); - } else if ( (*it).mWidget->isA( "TQDateTimeEdit" ) ) { + } else if ( (*it).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { TQDateTimeEdit *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); } @@ -321,13 +321,13 @@ void FieldWidget::storeContact( KABC::Addressee *addr ) FieldRecordList::ConstIterator it; for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) { TQString value; - if ( (*it).mWidget->isA( "TQLineEdit" ) ) { + if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) { TQLineEdit *wdg = static_cast( (*it).mWidget ); value = wdg->text(); - } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) { + } else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { TQSpinBox *wdg = static_cast( (*it).mWidget ); value = TQString::number( wdg->value() ); - } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) { + } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { TQCheckBox *wdg = static_cast( (*it).mWidget ); value = ( wdg->isChecked() ? "true" : "false" ); } else if ( (*it).mWidget->isA( "QDateEdit" ) ) { @@ -523,9 +523,9 @@ TQStringList CustomFieldsWidget::marshallFields( bool global ) const retval.append( (*it).mTitle ); TQString type = "text"; - if ( (*it).mWidget->isA( "TQSpinBox" ) ) { + if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { type = "integer"; - } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) { + } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { type = "boolean"; } else if ( (*it).mWidget->isA( "QDateEdit" ) ) { type = "date"; @@ -533,7 +533,7 @@ TQStringList CustomFieldsWidget::marshallFields( bool global ) const type = "time"; } else if ( (*it).mWidget->isA( "QDateTimeEdit" ) ) { type = "datetime"; - } else if ( (*it).mWidget->isA( "TQLineEdit" ) ) { + } else if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) { type = "text"; } -- cgit v1.2.1