summaryrefslogtreecommitdiffstats
path: root/kaddressbook
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-24 07:08:32 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-24 07:08:32 +0000
commita21c1c9b1dca09b9ab3a56d60e6f4c7a253689f8 (patch)
tree3359e2a90e87b53193c6ded445569016204e1c12 /kaddressbook
parent084c86a81820f17db9eee7362120586199008e27 (diff)
downloadtdepim-a21c1c9b1dca09b9ab3a56d60e6f4c7a253689f8.tar.gz
tdepim-a21c1c9b1dca09b9ab3a56d60e6f4c7a253689f8.zip
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
Diffstat (limited to 'kaddressbook')
-rw-r--r--kaddressbook/customfieldswidget.cpp36
1 files changed, 18 insertions, 18 deletions
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<TQLineEdit*>( (*fieldIt).mWidget );
wdg->setText( TQString() );
- } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) {
+ } else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*fieldIt).mWidget );
wdg->setValue( 0 );
- } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) {
+ } else if ( (*fieldIt).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*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<TQLineEdit*>( (*fieldIt).mWidget );
wdg->setText( value );
- } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) {
+ } else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*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<TQCheckBox*>( (*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<TQLineEdit*>( (*it).mWidget );
wdg->setReadOnly(readOnly);
- } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
+ } else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
- } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) {
+ } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
- } else if ( (*it).mWidget->isA( "TQDateEdit" ) ) {
+ } else if ( (*it).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) {
TQDateEdit *wdg = static_cast<TQDateEdit*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
- } else if ( (*it).mWidget->isA( "TQTimeEdit" ) ) {
+ } else if ( (*it).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) {
TQTimeEdit *wdg = static_cast<TQTimeEdit*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
- } else if ( (*it).mWidget->isA( "TQDateTimeEdit" ) ) {
+ } else if ( (*it).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( (*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<TQLineEdit*>( (*it).mWidget );
value = wdg->text();
- } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
+ } else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*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<TQCheckBox*>( (*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";
}