summaryrefslogtreecommitdiffstats
path: root/buildtools/ant/antprojectpart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/ant/antprojectpart.cpp')
-rw-r--r--buildtools/ant/antprojectpart.cpp176
1 files changed, 88 insertions, 88 deletions
diff --git a/buildtools/ant/antprojectpart.cpp b/buildtools/ant/antprojectpart.cpp
index a7f0ea25..d6f66b46 100644
--- a/buildtools/ant/antprojectpart.cpp
+++ b/buildtools/ant/antprojectpart.cpp
@@ -1,14 +1,14 @@
#include "antprojectpart.h"
-#include <qapplication.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qpopupmenu.h>
-#include <qvbox.h>
-#include <qtable.h>
-#include <qtextstream.h>
-#include <qvaluestack.h>
-#include <qdir.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqpopupmenu.h>
+#include <tqvbox.h>
+#include <tqtable.h>
+#include <tqtextstream.h>
+#include <tqvaluestack.h>
+#include <tqdir.h>
#include <kdevgenericfactory.h>
@@ -45,7 +45,7 @@ AntOptions::AntOptions()
}
-AntProjectPart::AntProjectPart(QObject *parent, const char *name, const QStringList &)
+AntProjectPart::AntProjectPart(TQObject *parent, const char *name, const TQStringList &)
: KDevBuildTool(&data, parent, name ? name : "AntProjectPart")
{
setInstance(AntProjectFactory::instance());
@@ -53,7 +53,7 @@ AntProjectPart::AntProjectPart(QObject *parent, const char *name, const QStringL
setXMLFile("kdevantproject.rc");
m_buildProjectAction = new KAction(i18n("&Build Project"), "make_kdevelop", Key_F8,
- this, SLOT(slotBuild()),
+ this, TQT_SLOT(slotBuild()),
actionCollection(), "build_build" );
m_buildProjectAction->setToolTip(i18n("Build project"));
m_buildProjectAction->setWhatsThis(i18n("<b>Build project</b><p>Executes <b>ant dist</b> command to build the project."));
@@ -65,9 +65,9 @@ AntProjectPart::AntProjectPart(QObject *parent, const char *name, const QStringL
m_targetMenu = menu->popupMenu();
- connect(m_targetMenu, SIGNAL(activated(int)), this, SLOT(slotTargetMenuActivated(int)));
- connect(core(), SIGNAL(projectConfigWidget(KDialogBase*)), this, SLOT(projectConfigWidget(KDialogBase*)));
- connect(core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), this, SLOT(contextMenu(QPopupMenu *, const Context *)));
+ connect(m_targetMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotTargetMenuActivated(int)));
+ connect(core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(projectConfigWidget(KDialogBase*)));
+ connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)));
m_antOptionsWidget = 0;
}
@@ -78,12 +78,12 @@ AntProjectPart::~AntProjectPart()
}
-void AntProjectPart::openProject(const QString &dirName, const QString &projectName)
+void AntProjectPart::openProject(const TQString &dirName, const TQString &projectName)
{
m_projectDirectory = dirName;
m_projectName = projectName;
- QDomDocument &dom = *projectDom();
+ TQDomDocument &dom = *projectDom();
// Set the default directory radio to "executable"
/// \FIXME there is no kdevantproject so this will not work !
if (DomUtil::readEntry(dom, "/kdevantproject/run/directoryradio") == "" ) {
@@ -97,13 +97,13 @@ void AntProjectPart::openProject(const QString &dirName, const QString &projectN
fillMenu();
- QFile f(dirName + "/" + projectName.lower() + ".kdevelop" + ".filelist");
+ TQFile f(dirName + "/" + projectName.lower() + ".kdevelop" + ".filelist");
if (f.open(IO_ReadOnly))
{
- QTextStream stream(&f);
+ TQTextStream stream(&f);
while (!stream.atEnd())
{
- QString s = stream.readLine();
+ TQString s = stream.readLine();
if (!s.startsWith("#"))
m_sourceFiles << s;
}
@@ -117,25 +117,25 @@ void AntProjectPart::openProject(const QString &dirName, const QString &projectN
void AntProjectPart::populateProject()
{
- QApplication::setOverrideCursor(Qt::waitCursor);
+ TQApplication::setOverrideCursor(Qt::waitCursor);
- QValueStack<QString> s;
+ TQValueStack<TQString> s;
int prefixlen = m_projectDirectory.length()+1;
s.push(m_projectDirectory);
- QDir dir;
+ TQDir dir;
do
{
dir.setPath(s.pop());
kdDebug() << "Examining: " << dir.path() << endl;
const QFileInfoList *dirEntries = dir.entryInfoList();
- QPtrListIterator<QFileInfo> it(*dirEntries);
+ TQPtrListIterator<TQFileInfo> it(*dirEntries);
for (; it.current(); ++it)
{
- QString fileName = it.current()->fileName();
+ TQString fileName = it.current()->fileName();
if (fileName == "." || fileName == "..")
continue;
- QString path = it.current()->absFilePath();
+ TQString path = it.current()->absFilePath();
if (it.current()->isDir())
{
kdDebug() << "Pushing: " << path << endl;
@@ -150,7 +150,7 @@ void AntProjectPart::populateProject()
}
while (!s.isEmpty());
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
@@ -164,32 +164,32 @@ void AntProjectPart::closeProject()
m_antOptions = AntOptions();
- QFile f(m_projectDirectory + "/" + m_projectName.lower() + ".kdevelop" + ".filelist");
+ TQFile f(m_projectDirectory + "/" + m_projectName.lower() + ".kdevelop" + ".filelist");
if (!f.open(IO_WriteOnly))
return;
- QTextStream stream(&f);
+ TQTextStream stream(&f);
stream << "# KDevelop Ant Project File List" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = m_sourceFiles.begin(); it != m_sourceFiles.end(); ++it)
stream << (*it) << endl;
f.close();
}
-QString AntProjectPart::projectDirectory() const
+TQString AntProjectPart::projectDirectory() const
{
return m_projectDirectory;
}
-QString AntProjectPart::buildDirectory() const
+TQString AntProjectPart::buildDirectory() const
{
return m_projectDirectory;
}
-QString AntProjectPart::projectName() const
+TQString AntProjectPart::projectName() const
{
return m_projectName;
}
@@ -212,16 +212,16 @@ DomUtil::PairList AntProjectPart::runEnvironmentVars() const
* if run/directoryradio == custom
* The custom directory absolute path
*/
-QString AntProjectPart::runDirectory() const
+TQString AntProjectPart::runDirectory() const
{
return buildDirectory();
/// \FIXME put the code below into use!
- QDomDocument &dom = *projectDom();
+ TQDomDocument &dom = *projectDom();
/// \FIXME there is no kdevantproject so this will not work !
- QString directoryRadioString = DomUtil::readEntry(dom, "/kdevantproject/run/directoryradio");
- QString DomMainProgram = DomUtil::readEntry(dom, "/kdevantproject/run/mainprogram");
+ TQString directoryRadioString = DomUtil::readEntry(dom, "/kdevantproject/run/directoryradio");
+ TQString DomMainProgram = DomUtil::readEntry(dom, "/kdevantproject/run/mainprogram");
if ( directoryRadioString == "build" )
return buildDirectory();
@@ -247,15 +247,15 @@ QString AntProjectPart::runDirectory() const
* if run/directoryradio == custom or relative == false
* The absolute path to executable
*/
-QString AntProjectPart::mainProgram() const
+TQString AntProjectPart::mainProgram() const
{
- QDomDocument * dom = projectDom();
+ TQDomDocument * dom = projectDom();
- if ( !dom ) return QString();
+ if ( !dom ) return TQString();
- QString DomMainProgram = DomUtil::readEntry( *dom, "/kdevantproject/run/mainprogram");
+ TQString DomMainProgram = DomUtil::readEntry( *dom, "/kdevantproject/run/mainprogram");
- if ( DomMainProgram.isEmpty() ) return QString();
+ if ( DomMainProgram.isEmpty() ) return TQString();
if ( DomMainProgram.startsWith("/") ) // assume absolute path
{
@@ -266,24 +266,24 @@ QString AntProjectPart::mainProgram() const
return projectDirectory() + "/" + DomMainProgram;
}
- return QString();
+ return TQString();
}
-QString AntProjectPart::debugArguments() const
+TQString AntProjectPart::debugArguments() const
{
- return QString("");
+ return TQString("");
}
-/** Retuns a QString with the run command line arguments */
-QString AntProjectPart::runArguments() const
+/** Retuns a TQString with the run command line arguments */
+TQString AntProjectPart::runArguments() const
{
/// \FIXME there is no kdevantproject so this will not work !
return DomUtil::readEntry(*projectDom(), "/kdevantproject/run/programargs");
}
-QString AntProjectPart::activeDirectory() const
+TQString AntProjectPart::activeDirectory() const
{
/// \FIXME
@@ -291,18 +291,18 @@ QString AntProjectPart::activeDirectory() const
// returning m_projectDirectory is wrong, the path returned should be _relative_ to the project dir
// returning an empty string until antproject supports the idea of an active directory
- return QString("");
+ return TQString("");
}
-QStringList AntProjectPart::allFiles() const
+TQStringList AntProjectPart::allFiles() const
{
-/* QStringList res;
+/* TQStringList res;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = m_sourceFiles.begin(); it != m_sourceFiles.end(); ++it)
{
- QString fileName = *it;
+ TQString fileName = *it;
if (!fileName.startsWith("/"))
{
fileName.prepend("/");
@@ -318,17 +318,17 @@ QStringList AntProjectPart::allFiles() const
}
-void AntProjectPart::addFile(const QString &fileName)
+void AntProjectPart::addFile(const TQString &fileName)
{
- QStringList fileList;
+ TQStringList fileList;
fileList.append ( fileName );
this->addFiles ( fileList );
}
-void AntProjectPart::addFiles ( const QStringList& fileList )
+void AntProjectPart::addFiles ( const TQStringList& fileList )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = fileList.begin(); it != fileList.end(); ++it )
{
@@ -339,20 +339,20 @@ void AntProjectPart::addFiles ( const QStringList& fileList )
emit addedFilesToProject(fileList);
}
-void AntProjectPart::removeFile(const QString &fileName)
+void AntProjectPart::removeFile(const TQString &fileName)
{
- QStringList fileList;
+ TQStringList fileList;
fileList.append ( fileName );
this->removeFiles ( fileList );
}
-void AntProjectPart::removeFiles ( const QStringList& fileList )
+void AntProjectPart::removeFiles ( const TQStringList& fileList )
{
kdDebug() << "Emitting removedFilesFromProject" << endl;
emit removedFilesFromProject(fileList);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = fileList.begin(); it != fileList.end(); ++it )
{
@@ -367,12 +367,12 @@ void AntProjectPart::parseBuildXML()
m_antOptions.m_defineProperties.clear();
// open build file
- QFile bf(m_projectDirectory + "/" + m_antOptions.m_buildXML);
+ TQFile bf(m_projectDirectory + "/" + m_antOptions.m_buildXML);
if (!bf.open(IO_ReadOnly))
return;
// parse build file
- QDomDocument dom;
+ TQDomDocument dom;
if (!dom.setContent(&bf))
{
bf.close();
@@ -383,7 +383,7 @@ void AntProjectPart::parseBuildXML()
m_projectName = dom.documentElement().attribute("name", m_projectName);
m_antOptions.m_defaultTarget = dom.documentElement().attribute("default", "");
- QDomNode node = dom.documentElement().firstChild();
+ TQDomNode node = dom.documentElement().firstChild();
while (!node.isNull())
{
if (node.toElement().tagName() == "target")
@@ -412,7 +412,7 @@ void AntProjectPart::fillMenu()
m_targetMenu->clear();
int id = 0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = m_antOptions.m_targets.begin(); it != m_antOptions.m_targets.end(); ++it)
m_targetMenu->insertItem(*it, id++);
}
@@ -430,11 +430,11 @@ void AntProjectPart::slotTargetMenuActivated(int id)
}
-void AntProjectPart::ant(const QString &target)
+void AntProjectPart::ant(const TQString &target)
{
- QString cmd = "%0 cd %1 && ant %2 -buildfile %3 %4 %5";
+ TQString cmd = "%0 cd %1 && ant %2 -buildfile %3 %4 %5";
- QString verb = "";
+ TQString verb = "";
switch (m_antOptions.m_verbosity)
{
case AntOptions::Quiet:
@@ -448,13 +448,13 @@ void AntProjectPart::ant(const QString &target)
break;
}
- QString options = "";
- QMap<QString,QString>::Iterator it;
+ TQString options = "";
+ TQMap<TQString,TQString>::Iterator it;
for (it = m_antOptions.m_properties.begin(); it != m_antOptions.m_properties.end(); ++it)
if (m_antOptions.m_defineProperties[it.key()])
options += "-D" + it.key() + "=\"" + it.data() + "\" ";
- QString cp;
+ TQString cp;
if (!m_classPath.count() == 0)
cp = "CLASSPATH="+m_classPath.join(":");
@@ -464,7 +464,7 @@ void AntProjectPart::ant(const QString &target)
void AntProjectPart::projectConfigWidget(KDialogBase *dlg)
{
- QVBox *vbox = dlg->addVBoxPage(i18n("Ant Options"));
+ TQVBox *vbox = dlg->addVBoxPage(i18n("Ant Options"));
m_antOptionsWidget = new AntOptionsWidget(vbox);
m_antOptionsWidget->BuildXML->setURL(m_antOptions.m_buildXML);
@@ -485,19 +485,19 @@ void AntProjectPart::projectConfigWidget(KDialogBase *dlg)
m_antOptionsWidget->Properties->setNumRows(m_antOptions.m_properties.count());
m_antOptionsWidget->Properties->setNumCols(2);
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::Iterator it;
int i=0;
for (it = m_antOptions.m_properties.begin(); it != m_antOptions.m_properties.end(); ++it)
{
- QCheckTableItem *citem = new QCheckTableItem(m_antOptionsWidget->Properties, it.key());
+ TQCheckTableItem *citem = new TQCheckTableItem(m_antOptionsWidget->Properties, it.key());
citem->setChecked(m_antOptions.m_defineProperties[it.key()]);
m_antOptionsWidget->Properties->setItem(i,0, citem);
- QTableItem *item = new QTableItem(m_antOptionsWidget->Properties, QTableItem::WhenCurrent, it.data());
+ TQTableItem *item = new TQTableItem(m_antOptionsWidget->Properties, TQTableItem::WhenCurrent, it.data());
m_antOptionsWidget->Properties->setItem(i,1, item);
++i;
}
- connect(dlg, SIGNAL(okClicked()), this, SLOT(optionsAccepted()));
+ connect(dlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(optionsAccepted()));
vbox = dlg->addVBoxPage(i18n("Classpath"));
m_classPathWidget = new ClassPathWidget(vbox);
@@ -528,11 +528,11 @@ void AntProjectPart::optionsAccepted()
for (int i=0; i<m_antOptionsWidget->Properties->numRows(); ++i)
{
- QString key = m_antOptionsWidget->Properties->text(i,0);
+ TQString key = m_antOptionsWidget->Properties->text(i,0);
m_antOptions.m_properties.replace(key, m_antOptionsWidget->Properties->text(i,1));
kdDebug() << "PROP: " << key << " = " << m_antOptionsWidget->Properties->text(i,1);
- QCheckTableItem *item =(QCheckTableItem*) m_antOptionsWidget->Properties->item(i,0);
+ TQCheckTableItem *item =(TQCheckTableItem*) m_antOptionsWidget->Properties->item(i,0);
m_antOptions.m_defineProperties.replace(key, item->isChecked());
}
@@ -543,7 +543,7 @@ void AntProjectPart::optionsAccepted()
}
-void AntProjectPart::contextMenu(QPopupMenu *popup, const Context *context)
+void AntProjectPart::contextMenu(TQPopupMenu *popup, const Context *context)
{
if (!context->hasType( Context::FileContext ))
return;
@@ -555,7 +555,7 @@ void AntProjectPart::contextMenu(QPopupMenu *popup, const Context *context)
m_contextFileName = url.fileName();
bool inProject = project()->allFiles().contains(m_contextFileName.mid ( project()->projectDirectory().length() + 1 ) );
- QString popupstr = QFileInfo(m_contextFileName).fileName();
+ TQString popupstr = TQFileInfo(m_contextFileName).fileName();
if (m_contextFileName.startsWith(projectDirectory()+ "/"))
m_contextFileName.remove(0, projectDirectory().length()+1);
@@ -563,13 +563,13 @@ void AntProjectPart::contextMenu(QPopupMenu *popup, const Context *context)
if (inProject)
{
int id = popup->insertItem( i18n("Remove %1 From Project").arg(popupstr),
- this, SLOT(slotRemoveFromProject()) );
+ this, TQT_SLOT(slotRemoveFromProject()) );
popup->setWhatsThis(id, i18n("<b>Remove from project</b><p>Removes current file from the project."));
}
else
{
int id = popup->insertItem( i18n("Add %1 to Project").arg(popupstr),
- this, SLOT(slotAddToProject()) );
+ this, TQT_SLOT(slotAddToProject()) );
popup->setWhatsThis(id, i18n("<b>Add to project</b><p>Adds current file from the project."));
}
}
@@ -577,7 +577,7 @@ void AntProjectPart::contextMenu(QPopupMenu *popup, const Context *context)
void AntProjectPart::slotAddToProject()
{
- QStringList fileList;
+ TQStringList fileList;
fileList.append ( m_contextFileName );
addFiles ( fileList );
}
@@ -585,7 +585,7 @@ void AntProjectPart::slotAddToProject()
void AntProjectPart::slotRemoveFromProject()
{
- QStringList fileList;
+ TQStringList fileList;
fileList.append ( m_contextFileName );
removeFiles ( fileList );
}
@@ -597,12 +597,12 @@ void AntProjectPart::slotRemoveFromProject()
/*!
\fn AntProjectPart::distFiles() const
*/
-QStringList AntProjectPart::distFiles() const
+TQStringList AntProjectPart::distFiles() const
{
- QStringList sourceList = allFiles();
+ TQStringList sourceList = allFiles();
// Scan current source directory for any .pro files.
- QString projectDir = projectDirectory();
- QDir dir(projectDir);
- QStringList files = dir.entryList( "build.xml");
+ TQString projectDir = projectDirectory();
+ TQDir dir(projectDir);
+ TQStringList files = dir.entryList( "build.xml");
return sourceList + files;
}