diff options
Diffstat (limited to 'buildtools/autotools/addfiledlg.cpp')
-rw-r--r-- | buildtools/autotools/addfiledlg.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/buildtools/autotools/addfiledlg.cpp b/buildtools/autotools/addfiledlg.cpp index 46529086..56df4998 100644 --- a/buildtools/autotools/addfiledlg.cpp +++ b/buildtools/autotools/addfiledlg.cpp @@ -11,14 +11,14 @@ #include "addfiledlg.h" -#include <qcheckbox.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qtextstream.h> +#include <tqcheckbox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqtextstream.h> #include <kbuttonbox.h> #include <kdebug.h> @@ -40,11 +40,11 @@ AddFileDialog::AddFileDialog(AutoProjectPart *part, AutoProjectWidget *widget, SubprojectItem *spitem, TargetItem *item, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : AddFileDlgBase(parent, name, true) { - connect ( createButton, SIGNAL ( clicked() ), this, SLOT ( accept() ) ); - connect ( cancelButton, SIGNAL ( clicked() ), this, SLOT ( reject() ) ); + connect ( createButton, TQT_SIGNAL ( clicked() ), this, TQT_SLOT ( accept() ) ); + connect ( cancelButton, TQT_SIGNAL ( clicked() ), this, TQT_SLOT ( reject() ) ); directoryLabel->setText ( spitem->path ); if ( item->name.isEmpty() ) @@ -67,13 +67,13 @@ AddFileDialog::~AddFileDialog() void AddFileDialog::accept() { - QString name = fileEdit->text(); + TQString name = fileEdit->text(); if (name.find('/') != -1) { KMessageBox::sorry(this, i18n("Please enter the file name without '/' and so on.")); return; } - QListViewItem *child = target->firstChild(); + TQListViewItem *child = target->firstChild(); while (child) { FileItem *item = static_cast<FileItem*>(child); if (name == item->name) { @@ -84,27 +84,27 @@ void AddFileDialog::accept() } if (templateCheckBox->isChecked()) { - QString srcdir = m_part->projectDirectory(); - QString destdir = subProject->path; - QString destpath = destdir + "/" + name; - if (QFileInfo(destpath).exists()) { + TQString srcdir = m_part->projectDirectory(); + TQString destdir = subProject->path; + TQString destpath = destdir + "/" + name; + if (TQFileInfo(destpath).exists()) { KMessageBox::sorry(this, i18n("<b>A file with this name already exists.</b><br><br>Please use the \"Add existing file\" dialog.")); return; } - if( !FileTemplate::copy(m_part, QFileInfo(name).extension(), destpath) ) + if( !FileTemplate::copy(m_part, TQFileInfo(name).extension(), destpath) ) kdDebug(9020) << "cannot create file " << destpath << endl; } else { // create an empty file - QString srcdir = m_part->projectDirectory(); - QString destdir = subProject->path; - QString destpath = destdir + "/" + name; + TQString srcdir = m_part->projectDirectory(); + TQString destdir = subProject->path; + TQString destpath = destdir + "/" + name; - if (QFileInfo(destpath).exists()) { + if (TQFileInfo(destpath).exists()) { KMessageBox::sorry(this, i18n("<b>A file with this name already exists.</b><br><br>Please use the \"Add existing file\" dialog.")); return; } - QFile f( destpath ); + TQFile f( destpath ); if( f.open(IO_WriteOnly) ) f.close(); } @@ -113,15 +113,15 @@ void AddFileDialog::accept() target->sources.append(fitem); target->insertItem(fitem); - QString canontargetname = AutoProjectTool::canonicalize(target->name); - QString varname; + TQString canontargetname = AutoProjectTool::canonicalize(target->name); + TQString varname; if( target->primary == "PROGRAMS" || target->primary == "LIBRARIES" || target->primary == "LTLIBRARIES" ) varname = canontargetname + "_SOURCES"; else varname = target->prefix + "_" + target->primary; subProject->variables[varname] += (" " + name); - QMap<QString,QString> replaceMap; + TQMap<TQString,TQString> replaceMap; replaceMap.insert(varname, subProject->variables[varname]); AutoProjectTool::addToMakefileam(subProject->path + "/Makefile.am", replaceMap); @@ -129,7 +129,7 @@ void AddFileDialog::accept() m_widget->emitAddedFile( subProject->path.mid ( m_part->project()->projectDirectory().length() + 1 ) + "/" + name ); m_part->partController()->editDocument ( KURL ( subProject->path + "/" + name ) ); - QDialog::accept(); + TQDialog::accept(); } #include "addfiledlg.moc" |