From fd5d099065a748cac49e20a13481f85666c53c71 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:14:12 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- kmail/snippetwidget.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'kmail/snippetwidget.cpp') diff --git a/kmail/snippetwidget.cpp b/kmail/snippetwidget.cpp index b7ba16f1..601174cf 100644 --- a/kmail/snippetwidget.cpp +++ b/kmail/snippetwidget.cpp @@ -44,14 +44,14 @@ #include -SnippetWidget::SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, TQWidget* parent) - : KListView(parent, "snippet widget"), TQToolTip( viewport() ), +SnippetWidget::SnippetWidget(KMEdit* editor, TDEActionCollection* actionCollection, TQWidget* parent) + : TDEListView(parent, "snippet widget"), TQToolTip( viewport() ), mEditor( editor ), mActionCollection( actionCollection ) { // init the TQPtrList _list.setAutoDelete(TRUE); - // init the KListView + // init the TDEListView setSorting( -1 ); addColumn( "" ); setFullWidth(true); @@ -142,13 +142,13 @@ void SnippetWidget::slotAdd() \fn SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text ) Helper factory method. */ -SnippetItem* SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text, const KShortcut& shortcut ) +SnippetItem* SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text, const TDEShortcut& shortcut ) { SnippetItem * item = new SnippetItem(parent, name, text); const TQString actionName = i18n("Snippet %1").arg(name); const TQString normalizedName = TQString(actionName).replace(" ", "_"); if ( !mActionCollection->action(normalizedName.utf8().data() ) ) { - KAction * action = new KAction( actionName, shortcut, item, + TDEAction * action = new TDEAction( actionName, shortcut, item, TQT_SLOT( slotExecute() ), mActionCollection, normalizedName.utf8() ); item->setAction(action); @@ -249,7 +249,7 @@ void SnippetWidget::slotEdit( TQListViewItem* item ) dlg.cbGroup->setCurrentText(SnippetItem::findGroupById(pSnippet->getParent(), _list)->getName()); if (dlg.exec() == TQDialog::Accepted) { - //update the KListView and the SnippetItem + //update the TDEListView and the SnippetItem item->setText( 0, dlg.snippetName->text() ); pSnippet->setName( dlg.snippetName->text() ); pSnippet->setText( dlg.snippetText->text() ); @@ -291,7 +291,7 @@ void SnippetWidget::slotEditGroup() dlg.cbGroup->insertItem(i18n("All")); if (dlg.exec() == TQDialog::Accepted) { - //update the KListView and the SnippetGroup + //update the TDEListView and the SnippetGroup item->setText( 0, dlg.snippetName->text() ); pGroup->setName( dlg.snippetName->text() ); @@ -369,9 +369,9 @@ void SnippetWidget::writeConfig() _cfg->writeEntry(strKeyText, item->getText()); _cfg->writeEntry(strKeyId, item->getParent()); - KAction * action = item->getAction(); + TDEAction * action = item->getAction(); assert( action ); - const KShortcut& sc = action->shortcut(); + const TDEShortcut& sc = action->shortcut(); if (!sc.isNull() ) { _cfg->writeEntry( TQString("snippetShortcut_%1").arg(iSnipCount), sc.toString() ); } @@ -474,7 +474,7 @@ void SnippetWidget::initConfig() //kdDebug(5006) << "Read item " << strNameVal << " " << iParentVal << endl; if (strNameVal != "" && strTextVal != "" && iParentVal != -1) { - KShortcut shortcut( _cfg->readEntry( TQString("snippetShortcut_%1").arg(i), TQString() ) ); + TDEShortcut shortcut( _cfg->readEntry( TQString("snippetShortcut_%1").arg(i), TQString() ) ); item = makeItem( SnippetItem::findGroupById(iParentVal, _list), strNameVal, strTextVal, shortcut ); //kdDebug(5006) << "Created item " << item->getName() << " " << item->getParent() << endl; _list.append(item); @@ -536,7 +536,7 @@ void SnippetWidget::maybeTip( const TQPoint & p ) */ void SnippetWidget::showPopupMenu( TQListViewItem * item, const TQPoint & p, int ) { - KPopupMenu popup; + TDEPopupMenu popup; SnippetItem * selectedItem = static_cast(item); if ( item ) { @@ -868,7 +868,7 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap