summaryrefslogtreecommitdiffstats
path: root/buildtools/custommakefiles/customprojectpart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/custommakefiles/customprojectpart.cpp')
-rw-r--r--buildtools/custommakefiles/customprojectpart.cpp586
1 files changed, 293 insertions, 293 deletions
diff --git a/buildtools/custommakefiles/customprojectpart.cpp b/buildtools/custommakefiles/customprojectpart.cpp
index f061dadc..b25a69d7 100644
--- a/buildtools/custommakefiles/customprojectpart.cpp
+++ b/buildtools/custommakefiles/customprojectpart.cpp
@@ -13,18 +13,18 @@
#include "customprojectpart.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kapplication.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qvaluestack.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
-#include <qdom.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqvaluestack.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
+#include <tqdom.h>
#include <kaction.h>
#include <kconfig.h>
@@ -65,7 +65,7 @@ typedef KDevGenericFactory<CustomProjectPart> CustomProjectFactory;
static const KDevPluginInfo data( "kdevcustomproject" );
K_EXPORT_COMPONENT_FACTORY( libkdevcustomproject, CustomProjectFactory( data ) )
-CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const QStringList & )
+CustomProjectPart::CustomProjectPart( TQObject *parent, const char *name, const TQStringList & )
: KDevBuildTool( &data, parent, name ? name : "CustomProjectPart" )
, m_lastCompilationFailed( false ), m_recursive( false ), m_first_recursive( false )
{
@@ -76,12 +76,12 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
KAction *action;
- action = new KAction( i18n( "Re-Populate Project" ), 0, this, SLOT( populateProject() ), actionCollection(), "repopulate_project" );
+ action = new KAction( i18n( "Re-Populate Project" ), 0, this, TQT_SLOT( populateProject() ), actionCollection(), "repopulate_project" );
action->setToolTip( i18n( "Re-Populate Project" ) );
action->setWhatsThis( i18n( "<b>Re-Populate Project</b><p>Re-Populates the project, searching through the project directory and adding all files that match one of the wildcards set in the custom manager options of the project filelist." ) );
action = new KAction( i18n( "&Build Project" ), "make_kdevelop", Key_F8,
- this, SLOT( slotBuild() ),
+ this, TQT_SLOT( slotBuild() ),
actionCollection(), "build_build" );
action->setToolTip( i18n( "Build project" ) );
action->setWhatsThis( i18n( "<b>Build project</b><p>Runs <b>make</b> from the project directory.<br>"
@@ -89,7 +89,7 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
"in the project settings dialog, <b>Build Options</b> tab." ) );
action = new KAction( i18n( "&Build Active Directory" ), "make_kdevelop", Key_F7,
- this, SLOT( slotBuildActiveDir() ),
+ this, TQT_SLOT( slotBuildActiveDir() ),
actionCollection(), "build_buildactivetarget" );
action->setToolTip( i18n( "Build active directory" ) );
action->setWhatsThis( i18n( "<b>Build active directory</b><p>Constructs a series of make commands to build the active directory. "
@@ -97,7 +97,7 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
"in the project settings dialog, <b>Make Options</b> tab." ) );
action = new KAction( i18n( "Compile &File" ), "make_kdevelop",
- this, SLOT( slotCompileFile() ),
+ this, TQT_SLOT( slotCompileFile() ),
actionCollection(), "build_compilefile" );
action->setToolTip( i18n( "Compile file" ) );
action->setWhatsThis( i18n( "<b>Compile file</b><p>Runs <b>make filename.o</b> command from the directory where 'filename' is the name of currently opened file.<br>"
@@ -105,7 +105,7 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
"in the project settings dialog, <b>Build Options</b> tab." ) );
action = new KAction( i18n( "Install" ), 0,
- this, SLOT( slotInstall() ),
+ this, TQT_SLOT( slotInstall() ),
actionCollection(), "build_install" );
action->setToolTip( i18n( "Install" ) );
action->setWhatsThis( i18n( "<b>Install</b><p>Runs <b>make install</b> command from the project directory.<br>"
@@ -113,7 +113,7 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
"in the project settings dialog, <b>Make Options</b> tab." ) );
action = new KAction( i18n( "Install Active Directory" ), 0,
- this, SLOT( slotInstallActiveDir() ),
+ this, TQT_SLOT( slotInstallActiveDir() ),
actionCollection(), "build_installactivetarget" );
action->setToolTip( i18n( "Install active directory" ) );
action->setWhatsThis( i18n( "<b>Install active directory</b><p>Runs <b>make install</b> command from the active directory.<br>"
@@ -121,7 +121,7 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
"in the project settings dialog, <b>Make Options</b> tab." ) );
action = new KAction( i18n( "Install (as root user)" ), 0,
- this, SLOT( slotInstallWithKdesu() ),
+ this, TQT_SLOT( slotInstallWithKdesu() ),
actionCollection(), "build_install_kdesu" );
action->setToolTip( i18n( "Install as root user" ) );
action->setWhatsThis( i18n( "<b>Install</b><p>Runs <b>make install</b> command from the project directory with root privileges.<br>"
@@ -130,7 +130,7 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
"in the project settings dialog, <b>Make Options</b> tab." ) );
action = new KAction( i18n( "&Clean Project" ), 0,
- this, SLOT( slotClean() ),
+ this, TQT_SLOT( slotClean() ),
actionCollection(), "build_clean" );
action->setToolTip( i18n( "Clean project" ) );
action->setWhatsThis( i18n( "<b>Clean project</b><p>Runs <b>make clean</b> command from the project directory.<br>"
@@ -138,7 +138,7 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
"in the project settings dialog, <b>Build Options</b> tab." ) );
action = new KAction( i18n( "Execute Program" ), "exec", 0,
- this, SLOT( slotExecute() ),
+ this, TQT_SLOT( slotExecute() ),
actionCollection(), "build_execute" );
action->setToolTip( i18n( "Execute program" ) );
action->setWhatsThis( i18n( "<b>Execute program</b><p>Executes the main program specified in project settings, <b>Run Options</b> tab. "
@@ -152,8 +152,8 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
"Environment variables and make arguments can be specified "
"in the project settings dialog, <b>Build Options</b> tab." ) );
- m_targetObjectFilesMenu = new QPopupMenu();
- m_targetOtherFilesMenu = new QPopupMenu();
+ m_targetObjectFilesMenu = new TQPopupMenu();
+ m_targetOtherFilesMenu = new TQPopupMenu();
m_makeEnvironmentsSelector = new KSelectAction( i18n( "Make &Environment" ), 0,
actionCollection(), "build_make_environment" );
@@ -162,27 +162,27 @@ CustomProjectPart::CustomProjectPart( QObject *parent, const char *name, const Q
"Environment variables can be specified in the project "
"settings dialog, <b>Build Options</b> tab." ) );
- connect( m_targetMenu, SIGNAL( aboutToShow() ),
- this, SLOT( updateTargetMenu() ) );
- connect( m_targetMenu, SIGNAL( activated( int ) ),
- this, SLOT( targetMenuActivated( int ) ) );
- connect( m_targetObjectFilesMenu, SIGNAL( activated( int ) ),
- this, SLOT( targetObjectFilesMenuActivated( int ) ) );
- connect( m_targetOtherFilesMenu, SIGNAL( activated( int ) ),
- this, SLOT( targetOtherFilesMenuActivated( int ) ) );
- connect( m_makeEnvironmentsSelector->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( updateMakeEnvironmentsMenu() ) );
- connect( m_makeEnvironmentsSelector->popupMenu(), SIGNAL( activated( int ) ),
- this, SLOT( makeEnvironmentsMenuActivated( int ) ) );
- connect( core(), SIGNAL( projectConfigWidget( KDialogBase* ) ),
- this, SLOT( projectConfigWidget( KDialogBase* ) ) );
- connect( core(), SIGNAL( contextMenu( QPopupMenu *, const Context * ) ),
- this, SLOT( contextMenu( QPopupMenu *, const Context * ) ) );
-
- connect( makeFrontend(), SIGNAL( commandFinished( const QString& ) ),
- this, SLOT( slotCommandFinished( const QString& ) ) );
- connect( makeFrontend(), SIGNAL( commandFailed( const QString& ) ),
- this, SLOT( slotCommandFailed( const QString& ) ) );
+ connect( m_targetMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( updateTargetMenu() ) );
+ connect( m_targetMenu, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( targetMenuActivated( int ) ) );
+ connect( m_targetObjectFilesMenu, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( targetObjectFilesMenuActivated( int ) ) );
+ connect( m_targetOtherFilesMenu, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( targetOtherFilesMenuActivated( int ) ) );
+ connect( m_makeEnvironmentsSelector->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( updateMakeEnvironmentsMenu() ) );
+ connect( m_makeEnvironmentsSelector->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( makeEnvironmentsMenuActivated( 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 * ) ) );
+
+ connect( makeFrontend(), TQT_SIGNAL( commandFinished( const TQString& ) ),
+ this, TQT_SLOT( slotCommandFinished( const TQString& ) ) );
+ connect( makeFrontend(), TQT_SIGNAL( commandFailed( const TQString& ) ),
+ this, TQT_SLOT( slotCommandFailed( const TQString& ) ) );
}
@@ -192,34 +192,34 @@ CustomProjectPart::~CustomProjectPart()
void CustomProjectPart::projectConfigWidget( KDialogBase *dlg )
{
- QVBox *vbox;
+ TQVBox *vbox;
vbox = dlg->addVBoxPage( i18n( "Custom Manager" ), i18n( "Custom Manager" ), BarIcon( "make", KIcon::SizeMedium ) );
CustomManagerWidget *w0 = new CustomManagerWidget( this, vbox );
- connect( dlg, SIGNAL( okClicked() ), w0, SLOT( accept() ) );
+ connect( dlg, TQT_SIGNAL( okClicked() ), w0, TQT_SLOT( accept() ) );
vbox = dlg->addVBoxPage( i18n( "Run Options" ), i18n( "Run Options" ), BarIcon( "make", KIcon::SizeMedium ) );
RunOptionsWidget *w1 = new RunOptionsWidget( *projectDom(), "/kdevcustomproject", buildDirectory(), vbox );
- connect( dlg, SIGNAL( okClicked() ), w1, SLOT( accept() ) );
+ connect( dlg, TQT_SIGNAL( okClicked() ), w1, TQT_SLOT( accept() ) );
vbox = dlg->addVBoxPage( i18n( "Build Options" ), i18n( "Build Options" ), BarIcon( "make", KIcon::SizeMedium ) );
- QTabWidget *buildtab = new QTabWidget( vbox );
+ TQTabWidget *buildtab = new TQTabWidget( vbox );
CustomBuildOptionsWidget *w2 = new CustomBuildOptionsWidget( *projectDom(), buildtab );
- connect( dlg, SIGNAL( okClicked() ), w2, SLOT( accept() ) );
+ connect( dlg, TQT_SIGNAL( okClicked() ), w2, TQT_SLOT( accept() ) );
buildtab->addTab( w2, i18n( "&Build" ) );
CustomOtherConfigWidget *w4 = new CustomOtherConfigWidget( this, "/kdevcustomproject", buildtab );
- connect( dlg, SIGNAL( okClicked() ), w4, SLOT( accept() ) );
+ connect( dlg, TQT_SIGNAL( okClicked() ), w4, TQT_SLOT( accept() ) );
buildtab->addTab( w4, i18n( "&Other" ) );
CustomMakeConfigWidget *w3 = new CustomMakeConfigWidget( this, "/kdevcustomproject", buildtab );
buildtab->addTab( w3, i18n( "Ma&ke" ) );
w2->setMakeOptionsWidget( buildtab, w3, w4 );
- connect( dlg, SIGNAL( okClicked() ), w3, SLOT( accept() ) );
+ connect( dlg, TQT_SIGNAL( okClicked() ), w3, TQT_SLOT( accept() ) );
}
-void CustomProjectPart::contextMenu( QPopupMenu *popup, const Context *context )
+void CustomProjectPart::contextMenu( TQPopupMenu *popup, const Context *context )
{
if ( !context->hasType( Context::FileContext ) )
return;
@@ -229,9 +229,9 @@ void CustomProjectPart::contextMenu( QPopupMenu *popup, const Context *context )
m_contextAddFiles.clear();
m_contextRemoveFiles.clear();
- QString popupstr = fcontext->urls().first().fileName();
+ TQString popupstr = fcontext->urls().first().fileName();
- if ( popupstr == QString::null )
+ if ( popupstr == TQString::null )
popupstr = ".";
if ( fcontext->urls().size() == 1 && URLUtil::isDirectory( fcontext->urls().first() ) && !isInBlacklist( fcontext->urls().first().path() ) )
@@ -241,7 +241,7 @@ void CustomProjectPart::contextMenu( QPopupMenu *popup, const Context *context )
m_contextDirName = fcontext->urls().first().path();
m_contextDirName = m_contextDirName.mid( project()->projectDirectory().length() + 1 );
int id = popup->insertItem( i18n( "Make Active Directory" ),
- this, SLOT( slotChooseActiveDirectory() ) );
+ this, TQT_SLOT( slotChooseActiveDirectory() ) );
popup->setWhatsThis( id, i18n( "<b>Make active directory</b><p>"
"Chooses this directory as the destination for new files created using wizards "
"like the <i>New Class</i> wizard." ) );
@@ -257,7 +257,7 @@ void CustomProjectPart::contextMenu( QPopupMenu *popup, const Context *context )
if ( isInBlacklist( m_contextDirName ) )
{
id = popup->insertItem( i18n( "Remove from blacklist" ),
- this, SLOT( slotChangeBlacklist() ) );
+ this, TQT_SLOT( slotChangeBlacklist() ) );
popup->setWhatsThis( id, i18n( "<b>Remove from blacklist</b><p>"
"Removes the given file or directory from the "
"blacklist if it is already in it.<br>The blacklist contains files and"
@@ -267,7 +267,7 @@ void CustomProjectPart::contextMenu( QPopupMenu *popup, const Context *context )
else
{
id = popup->insertItem( i18n( "Add to blacklist" ),
- this, SLOT( slotChangeBlacklist() ) );
+ this, TQT_SLOT( slotChangeBlacklist() ) );
popup->setWhatsThis( id, i18n( "<b>Add to blacklist</b><p>"
"Adds the given file or directory to the blacklist.<br>The blacklist contains files and"
" directories that should be ignored even if they match a project filetype "
@@ -283,8 +283,8 @@ void CustomProjectPart::contextMenu( QPopupMenu *popup, const Context *context )
for ( KURL::List::ConstIterator it = urls.begin(); it != urls.end(); ++it )
{
kdDebug( 9025 ) << "Checking URL: " << *it << endl;
- QString canPath( URLUtil::canonicalPath(( *it ).path() ) );
- QString relPath = relativeToProject( canPath );
+ TQString canPath( URLUtil::canonicalPath(( *it ).path() ) );
+ TQString relPath = relativeToProject( canPath );
kdDebug( 9025 ) << "relpath: " << relPath << "|canpath: " << canPath << endl;
if ( isInBlacklist( relPath ) )
continue;
@@ -295,7 +295,7 @@ void CustomProjectPart::contextMenu( QPopupMenu *popup, const Context *context )
if ( !project()->isProjectFile( canPath ) )
m_contextAddFiles << relPath;
}
- if ( QFileInfo(( *it ).path() ).isDir() )
+ if ( TQFileInfo(( *it ).path() ).isDir() )
{
if ( containsProjectFiles( canPath ) || project()->isProjectFile( canPath ) )
{
@@ -317,13 +317,13 @@ void CustomProjectPart::contextMenu( QPopupMenu *popup, const Context *context )
if ( m_contextAddFiles.size() > 0 )
{
int id = popup->insertItem( i18n( "Add Selected File/Dir(s) to Project" ),
- this, SLOT( slotAddToProject() ) );
+ this, TQT_SLOT( slotAddToProject() ) );
popup->setWhatsThis( id, i18n( "<b>Add to project</b><p>Adds selected file/dir(s) to the list of files in the project. "
"Note that the files should be manually added to the corresponding makefile or build.xml." ) );
if ( dirAddRecursive )
{
int id = popup->insertItem( i18n( "Add Selected Dir(s) to Project (recursive)" ),
- this, SLOT( slotAddToProjectRecursive() ) );
+ this, TQT_SLOT( slotAddToProjectRecursive() ) );
popup->setWhatsThis( id, i18n( "<b>Add to project</b><p>Recursively adds selected dir(s) to the list of files in the project. "
"Note that the files should be manually added to the corresponding makefile or build.xml." ) );
}
@@ -332,14 +332,14 @@ void CustomProjectPart::contextMenu( QPopupMenu *popup, const Context *context )
if ( m_contextRemoveFiles.size() > 0 )
{
int id = popup->insertItem( i18n( "Remove Selected File/Dir(s) From Project" ),
- this, SLOT( slotRemoveFromProject() ) );
+ this, TQT_SLOT( slotRemoveFromProject() ) );
popup->setWhatsThis( id, i18n( "<b>Remove from project</b><p>Removes selected file/dir(s) from the list of files in the project. "
"Note that the files should be manually excluded from the corresponding makefile or build.xml." ) );
if ( dirDelRecursive )
{
int id = popup->insertItem( i18n( "Remove Selected Dir(s) From Project (recursive)" ),
- this, SLOT( slotRemoveFromProjectRecursive() ) );
+ this, TQT_SLOT( slotRemoveFromProjectRecursive() ) );
popup->setWhatsThis( id, i18n( "<b>Remove from project</b><p>Recursively removes selected dir(s) from the list of files in the project. "
"Note that the files should be manually excluded from the corresponding makefile or build.xml." ) );
}
@@ -385,19 +385,19 @@ void CustomProjectPart::slotChangeBlacklist()
void CustomProjectPart::slotChooseActiveDirectory()
{
- QString olddir = activeDirectory();
- QDomDocument &dom = *projectDom();
+ TQString olddir = activeDirectory();
+ TQDomDocument &dom = *projectDom();
DomUtil::writeEntry( dom, "/kdevcustomproject/general/activedir", m_contextDirName );
emit activeDirectoryChanged( olddir, activeDirectory() );
}
-void CustomProjectPart::openProject( const QString &dirName, const QString &projectName )
+void CustomProjectPart::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"
if ( DomUtil::readEntry( dom, "/kdevcustomproject/run/directoryradio" ) == "" )
{
@@ -406,7 +406,7 @@ void CustomProjectPart::openProject( const QString &dirName, const QString &proj
if ( filetypes().isEmpty() )
{
- QStringList types;
+ TQStringList types;
types << "*.java" << "*.h" << "*.H" << "*.hh" << "*.hxx" << "*.hpp" << "*.c" << "*.C"
<< "*.cc" << "*.cpp" << "*.c++" << "*.cxx" << "Makefile" << "CMakeLists.txt";
DomUtil::writeListEntry( dom, "/kdevcustomproject/filetypes", "filetype", types );
@@ -420,33 +420,33 @@ void CustomProjectPart::openProject( const QString &dirName, const QString &proj
if ( m_filelistDir.isEmpty() )
m_filelistDir = dirName;
- if ( QFileInfo( m_filelistDir + "/" + projectName.lower() +
+ if ( TQFileInfo( m_filelistDir + "/" + projectName.lower() +
".kdevelop.filelist" ).exists() )
{
- QDir( m_filelistDir ).rename(
+ TQDir( m_filelistDir ).rename(
projectName.lower() + ".kdevelop.filelist",
projectName + ".kdevelop.filelist" );
}
- QFile f( m_filelistDir + "/" + projectName + ".kdevelop.filelist" );
+ TQFile f( m_filelistDir + "/" + projectName + ".kdevelop.filelist" );
if ( f.open( IO_ReadOnly ) )
{
- QTextStream stream( &f );
+ TQTextStream stream( &f );
while ( !stream.atEnd() )
{
- QString s = stream.readLine();
+ TQString s = stream.readLine();
// Skip comments.
if ( s.isEmpty() || s.startsWith( "#" ) )
continue;
// Skip non-existent files.
- if ( ! QFileInfo( projectDirectory() + "/" + s ).exists() )
+ if ( ! TQFileInfo( projectDirectory() + "/" + s ).exists() )
continue;
// Do not bother with files already in project or on blacklist.
if ( isInProject( s ) || isInBlacklist( s ) )
continue;
addToProject( s );
}
- QStringList newfiles;
+ TQStringList newfiles;
findNewFiles( dirName, newfiles );
if ( newfiles.count() > 0 )
@@ -460,19 +460,19 @@ void CustomProjectPart::openProject( const QString &dirName, const QString &proj
int r = KMessageBox::questionYesNo( mainWindow()->main(),
i18n( "This project does not contain any files yet.\n"
"Populate it with all C/C++/Java files below "
- "the project directory?" ), QString::null, i18n( "Populate" ), i18n( "Do Not Populate" ) );
+ "the project directory?" ), TQString::null, i18n( "Populate" ), i18n( "Do Not Populate" ) );
if ( r == KMessageBox::Yes )
populateProject();
}
// check if there is an old envvars entry (from old project file with single make environment)
- QString buildtool = DomUtil::readEntry( dom , "/kdevcustomproject/build/buildtool" );
- QDomElement el =
+ TQString buildtool = DomUtil::readEntry( dom , "/kdevcustomproject/build/buildtool" );
+ TQDomElement el =
DomUtil::elementByPath( dom , "/kdevcustomproject/" + buildtool + "/envvars" );
if ( !el.isNull() )
{
- QDomElement envs = DomUtil::createElementByPath( dom , "/kdevcustomproject/" + buildtool + "/environments" );
+ TQDomElement envs = DomUtil::createElementByPath( dom , "/kdevcustomproject/" + buildtool + "/environments" );
DomUtil::makeEmpty( envs );
el.setTagName( "default" );
envs.appendChild( el );
@@ -490,23 +490,23 @@ void CustomProjectPart::openProject( const QString &dirName, const QString &proj
* @param dir directory to scan (and recurse) for potential project files.
* @param[out] fileList the list of files found.
*/
-void CustomProjectPart::findNewFiles( const QString& dir, QStringList& filelist ) const
+void CustomProjectPart::findNewFiles( const TQString& dir, TQStringList& filelist ) const
{
if ( dir.isEmpty() )
return;
- QStringList fileentries = QDir( dir ).entryList( filetypes().join( ";" ) );
- QStringList dirs = QDir( dir ).entryList( QDir::Dirs );
- QStringList entries = fileentries + dirs;
- QString relpath = relativeToProject( dir );
+ TQStringList fileentries = TQDir( dir ).entryList( filetypes().join( ";" ) );
+ TQStringList dirs = TQDir( dir ).entryList( TQDir::Dirs );
+ TQStringList entries = fileentries + dirs;
+ TQString relpath = relativeToProject( dir );
if ( !relpath.isEmpty() )
relpath += "/";
- for ( QStringList::const_iterator it = entries.begin(); it != entries.end(); ++it )
+ for ( TQStringList::const_iterator it = entries.begin(); it != entries.end(); ++it )
{
// Only process genuine entries - files and directories.
if (( *it == "." ) || ( *it == ".." ) )
continue;
// If the entry (be it a file or a directory) is already part of this project, proceed to next one.
- const QString relativeEntry( relpath + *it );
+ const TQString relativeEntry( relpath + *it );
if ( isInProject( relativeEntry ) )
continue;
// If the entry is blacklisted, proceed to next one.
@@ -519,24 +519,24 @@ void CustomProjectPart::findNewFiles( const QString& dir, QStringList& filelist
continue;
// We have a new, non-blacklisted entry.
// Recurse into it (a directory) or add it to the potential list of new project files.
- const QString absoluteEntry( dir + "/" + *it );
- if ( QFileInfo( absoluteEntry ).isFile() )
+ const TQString absoluteEntry( dir + "/" + *it );
+ if ( TQFileInfo( absoluteEntry ).isFile() )
{
filelist << relativeEntry;
}
- else if ( QFileInfo( absoluteEntry ).isDir() )
+ else if ( TQFileInfo( absoluteEntry ).isDir() )
{
bool searchRecursive = true;
- QFileInfo fi( absoluteEntry );
+ TQFileInfo fi( absoluteEntry );
if( fi.isSymLink() )
{
- QString realDir = fi.readLink();
- if( QFileInfo( realDir ).exists() )
+ TQString realDir = fi.readLink();
+ if( TQFileInfo( realDir ).exists() )
{
- for( QStringList::const_iterator it = filelist.constBegin(); it != filelist.constEnd(); ++it )
+ for( TQStringList::const_iterator it = filelist.constBegin(); it != filelist.constEnd(); ++it )
{
- if( QFileInfo(projectDirectory()+"/"+*it).absFilePath().startsWith( realDir ) )
+ if( TQFileInfo(projectDirectory()+"/"+*it).absFilePath().startsWith( realDir ) )
{
searchRecursive = false;
}
@@ -559,24 +559,24 @@ void CustomProjectPart::populateProject()
KDialogBase* dlg = new KDialogBase( mainWindow()->main(), "typeselector", true,
"Select filetypes of project", KDialogBase::Ok | KDialogBase::Cancel );
- QVBox* box = dlg->makeVBoxMainWidget();
+ TQVBox* box = dlg->makeVBoxMainWidget();
KEditListBox* lb = new KEditListBox( "Filetypes in the project", box, "selecttypes",
false, KEditListBox::Add | KEditListBox::Remove );
lb->setItems( filetypes() );
- if ( dlg->exec() == QDialog::Accepted )
+ if ( dlg->exec() == TQDialog::Accepted )
{
setFiletypes( lb->items() );
}
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( Qt::waitCursor );
removeFiles( allFiles() );
- updateBlacklist( QStringList() );
+ updateBlacklist( TQStringList() );
- QStringList newlist;
+ TQStringList newlist;
findNewFiles( projectDirectory(), newlist );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
addNewFilesToProject( newlist );
}
@@ -588,11 +588,11 @@ void CustomProjectPart::closeProject()
void CustomProjectPart::saveProject()
{
- QFile f( m_filelistDir + "/" + m_projectName + ".kdevelop.filelist" );
+ TQFile f( m_filelistDir + "/" + m_projectName + ".kdevelop.filelist" );
if ( !f.open( IO_WriteOnly ) )
return;
- QTextStream stream( &f );
+ TQTextStream stream( &f );
stream << "# KDevelop Custom Project File List" << endl;
ProjectFilesSet::ConstIterator it;
@@ -602,13 +602,13 @@ void CustomProjectPart::saveProject()
}
-QString CustomProjectPart::projectDirectory() const
+TQString CustomProjectPart::projectDirectory() const
{
return m_projectDirectory;
}
-QString CustomProjectPart::projectName() const
+TQString CustomProjectPart::projectName() const
{
return m_projectName;
}
@@ -630,9 +630,9 @@ DomUtil::PairList CustomProjectPart::runEnvironmentVars() const
* if run/directoryradio == custom
* The custom directory absolute path
*/
-QString CustomProjectPart::runDirectory() const
+TQString CustomProjectPart::runDirectory() const
{
- QString cwd = defaultRunDirectory( "kdevcustomproject" );
+ TQString cwd = defaultRunDirectory( "kdevcustomproject" );
if ( cwd.isEmpty() )
cwd = buildDirectory();
return cwd;
@@ -648,15 +648,15 @@ QString CustomProjectPart::runDirectory() const
* if run/directoryradio == custom or relative == false
* The absolute path to executable
*/
-QString CustomProjectPart::mainProgram() const
+TQString CustomProjectPart::mainProgram() const
{
- QDomDocument * dom = projectDom();
+ TQDomDocument * dom = projectDom();
- if ( !dom ) return QString();
+ if ( !dom ) return TQString();
- QString DomMainProgram = DomUtil::readEntry( *dom, "/kdevcustomproject/run/mainprogram" );
+ TQString DomMainProgram = DomUtil::readEntry( *dom, "/kdevcustomproject/run/mainprogram" );
- if ( DomMainProgram.isEmpty() ) return QString();
+ if ( DomMainProgram.isEmpty() ) return TQString();
if ( DomMainProgram.startsWith( "/" ) ) // assume absolute path
{
@@ -667,48 +667,48 @@ QString CustomProjectPart::mainProgram() const
return projectDirectory() + "/" + DomMainProgram;
}
- return QString();
+ return TQString();
}
-/** Retuns a QString with the debug command line arguments */
-QString CustomProjectPart::debugArguments() const
+/** Retuns a TQString with the debug command line arguments */
+TQString CustomProjectPart::debugArguments() const
{
return DomUtil::readEntry( *projectDom(), "/kdevcustomproject/run/globaldebugarguments" );
}
-/** Retuns a QString with the run command line arguments */
-QString CustomProjectPart::runArguments() const
+/** Retuns a TQString with the run command line arguments */
+TQString CustomProjectPart::runArguments() const
{
return DomUtil::readEntry( *projectDom(), "/kdevcustomproject/run/programargs" );
}
-QString CustomProjectPart::activeDirectory() const
+TQString CustomProjectPart::activeDirectory() const
{
- QDomDocument &dom = *projectDom();
+ TQDomDocument &dom = *projectDom();
return DomUtil::readEntry( dom, "/kdevcustomproject/general/activedir", "." );
}
-QStringList CustomProjectPart::allFiles() const
+TQStringList CustomProjectPart::allFiles() const
{
return m_sourceFilesSet.keys();
}
-void CustomProjectPart::addFile( const QString &fileName )
+void CustomProjectPart::addFile( const TQString &fileName )
{
- QStringList fileList;
+ TQStringList fileList;
fileList.append( fileName );
this->addFiles( fileList );
}
-void CustomProjectPart::addFiles( const QStringList& fileList )
+void CustomProjectPart::addFiles( const TQStringList& fileList )
{
- QStringList::ConstIterator it;
- QStringList addedFiles;
- QStringList myfileList = fileList;
+ TQStringList::ConstIterator it;
+ TQStringList addedFiles;
+ TQStringList myfileList = fileList;
kdDebug( 9025 ) << "Adding files: " << myfileList << endl;
myfileList.remove( "." );
myfileList.remove( "" );
@@ -717,9 +717,9 @@ void CustomProjectPart::addFiles( const QStringList& fileList )
{
if ( isInBlacklist( *it ) )
continue;
- QString relpath;
+ TQString relpath;
kdDebug( 9025 ) << "Checking path: " << *it << endl;
- if ( QDir::isRelativePath( *it ) )
+ if ( TQDir::isRelativePath( *it ) )
{
kdDebug( 9025 ) << *it << " is relative" << endl;
relpath = *it;
@@ -730,17 +730,17 @@ void CustomProjectPart::addFiles( const QStringList& fileList )
relpath = relativeToProject( *it );
}
- if ( !QFileInfo( projectDirectory() + "/" + relpath ).exists() )
+ if ( !TQFileInfo( projectDirectory() + "/" + relpath ).exists() )
continue;
- if ( QFileInfo( projectDirectory() + "/" + relpath ).isDir() && ( m_recursive || m_first_recursive ) )
+ if ( TQFileInfo( projectDirectory() + "/" + relpath ).isDir() && ( m_recursive || m_first_recursive ) )
{
kdDebug( 9025 ) << "is a dir and " << m_recursive << "|" << m_first_recursive << endl;
m_first_recursive = false;
- QStringList fileentries = QDir( projectDirectory() + "/" + relpath ).entryList( filetypes().join( ";" ) );
- QStringList dirs = QDir( projectDirectory() + "/" + relpath ).entryList( QDir::Dirs );
- QStringList subentries = fileentries + dirs;
- for ( QStringList::iterator subit = subentries.begin(); subit != subentries.end(); ++subit )
+ TQStringList fileentries = TQDir( projectDirectory() + "/" + relpath ).entryList( filetypes().join( ";" ) );
+ TQStringList dirs = TQDir( projectDirectory() + "/" + relpath ).entryList( TQDir::Dirs );
+ TQStringList subentries = fileentries + dirs;
+ for ( TQStringList::iterator subit = subentries.begin(); subit != subentries.end(); ++subit )
{
if ( *subit != "." && *subit != ".." )
*subit = relpath + "/" + ( *subit );
@@ -752,12 +752,12 @@ void CustomProjectPart::addFiles( const QStringList& fileList )
addToProject( relpath );
m_first_recursive = true;
}
- else if ( isProjectFileType( QFileInfo( relpath ).fileName() ) && ( ! isInProject( relpath ) ) )
+ else if ( isProjectFileType( TQFileInfo( relpath ).fileName() ) && ( ! isInProject( relpath ) ) )
{
- QStringList paths = QStringList::split( "/", relpath );
+ TQStringList paths = TQStringList::split( "/", relpath );
paths.pop_back();
- QString path;
- for ( QStringList::const_iterator it = paths.begin(); it != paths.end(); ++it )
+ TQString path;
+ for ( TQStringList::const_iterator it = paths.begin(); it != paths.end(); ++it )
{
path += *it;
if ( ! isInProject( path ) )
@@ -782,39 +782,39 @@ void CustomProjectPart::addFiles( const QStringList& fileList )
emit addedFilesToProject( addedFiles );
}
-void CustomProjectPart::removeFile( const QString &fileName )
+void CustomProjectPart::removeFile( const TQString &fileName )
{
- QStringList fileList;
+ TQStringList fileList;
fileList.append( fileName );
this->removeFiles( fileList );
}
-void CustomProjectPart::removeFiles( const QStringList& fileList )
+void CustomProjectPart::removeFiles( const TQStringList& fileList )
{
kdDebug( 9025 ) << "Emitting removedFilesFromProject" << fileList << endl;
- QStringList removedFiles;
- QStringList myfileList = fileList;
- QStringList::ConstIterator it;
+ TQStringList removedFiles;
+ TQStringList myfileList = fileList;
+ TQStringList::ConstIterator it;
myfileList.remove( "." );
myfileList.remove( ".." );
myfileList.remove( "" );
for ( it = myfileList.begin(); it != myfileList.end(); ++it )
{
- QString relpath;
- if ( QDir::isRelativePath( *it ) )
+ TQString relpath;
+ if ( TQDir::isRelativePath( *it ) )
relpath = *it;
else
relpath = relativeToProject( *it );
- if ( QFileInfo( projectDirectory() + "/" + relpath ).isDir() && ( m_recursive || m_first_recursive ) )
+ if ( TQFileInfo( projectDirectory() + "/" + relpath ).isDir() && ( m_recursive || m_first_recursive ) )
{
m_first_recursive = false;
- QStringList fileentries = QDir( projectDirectory() + "/" + relpath ).entryList( filetypes().join( ";" ) );
- QStringList dirs = QDir( projectDirectory() + "/" + relpath ).entryList( QDir::Dirs );
- QStringList subentries = fileentries + dirs;
- for ( QStringList::iterator subit = subentries.begin(); subit != subentries.end(); ++subit )
+ TQStringList fileentries = TQDir( projectDirectory() + "/" + relpath ).entryList( filetypes().join( ";" ) );
+ TQStringList dirs = TQDir( projectDirectory() + "/" + relpath ).entryList( TQDir::Dirs );
+ TQStringList subentries = fileentries + dirs;
+ for ( TQStringList::iterator subit = subentries.begin(); subit != subentries.end(); ++subit )
if ( *subit != "." && *subit != ".." )
*subit = relpath + "/" + ( *subit );
removeFiles( subentries );
@@ -829,13 +829,13 @@ void CustomProjectPart::removeFiles( const QStringList& fileList )
{
removedFiles << relpath;
removeFromProject( relpath );
- QStringList paths = QStringList::split( "/", relpath );
- QString lastsubentry = paths[paths.size()-1];
+ TQStringList paths = TQStringList::split( "/", relpath );
+ TQString lastsubentry = paths[paths.size()-1];
paths.pop_back();
while ( paths.size() > 0 )
{
- QString dir = paths.join( "/" );
- QStringList projectentries = projectFilesInDir( dir );
+ TQString dir = paths.join( "/" );
+ TQStringList projectentries = projectFilesInDir( dir );
if ( projectentries.size() == 0 )
{
removedFiles << dir;
@@ -853,28 +853,28 @@ void CustomProjectPart::removeFiles( const QStringList& fileList )
emit removedFilesFromProject( removedFiles );
}
-QString CustomProjectPart::buildDirectory() const
+TQString CustomProjectPart::buildDirectory() const
{
- QString dir = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/builddir" );
+ TQString dir = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/builddir" );
if ( dir.isEmpty() )
return projectDirectory();
- if ( QFileInfo( dir ).isRelative() )
- return QDir::cleanDirPath( projectDirectory() + "/" + dir );
+ if ( TQFileInfo( dir ).isRelative() )
+ return TQDir::cleanDirPath( projectDirectory() + "/" + dir );
return dir;
}
-QString CustomProjectPart::makeEnvironment() const
+TQString CustomProjectPart::makeEnvironment() const
{
// Get the make environment variables pairs into the environstr string
// in the form of: "ENV_VARIABLE=ENV_VALUE"
// Note that we quote the variable value due to the possibility of
// embedded spaces
- QString buildtool = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/buildtool" );
+ TQString buildtool = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/buildtool" );
DomUtil::PairList envvars =
DomUtil::readPairListEntry( *projectDom(), "/kdevcustomproject/" + buildtool + "/environments/" + currentMakeEnvironment(), "envvar", "name", "value" );
- QString environstr;
+ TQString environstr;
DomUtil::PairList::ConstIterator it;
for ( it = envvars.begin(); it != envvars.end(); ++it )
{
@@ -892,15 +892,15 @@ QString CustomProjectPart::makeEnvironment() const
}
-void CustomProjectPart::startMakeCommand( const QString &dir, const QString &target, bool withKdesu )
+void CustomProjectPart::startMakeCommand( const TQString &dir, const TQString &target, bool withKdesu )
{
if ( partController()->saveAllFiles() == false )
return; //user cancelled
- QDomDocument &dom = *projectDom();
- QString buildtool = DomUtil::readEntry( dom, "/kdevcustomproject/build/buildtool" );
+ TQDomDocument &dom = *projectDom();
+ TQString buildtool = DomUtil::readEntry( dom, "/kdevcustomproject/build/buildtool" );
- QString cmdline;
+ TQString cmdline;
if ( buildtool == "ant" )
{
cmdline = "ant";
@@ -925,7 +925,7 @@ void CustomProjectPart::startMakeCommand( const QString &dir, const QString &tar
if ( jobs != 0 )
{
cmdline += " -j";
- cmdline += QString::number( jobs );
+ cmdline += TQString::number( jobs );
}
if ( DomUtil::readBoolEntry( dom, "/kdevcustomproject/make/dontact" ) )
cmdline += " -n";
@@ -936,15 +936,15 @@ void CustomProjectPart::startMakeCommand( const QString &dir, const QString &tar
if ( !target.isEmpty() )
cmdline += KProcess::quote( target );
- QString dircmd = "cd ";
+ TQString dircmd = "cd ";
dircmd += KProcess::quote( dir );
dircmd += " && ";
int prio = DomUtil::readIntEntry( dom, "/kdevcustomproject/" + buildtool + "/prio" );
- QString nice;
+ TQString nice;
if ( prio != 0 )
{
- nice = QString( "nice -n%1 " ).arg( prio );
+ nice = TQString( "nice -n%1 " ).arg( prio );
}
cmdline.prepend( nice );
@@ -963,7 +963,7 @@ void CustomProjectPart::startMakeCommand( const QString &dir, const QString &tar
void CustomProjectPart::slotBuild()
{
m_lastCompilationFailed = false;
- QString buildtool = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/buildtool" );
+ TQString buildtool = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/buildtool" );
startMakeCommand( buildDirectory(), DomUtil::readEntry( *projectDom(),
"/kdevcustomproject/" + buildtool + "/defaulttarget" ) );
}
@@ -971,7 +971,7 @@ void CustomProjectPart::slotBuild()
void CustomProjectPart::slotBuildActiveDir()
{
m_lastCompilationFailed = false;
- QString buildtool = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/buildtool" );
+ TQString buildtool = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/buildtool" );
startMakeCommand( buildDirectory() + "/" + activeDirectory(), DomUtil::readEntry( *projectDom(),
"/kdevcustomproject/" + buildtool + "/defaulttarget" ) );
}
@@ -983,10 +983,10 @@ void CustomProjectPart::slotCompileFile()
if ( !part || !part->url().isLocalFile() )
return;
- QString fileName = part->url().path();
- QFileInfo fi( fileName );
- QString sourceDir = fi.dirPath();
- QString baseName = fi.baseName( true );
+ TQString fileName = part->url().path();
+ TQFileInfo fi( fileName );
+ TQString sourceDir = fi.dirPath();
+ TQString baseName = fi.baseName( true );
kdDebug( 9025 ) << "Compiling " << fileName
<< "in dir " << sourceDir
<< " with baseName " << baseName << endl;
@@ -994,16 +994,16 @@ void CustomProjectPart::slotCompileFile()
// What would be nice: In case of non-recursive build system, climb up from
// the source dir until a Makefile is found
- QString buildDir = sourceDir;
- QString target = baseName + ".o";
+ TQString buildDir = sourceDir;
+ TQString target = baseName + ".o";
- QString buildtool = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/buildtool" );
+ TQString buildtool = DomUtil::readEntry( *projectDom(), "/kdevcustomproject/build/buildtool" );
//if there is no Makefile in the directory of the source file
//try to build it from the main build dir
//this works e.g. for non-recursive cmake Makefiles, Alex
- if ( buildtool == "make" && ( QFile::exists( sourceDir + "/Makefile" ) == false )
- && ( QFile::exists( sourceDir + "/makefile" ) == false ) )
+ if ( buildtool == "make" && ( TQFile::exists( sourceDir + "/Makefile" ) == false )
+ && ( TQFile::exists( sourceDir + "/makefile" ) == false ) )
{
buildDir = buildDirectory();
}
@@ -1013,12 +1013,12 @@ void CustomProjectPart::slotCompileFile()
void CustomProjectPart::slotInstallActiveDir()
{
- startMakeCommand( buildDirectory() + "/" + activeDirectory(), QString::fromLatin1( "install" ) );
+ startMakeCommand( buildDirectory() + "/" + activeDirectory(), TQString::fromLatin1( "install" ) );
}
void CustomProjectPart::slotInstall()
{
- startMakeCommand( buildDirectory(), QString::fromLatin1( "install" ) );
+ startMakeCommand( buildDirectory(), TQString::fromLatin1( "install" ) );
}
@@ -1029,12 +1029,12 @@ void CustomProjectPart::slotInstallWithKdesu()
slotBuild();
// After that issue "make install" with the root user
- startMakeCommand( buildDirectory(), QString::fromLatin1( "install" ), true );
+ startMakeCommand( buildDirectory(), TQString::fromLatin1( "install" ), true );
}
void CustomProjectPart::slotClean()
{
- startMakeCommand( buildDirectory(), QString::fromLatin1( "clean" ) );
+ startMakeCommand( buildDirectory(), TQString::fromLatin1( "clean" ) );
}
@@ -1043,20 +1043,20 @@ void CustomProjectPart::slotExecute()
partController()->saveAllFiles();
bool _auto = false;
- if ( DomUtil::readBoolEntry( *projectDom(), "/kdevcustomproject/run/autocompile", true ) && ( isDirty() || !QFileInfo( mainProgram() ).exists() ) )
+ if ( DomUtil::readBoolEntry( *projectDom(), "/kdevcustomproject/run/autocompile", true ) && ( isDirty() || !TQFileInfo( mainProgram() ).exists() ) )
{
m_executeAfterBuild = true;
slotBuild();
_auto = true;
}
- if ( DomUtil::readBoolEntry( *projectDom(), "/kdevcustomproject/run/autoinstall", false ) && ( isDirty() || !QFileInfo( mainProgram() ).exists() ) )
+ if ( DomUtil::readBoolEntry( *projectDom(), "/kdevcustomproject/run/autoinstall", false ) && ( isDirty() || !TQFileInfo( mainProgram() ).exists() ) )
{
m_executeAfterBuild = true;
// Use kdesu??
if ( DomUtil::readBoolEntry( *projectDom(), "/kdevcustomproject/run/autokdesu", false ) )
//slotInstallWithKdesu assumes that it hasn't just been build...
- _auto ? slotInstallWithKdesu() : startMakeCommand( buildDirectory(), QString::fromLatin1( "install" ), true );
+ _auto ? slotInstallWithKdesu() : startMakeCommand( buildDirectory(), TQString::fromLatin1( "install" ), true );
else
slotInstall();
_auto = true;
@@ -1070,7 +1070,7 @@ void CustomProjectPart::slotExecute()
// Note that we quote the variable value due to the possibility of
// embedded spaces
DomUtil::PairList envvars = runEnvironmentVars();
- QString environstr;
+ TQString environstr;
DomUtil::PairList::ConstIterator it;
for ( it = envvars.begin(); it != envvars.end(); ++it )
{
@@ -1084,7 +1084,7 @@ void CustomProjectPart::slotExecute()
// Do not execute non executable targets
return;
- QString program = environstr;
+ TQString program = environstr;
program += mainProgram();
program += " " + runArguments();
@@ -1107,18 +1107,18 @@ void CustomProjectPart::updateTargetMenu()
m_targetObjectFilesMenu->clear();
m_targetOtherFilesMenu->clear();
- QDomDocument &dom = *projectDom();
+ TQDomDocument &dom = *projectDom();
bool ant = DomUtil::readEntry( dom, "/kdevcustomproject/build/buildtool" ) == "ant";
if ( ant )
{
- QFile f( buildDirectory() + "/build.xml" );
+ TQFile f( buildDirectory() + "/build.xml" );
if ( !f.open( IO_ReadOnly ) )
{
kdDebug( 9025 ) << "No build file" << endl;
return;
}
- QDomDocument dom;
+ TQDomDocument dom;
if ( !dom.setContent( &f ) )
{
kdDebug( 9025 ) << "Build script not valid xml" << endl;
@@ -1127,7 +1127,7 @@ void CustomProjectPart::updateTargetMenu()
}
f.close();
- QDomNode node = dom.documentElement().firstChild();
+ TQDomNode node = dom.documentElement().firstChild();
while ( !node.isNull() )
{
if ( node.toElement().tagName() == "target" )
@@ -1162,7 +1162,7 @@ void CustomProjectPart::updateTargetMenu()
m_targetMenu->insertItem( i18n( "Other Files" ), m_targetOtherFilesMenu );
int id = 0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = m_targets.begin(); it != m_targets.end(); ++it )
m_targetMenu->insertItem( *it, id++ );
@@ -1184,31 +1184,31 @@ void CustomProjectPart::putEnvVarsInVarMap()
m_makefileVars[( *it ).first] = ( *it ).second; //is qouting here required as in makeEnvironment() ??
}
-void CustomProjectPart::parseMakefile( const QString& filename )
+void CustomProjectPart::parseMakefile( const TQString& filename )
{
if ( m_parsedMakefiles.contains( filename ) )
return;
m_parsedMakefiles.insert( filename, 1 );
- QString absFilename = filename;
+ TQString absFilename = filename;
if ( !filename.startsWith( "/" ) )
absFilename = buildDirectory() + "/" + filename;
- QFile f( absFilename );
+ TQFile f( absFilename );
if ( !f.open( IO_ReadOnly ) )
{
kdDebug( 9025 ) << "could not open " << absFilename << endl;
return;
}
- QRegExp targetRe( "^ *([^\\t$.#]\\S+) *:.*$" );
+ TQRegExp targetRe( "^ *([^\\t$.#]\\S+) *:.*$" );
targetRe.setMinimal( true );
- QRegExp variablesRe( "\\$\\(\\s*([^\\)\\s]+)\\s*\\)" );
- QRegExp assignmentRe( "^\\s*(\\S+)\\s*[:\\?]?=\\s*(\\S+)\\s*(#.*)?$" );
+ TQRegExp variablesRe( "\\$\\(\\s*([^\\)\\s]+)\\s*\\)" );
+ TQRegExp assignmentRe( "^\\s*(\\S+)\\s*[:\\?]?=\\s*(\\S+)\\s*(#.*)?$" );
- QRegExp includedMakefilesRe( "^include\\s+(\\S+)" );
- QString str = "";
+ TQRegExp includedMakefilesRe( "^include\\s+(\\S+)" );
+ TQString str = "";
while ( !f.atEnd() )
{
f.readLine( str, 200 );
@@ -1217,7 +1217,7 @@ void CustomProjectPart::parseMakefile( const QString& filename )
int offset = -1;
while (( offset = variablesRe.search( str, offset + 1 ) ) != -1 )
{
- QString variableName = variablesRe.cap( 1 ).simplifyWhiteSpace();
+ TQString variableName = variablesRe.cap( 1 ).simplifyWhiteSpace();
if ( m_makefileVars.contains( variableName ) )
{
str.replace( variablesRe.cap( 0 ), m_makefileVars[variableName] );
@@ -1237,12 +1237,12 @@ void CustomProjectPart::parseMakefile( const QString& filename )
}
else if ( includedMakefilesRe.search( str ) != -1 )
{
- QString includedMakefile = includedMakefilesRe.cap( 1 ).simplifyWhiteSpace();
+ TQString includedMakefile = includedMakefilesRe.cap( 1 ).simplifyWhiteSpace();
m_makefilesToParse.push( includedMakefile );
}
else if ( targetRe.search( str ) != -1 )
{
- QString tmpTarget = targetRe.cap( 1 ).simplifyWhiteSpace();
+ TQString tmpTarget = targetRe.cap( 1 ).simplifyWhiteSpace();
if ( tmpTarget.endsWith( ".o" ) )
{
if ( m_targetsObjectFiles.find( tmpTarget ) == m_targetsObjectFiles.end() )
@@ -1265,29 +1265,29 @@ void CustomProjectPart::parseMakefile( const QString& filename )
void CustomProjectPart::targetMenuActivated( int id )
{
- QString target = m_targets[id];
+ TQString target = m_targets[id];
startMakeCommand( buildDirectory(), target );
}
void CustomProjectPart::targetObjectFilesMenuActivated( int id )
{
- QString target = m_targetsObjectFiles[id];
+ TQString target = m_targetsObjectFiles[id];
startMakeCommand( buildDirectory(), target );
}
void CustomProjectPart::targetOtherFilesMenuActivated( int id )
{
- QString target = m_targetsOtherFiles[id];
+ TQString target = m_targetsOtherFiles[id];
startMakeCommand( buildDirectory(), target );
}
void CustomProjectPart::updateMakeEnvironmentsMenu()
{
- QDomDocument &dom = *projectDom();
+ TQDomDocument &dom = *projectDom();
bool makeUsed = ( DomUtil::readEntry( dom, "/kdevcustomproject/build/buildtool" ) == "make" );
if ( makeUsed )
{
- QStringList l = allMakeEnvironments();
+ TQStringList l = allMakeEnvironments();
m_makeEnvironmentsSelector->setItems( l );
m_makeEnvironmentsSelector->setCurrentItem( l.findIndex( currentMakeEnvironment() ) );
}
@@ -1297,10 +1297,10 @@ void CustomProjectPart::updateMakeEnvironmentsMenu()
}
/*
m_makeEnvironmentsMenu->clear();
- QDomDocument &dom = *projectDom();
+ TQDomDocument &dom = *projectDom();
- QStringList environments = allMakeEnvironments();
- QStringList::ConstIterator it;
+ TQStringList environments = allMakeEnvironments();
+ TQStringList::ConstIterator it;
int id = 0;
for (it = environments.begin(); it != environments.end(); ++it)
m_makeEnvironmentsMenu->insertItem(*it, id++);
@@ -1310,29 +1310,29 @@ void CustomProjectPart::updateMakeEnvironmentsMenu()
void CustomProjectPart::makeEnvironmentsMenuActivated( int id )
{
- QDomDocument &dom = *projectDom();
- QString environment = allMakeEnvironments()[id];
+ TQDomDocument &dom = *projectDom();
+ TQString environment = allMakeEnvironments()[id];
DomUtil::writeEntry( dom, "/kdevcustomproject/make/selectedenvironment", environment );
}
-void CustomProjectPart::slotCommandFinished( const QString& command )
+void CustomProjectPart::slotCommandFinished( const TQString& command )
{
kdDebug( 9025 ) << "CustomProjectPart::slotProcessFinished()" << endl;
if ( m_buildCommand != command )
return;
- m_buildCommand = QString::null;
+ m_buildCommand = TQString::null;
m_timestamp.clear();
- QStringList fileList = allFiles();
- QStringList::Iterator it = fileList.begin();
+ TQStringList fileList = allFiles();
+ TQStringList::Iterator it = fileList.begin();
while ( it != fileList.end() )
{
- QString fileName = *it;
+ TQString fileName = *it;
++it;
- m_timestamp[ fileName ] = QFileInfo( projectDirectory(), fileName ).lastModified();
+ m_timestamp[ fileName ] = TQFileInfo( projectDirectory(), fileName ).lastModified();
}
emit projectCompiled();
@@ -1344,7 +1344,7 @@ void CustomProjectPart::slotCommandFinished( const QString& command )
}
}
-void CustomProjectPart::slotCommandFailed( const QString& /*command*/ )
+void CustomProjectPart::slotCommandFailed( const TQString& /*command*/ )
{
m_lastCompilationFailed = true;
m_executeAfterBuild = false;
@@ -1354,15 +1354,15 @@ bool CustomProjectPart::isDirty()
{
if ( m_lastCompilationFailed ) return true;
- QStringList fileList = allFiles();
- QStringList::Iterator it = fileList.begin();
+ TQStringList fileList = allFiles();
+ TQStringList::Iterator it = fileList.begin();
while ( it != fileList.end() )
{
- QString fileName = *it;
+ TQString fileName = *it;
++it;
- QMap<QString, QDateTime>::Iterator it = m_timestamp.find( fileName );
- QDateTime t = QFileInfo( projectDirectory(), fileName ).lastModified();
+ TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.find( fileName );
+ TQDateTime t = TQFileInfo( projectDirectory(), fileName ).lastModified();
if ( it == m_timestamp.end() || *it != t )
{
return true;
@@ -1373,19 +1373,19 @@ bool CustomProjectPart::isDirty()
}
-QStringList CustomProjectPart::allMakeEnvironments() const
+TQStringList CustomProjectPart::allMakeEnvironments() const
{
- QDomDocument &dom = *projectDom();
+ TQDomDocument &dom = *projectDom();
- QStringList allConfigs;
+ TQStringList allConfigs;
- QDomNode node =
+ TQDomNode node =
DomUtil::elementByPath( dom , "/kdevcustomproject/make/environments" );
// extract the names of the different make environments
- QDomElement childEl = node.firstChild().toElement();
+ TQDomElement childEl = node.firstChild().toElement();
while ( !childEl.isNull() )
{
- QString config = childEl.tagName();
+ TQString config = childEl.tagName();
allConfigs.append( config );
childEl = childEl.nextSibling().toElement();
}
@@ -1396,11 +1396,11 @@ QStringList CustomProjectPart::allMakeEnvironments() const
}
-QString CustomProjectPart::currentMakeEnvironment() const
+TQString CustomProjectPart::currentMakeEnvironment() const
{
- QStringList allEnvs = allMakeEnvironments();
- QDomDocument &dom = *projectDom();
- QString environment = DomUtil::readEntry( dom, "/kdevcustomproject/make/selectedenvironment" );
+ TQStringList allEnvs = allMakeEnvironments();
+ TQDomDocument &dom = *projectDom();
+ TQString environment = DomUtil::readEntry( dom, "/kdevcustomproject/make/selectedenvironment" );
if ( environment.isEmpty() || !allEnvs.contains( environment ) )
environment = allEnvs[0];
return environment;
@@ -1409,30 +1409,30 @@ QString CustomProjectPart::currentMakeEnvironment() const
/*!
\fn CustomProjectPart::distFiles() const
*/
-QStringList CustomProjectPart::distFiles() const
+TQStringList CustomProjectPart::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( "*README*" );
+ TQString projectDir = projectDirectory();
+ TQDir dir( projectDir );
+ TQStringList files = dir.entryList( "*README*" );
return sourceList + files;
}
-bool CustomProjectPart::containsNonProjectFiles( const QString& dir )
+bool CustomProjectPart::containsNonProjectFiles( const TQString& dir )
{
if ( isInBlacklist( dir ) )
return false;
- QStringList fileentries = QDir( dir ).entryList( filetypes().join( ";" ) );
- QStringList dirs = QDir( dir ).entryList( QDir::Dirs );
- QStringList subentries = fileentries + dirs;
+ TQStringList fileentries = TQDir( dir ).entryList( filetypes().join( ";" ) );
+ TQStringList dirs = TQDir( dir ).entryList( TQDir::Dirs );
+ TQStringList subentries = fileentries + dirs;
subentries.remove( "." );
subentries.remove( ".." );
- for ( QStringList::const_iterator it = subentries.begin(); it != subentries.end(); ++it )
+ for ( TQStringList::const_iterator it = subentries.begin(); it != subentries.end(); ++it )
{
if ( isInBlacklist( *it ) )
continue;
- if ( QFileInfo( dir + "/" + *it ).isDir() && !isInBlacklist( *it ) )
+ if ( TQFileInfo( dir + "/" + *it ).isDir() && !isInBlacklist( *it ) )
{
if ( containsNonProjectFiles( dir + "/" + *it ) )
{
@@ -1448,22 +1448,22 @@ bool CustomProjectPart::containsNonProjectFiles( const QString& dir )
return false;
}
-bool CustomProjectPart::containsProjectFiles( const QString& dir )
+bool CustomProjectPart::containsProjectFiles( const TQString& dir )
{
if ( isInBlacklist( dir ) )
return false;
- QStringList fileentries = QDir( dir ).entryList( filetypes().join( ";" ) );
- QStringList dirs = QDir( dir ).entryList( QDir::Dirs );
- QStringList subentries = fileentries + dirs;
+ TQStringList fileentries = TQDir( dir ).entryList( filetypes().join( ";" ) );
+ TQStringList dirs = TQDir( dir ).entryList( TQDir::Dirs );
+ TQStringList subentries = fileentries + dirs;
subentries.remove( "." );
subentries.remove( ".." );
- for ( QStringList::const_iterator it = subentries.begin(); it != subentries.end(); ++it )
+ for ( TQStringList::const_iterator it = subentries.begin(); it != subentries.end(); ++it )
{
if ( isInBlacklist( *it ) )
continue;
- if ( QFileInfo( dir + "/" + *it ).isDir() && !isInBlacklist( *it ) )
+ if ( TQFileInfo( dir + "/" + *it ).isDir() && !isInBlacklist( *it ) )
{
if ( containsProjectFiles( dir + "/" + *it ) )
{
@@ -1478,15 +1478,15 @@ bool CustomProjectPart::containsProjectFiles( const QString& dir )
return false;
}
-QStringList CustomProjectPart::projectFilesInDir( const QString& dir )
+TQStringList CustomProjectPart::projectFilesInDir( const TQString& dir )
{
- QStringList result;
- QStringList fileentries = QDir( projectDirectory() + "/" + dir ).entryList( filetypes().join( ";" ) );
- QStringList dirs = QDir( projectDirectory() + "/" + dir ).entryList( QDir::Dirs );
- QStringList subentries = fileentries + dirs;
+ TQStringList result;
+ TQStringList fileentries = TQDir( projectDirectory() + "/" + dir ).entryList( filetypes().join( ";" ) );
+ TQStringList dirs = TQDir( projectDirectory() + "/" + dir ).entryList( TQDir::Dirs );
+ TQStringList subentries = fileentries + dirs;
subentries.remove( "." );
subentries.remove( ".." );
- for ( QStringList::const_iterator it = subentries.begin(); it != subentries.end(); ++it )
+ for ( TQStringList::const_iterator it = subentries.begin(); it != subentries.end(); ++it )
{
if ( isInProject( dir + "/" + *it ) )
{
@@ -1496,16 +1496,16 @@ QStringList CustomProjectPart::projectFilesInDir( const QString& dir )
return result;
}
-QStringList CustomProjectPart::filetypes( ) const
+TQStringList CustomProjectPart::filetypes( ) const
{
return DomUtil::readListEntry( *projectDom(), "/kdevcustomproject/filetypes", "filetype" );
}
-bool CustomProjectPart::isProjectFileType( const QString& filename ) const
+bool CustomProjectPart::isProjectFileType( const TQString& filename ) const
{
- QStringList types = filetypes();
- QRegExp re( "", true, true );
- for ( QStringList::const_iterator it = types.begin(); it != types.end(); ++it )
+ TQStringList types = filetypes();
+ TQRegExp re( "", true, true );
+ for ( TQStringList::const_iterator it = types.begin(); it != types.end(); ++it )
{
re.setPattern( *it );
int pos = re.search( filename );
@@ -1520,9 +1520,9 @@ bool CustomProjectPart::isProjectFileType( const QString& filename ) const
return false;
}
-void CustomProjectPart::switchBlacklistEntry( const QString& path )
+void CustomProjectPart::switchBlacklistEntry( const TQString& path )
{
- QStringList blacklist = this->blacklist();
+ TQStringList blacklist = this->blacklist();
kdDebug( 9025 ) << "Switching path " << path << endl;
if ( !isInBlacklist( path ) )
{
@@ -1538,9 +1538,9 @@ void CustomProjectPart::switchBlacklistEntry( const QString& path )
updateBlacklist( blacklist );
}
-QString CustomProjectPart::relativeToProject( const QString& abspath ) const
+TQString CustomProjectPart::relativeToProject( const TQString& abspath ) const
{
- QString path = abspath.mid( projectDirectory().length() + 1 );
+ TQString path = abspath.mid( projectDirectory().length() + 1 );
kdDebug( 9025 ) << "abspath: " << "|project dir: " << projectDirectory() << "|path: " << path << endl;
if ( path.endsWith( "/" ) )
path = path.mid( 0, path.length() - 1 );
@@ -1549,17 +1549,17 @@ QString CustomProjectPart::relativeToProject( const QString& abspath ) const
return path;
}
-bool CustomProjectPart::isInBlacklist( const QString& path ) const
+bool CustomProjectPart::isInBlacklist( const TQString& path ) const
{
- QString relpath = path;
- QStringList blacklist = this->blacklist();
- if ( !QFileInfo( relpath ).isRelative() )
+ TQString relpath = path;
+ TQStringList blacklist = this->blacklist();
+ if ( !TQFileInfo( relpath ).isRelative() )
relpath = relativeToProject( path );
if ( blacklist.find( relpath ) != blacklist.end() )
return true;
- QStringList paths = QStringList::split( "/", relpath );
- QString parentpath;
- for ( QStringList::const_iterator it = paths.begin(); it != paths.end(); ++it )
+ TQStringList paths = TQStringList::split( "/", relpath );
+ TQString parentpath;
+ for ( TQStringList::const_iterator it = paths.begin(); it != paths.end(); ++it )
{
parentpath += *it;
if ( blacklist.find( parentpath ) != blacklist.end() )
@@ -1569,22 +1569,22 @@ bool CustomProjectPart::isInBlacklist( const QString& path ) const
return false;
}
-void CustomProjectPart::updateBlacklist( const QStringList& l )
+void CustomProjectPart::updateBlacklist( const TQStringList& l )
{
DomUtil::writeListEntry( *projectDom(), "kdevcustomproject/blacklist", "path", l );
}
-QStringList CustomProjectPart::blacklist() const
+TQStringList CustomProjectPart::blacklist() const
{
return DomUtil::readListEntry( *projectDom(), "kdevcustomproject/blacklist", "path" );
}
-void CustomProjectPart::addNewFilesToProject( const QStringList& filelist )
+void CustomProjectPart::addNewFilesToProject( const TQStringList& filelist )
{
- QStringList addfiles;
- for ( QStringList::const_iterator it = filelist.begin(); it != filelist.end(); ++it )
+ TQStringList addfiles;
+ for ( TQStringList::const_iterator it = filelist.begin(); it != filelist.end(); ++it )
{
- if (( ! isInProject( *it ) ) && ( isProjectFileType( *it ) || QFileInfo( projectDirectory() + "/" + *it ).isDir() ) && !isInBlacklist( *it ) )
+ if (( ! isInProject( *it ) ) && ( isProjectFileType( *it ) || TQFileInfo( projectDirectory() + "/" + *it ).isDir() ) && !isInBlacklist( *it ) )
{
addfiles << *it;
}
@@ -1598,12 +1598,12 @@ void CustomProjectPart::addNewFilesToProject( const QStringList& filelist )
{
m_first_recursive = false;
m_recursive = false;
- QStringList blacklist = this->blacklist();
- QStringList excludelist = dlg->excludedPaths();
- QStringList removeFromExcludes;
- for ( QStringList::const_iterator it = excludelist.begin(); it != excludelist.end(); ++it )
+ TQStringList blacklist = this->blacklist();
+ TQStringList excludelist = dlg->excludedPaths();
+ TQStringList removeFromExcludes;
+ for ( TQStringList::const_iterator it = excludelist.begin(); it != excludelist.end(); ++it )
{
- if ( QFileInfo( projectDirectory() + "/" + *it ).isDir() )
+ if ( TQFileInfo( projectDirectory() + "/" + *it ).isDir() )
{
for ( ProjectFilesSet::ConstIterator it2 = m_sourceFilesSet.constBegin(); it2 != m_sourceFilesSet.constEnd(); ++it2 )
{
@@ -1614,7 +1614,7 @@ void CustomProjectPart::addNewFilesToProject( const QStringList& filelist )
}
}
}
- for ( QStringList::const_iterator it = removeFromExcludes.begin(); it != removeFromExcludes.end(); ++it )
+ for ( TQStringList::const_iterator it = removeFromExcludes.begin(); it != removeFromExcludes.end(); ++it )
{
excludelist.remove( *it );
}
@@ -1624,7 +1624,7 @@ void CustomProjectPart::addNewFilesToProject( const QStringList& filelist )
}
}
-void CustomProjectPart::setFiletypes( const QStringList& l )
+void CustomProjectPart::setFiletypes( const TQStringList& l )
{
DomUtil::writeListEntry( *projectDom(), "kdevcustomproject/filetypes", "filetype", l );
}
@@ -1635,7 +1635,7 @@ void CustomProjectPart::setFiletypes( const QStringList& l )
*
* @param fileName
*/
-bool CustomProjectPart::isInProject( const QString& fileName ) const
+bool CustomProjectPart::isInProject( const TQString& fileName ) const
{
return m_sourceFilesSet.contains( fileName );
}
@@ -1648,7 +1648,7 @@ bool CustomProjectPart::isInProject( const QString& fileName ) const
*
* @see removeFromProject()
*/
-void CustomProjectPart::addToProject( const QString& fileName )
+void CustomProjectPart::addToProject( const TQString& fileName )
{
m_sourceFilesSet.insert( fileName, false );
}
@@ -1659,7 +1659,7 @@ void CustomProjectPart::addToProject( const QString& fileName )
*
* @param fileName
*/
-void CustomProjectPart::removeFromProject( const QString& fileName )
+void CustomProjectPart::removeFromProject( const TQString& fileName )
{
m_sourceFilesSet.remove( fileName );
}