From 30555507108fe0b2b3f9ded9de37f38d4a1d9c50 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 12 Jul 2023 11:31:57 +0900 Subject: Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3. Signed-off-by: Michele Calgaro --- kaddressbook/customfieldswidget.cpp | 60 ++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'kaddressbook/customfieldswidget.cpp') diff --git a/kaddressbook/customfieldswidget.cpp b/kaddressbook/customfieldswidget.cpp index b267eddc9..baad0c676 100644 --- a/kaddressbook/customfieldswidget.cpp +++ b/kaddressbook/customfieldswidget.cpp @@ -227,22 +227,22 @@ void FieldWidget::clearFields() { FieldRecordList::ConstIterator fieldIt; for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) { - if ( (*fieldIt).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) { + if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) { TQLineEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setText( TQString() ); - } else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) { TQSpinBox *wdg = static_cast( (*fieldIt).mWidget ); wdg->setValue( 0 ); - } else if ( (*fieldIt).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) { TQCheckBox *wdg = static_cast( (*fieldIt).mWidget ); wdg->setChecked( true ); - } else if ( (*fieldIt).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQDateEdit" ) ) { TQDateEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setDate( TQDate::currentDate() ); - } else if ( (*fieldIt).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQTimeEdit" ) ) { TQTimeEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setTime( TQTime::currentTime() ); - } else if ( (*fieldIt).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQDateTimeEdit" ) ) { TQDateTimeEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setDateTime( TQDateTime::currentDateTime() ); } @@ -265,22 +265,22 @@ void FieldWidget::loadContact( TDEABC::Addressee *addr ) FieldRecordList::ConstIterator fieldIt; for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) { if ( (*fieldIt).mIdentifier == name ) { - if ( (*fieldIt).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) { + if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) { TQLineEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setText( value ); - } else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) { TQSpinBox *wdg = static_cast( (*fieldIt).mWidget ); wdg->setValue( value.toInt() ); - } else if ( (*fieldIt).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) { TQCheckBox *wdg = static_cast( (*fieldIt).mWidget ); wdg->setChecked( value == "true" || value == "1" ); - } else if ( (*fieldIt).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQDateEdit" ) ) { TQDateEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setDate( TQDate::fromString( value, Qt::ISODate ) ); - } else if ( (*fieldIt).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQTimeEdit" ) ) { TQTimeEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setTime( TQTime::fromString( value, Qt::ISODate ) ); - } else if ( (*fieldIt).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*fieldIt).mWidget->isA( "TQDateTimeEdit" ) ) { TQDateTimeEdit *wdg = static_cast( (*fieldIt).mWidget ); wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) ); } @@ -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_OBJECT_NAME_STRING ) ) { + if ( (*it).mWidget->isA( "TQLineEdit" ) ) { TQLineEdit *wdg = static_cast( (*it).mWidget ); wdg->setReadOnly(readOnly); - } else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) { TQSpinBox *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); - } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) { TQCheckBox *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); - } else if ( (*it).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQDateEdit" ) ) { TQDateEdit *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); - } else if ( (*it).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQTimeEdit" ) ) { TQTimeEdit *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); - } else if ( (*it).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQDateTimeEdit" ) ) { TQDateTimeEdit *wdg = static_cast( (*it).mWidget ); wdg->setEnabled( !readOnly ); } @@ -321,22 +321,22 @@ void FieldWidget::storeContact( TDEABC::Addressee *addr ) FieldRecordList::ConstIterator it; for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) { TQString value; - if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) { + if ( (*it).mWidget->isA( "TQLineEdit" ) ) { TQLineEdit *wdg = static_cast( (*it).mWidget ); value = wdg->text(); - } else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) { TQSpinBox *wdg = static_cast( (*it).mWidget ); value = TQString::number( wdg->value() ); - } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) { TQCheckBox *wdg = static_cast( (*it).mWidget ); value = ( wdg->isChecked() ? "true" : "false" ); - } else if ( (*it).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQDateEdit" ) ) { TQDateEdit *wdg = static_cast( (*it).mWidget ); value = wdg->date().toString( Qt::ISODate ); - } else if ( (*it).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQTimeEdit" ) ) { TQTimeEdit *wdg = static_cast( (*it).mWidget ); value = wdg->time().toString( Qt::ISODate ); - } else if ( (*it).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQDateTimeEdit" ) ) { TQDateTimeEdit *wdg = static_cast( (*it).mWidget ); value = wdg->dateTime().toString( Qt::ISODate ); } @@ -523,17 +523,17 @@ TQStringList CustomFieldsWidget::marshallFields( bool global ) const retval.append( (*it).mTitle ); TQString type = "text"; - if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) { + if ( (*it).mWidget->isA( "TQSpinBox" ) ) { type = "integer"; - } else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) { type = "boolean"; - } else if ( (*it).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQDateEdit" ) ) { type = "date"; - } else if ( (*it).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQTimeEdit" ) ) { type = "time"; - } else if ( (*it).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQDateTimeEdit" ) ) { type = "datetime"; - } else if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) { + } else if ( (*it).mWidget->isA( "TQLineEdit" ) ) { type = "text"; } -- cgit v1.2.1