From f4fae92b6768541e2952173c3d4b09040f95bf7e Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 16 Feb 2011 20:17:18 +0000 Subject: Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/antispamwizard.cpp | 80 ++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'kmail/antispamwizard.cpp') diff --git a/kmail/antispamwizard.cpp b/kmail/antispamwizard.cpp index 17d7ed1ed..15b3e7f79 100644 --- a/kmail/antispamwizard.cpp +++ b/kmail/antispamwizard.cpp @@ -150,7 +150,7 @@ void AntiSpamWizard::accept() KMFilterActionDict dict; TQValueList filterList; - bool replaceExistingFilters = false; + bool tqreplaceExistingFilters = false; // Let's start with virus detection and handling, // so we can avoid spam checks for viral messages @@ -227,10 +227,10 @@ void AntiSpamWizard::accept() } } else { // AntiSpam mode - // TODO Existing filters with same name are replaced. This is hardcoded - // ATM and needs to be replaced with a value from a (still missing) - // checkbox in the GUI. At least, the replacement is announced in the GUI. - replaceExistingFilters = true; + // TODO Existing filters with same name are tqreplaced. This is hardcoded + // ATM and needs to be tqreplaced with a value from a (still missing) + // checkbox in the GUI. At least, the tqreplacement is announced in the GUI. + tqreplaceExistingFilters = true; for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && @@ -245,7 +245,7 @@ void AntiSpamWizard::accept() pipeFilterAction->argsFromString( (*it).getDetectCmd() ); pipeFilterActions->append( pipeFilterAction ); KMSearchPattern* pipeFilterPattern = pipeFilter->pattern(); - if ( replaceExistingFilters ) + if ( tqreplaceExistingFilters ) pipeFilterPattern->setName( (*it).getFilterName() ); else pipeFilterPattern->setName( uniqueNameFor( (*it).getFilterName() ) ); @@ -279,7 +279,7 @@ void AntiSpamWizard::accept() spamFilterActions->append( spamFilterAction3 ); } KMSearchPattern* spamFilterPattern = spamFilter->pattern(); - if ( replaceExistingFilters ) + if ( tqreplaceExistingFilters ) spamFilterPattern->setName( i18n( "Spam handling" ) ); else spamFilterPattern->setName( uniqueNameFor( i18n( "Spam handling" ) ) ); @@ -320,7 +320,7 @@ void AntiSpamWizard::accept() unsureFilterAction1->argsFromString( mSpamRulesPage->selectedUnsureFolderName() ); unsureFilterActions->append( unsureFilterAction1 ); KMSearchPattern* unsureFilterPattern = unsureFilter->pattern(); - if ( replaceExistingFilters ) + if ( tqreplaceExistingFilters ) unsureFilterPattern->setName( i18n( "Semi spam (unsure) handling" ) ); else unsureFilterPattern->setName( uniqueNameFor( i18n( "Semi spam (unsure) handling" ) ) ); @@ -382,7 +382,7 @@ void AntiSpamWizard::accept() } KMSearchPattern* classSpamFilterPattern = classSpamFilter->pattern(); - if ( replaceExistingFilters ) + if ( tqreplaceExistingFilters ) classSpamFilterPattern->setName( i18n( "Classify as spam" ) ); else classSpamFilterPattern->setName( uniqueNameFor( i18n( "Classify as spam" ) ) ); @@ -414,7 +414,7 @@ void AntiSpamWizard::accept() } } KMSearchPattern* classHamFilterPattern = classHamFilter->pattern(); - if ( replaceExistingFilters ) + if ( tqreplaceExistingFilters ) classHamFilterPattern->setName( i18n( "Classify as NOT spam" ) ); else classHamFilterPattern->setName( uniqueNameFor( i18n( "Classify as NOT spam" ) ) ); @@ -441,7 +441,7 @@ void AntiSpamWizard::accept() * initialized. This should happend only once. */ if ( !filterList.isEmpty() ) KMKernel::self()->filterMgr()->appendFilters( - filterList, replaceExistingFilters ); + filterList, tqreplaceExistingFilters ); TQDialog::accept(); } @@ -505,9 +505,9 @@ void AntiSpamWizard::checkToolAvailability() AccountManager* mgr = kmkernel->acctMgr(); KMAccount* account = mgr->first(); while ( account ) { - if ( account->type() == "pop" || account->type().contains( "imap" ) ) { + if ( account->type() == "pop" || account->type().tqcontains( "imap" ) ) { const NetworkAccount * n = dynamic_cast( account ); - if ( n && n->host().lower().contains( pattern.lower() ) ) { + if ( n && n->host().lower().tqcontains( pattern.lower() ) ) { mInfoPage->addAvailableTool( (*it).getVisibleName() ); found = true; } @@ -550,7 +550,7 @@ void AntiSpamWizard::slotBuildSummary() { TQString text; TQString newFilters; - TQString replaceFilters; + TQString tqreplaceFilters; if ( mMode == AntiVirus ) { text = ""; // TODO add summary for the virus part @@ -571,10 +571,10 @@ void AntiSpamWizard::slotBuildSummary() it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && (*it).isSpamTool() && !(*it).isDetectionOnly() ) { - sortFilterOnExistance( (*it).getFilterName(), newFilters, replaceFilters ); + sortFilterOnExistance( (*it).getFilterName(), newFilters, tqreplaceFilters ); } } - sortFilterOnExistance( i18n( "Spam handling" ), newFilters, replaceFilters ); + sortFilterOnExistance( i18n( "Spam handling" ), newFilters, tqreplaceFilters ); // The need for a andling of status "probably spam" depends on the tools chosen if ( mSpamRulesPage->moveUnsureSelected() ) { @@ -588,7 +588,7 @@ void AntiSpamWizard::slotBuildSummary() } if ( atLeastOneUnsurePattern ) { sortFilterOnExistance( i18n( "Semi spam (unsure) handling" ), - newFilters, replaceFilters ); + newFilters, tqreplaceFilters ); text += i18n( "

The folder for messages classified as unsure (probably spam) is " ) + mSpamRulesPage->selectedUnsureFolderName() + ".

"; } @@ -596,17 +596,17 @@ void AntiSpamWizard::slotBuildSummary() // Manual classification via toolbar icon / manually applied filter action sortFilterOnExistance( i18n( "Classify as spam" ), - newFilters, replaceFilters ); + newFilters, tqreplaceFilters ); sortFilterOnExistance( i18n( "Classify as NOT spam" ), - newFilters, replaceFilters ); + newFilters, tqreplaceFilters ); // Show the filters in the summary if ( !newFilters.isEmpty() ) text += i18n( "

The wizard will create the following filters:

    " ) + newFilters + "

"; - if ( !replaceFilters.isEmpty() ) - text += i18n( "

The wizard will replace the following filters:

    " ) - + replaceFilters + "

"; + if ( !tqreplaceFilters.isEmpty() ) + text += i18n( "

The wizard will tqreplace the following filters:

    " ) + + tqreplaceFilters + "

"; } mSummaryPage->setSummaryText( text ); @@ -639,12 +639,12 @@ const TQString AntiSpamWizard::uniqueNameFor( const TQString & name ) void AntiSpamWizard::sortFilterOnExistance( const TQString & intendedFilterName, - TQString & newFilters, TQString & replaceFilters ) + TQString & newFilters, TQString & tqreplaceFilters ) { if ( uniqueNameFor( intendedFilterName ) == intendedFilterName ) newFilters += "
  • " + intendedFilterName + "
  • "; else - replaceFilters += "
  • " + intendedFilterName + "
  • "; + tqreplaceFilters += "
  • " + intendedFilterName + "
  • "; } @@ -855,7 +855,7 @@ ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode, TQWidget * parent, const char * name ) : ASWizPage( parent, name ) { - TQBoxLayout * layout = new TQVBoxLayout( mLayout ); + TQBoxLayout * tqlayout = new TQVBoxLayout( mLayout ); mIntroText = new TQLabel( this ); mIntroText->setText( @@ -879,26 +879,26 @@ ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode, "deleting the filter rules created by the wizard to get " "back to the former behavior." ) ); - layout->addWidget( mIntroText ); + tqlayout->addWidget( mIntroText ); mScanProgressText = new TQLabel( this ); mScanProgressText->setText( "" ) ; - layout->addWidget( mScanProgressText ); + tqlayout->addWidget( mScanProgressText ); mToolsList = new KListBox( this ); mToolsList->hide(); mToolsList->setSelectionMode( TQListBox::Multi ); mToolsList->setRowMode( TQListBox::FixedNumber ); mToolsList->setRowMode( 10 ); - layout->addWidget( mToolsList ); + tqlayout->addWidget( mToolsList ); connect( mToolsList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(processSelectionChange(void)) ); mSelectionHint = new TQLabel( this ); mSelectionHint->setText( "" ); - layout->addWidget( mSelectionHint ); + tqlayout->addWidget( mSelectionHint ); - layout->addStretch(); + tqlayout->addStretch(); } @@ -940,18 +940,18 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( TQWidget * parent, const char * name, KMFolderTree * mainFolderTree ) : ASWizPage( parent, name ) { - TQVBoxLayout *layout = new TQVBoxLayout( mLayout ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( mLayout ); mMarkRules = new TQCheckBox( i18n("&Mark detected spam messages as read"), this ); TQWhatsThis::add( mMarkRules, i18n( "Mark messages which have been classified as spam as read.") ); - layout->addWidget( mMarkRules); + tqlayout->addWidget( mMarkRules); mMoveSpamRules = new TQCheckBox( i18n("Move &known spam to:"), this ); TQWhatsThis::add( mMoveSpamRules, i18n( "The default folder for spam messages is the trash folder, " "but you may change that in the folder view below.") ); - layout->addWidget( mMoveSpamRules ); + tqlayout->addWidget( mMoveSpamRules ); mFolderReqForSpamFolder = new FolderRequester( this, mainFolderTree ); mFolderReqForSpamFolder->setFolder( "trash" ); @@ -959,7 +959,7 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( TQWidget * parent, const char * name, mFolderReqForSpamFolder->setShowOutbox( false ); mFolderReqForSpamFolder->setShowImapFolders( false ); - TQHBoxLayout *hLayout1 = new TQHBoxLayout( layout ); + TQHBoxLayout *hLayout1 = new TQHBoxLayout( tqlayout ); hLayout1->addSpacing( KDialog::spacingHint() * 3 ); hLayout1->addWidget( mFolderReqForSpamFolder ); @@ -969,7 +969,7 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( TQWidget * parent, const char * name, "in the folder view below.

    " "Not all tools support a classification as unsure. If you haven't " "selected a capable tool, you can't select a folder as well.") ); - layout->addWidget( mMoveUnsureRules ); + tqlayout->addWidget( mMoveUnsureRules ); mFolderReqForUnsureFolder = new FolderRequester( this, mainFolderTree ); mFolderReqForUnsureFolder->setFolder( "inbox" ); @@ -977,11 +977,11 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( TQWidget * parent, const char * name, mFolderReqForUnsureFolder->setShowOutbox( false ); mFolderReqForUnsureFolder->setShowImapFolders( false ); - TQHBoxLayout *hLayout2 = new TQHBoxLayout( layout ); + TQHBoxLayout *hLayout2 = new TQHBoxLayout( tqlayout ); hLayout2->addSpacing( KDialog::spacingHint() * 3 ); hLayout2->addWidget( mFolderReqForUnsureFolder ); - layout->addStretch(); + tqlayout->addStretch(); connect( mMarkRules, TQT_SIGNAL(clicked()), this, TQT_SLOT(processSelectionChange(void)) ); @@ -1138,11 +1138,11 @@ void ASWizVirusRulesPage::processSelectionChange() ASWizSummaryPage::ASWizSummaryPage( TQWidget * parent, const char * name ) : ASWizPage( parent, name ) { - TQBoxLayout * layout = new TQVBoxLayout( mLayout ); + TQBoxLayout * tqlayout = new TQVBoxLayout( mLayout ); mSummaryText = new TQLabel( this ); - layout->addWidget( mSummaryText ); - layout->addStretch(); + tqlayout->addWidget( mSummaryText ); + tqlayout->addStretch(); } -- cgit v1.2.1