summaryrefslogtreecommitdiffstats
path: root/buildtools/autotools/addsubprojectdlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/autotools/addsubprojectdlg.cpp')
-rw-r--r--buildtools/autotools/addsubprojectdlg.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/buildtools/autotools/addsubprojectdlg.cpp b/buildtools/autotools/addsubprojectdlg.cpp
index 8011886b..9aeef695 100644
--- a/buildtools/autotools/addsubprojectdlg.cpp
+++ b/buildtools/autotools/addsubprojectdlg.cpp
@@ -11,11 +11,11 @@
#include "addsubprojectdlg.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <kbuttonbox.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -32,13 +32,13 @@
AddSubprojectDialog::AddSubprojectDialog(AutoProjectPart *part, AutoSubprojectView *view,
- SubprojectItem *item, QWidget *parent, const char *name)
+ SubprojectItem *item, TQWidget *parent, const char *name)
: AddSubprojectDlgBase(parent, name, true)
{
setIcon(SmallIcon("folder_new.png"));
- 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()) );
m_subProject = item;
m_subprojectView = view;
@@ -52,14 +52,14 @@ AddSubprojectDialog::~AddSubprojectDialog()
void AddSubprojectDialog::accept()
{
- QString name = spEdit->text().stripWhiteSpace();
+ TQString name = spEdit->text().stripWhiteSpace();
if (name.isEmpty()) {
KMessageBox::sorry(this, i18n("You have to give the subproject a name."));
return;
}
- QListViewItem *childItem = m_subProject->firstChild();
+ TQListViewItem *childItem = m_subProject->firstChild();
while (childItem) {
if (name == static_cast<SubprojectItem*>(childItem)->subdir) {
KMessageBox::sorry(this, i18n("A subproject with this name already exists."));
@@ -71,47 +71,47 @@ void AddSubprojectDialog::accept()
#if 0
// check for config.status
- if( !QFileInfo(m_part->projectDirectory(), "config.status").exists() ){
+ if( !TQFileInfo(m_part->projectDirectory(), "config.status").exists() ){
KMessageBox::sorry(this, i18n("There is no config.status in the project root directory. Run 'Configure' first"));
- QDialog::accept();
+ TQDialog::accept();
return;
}
#endif
- QDir dir( m_subProject->path );
- QFileInfo file( dir, name );
+ TQDir dir( m_subProject->path );
+ TQFileInfo file( dir, name );
if( file.exists() && !file.isDir() ) {
KMessageBox::sorry(this, i18n("A file named %1 already exists.").arg(name));
- QDialog::accept();
+ TQDialog::accept();
return;
} else if( file.isDir() ) {
if( KMessageBox::warningContinueCancel(this,
i18n("A subdirectory %1 already exists. "
"Do you wish to add it as a subproject?").arg(name))
== KMessageBox::Cancel ){
- QDialog::accept();
+ TQDialog::accept();
return;
}
} else if (!dir.mkdir(name)) {
KMessageBox::sorry(this, i18n("Could not create subdirectory %1.").arg(name));
- QDialog::accept();
+ TQDialog::accept();
return;
}
if(!dir.cd(name)) {
KMessageBox::sorry(this, i18n("Could not access the subdirectory %1.").arg(name));
- QDialog::accept();
+ TQDialog::accept();
return;
}
// Adjust SUBDIRS variable in containing Makefile.am
if (m_subProject->variables["SUBDIRS"].find("$(TOPSUBDIRS)") != -1)
{
- QFile subdirsfile( m_subProject->path + "/subdirs" );
+ TQFile subdirsfile( m_subProject->path + "/subdirs" );
if ( subdirsfile.open( IO_WriteOnly | IO_Append ) )
{
- QTextStream subdirsstream( &subdirsfile );
+ TQTextStream subdirsstream( &subdirsfile );
subdirsstream << name << endl;
subdirsfile.close();
}
@@ -122,7 +122,7 @@ void AddSubprojectDialog::accept()
else
{
m_subProject->variables["SUBDIRS"] += (" " + name);
- QMap<QString,QString> replaceMap;
+ TQMap<TQString,TQString> replaceMap;
replaceMap.insert("SUBDIRS", m_subProject->variables["SUBDIRS"]);
AutoProjectTool::addToMakefileam(m_subProject->path + "/Makefile.am", replaceMap);
}
@@ -135,7 +135,7 @@ void AddSubprojectDialog::accept()
newitem->setOpen(true);
// Move to the bottom of the list
- QListViewItem *lastItem = m_subProject->firstChild();
+ TQListViewItem *lastItem = m_subProject->firstChild();
while (lastItem->nextSibling())
lastItem = lastItem->nextSibling();
if (lastItem != newitem)
@@ -143,7 +143,7 @@ void AddSubprojectDialog::accept()
// Create a Makefile in the new subdirectory
- QFile f( dir.filePath("Makefile.am") );
+ TQFile f( dir.filePath("Makefile.am") );
if (f.exists()) {
m_subprojectView->parse( newitem );
} else {
@@ -151,7 +151,7 @@ void AddSubprojectDialog::accept()
KMessageBox::sorry(this, i18n("Could not create Makefile.am in subdirectory %1.").arg(name));
return;
}
- QTextStream stream(&f);
+ TQTextStream stream(&f);
stream << "INCLUDES = " << newitem->variables["INCLUDES"] << endl << "METASOURCES = AUTO" << endl;
f.close();
}
@@ -160,13 +160,13 @@ void AddSubprojectDialog::accept()
// if !isKDE: add the new sub-proj to configure.in
if ( !m_part->isKDE() ) {
- QString projroot = m_part->projectDirectory() + "/";
- QString subdirectory = dir.path();
- QString relpath = subdirectory.replace(0, projroot.length(),"");
+ TQString projroot = m_part->projectDirectory() + "/";
+ TQString subdirectory = dir.path();
+ TQString relpath = subdirectory.replace(0, projroot.length(),"");
- QString configureFile = m_part->getAutoConfFile(projroot);
+ TQString configureFile = m_part->getAutoConfFile(projroot);
- QStringList list = AutoProjectTool::configureinLoadMakefiles(configureFile);
+ TQStringList list = AutoProjectTool::configureinLoadMakefiles(configureFile);
if ( !list.isEmpty() )
{
list.push_back( relpath + "/Makefile" );
@@ -175,10 +175,10 @@ void AddSubprojectDialog::accept()
}
#if 0
- QString relmakefile = (m_subProject->path + "/" + name + "/Makefile").mid(m_part->projectDirectory().length()+1);
+ TQString relmakefile = (m_subProject->path + "/" + name + "/Makefile").mid(m_part->projectDirectory().length()+1);
kdDebug(9020) << "Relative makefile path: " << relmakefile << endl;
- QString cmdline = "cd ";
+ TQString cmdline = "cd ";
cmdline += KProcess::quote(m_part->projectDirectory());
cmdline += " && automake ";
cmdline += KProcess::quote(relmakefile);
@@ -192,7 +192,7 @@ void AddSubprojectDialog::accept()
m_part->needMakefileCvs();
- QDialog::accept();
+ TQDialog::accept();
}
#include "addsubprojectdlg.moc"