diff options
Diffstat (limited to 'parts/filecreate/fcconfigwidget.cpp')
-rw-r--r-- | parts/filecreate/fcconfigwidget.cpp | 242 |
1 files changed, 121 insertions, 121 deletions
diff --git a/parts/filecreate/fcconfigwidget.cpp b/parts/filecreate/fcconfigwidget.cpp index 480d38e0..df4963fa 100644 --- a/parts/filecreate/fcconfigwidget.cpp +++ b/parts/filecreate/fcconfigwidget.cpp @@ -8,17 +8,17 @@ * (at your option) any later version. * ***************************************************************************/ -#include <qlistview.h> -#include <qpushbutton.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qtabwidget.h> -#include <qdom.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qcheckbox.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqtabwidget.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqcheckbox.h> #include <klineedit.h> -#include <qlabel.h> +#include <tqlabel.h> #include <kstandarddirs.h> #include <kio/netaccess.h> @@ -39,7 +39,7 @@ #include "kdevpartcontroller.h" -FCConfigWidget::FCConfigWidget(FileCreatePart * part, bool global, QWidget *parent, const char *name): +FCConfigWidget::FCConfigWidget(FileCreatePart * part, bool global, TQWidget *parent, const char *name): FCConfigWidgetBase(parent, name), m_part(part), m_global(global) { fc_view->setSorting(-1, FALSE); @@ -82,16 +82,16 @@ void FCConfigWidget::accept() m_part->m_filetypes.clear(); m_part->slotProjectOpened(); - for (QValueList<KURL>::iterator it = urlsToEdit.begin(); it != urlsToEdit.end(); ++it ) + for (TQValueList<KURL>::iterator it = urlsToEdit.begin(); it != urlsToEdit.end(); ++it ) { m_part->partController()->editDocument(*it); } } -void FCConfigWidget::loadGlobalConfig(QListView *view, bool checkmarks) +void FCConfigWidget::loadGlobalConfig(TQListView *view, bool checkmarks) { - QString globalXMLFile = ::locate("data", "kdevfilecreate/template-info.xml"); - QDomDocument globalDom; + TQString globalXMLFile = ::locate("data", "kdevfilecreate/template-info.xml"); + TQDomDocument globalDom; if (!globalXMLFile.isNull() && DomUtil::openDOMFile(globalDom,globalXMLFile)) { m_part->readTypes(globalDom, m_globalfiletypes, false); @@ -102,55 +102,55 @@ void FCConfigWidget::loadGlobalConfig(QListView *view, bool checkmarks) if (checkmarks) { - QDomElement useGlobalTypes = + TQDomElement useGlobalTypes = DomUtil::elementByPath(*(m_part->projectDom()),"/kdevfilecreate/useglobaltypes"); - for(QDomNode node = useGlobalTypes.firstChild(); !node.isNull();node=node.nextSibling()) + for(TQDomNode node = useGlobalTypes.firstChild(); !node.isNull();node=node.nextSibling()) { if (node.isElement() && node.nodeName()=="type") { - QDomElement element = node.toElement(); - QString ext = element.attribute("ext"); - QString subtyperef = element.attribute("subtyperef"); + TQDomElement element = node.toElement(); + TQString ext = element.attribute("ext"); + TQString subtyperef = element.attribute("subtyperef"); if (subtyperef.isNull()) { - QListViewItem *it = view->findItem(ext, 0); + TQListViewItem *it = view->findItem(ext, 0); if (it) { - ((QCheckListItem*)it)->setOn(true); + ((TQCheckListItem*)it)->setOn(true); - QListViewItem *lastChild = it->firstChild(); + TQListViewItem *lastChild = it->firstChild(); while ( lastChild ) { - ((QCheckListItem*)lastChild)->setOn(true); + ((TQCheckListItem*)lastChild)->setOn(true); lastChild = lastChild->nextSibling(); } } } else { - QListViewItem *it = view->findItem(subtyperef, 0); + TQListViewItem *it = view->findItem(subtyperef, 0); if (it) - ((QCheckListItem*)it)->setOn(true); + ((TQCheckListItem*)it)->setOn(true); } } } } } -void FCConfigWidget::loadProjectConfig(QListView *view) +void FCConfigWidget::loadProjectConfig(TQListView *view) { m_part->readTypes( *(m_part->projectDom()), m_projectfiletypes, false ); loadFileTypes(m_projectfiletypes, view, false); } -void FCConfigWidget::loadProjectTemplates(QListView *view) +void FCConfigWidget::loadProjectTemplates(TQListView *view) { - QDir templDir( m_part->project()->projectDirectory() + "/templates/" ); - templDir.setFilter( QDir::Files ); + TQDir templDir( m_part->project()->projectDirectory() + "/templates/" ); + templDir.setFilter( TQDir::Files ); const QFileInfoList * list = templDir.entryInfoList(); if( list ){ QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { FileType * filetype; filetype = new FileType; @@ -168,19 +168,19 @@ void FCConfigWidget::loadProjectTemplates(QListView *view) void FCConfigWidget::saveGlobalConfig() { - QDomDocument globalDom; - QDomElement element = globalDom.createElement("kdevelop" ); + TQDomDocument globalDom; + TQDomElement element = globalDom.createElement("kdevelop" ); globalDom.appendChild(element); - QDomElement apPart = globalDom.createElement("kdevfilecreate"); + TQDomElement apPart = globalDom.createElement("kdevfilecreate"); element.appendChild(apPart); - QDomElement fileTypes = globalDom.createElement( "filetypes" ); + TQDomElement fileTypes = globalDom.createElement( "filetypes" ); apPart.appendChild( fileTypes ); saveConfiguration(globalDom, fileTypes, true); - QFile config( KGlobal::dirs()->saveLocation("data", "kdevfilecreate/", true) + "template-info.xml" ); + TQFile config( KGlobal::dirs()->saveLocation("data", "kdevfilecreate/", true) + "template-info.xml" ); config.open(IO_WriteOnly | IO_Truncate); - QTextStream stream(&config); + TQTextStream stream(&config); stream << "<?xml version = '1.0'?>"; stream << globalDom.toString(); config.close(); @@ -188,9 +188,9 @@ void FCConfigWidget::saveGlobalConfig() void FCConfigWidget::saveProjectConfig() { - QDomDocument dom = *m_part->projectDom( ); - QDomElement element = dom.documentElement( ); - QDomElement apPart = element.namedItem( "kdevfilecreate" ).toElement( ); + TQDomDocument dom = *m_part->projectDom( ); + TQDomElement element = dom.documentElement( ); + TQDomElement apPart = element.namedItem( "kdevfilecreate" ).toElement( ); if( apPart.isNull( ) ) { apPart = dom.createElement( "kdevfilecreate" ); @@ -200,7 +200,7 @@ void FCConfigWidget::saveProjectConfig() // project template configuration - QDomElement projectTypes = apPart.namedItem( "filetypes" ).toElement( ); + TQDomElement projectTypes = apPart.namedItem( "filetypes" ).toElement( ); apPart.removeChild(projectTypes); projectTypes = dom.createElement( "filetypes" ); apPart.appendChild( projectTypes ); @@ -210,32 +210,32 @@ void FCConfigWidget::saveProjectConfig() // global template usage - QDomElement globalTypes = apPart.namedItem( "useglobaltypes" ).toElement( ); + TQDomElement globalTypes = apPart.namedItem( "useglobaltypes" ).toElement( ); apPart.removeChild(globalTypes); globalTypes = dom.createElement( "useglobaltypes" ); apPart.appendChild( globalTypes ); - QListViewItemIterator it( fcglobal_view ); + TQListViewItemIterator it( fcglobal_view ); for( ; it.current( ); ++it ){ if (!it.current()->parent()) { - QCheckListItem *chit = dynamic_cast<QCheckListItem*>(it.current()); + TQCheckListItem *chit = dynamic_cast<TQCheckListItem*>(it.current()); if ( !chit ) continue; if (chit->isOn()) { - QDomElement type = dom.createElement( "type" ); + TQDomElement type = dom.createElement( "type" ); type.setAttribute( "ext", chit->text(0) ); globalTypes.appendChild( type ); } else { - QListViewItem *lastChild = chit->firstChild(); + TQListViewItem *lastChild = chit->firstChild(); while ( lastChild ) { - QCheckListItem *chsit = dynamic_cast<QCheckListItem*>(lastChild); + TQCheckListItem *chsit = dynamic_cast<TQCheckListItem*>(lastChild); if ( (chsit) && (chsit->isOn())) { - QDomElement type = dom.createElement( "type" ); + TQDomElement type = dom.createElement( "type" ); type.setAttribute( "ext", chit->text(0) ); type.setAttribute( "subtyperef", chsit->text(0) ); globalTypes.appendChild( type ); @@ -251,15 +251,15 @@ void FCConfigWidget::saveProjectConfig() // project template files //check for new templates and those with location changed - QListViewItemIterator it2(fctemplates_view); + TQListViewItemIterator it2(fctemplates_view); while (it2.current()) { if (!it2.current()->text(1).isEmpty()) { - QString dest; + TQString dest; dest = m_part->project()->projectDirectory() + "/templates/"; if (it2.current()->text(1) == "create") - copyTemplate(QString::null, dest, it2.current()->text(0)); + copyTemplate(TQString::null, dest, it2.current()->text(0)); else copyTemplate(it2.current()->text(1), dest, it2.current()->text(0)); } @@ -267,13 +267,13 @@ void FCConfigWidget::saveProjectConfig() } } -void FCConfigWidget::saveConfiguration(QDomDocument &dom, QDomElement &element, bool global) +void FCConfigWidget::saveConfiguration(TQDomDocument &dom, TQDomElement &element, bool global) { - QListViewItemIterator it( fc_view ); + TQListViewItemIterator it( fc_view ); for( ; it.current( ); ++it ){ if (!it.current()->parent()) { - QDomElement type = dom.createElement( "type" ); + TQDomElement type = dom.createElement( "type" ); type.setAttribute( "ext", it.current()->text(0) ); type.setAttribute( "name", it.current()->text(1) ); if (it.current()->childCount() > 0) @@ -282,47 +282,47 @@ void FCConfigWidget::saveConfiguration(QDomDocument &dom, QDomElement &element, type.setAttribute( "create", "template"); type.setAttribute( "icon", it.current()->text(2) ); - QDomElement edescr = dom.createElement("descr"); + TQDomElement edescr = dom.createElement("descr"); type.appendChild(edescr); - QDomText descr = dom.createTextNode( it.current()->text(3) ); + TQDomText descr = dom.createTextNode( it.current()->text(3) ); edescr.appendChild(descr); if (!it.current()->text(4).isEmpty()) { - QString dest; + TQString dest; if (global) dest = KGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); else dest = m_part->project()->projectDirectory() + "/templates/"; if (it.current()->text(4) == "create") - copyTemplate(QString::null, dest, it.current()->text(0)); + copyTemplate(TQString::null, dest, it.current()->text(0)); else copyTemplate(it.current()->text(4), dest, it.current()->text(0)); } - QListViewItem *lastChild = it.current()->firstChild(); + TQListViewItem *lastChild = it.current()->firstChild(); while ( lastChild ) { - QDomElement subtype = dom.createElement( "subtype" ); + TQDomElement subtype = dom.createElement( "subtype" ); subtype.setAttribute( "ref", lastChild->text(0) ); subtype.setAttribute( "name", lastChild->text(1) ); subtype.setAttribute( "icon", lastChild->text(2) ); - QDomElement edescr = dom.createElement("descr"); + TQDomElement edescr = dom.createElement("descr"); subtype.appendChild(edescr); - QDomText descr = dom.createTextNode( lastChild->text(3) ); + TQDomText descr = dom.createTextNode( lastChild->text(3) ); edescr.appendChild(descr); if (!lastChild->text(4).isEmpty()) { - QString dest; + TQString dest; if (global) dest = KGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); else dest = m_part->project()->projectDirectory() + "/templates/"; if (lastChild->text(4) == "create") - copyTemplate(QString::null, dest, it.current()->text(0) + "-" + lastChild->text(0)); + copyTemplate(TQString::null, dest, it.current()->text(0) + "-" + lastChild->text(0)); else copyTemplate(lastChild->text(4), dest, it.current()->text(0) + "-" + lastChild->text(0)); } @@ -336,15 +336,15 @@ void FCConfigWidget::saveConfiguration(QDomDocument &dom, QDomElement &element, } } -void FCConfigWidget::copyTemplate(QString templateUrl, QString dest, QString destName) +void FCConfigWidget::copyTemplate(TQString templateUrl, TQString dest, TQString destName) { if (templateUrl.isEmpty()) { - QDir d(dest); + TQDir d(dest); if (!d.exists()) d.mkdir(dest); - QFile f(dest + destName); + TQFile f(dest + destName); f.open(IO_WriteOnly); f.close(); } @@ -362,7 +362,7 @@ void FCConfigWidget::copyTemplate(QString templateUrl, QString dest, QString des } } -void FCConfigWidget::loadFileTypes(QPtrList<FileCreate::FileType> list, QListView *view, bool checkmarks) +void FCConfigWidget::loadFileTypes(TQPtrList<FileCreate::FileType> list, TQListView *view, bool checkmarks) { FileType *ft; @@ -371,11 +371,11 @@ void FCConfigWidget::loadFileTypes(QPtrList<FileCreate::FileType> list, QListVie { if ( (ft = list.at(i)) ) { - QListViewItem *it; + TQListViewItem *it; if (!checkmarks) - it = new QListViewItem(view); + it = new TQListViewItem(view); else - it = new QCheckListItem(view, "", QCheckListItem::CheckBox); + it = new TQCheckListItem(view, "", TQCheckListItem::CheckBox); it->setText(0, ft->ext()); it->setText(1, ft->name()); @@ -388,11 +388,11 @@ void FCConfigWidget::loadFileTypes(QPtrList<FileCreate::FileType> list, QListVie { if ( (sft = ft->subtypes().at(j)) ) { - QListViewItem *sit; + TQListViewItem *sit; if (!checkmarks) - sit = new QListViewItem(it); + sit = new TQListViewItem(it); else - sit = new QCheckListItem(it, "", QCheckListItem::CheckBox); + sit = new TQCheckListItem(it, "", TQCheckListItem::CheckBox); sit->setText(0, sft->subtypeRef()); sit->setText(1, sft->name()); @@ -412,7 +412,7 @@ void FCConfigWidget::removetemplate_button_clicked( ) KURL removedTemplate; removedTemplate.setPath(m_part->project()->projectDirectory() + "/templates/" + fctemplates_view->currentItem()->text(0)); KIO::NetAccess::del(removedTemplate); - QListViewItem *it = fctemplates_view->currentItem(); + TQListViewItem *it = fctemplates_view->currentItem(); if (it->itemBelow()) { fc_view->setSelected(it->itemBelow(), true); @@ -429,49 +429,49 @@ void FCConfigWidget::removetemplate_button_clicked( ) void FCConfigWidget::copyToProject_button_clicked() { - QListViewItem *it = fcglobal_view->currentItem(); + TQListViewItem *it = fcglobal_view->currentItem(); if (it) { - QListViewItem *it_copy_parent = 0; - QString destParent; + TQListViewItem *it_copy_parent = 0; + TQString destParent; if (it->parent()) { - it_copy_parent = new QListViewItem(fc_view, it->parent()->text(0), + it_copy_parent = new TQListViewItem(fc_view, it->parent()->text(0), it->parent()->text(1), it->parent()->text(2), it->parent()->text(3), locate("data", "kdevfilecreate/file-templates/"+ it->parent()->text(0))); destParent += it->parent()->text(0) + "-"; - QCheckListItem *chk = dynamic_cast<QCheckListItem*>(it->parent()); + TQCheckListItem *chk = dynamic_cast<TQCheckListItem*>(it->parent()); if (chk) chk->setOn(false); } - QListViewItem *it_copy = 0; + TQListViewItem *it_copy = 0; if (it_copy_parent) - it_copy = new QListViewItem(it_copy_parent, it->text(0), + it_copy = new TQListViewItem(it_copy_parent, it->text(0), it->text(1), it->text(2), it->text(3), locate("data", "kdevfilecreate/file-templates/"+destParent + it->text(0))); else - it_copy = new QListViewItem(fc_view, it->text(0), + it_copy = new TQListViewItem(fc_view, it->text(0), it->text(1), it->text(2), it->text(3), locate("data", "kdevfilecreate/file-templates/" +destParent+ it->text(0))); - QCheckListItem *chk = dynamic_cast<QCheckListItem*>(it); + TQCheckListItem *chk = dynamic_cast<TQCheckListItem*>(it); if (chk) chk->setOn(false); fc_view->setSelected(it_copy, true); fc_view->setCurrentItem(it_copy); - QListViewItem * it_child = it->firstChild(); + TQListViewItem * it_child = it->firstChild(); while( it_child ) { - new QListViewItem(it_copy, it_child->text(0), + new TQListViewItem(it_copy, it_child->text(0), it_child->text(1), it_child->text(2), it_child->text(3), locate("data", "kdevfilecreate/file-templates/"+ it_copy->text(0) + "-" + it_child->text(0))); - QCheckListItem *chk_child = dynamic_cast<QCheckListItem*>(it_child); + TQCheckListItem *chk_child = dynamic_cast<TQCheckListItem*>(it_child); if (chk_child) chk_child->setOn(false); it_child = it_child->nextSibling(); @@ -482,13 +482,13 @@ void FCConfigWidget::copyToProject_button_clicked() void FCConfigWidget::newtype_button_clicked() { FCTypeEdit *te = new FCTypeEdit(); - if (te->exec() == QDialog::Accepted ) + if (te->exec() == TQDialog::Accepted ) { - QListViewItem *it = new QListViewItem(fc_view, te->typeext_edit->text(), + TQListViewItem *it = new TQListViewItem(fc_view, te->typeext_edit->text(), te->typename_edit->text(), te->icon_url->icon(), te->typedescr_edit->text(), - te->template_url->url().isEmpty() ? QString("create") : te->template_url->url()); + te->template_url->url().isEmpty() ? TQString("create") : te->template_url->url()); fc_view->setSelected(it, true); fc_view->setCurrentItem(it); } @@ -500,14 +500,14 @@ void FCConfigWidget::newsubtype_button_clicked() if (fc_view->currentItem() && (!fc_view->currentItem()->parent())) { FCTypeEdit *te = new FCTypeEdit(this); - if (te->exec() == QDialog::Accepted ) + if (te->exec() == TQDialog::Accepted ) { - /*QListViewItem *it =*/(void) new QListViewItem(fc_view->currentItem(), + /*TQListViewItem *it =*/(void) new TQListViewItem(fc_view->currentItem(), te->typeext_edit->text(), te->typename_edit->text(), te->icon_url->icon(), te->typedescr_edit->text(), - te->template_url->url().isEmpty() ? QString("create") : te->template_url->url()); + te->template_url->url().isEmpty() ? TQString("create") : te->template_url->url()); fc_view->currentItem()->setOpen(true); } delete te; @@ -518,7 +518,7 @@ void FCConfigWidget::remove_button_clicked() { if (fc_view->currentItem()) { - QListViewItem *it = fc_view->currentItem(); + TQListViewItem *it = fc_view->currentItem(); if (it->itemBelow()) { fc_view->setSelected(it->itemBelow(), true); @@ -536,12 +536,12 @@ void FCConfigWidget::remove_button_clicked() void FCConfigWidget::moveup_button_clicked() { - QListViewItem *i = fc_view->currentItem(); + TQListViewItem *i = fc_view->currentItem(); if ( !i ) return; - QListViewItemIterator it( i ); - QListViewItem *parent = i->parent(); + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); --it; while ( it.current() ) { if ( it.current()->parent() == parent ) @@ -551,7 +551,7 @@ void FCConfigWidget::moveup_button_clicked() if ( !it.current() ) return; - QListViewItem *other = it.current(); + TQListViewItem *other = it.current(); other->moveItem( i ); } @@ -559,12 +559,12 @@ void FCConfigWidget::moveup_button_clicked() void FCConfigWidget::movedown_button_clicked() { - QListViewItem *i = fc_view->currentItem(); + TQListViewItem *i = fc_view->currentItem(); if ( !i ) return; - QListViewItemIterator it( i ); - QListViewItem *parent = i->parent(); + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); it++; while ( it.current() ) { if ( it.current()->parent() == parent ) @@ -574,7 +574,7 @@ void FCConfigWidget::movedown_button_clicked() if ( !it.current() ) return; - QListViewItem *other = it.current(); + TQListViewItem *other = it.current(); i->moveItem( other ); } @@ -582,7 +582,7 @@ void FCConfigWidget::movedown_button_clicked() void FCConfigWidget::edittype_button_clicked() { - QListViewItem *it = fc_view->currentItem(); + TQListViewItem *it = fc_view->currentItem(); if ( it ) { FCTypeEdit *te = new FCTypeEdit(this); @@ -594,7 +594,7 @@ void FCConfigWidget::edittype_button_clicked() if (it->text(4) != "create") te->template_url->setURL(it->text(4)); - if (te->exec() == QDialog::Accepted ) + if (te->exec() == TQDialog::Accepted ) { it->setText(0, te->typeext_edit->text()); it->setText(1, te->typename_edit->text()); @@ -612,23 +612,23 @@ void FCConfigWidget::edittype_button_clicked() void FCConfigWidget::newtemplate_button_clicked() { FCTemplateEdit *te = new FCTemplateEdit; - if (te->exec() == QDialog::Accepted) + if (te->exec() == TQDialog::Accepted) { - /*QListViewItem *it =*/(void) new QListViewItem(fctemplates_view, te->templatename_edit->text(), - te->template_url->url().isEmpty() ? QString("create") : te->template_url->url()); + /*TQListViewItem *it =*/(void) new TQListViewItem(fctemplates_view, te->templatename_edit->text(), + te->template_url->url().isEmpty() ? TQString("create") : te->template_url->url()); } } void FCConfigWidget::edittemplate_button_clicked() { - QListViewItem *it; + TQListViewItem *it; if ( (it = fctemplates_view->currentItem()) ) { FCTemplateEdit *te = new FCTemplateEdit; te->templatename_edit->setText(it->text(0)); te->templatename_edit->setEnabled(false); - if (te->exec() == QDialog::Accepted) + if (te->exec() == TQDialog::Accepted) { if ((te->template_url->url() == "") && ((it->text(1) == "create"))) it->setText(1, "create"); @@ -642,14 +642,14 @@ void FCConfigWidget::edit_template_content_button_clicked( ) { if (fctemplates_view->currentItem()) { - QFileInfo fi(m_part->project()->projectDirectory() + "/templates/" + fctemplates_view->currentItem()->text(0)); + TQFileInfo fi(m_part->project()->projectDirectory() + "/templates/" + fctemplates_view->currentItem()->text(0)); KURL content; content.setPath(m_part->project()->projectDirectory() + "/templates/" + fctemplates_view->currentItem()->text(0)); if (fi.exists()) m_part->partController()->editDocument(content); else { - KMessageBox::information(this, i18n("Requested template does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit template content warning"); + KMessageBox::information(this, i18n("Requested template does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit template content warning"); fctemplates_view->currentItem()->setPixmap(0, SmallIcon("edit")); urlsToEdit.append(content); } @@ -660,13 +660,13 @@ void FCConfigWidget::edit_type_content_button_clicked( ) { if (!fc_view->currentItem()) return; - QListViewItem *it = fc_view->currentItem(); - QString type_name = it->text(0); + TQListViewItem *it = fc_view->currentItem(); + TQString type_name = it->text(0); if (it->parent()) type_name.prepend(it->parent()->text(0) + "-"); if (!m_global) { - QString typePath = m_part->project()->projectDirectory() + "/templates/" + type_name; + TQString typePath = m_part->project()->projectDirectory() + "/templates/" + type_name; KURL content; content.setPath(typePath); if (it->text(4).isEmpty()) @@ -674,22 +674,22 @@ void FCConfigWidget::edit_type_content_button_clicked( ) else { if (it->text(4) == "create") - KMessageBox::information(this, i18n("Template for the selected file type does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit type template content warning"); + KMessageBox::information(this, i18n("Template for the selected file type does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit type template content warning"); else - KMessageBox::information(this, i18n("Template for the selected file type has been changed.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit type template content warning"); + KMessageBox::information(this, i18n("Template for the selected file type has been changed.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit type template content warning"); fc_view->currentItem()->setPixmap(0, SmallIcon("edit")); urlsToEdit.append(content); } } else { - QString dest = KGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); - QString typePath = dest + type_name; + TQString dest = KGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); + TQString typePath = dest + type_name; KURL content; content.setPath(typePath); if (it->text(4).isEmpty()) { - QFileInfo fi(dest+type_name); + TQFileInfo fi(dest+type_name); if (!fi.exists()) copyTemplate(locate("data", "kdevfilecreate/file-templates/" + type_name), dest, type_name); m_part->partController()->editDocument(content); @@ -697,9 +697,9 @@ void FCConfigWidget::edit_type_content_button_clicked( ) else { if (it->text(4) == "create") - KMessageBox::information(this, i18n("Template for the selected file type does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit global type template content warning"); + KMessageBox::information(this, i18n("Template for the selected file type does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit global type template content warning"); else - KMessageBox::information(this, i18n("Template for the selected file type has been changed.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit global type template content warning"); + KMessageBox::information(this, i18n("Template for the selected file type has been changed.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit global type template content warning"); fc_view->currentItem()->setPixmap(0, SmallIcon("edit")); urlsToEdit.append(content); } |