From 1c93fca14d9ce37499bcfdf994c660186a0b6f17 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 14 Apr 2011 20:16:30 +0000 Subject: Enable kdepim compilation under Qt4 This will likely break Qt3 compilation temporarily, which is an unintended side effect. A third and final kdepim commit will repair Qt3 compilation shortly. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/rulewidgethandlermanager.cpp | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'kmail/rulewidgethandlermanager.cpp') diff --git a/kmail/rulewidgethandlermanager.cpp b/kmail/rulewidgethandlermanager.cpp index b3e211fa0..18a848149 100644 --- a/kmail/rulewidgethandlermanager.cpp +++ b/kmail/rulewidgethandlermanager.cpp @@ -251,7 +251,7 @@ void KMail::RuleWidgetHandlerManager::createWidgets( TQWidgetStack *functionStac for ( int i = 0; ( w = (*it)->createFunctionWidget( i, functionStack, receiver ) ); ++i ) { - if ( childCount( functionStack, w->name() ) < 2 ) { + if ( childCount( TQT_TQOBJECT(functionStack), w->name() ) < 2 ) { // there wasn't already a widget with this name, so add this widget functionStack->addWidget( w ); } @@ -266,7 +266,7 @@ void KMail::RuleWidgetHandlerManager::createWidgets( TQWidgetStack *functionStac for ( int i = 0; ( w = (*it)->createValueWidget( i, valueStack, receiver ) ); ++i ) { - if ( childCount( valueStack, w->name() ) < 2 ) { + if ( childCount( TQT_TQOBJECT(valueStack), w->name() ) < 2 ) { // there wasn't already a widget with this name, so add this widget valueStack->addWidget( w ); } @@ -360,15 +360,15 @@ namespace { TQObject* TQObject_child_const( const TQObject *tqparent, const char *objName ) { - const TQObjectList *list = tqparent->tqchildren(); - if ( !list ) + const TQObjectList list = tqparent->childrenListObject(); + if ( list.isEmpty() ) return 0; - TQObjectListIterator it( *list ); + TQObjectListIterator it( list ); TQObject *obj; while ( ( obj = it.current() ) ) { ++it; - if ( !objName || qstrcmp( objName, obj->name() ) == 0 ) + if ( !objName || tqstrcmp( objName, obj->name() ) == 0 ) break; } return obj; @@ -472,7 +472,7 @@ namespace { KMSearchRule::Function TextRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const { const TQComboBox *funcCombo = - dynamic_cast( TQObject_child_const( functionStack, + dynamic_cast( TQObject_child_const( TQT_TQOBJECT_CONST(functionStack), "textRuleFuncCombo" ) ); // FIXME (TQt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast( functionStack->child( "textRuleFuncCombo", @@ -503,7 +503,7 @@ namespace { if ( func == KMSearchRule::FuncIsInCategory || func == KMSearchRule::FuncIsNotInCategory ) { const TQComboBox *combo= - dynamic_cast( TQObject_child_const( valueStack, + dynamic_cast( TQObject_child_const( TQT_TQOBJECT_CONST(valueStack), "categoryCombo" ) ); // FIXME (TQt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast( valueStack->child( "categoryCombo", @@ -520,7 +520,7 @@ namespace { //in other cases of func it is a lineedit const RegExpLineEdit *lineEdit = - dynamic_cast( TQObject_child_const( valueStack, + dynamic_cast( TQObject_child_const( TQT_TQOBJECT_CONST(valueStack), "regExpLineEdit" ) ); // FIXME (TQt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast( valueStack->child( "regExpLineEdit", @@ -646,15 +646,15 @@ namespace { if ( func == KMSearchRule::FuncIsInAddressbook || func == KMSearchRule::FuncIsNotInAddressbook ) { TQWidget *w = - static_cast( valueStack->child( "textRuleValueHider", + TQT_TQWIDGET( valueStack->child( "textRuleValueHider", 0, false ) ); valueStack->raiseWidget( w ); } else if ( func == KMSearchRule::FuncIsInCategory || func == KMSearchRule::FuncIsNotInCategory) { TQComboBox *combo = - static_cast( valueStack->child( "categoryCombo", - 0, false ) ); + static_cast( TQT_TQWIDGET(valueStack->child( "categoryCombo", + 0, false )) ); combo->blockSignals( true ); for ( i = 0; i < combo->count(); ++i ) if ( rule->contents() == combo->text( i ) ) { @@ -692,7 +692,7 @@ namespace { { // raise the correct function widget functionStack->raiseWidget( - static_cast( functionStack->child( "textRuleFuncCombo", + TQT_TQWIDGET( functionStack->child( "textRuleFuncCombo", 0, false ) ) ); // raise the correct value widget @@ -700,13 +700,13 @@ namespace { if ( func == KMSearchRule::FuncIsInAddressbook || func == KMSearchRule::FuncIsNotInAddressbook ) { valueStack->raiseWidget( - static_cast( valueStack->child( "textRuleValueHider", + TQT_TQWIDGET( valueStack->child( "textRuleValueHider", 0, false ) ) ); } else if ( func == KMSearchRule::FuncIsInCategory || func == KMSearchRule::FuncIsNotInCategory) { valueStack->raiseWidget( - static_cast( valueStack->child( "categoryCombo", + TQT_TQWIDGET( valueStack->child( "categoryCombo", 0, false ) ) ); } else { @@ -794,7 +794,7 @@ namespace { KMSearchRule::Function MessageRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const { const TQComboBox *funcCombo = - dynamic_cast( TQObject_child_const( functionStack, + dynamic_cast( TQObject_child_const( TQT_TQOBJECT_CONST(functionStack), "messageRuleFuncCombo" ) ); // FIXME (TQt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast( functionStack->child( "messageRuleFuncCombo", @@ -825,7 +825,7 @@ namespace { KMSearchRule::Function ) const { const RegExpLineEdit *lineEdit = - dynamic_cast( TQObject_child_const( valueStack, + dynamic_cast( TQObject_child_const( TQT_TQOBJECT_CONST(valueStack), "regExpLineEdit" ) ); // FIXME (TQt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast( valueStack->child( "regExpLineEdit", @@ -947,7 +947,7 @@ namespace { if ( func == KMSearchRule::FuncHasAttachment || func == KMSearchRule::FuncHasNoAttachment ) { TQWidget *w = - static_cast( valueStack->child( "textRuleValueHider", + TQT_TQWIDGET( valueStack->child( "textRuleValueHider", 0, false ) ); valueStack->raiseWidget( w ); } @@ -978,7 +978,7 @@ namespace { return false; // raise the correct function widget functionStack->raiseWidget( - static_cast( functionStack->child( "messageRuleFuncCombo", + TQT_TQWIDGET( functionStack->child( "messageRuleFuncCombo", 0, false ) ) ); // raise the correct value widget @@ -986,7 +986,7 @@ namespace { if ( func == KMSearchRule::FuncHasAttachment || func == KMSearchRule::FuncHasNoAttachment ) { TQWidget *w = - static_cast( valueStack->child( "textRuleValueHider", + TQT_TQWIDGET( valueStack->child( "textRuleValueHider", 0, false ) ); valueStack->raiseWidget( w ); } @@ -1068,7 +1068,7 @@ namespace { KMSearchRule::Function StatusRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const { const TQComboBox *funcCombo = - dynamic_cast( TQObject_child_const( functionStack, + dynamic_cast( TQObject_child_const( TQT_TQOBJECT_CONST(functionStack), "statusRuleFuncCombo" ) ); // FIXME (TQt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast( functionStack->child( "statusRuleFuncCombo", @@ -1098,7 +1098,7 @@ namespace { int StatusRuleWidgetHandler::currenStatusValue( const TQWidgetStack *valueStack ) const { const TQComboBox *statusCombo = - dynamic_cast( TQObject_child_const( valueStack, + dynamic_cast( TQObject_child_const( TQT_TQOBJECT_CONST(valueStack), "statusRuleValueCombo" ) ); // FIXME (TQt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast( valueStack->child( "statusRuleValueCombo", @@ -1249,12 +1249,12 @@ namespace { // raise the correct function widget functionStack->raiseWidget( - static_cast( functionStack->child( "statusRuleFuncCombo", + TQT_TQWIDGET( functionStack->child( "statusRuleFuncCombo", 0, false ) ) ); // raise the correct value widget valueStack->raiseWidget( - static_cast( valueStack->child( "statusRuleValueCombo", + TQT_TQWIDGET( valueStack->child( "statusRuleValueCombo", 0, false ) ) ); return true; } @@ -1323,7 +1323,7 @@ namespace { KMSearchRule::Function NumericRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const { const TQComboBox *funcCombo = - dynamic_cast( TQObject_child_const( functionStack, + dynamic_cast( TQObject_child_const( TQT_TQOBJECT_CONST(functionStack), "numericRuleFuncCombo" ) ); // FIXME (TQt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast( functionStack->child( "numericRuleFuncCombo", @@ -1353,7 +1353,7 @@ namespace { TQString NumericRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack ) const { const KIntNumInput *numInput = - dynamic_cast( TQObject_child_const( valueStack, + dynamic_cast( TQObject_child_const( TQT_TQOBJECT_CONST(valueStack), "KIntNumInput" ) ); // FIXME (TQt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast( valueStack->child( "KIntNumInput", @@ -1502,7 +1502,7 @@ namespace { // raise the correct function widget functionStack->raiseWidget( - static_cast( functionStack->child( "numericRuleFuncCombo", + TQT_TQWIDGET( functionStack->child( "numericRuleFuncCombo", 0, false ) ) ); // raise the correct value widget -- cgit v1.2.1