summaryrefslogtreecommitdiffstats
path: root/buildtools/autotools/autosubprojectview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /buildtools/autotools/autosubprojectview.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/autotools/autosubprojectview.cpp')
-rw-r--r--buildtools/autotools/autosubprojectview.cpp316
1 files changed, 158 insertions, 158 deletions
diff --git a/buildtools/autotools/autosubprojectview.cpp b/buildtools/autotools/autosubprojectview.cpp
index efa3a358..9e1f9735 100644
--- a/buildtools/autotools/autosubprojectview.cpp
+++ b/buildtools/autotools/autosubprojectview.cpp
@@ -14,11 +14,11 @@
*/
/** Qt */
-#include <qregexp.h>
-#include <qcheckbox.h>
-#include <qstringlist.h>
-#include <qtable.h>
-#include <qlayout.h>
+#include <tqregexp.h>
+#include <tqcheckbox.h>
+#include <tqstringlist.h>
+#include <tqtable.h>
+#include <tqlayout.h>
/** KDE Libs */
#include <kxmlguiclient.h>
@@ -58,17 +58,17 @@
namespace AutoProjectPrivate
{
-bool isHeader( const QString& fileName )
+bool isHeader( const TQString& fileName )
{
- return QStringList::split( ";", "h;H;hh;hxx;hpp;tcc;h++" ).contains( QFileInfo(fileName).extension(false) );
+ return TQStringList::split( ";", "h;H;hh;hxx;hpp;tcc;h++" ).contains( TQFileInfo(fileName).extension(false) );
}
-static QString cleanWhitespace( const QString &str )
+static TQString cleanWhitespace( const TQString &str )
{
- QString res;
+ TQString res;
- QStringList l = QStringList::split( QRegExp( "[ \t]" ), str );
- QStringList::ConstIterator it;
+ TQStringList l = TQStringList::split( TQRegExp( "[ \t]" ), str );
+ TQStringList::ConstIterator it;
for ( it = l.begin(); it != l.end(); ++it )
{
res += *it;
@@ -78,16 +78,16 @@ static QString cleanWhitespace( const QString &str )
return res.left( res.length() - 1 );
}
-static void removeDir( const QString& dirName )
+static void removeDir( const TQString& dirName )
{
- QDir d( dirName );
+ TQDir d( dirName );
const QFileInfoList* fileList = d.entryInfoList();
if( !fileList )
return;
QFileInfoListIterator it( *fileList );
while( it.current() ){
- const QFileInfo* fileInfo = it.current();
+ const TQFileInfo* fileInfo = it.current();
++it;
if( fileInfo->fileName() == "." || fileInfo->fileName() == ".." )
@@ -107,7 +107,7 @@ static void removeDir( const QString& dirName )
}
-AutoSubprojectView::AutoSubprojectView(AutoProjectWidget* widget, AutoProjectPart* part, QWidget *parent, const char *name)
+AutoSubprojectView::AutoSubprojectView(AutoProjectWidget* widget, AutoProjectPart* part, TQWidget *parent, const char *name)
: AutoProjectViewBase(parent, name)
{
@@ -116,10 +116,10 @@ AutoSubprojectView::AutoSubprojectView(AutoProjectWidget* widget, AutoProjectPar
m_listView->setSorting(-1);
m_listView->header()->hide();
- m_listView->addColumn( QString::null );
+ m_listView->addColumn( TQString::null );
- connect( m_listView, SIGNAL( selectionChanged( QListViewItem* ) ),
- this, SLOT( slotSelectionChanged( QListViewItem* ) ) );
+ connect( m_listView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
initActions();
}
@@ -129,7 +129,7 @@ AutoSubprojectView::~AutoSubprojectView()
{
}
-void AutoSubprojectView::slotSelectionChanged( QListViewItem* item )
+void AutoSubprojectView::slotSelectionChanged( TQListViewItem* item )
{
if ( m_listView->selectedItems().count() <= 0 )
{
@@ -153,7 +153,7 @@ void AutoSubprojectView::slotSelectionChanged( QListViewItem* item )
emit selectionChanged( item );
}
-void AutoSubprojectView::loadMakefileams ( const QString& dir )
+void AutoSubprojectView::loadMakefileams ( const TQString& dir )
{
SubprojectItem * item = new SubprojectItem( m_listView, m_part->projectName() );
item->setPixmap ( 0, SmallIcon ( "kdevelop" ) );
@@ -173,53 +173,53 @@ void AutoSubprojectView::initActions()
KActionCollection * actions = new KActionCollection( this );
subProjectOptionsAction = new AutoToolsAction( i18n( "Options..." ), "configure", 0,
- this, SLOT( slotSubprojectOptions() ), actions, "subproject options" );
+ this, TQT_SLOT( slotSubprojectOptions() ), actions, "subproject options" );
subProjectOptionsAction->setWhatsThis(i18n("<qt><b>Options</b><p>Shows subproject options dialog "
"that provides settings for compiler, include paths, "
"prefixes and build order.</qt>"));
subProjectOptionsAction->plug( m_optionsButton );
- QToolTip::add( m_button1, tr2i18n( "Add new subproject..."));
+ TQToolTip::add( m_button1, tr2i18n( "Add new subproject..."));
addSubprojectAction = new AutoToolsAction( i18n( "Add new subproject..." ), "folder_new", 0,
- this, SLOT( slotAddSubproject() ), actions, "add subproject" );
+ this, TQT_SLOT( slotAddSubproject() ), actions, "add subproject" );
addSubprojectAction->setWhatsThis(i18n("<qt><b>Add new subproject</b><p>Creates a new "
"subproject in currently selected subproject.</qt>"));
addSubprojectAction->plug( m_button1 );
removeSubprojectAction = new KAction( i18n( "Remove Subproject..." ), "remove_subdir", 0,
- this, SLOT( slotRemoveSubproject() ), actions, "remove subproject" );
+ this, TQT_SLOT( slotRemoveSubproject() ), actions, "remove subproject" );
removeSubprojectAction->setWhatsThis(i18n("<qt><b>Remove subproject</b><p>Removes the subproject. Asks if the "
"subproject should be also removed from disk. Only subprojects "
"which do not hold other subprojects can be removed.</qt>"));
addExistingSubprojectAction = new KAction( i18n( "Add Existing Subprojects..." ), "fileimport", 0,
- this, SLOT( slotAddExistingSubproject() ), actions, "add existing subproject" );
+ this, TQT_SLOT( slotAddExistingSubproject() ), actions, "add existing subproject" );
addExistingSubprojectAction->setWhatsThis(i18n("<qt><b>Add existing subprojects</b><p>Imports existing "
"subprojects containing Makefile.am.</qt>"));
- QToolTip::add( m_button2, tr2i18n( "Add Target..."));
+ TQToolTip::add( m_button2, tr2i18n( "Add Target..."));
addTargetAction = new AutoToolsAction( i18n( "Add Target..." ), "targetnew_kdevelop", 0,
- this, SLOT( slotAddTarget() ), actions, "add target" );
+ this, TQT_SLOT( slotAddTarget() ), actions, "add target" );
addTargetAction->setWhatsThis(i18n( "<qt><b>Add target</b><p>Adds a new target to "
"the currently selected subproject. Target can be a "
"binary program, library, script, also a collection of "
"data or header files.</qt>"));
addTargetAction->plug( m_button2 );
- QToolTip::add( m_button3, tr2i18n( "Add Service..."));
+ TQToolTip::add( m_button3, tr2i18n( "Add Service..."));
addServiceAction = new AutoToolsAction( i18n( "Add Service..." ), "servicenew_kdevelop", 0, this,
- SLOT( slotAddService() ), actions, "add service" );
+ TQT_SLOT( slotAddService() ), actions, "add service" );
addServiceAction->setWhatsThis(i18n("<qt><b>Add service</b><p>Creates a .desktop file describing the service.</qt>"));
addServiceAction->plug( m_button3 );
- QToolTip::add( m_button4, tr2i18n( "Add Application..."));
+ TQToolTip::add( m_button4, tr2i18n( "Add Application..."));
addApplicationAction = new AutoToolsAction( i18n( "Add Application..." ), "window_new", 0, this,
- SLOT( slotAddApplication() ), actions, "add application" );
+ TQT_SLOT( slotAddApplication() ), actions, "add application" );
addApplicationAction->setWhatsThis(i18n("<qt><b>Add application</b><p>Creates an application .desktop file.</qt>"));
addApplicationAction->plug( m_button4 );
- QToolTip::add( m_button5, tr2i18n( "Build"));
+ TQToolTip::add( m_button5, tr2i18n( "Build"));
buildSubprojectAction = new AutoToolsAction( i18n( "Build" ), "launch", 0, this,
- SLOT( slotBuildSubproject() ), actions, "build subproject" );
+ TQT_SLOT( slotBuildSubproject() ), actions, "build subproject" );
buildSubprojectAction->setWhatsThis(i18n("<qt><b>Build</b><p>Runs <b>make</b> from the directory of "
"the selected subproject.<br> Environment variables and "
"make arguments can be specified in the project settings "
@@ -227,7 +227,7 @@ void AutoSubprojectView::initActions()
buildSubprojectAction->plug( m_button5 );
forceReeditSubprojectAction = new KAction( i18n( "Force Reedit" ), 0, 0, this,
- SLOT( slotForceReeditSubproject() ), actions, "force-reedit subproject" );
+ TQT_SLOT( slotForceReeditSubproject() ), actions, "force-reedit subproject" );
forceReeditSubprojectAction->setWhatsThis(i18n("<qt><b>Force Reedit</b><p>Runs <b>make force-reedit</b> "
"from the directory of the selected subproject.<br>This "
"recreates makefile (tip: and solves most of .moc related "
@@ -239,20 +239,20 @@ void AutoSubprojectView::initActions()
forceReeditSubprojectAction->setEnabled(false);
cleanSubprojectAction = new KAction( i18n( "Clean" ), 0, 0, this,
- SLOT( slotCleanSubproject() ), actions, "clean subproject" );
+ TQT_SLOT( slotCleanSubproject() ), actions, "clean subproject" );
cleanSubprojectAction->setWhatsThis(i18n("<qt><b>Clean</b><p>Runs <b>make clean</b> from the directory of "
"the selected subproject.<br> Environment variables and make "
"arguments can be specified in the project settings dialog, "
"<b>Make Options</b> tab.</qt>"));
installSubprojectAction = new KAction( i18n( "Install" ), 0, 0, this,
- SLOT( slotInstallSubproject() ), actions, "install subproject" );
+ TQT_SLOT( slotInstallSubproject() ), actions, "install subproject" );
installSubprojectAction->setWhatsThis(i18n("<qt><b>Install</b><p>Runs <b>make install</b> from the directory "
"of the selected subproject.<br> Environment variables and "
"make arguments can be specified in the project settings "
"dialog, <b>Make Options</b> tab.</qt>"));
installSuSubprojectAction = new KAction( i18n( "Install (as root user)" ), 0, 0,
- this, SLOT( slotInstallSuSubproject() ), actions, "install subproject as root" );
+ this, TQT_SLOT( slotInstallSuSubproject() ), actions, "install subproject as root" );
installSuSubprojectAction->setWhatsThis(i18n("<qt><b>Install as root user</b><p>Runs <b>make install</b> "
"command from the directory of the selected subproject "
"with root privileges.<br> It is executed via kdesu "
@@ -261,21 +261,21 @@ void AutoSubprojectView::initActions()
"<b>Make Options</b> tab.</qt>"));
expandAction = new KAction( i18n( "Expand Subtree" ), 0, 0, this,
- SLOT(slotExpandTree()), actions, "expandAction" );
+ TQT_SLOT(slotExpandTree()), actions, "expandAction" );
collapseAction = new KAction( i18n( "Collapse Subtree" ), 0, 0, this,
- SLOT(slotCollapseTree()), actions, "collapseAction" );
+ TQT_SLOT(slotCollapseTree()), actions, "collapseAction" );
otherAction = new KAction( i18n( "Manage Custom Commands..." ), 0, 0, this,
- SLOT( slotManageBuildCommands() ), actions, "manage custom commands" );
+ TQT_SLOT( slotManageBuildCommands() ), actions, "manage custom commands" );
otherAction->setWhatsThis(i18n("<qt><b>Manage custom commands</b><p>Allows to create, edit and "
"delete custom build commands which appears in the subproject "
"context menu.<br></qt>"));
- connect( m_listView, SIGNAL( contextMenu( KListView*, QListViewItem*, const QPoint& ) ),
- this, SLOT( slotContextMenu( KListView*, QListViewItem*, const QPoint& ) ) );
+ connect( m_listView, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( slotContextMenu( KListView*, TQListViewItem*, const TQPoint& ) ) );
}
-void AutoSubprojectView::slotContextMenu( KListView *, QListViewItem *item, const QPoint &p )
+void AutoSubprojectView::slotContextMenu( KListView *, TQListViewItem *item, const TQPoint &p )
{
if ( !item )
return ;
@@ -306,8 +306,8 @@ void AutoSubprojectView::slotContextMenu( KListView *, QListViewItem *item, cons
KConfig *config = m_part->instance()->config();
bool separate = true;
- QMap<QString,QString> customBuildCommands = config->entryMap("CustomCommands");
- for (QMap<QString,QString>::const_iterator it = customBuildCommands.constBegin();
+ TQMap<TQString,TQString> customBuildCommands = config->entryMap("CustomCommands");
+ for (TQMap<TQString,TQString>::const_iterator it = customBuildCommands.constBegin();
it != customBuildCommands.constEnd(); ++it)
{
if (separate)
@@ -315,7 +315,7 @@ void AutoSubprojectView::slotContextMenu( KListView *, QListViewItem *item, cons
popup.insertSeparator();
separate = false;
}
- int id = popup.insertItem(it.key(), this, SLOT(slotCustomBuildCommand(int)));
+ int id = popup.insertItem(it.key(), this, TQT_SLOT(slotCustomBuildCommand(int)));
m_commandList.append(it.data());
popup.setItemParameter(id, m_commandList.findIndex(it.data()));
}
@@ -420,9 +420,9 @@ void AutoSubprojectView::slotBuildSubproject()
SubprojectItem* spitem = dynamic_cast<SubprojectItem*>( m_listView->selectedItem() );
if ( !spitem ) return;
- QString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
+ TQString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
- m_part->startMakeCommand( m_part->buildDirectory() + relpath, QString::fromLatin1( "" ) );
+ m_part->startMakeCommand( m_part->buildDirectory() + relpath, TQString::fromLatin1( "" ) );
}
void AutoSubprojectView::slotRemoveSubproject()
@@ -439,9 +439,9 @@ void AutoSubprojectView::slotRemoveSubproject()
return;
}
- QStringList list = QStringList::split( QRegExp("[ \t]"), parent->variables["SUBDIRS"] );
- QStringList::Iterator it = list.find( spitem->subdir );
- QString subdirToRemove = spitem->subdir;
+ TQStringList list = TQStringList::split( TQRegExp("[ \t]"), parent->variables["SUBDIRS"] );
+ TQStringList::Iterator it = list.find( spitem->subdir );
+ TQString subdirToRemove = spitem->subdir;
bool topsubdirs = true;
if ((parent->variables["SUBDIRS"].find("$(TOPSUBDIRS)") == -1)
&& (parent->variables["SUBDIRS"].find("$(AUTODIRS)") == -1))
@@ -481,19 +481,19 @@ void AutoSubprojectView::slotRemoveSubproject()
// Adjust AC_OUTPUT in configure.in
if ( !m_part->isKDE() ) {
- QString projroot = m_part->projectDirectory() + "/";
- QString subdirectory = spitem->path;
- QString relpath = subdirectory.replace(0, projroot.length(),"");
+ TQString projroot = m_part->projectDirectory() + "/";
+ TQString subdirectory = spitem->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);
- QStringList::iterator it;
+ TQStringList::iterator it;
for ( it = list.begin(); it != list.end(); it++ ) {
- QString current = (QString) (*it);
- QRegExp path_regex(relpath);
+ TQString current = (TQString) (*it);
+ TQRegExp path_regex(relpath);
if ( path_regex.search(current) >= 0) {
list.remove(it);
break;
@@ -513,11 +513,11 @@ void AutoSubprojectView::slotRemoveSubproject()
if (parent->variables["SUBDIRS"].find("$(TOPSUBDIRS)") != -1)
{
- QFile subdirsfile( parent->path + "/subdirs" );
- QStringList topdirs;
+ TQFile subdirsfile( parent->path + "/subdirs" );
+ TQStringList topdirs;
if ( subdirsfile.open( IO_ReadOnly ) )
{
- QTextStream subdirsstream( &subdirsfile );
+ TQTextStream subdirsstream( &subdirsfile );
while (!subdirsstream.atEnd())
topdirs.append(subdirsstream.readLine());
subdirsfile.close();
@@ -525,26 +525,26 @@ void AutoSubprojectView::slotRemoveSubproject()
topdirs.remove(subdirToRemove);
if ( subdirsfile.open( IO_WriteOnly | IO_Truncate ) )
{
- QTextStream subdirsstream( &subdirsfile );
- for (QStringList::const_iterator it = topdirs.begin(); it != topdirs.end(); ++it)
+ TQTextStream subdirsstream( &subdirsfile );
+ for (TQStringList::const_iterator it = topdirs.begin(); it != topdirs.end(); ++it)
subdirsstream << *it << endl;
subdirsfile.close();
}
}
- QMap<QString,QString> replaceMap;
+ TQMap<TQString,TQString> replaceMap;
replaceMap.insert( "SUBDIRS", subdirToRemove );
AutoProjectTool::removeFromMakefileam( parent->path + "/Makefile.am", replaceMap );
- QString relmakefile = ( parent->path + "/Makefile" ).mid( m_part->projectDirectory().length()+1 );
+ TQString relmakefile = ( parent->path + "/Makefile" ).mid( m_part->projectDirectory().length()+1 );
kdDebug(9020) << "Relative makefile path: " << relmakefile << endl;
// check for config.status
- if( !QFileInfo(m_part->buildDirectory(), "config.status").exists() ){
+ if( !TQFileInfo(m_part->buildDirectory(), "config.status").exists() ){
return;
}
- QString cmdline = "cd ";
+ TQString cmdline = "cd ";
cmdline += KProcess::quote(m_part->projectDirectory());
cmdline += " && automake ";
cmdline += KProcess::quote(relmakefile);
@@ -559,26 +559,26 @@ void AutoSubprojectView::slotRemoveSubproject()
void AutoSubprojectView::parsePrimary( SubprojectItem *item,
- const QString &lhs, const QString &rhs )
+ const TQString &lhs, const TQString &rhs )
{
// Parse line foo_bar = bla bla
int pos = lhs.findRev( '_' );
- QString prefix = lhs.left( pos );
- QString primary = lhs.right( lhs.length() - pos - 1 );
+ TQString prefix = lhs.left( pos );
+ TQString primary = lhs.right( lhs.length() - pos - 1 );
// kdDebug(9020) << "Prefix:" << prefix << ",Primary:" << primary << endl;
#if 0
- QStrList prefixes;
+ TQStrList prefixes;
prefixes.append( "bin" );
prefixes.append( "pkglib" );
prefixes.append( "pkgdata" );
prefixes.append( "noinst" );
prefixes.append( "check" );
prefixes.append( "sbin" );
- QStrList primaries;
+ TQStrList primaries;
primaries.append( "PROGRAMS" );
primaries.append( "LIBRARIES" );
primaries.append( "LTLIBRARIES" );
@@ -592,31 +592,31 @@ void AutoSubprojectView::parsePrimary( SubprojectItem *item,
// possible prefixes can be extended dynamically (see below)
if ( primary == "PROGRAMS" || primary == "LIBRARIES" || primary == "LTLIBRARIES" )
{
- QStringList l = QStringList::split( QRegExp( "[ \t\n]" ), rhs );
- QStringList::Iterator it1;
+ TQStringList l = TQStringList::split( TQRegExp( "[ \t\n]" ), rhs );
+ TQStringList::Iterator it1;
for ( it1 = l.begin(); it1 != l.end(); ++it1 )
{
TargetItem *titem = m_widget->createTargetItem( *it1, prefix, primary );
item->targets.append( titem );
- QString canonname = AutoProjectTool::canonicalize( *it1 );
+ TQString canonname = AutoProjectTool::canonicalize( *it1 );
titem->ldflags = AutoProjectPrivate::cleanWhitespace( item->variables[ canonname + "_LDFLAGS" ] );
titem->ldadd = AutoProjectPrivate::cleanWhitespace( item->variables[ canonname + "_LDADD" ] );
titem->libadd = AutoProjectPrivate::cleanWhitespace( item->variables[ canonname + "_LIBADD" ] );
titem->dependencies = AutoProjectPrivate::cleanWhitespace( item->variables[ canonname + "_DEPENDENCIES" ] );
- QString sources = item->variables[ canonname + "_SOURCES" ];
- QStringList sourceList = QStringList::split( QRegExp( "[ \t\n]" ), sources );
- QMap<QString, bool> dict;
- QStringList::Iterator it = sourceList.begin();
+ TQString sources = item->variables[ canonname + "_SOURCES" ];
+ TQStringList sourceList = TQStringList::split( TQRegExp( "[ \t\n]" ), sources );
+ TQMap<TQString, bool> dict;
+ TQStringList::Iterator it = sourceList.begin();
while( it != sourceList.end() ){
dict.insert( *it, true );
++it;
}
- QMap<QString, bool>::Iterator dictIt = dict.begin();
+ TQMap<TQString, bool>::Iterator dictIt = dict.begin();
while( dictIt != dict.end() ){
- QString fname = dictIt.key();
+ TQString fname = dictIt.key();
++dictIt;
FileItem *fitem = m_widget->createFileItem( fname, item );
@@ -643,11 +643,11 @@ void AutoSubprojectView::parsePrimary( SubprojectItem *item,
TargetItem *titem = m_widget->createTargetItem( "", prefix, primary );
item->targets.append( titem );
- QStringList l = QStringList::split( QRegExp( "[ \t]" ), rhs );
- QStringList::Iterator it3;
+ TQStringList l = TQStringList::split( TQRegExp( "[ \t]" ), rhs );
+ TQStringList::Iterator it3;
for ( it3 = l.begin(); it3 != l.end(); ++it3 )
{
- QString fname = *it3;
+ TQString fname = *it3;
FileItem *fitem = m_widget->createFileItem( fname, item );
titem->sources.append( fitem );
@@ -658,8 +658,8 @@ void AutoSubprojectView::parsePrimary( SubprojectItem *item,
}
else if ( primary == "JAVA" )
{
- QStringList l = QStringList::split( QRegExp( "[ \t\n]" ), rhs );
- QStringList::Iterator it1;
+ TQStringList l = TQStringList::split( TQRegExp( "[ \t\n]" ), rhs );
+ TQStringList::Iterator it1;
TargetItem *titem = m_widget->createTargetItem( "", prefix, primary );
item->targets.append( titem );
@@ -673,28 +673,28 @@ void AutoSubprojectView::parsePrimary( SubprojectItem *item,
void AutoSubprojectView::parseKDEDOCS( SubprojectItem *item,
- const QString & /*lhs*/, const QString & /*rhs*/ )
+ const TQString & /*lhs*/, const TQString & /*rhs*/ )
{
// Handle the line KDE_ICON =
// (actually, no parsing is involved here)
- QString prefix = "kde_docs";
- QString primary = "KDEDOCS";
+ TQString prefix = "kde_docs";
+ TQString primary = "KDEDOCS";
TargetItem *titem = m_widget->createTargetItem( "", prefix, primary );
item->targets.append( titem );
- QDir d( item->path );
- QStringList l = d.entryList( QDir::Files );
+ TQDir d( item->path );
+ TQStringList l = d.entryList( TQDir::Files );
- QRegExp re( "Makefile.*|\\..*|.*~|index.cache.bz2" );
+ TQRegExp re( "Makefile.*|\\..*|.*~|index.cache.bz2" );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = l.begin(); it != l.end(); ++it )
{
if ( !re.exactMatch( *it ) )
{
- QString fname = *it;
+ TQString fname = *it;
FileItem * fitem = m_widget->createFileItem( fname, item );
titem->sources.append( fitem );
}
@@ -703,24 +703,24 @@ void AutoSubprojectView::parseKDEDOCS( SubprojectItem *item,
void AutoSubprojectView::parseKDEICON( SubprojectItem *item,
- const QString &lhs, const QString &rhs )
+ const TQString &lhs, const TQString &rhs )
{
// Parse a line foo_ICON = bla bla
int pos = lhs.find( "_ICON" );
- QString prefix = lhs.left( pos );
+ TQString prefix = lhs.left( pos );
if ( prefix == "KDE" )
prefix = "kde_icon";
- QString primary = "KDEICON";
+ TQString primary = "KDEICON";
TargetItem *titem = m_widget->createTargetItem( "", prefix, primary );
item->targets.append( titem );
- QDir d( item->path );
- QStringList l = d.entryList( QDir::Files );
+ TQDir d( item->path );
+ TQStringList l = d.entryList( TQDir::Files );
- QString regexp;
+ TQString regexp;
if ( rhs == "AUTO" )
{
@@ -728,13 +728,13 @@ void AutoSubprojectView::parseKDEICON( SubprojectItem *item,
}
else
{
- QStringList appNames = QStringList::split( QRegExp( "[ \t\n]" ), rhs );
+ TQStringList appNames = TQStringList::split( TQRegExp( "[ \t\n]" ), rhs );
regexp = ".*(-" + appNames.join( "|-" ) + ")\\.(png|mng|xpm)";
}
- QRegExp re( regexp );
+ TQRegExp re( regexp );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = l.begin(); it != l.end(); ++it )
{
if ( re.exactMatch( *it ) )
@@ -747,20 +747,20 @@ void AutoSubprojectView::parseKDEICON( SubprojectItem *item,
void AutoSubprojectView::parsePrefix( SubprojectItem *item,
- const QString &lhs, const QString &rhs )
+ const TQString &lhs, const TQString &rhs )
{
// Parse a line foodir = bla bla
- QString name = lhs.left( lhs.length() - 3 );
- QString dir = rhs;
+ TQString name = lhs.left( lhs.length() - 3 );
+ TQString dir = rhs;
item->prefixes.insert( name, dir );
}
void AutoSubprojectView::parseSUBDIRS( SubprojectItem *item,
- const QString & /*lhs*/, const QString &rhs )
+ const TQString & /*lhs*/, const TQString &rhs )
{
// Parse a line SUBDIRS = bla bla
- QString subdirs = rhs;
+ TQString subdirs = rhs;
kdDebug( 9020 ) << "subdirs are " << subdirs << endl;
// Take care of KDE hacks:
@@ -768,26 +768,26 @@ void AutoSubprojectView::parseSUBDIRS( SubprojectItem *item,
// listed in the subdirs file
if ( subdirs.find( "$(TOPSUBDIRS)" ) != -1 )
{
- QStringList dirs;
- QFile subdirsfile( item->path + "/subdirs" );
+ TQStringList dirs;
+ TQFile subdirsfile( item->path + "/subdirs" );
if( subdirsfile.exists() )
{
if ( subdirsfile.open( IO_ReadOnly ) )
{
- QTextStream subdirsstream( &subdirsfile );
+ TQTextStream subdirsstream( &subdirsfile );
while ( !subdirsstream.atEnd() )
dirs.append( subdirsstream.readLine() );
subdirsfile.close();
}
} else
{
- QDir d( item->path );
- QStringList l = d.entryList( QDir::Dirs );
- for( QStringList::const_iterator it = l.begin(); it != l.end(); ++it )
+ TQDir d( item->path );
+ TQStringList l = d.entryList( TQDir::Dirs );
+ for( TQStringList::const_iterator it = l.begin(); it != l.end(); ++it )
{
if( (*it) != "CVS" && (*it) != "admin" && (*it) != ".svn" && (*it) != "." && (*it) != ".." )
{
- QDir subdir = d;
+ TQDir subdir = d;
subdir.cd( *it, false );
if( subdir.exists( "Makefile.am" ) )
dirs.append( *it );
@@ -795,34 +795,34 @@ void AutoSubprojectView::parseSUBDIRS( SubprojectItem *item,
}
}
- subdirs.replace( QRegExp( "\\$\\(TOPSUBDIRS\\)" ), dirs.join( " " ) );
+ subdirs.replace( TQRegExp( "\\$\\(TOPSUBDIRS\\)" ), dirs.join( " " ) );
}
// AUTODIRS is an alias for all subdirectories
if ( subdirs.find( "$(AUTODIRS)" ) != -1 )
{
- QDir d( item->path );
- QStringList dirs = d.entryList( QDir::Dirs );
+ TQDir d( item->path );
+ TQStringList dirs = d.entryList( TQDir::Dirs );
dirs.remove( "." );
dirs.remove( ".." );
dirs.remove( "CVS" );
- subdirs.replace( QRegExp( "\\$\\(AUTODIRS\\)" ), dirs.join( " " ) );
+ subdirs.replace( TQRegExp( "\\$\\(AUTODIRS\\)" ), dirs.join( " " ) );
}
// If there are any variables in the subdirs line then search
// the Makefile(.am?) for its definition. Unfortunately, it may be
// defined outside this file in which case those dirs won't be added.
- QRegExp varre( "\\$\\(\\s*(.*)\\s*\\)" );
+ TQRegExp varre( "\\$\\(\\s*(.*)\\s*\\)" );
varre.setMinimal( true );
while ( varre.search( subdirs ) != -1 )
{
- QString varname = varre.cap( 1 );
- QString varvalue;
+ TQString varname = varre.cap( 1 );
+ TQString varvalue;
// Search the whole Makefile(.am?)
// Note that if the variable isn't found it just disappears
// (Perhaps we should add it back in this case?)
- QMap<QString, QString>::ConstIterator varit = item->variables.find( varname );
+ TQMap<TQString, TQString>::ConstIterator varit = item->variables.find( varname );
if ( varit != item->variables.end() )
{
kdDebug( 9020 ) << "Found Makefile var " << varname << ", adding dirs <" << varit.data() << ">" << endl;
@@ -832,22 +832,22 @@ void AutoSubprojectView::parseSUBDIRS( SubprojectItem *item,
{
kdDebug( 9020 ) << "Not found Makefile var " << varname << endl;
}
- subdirs.replace( QRegExp( "\\$\\(\\s*" + varname + "\\s*\\)" ), varvalue );
+ subdirs.replace( TQRegExp( "\\$\\(\\s*" + varname + "\\s*\\)" ), varvalue );
}
//search for AC_SUBST variables and try to replace them with variables
//that have been already defined e.g. in a "kdevelop hint"
- varre = QRegExp( "\\@(.*)\\@" );
+ varre = TQRegExp( "\\@(.*)\\@" );
varre.setMinimal( true );
while ( varre.search( subdirs ) != -1 )
{
- QString varname = varre.cap( 1 );
- QString varvalue;
+ TQString varname = varre.cap( 1 );
+ TQString varvalue;
// Search the whole Makefile(.am?)
// Note that if the variable isn't found it just disappears
// (Perhaps we should add it back in this case?)
- QMap<QString, QString>::ConstIterator varit = item->variables.find( varname );
+ TQMap<TQString, TQString>::ConstIterator varit = item->variables.find( varname );
if ( varit != item->variables.end() )
{
kdDebug( 9020 ) << "Found Makefile var " << varname << ", adding dirs <" << varit.data() << ">" << endl;
@@ -857,12 +857,12 @@ void AutoSubprojectView::parseSUBDIRS( SubprojectItem *item,
{
kdDebug( 9020 ) << "Not found Makefile var " << varname << endl;
}
- subdirs.replace( QRegExp( "\\@" + varname + "\\@" ), varvalue );
+ subdirs.replace( TQRegExp( "\\@" + varname + "\\@" ), varvalue );
}
- QStringList l = QStringList::split( QRegExp( "[ \t]" ), subdirs );
+ TQStringList l = TQStringList::split( TQRegExp( "[ \t]" ), subdirs );
l.sort();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = l.begin(); it != l.end(); ++it )
{
if ( *it == "." )
@@ -891,7 +891,7 @@ void AutoSubprojectView::parseSUBDIRS( SubprojectItem *item,
newitem->setOpen( open );
// Move to the bottom of the list
- QListViewItem *lastItem = item->firstChild();
+ TQListViewItem *lastItem = item->firstChild();
while ( lastItem->nextSibling()
)
lastItem = lastItem->nextSibling();
@@ -905,11 +905,11 @@ void AutoSubprojectView::parse( SubprojectItem *item )
headers.clear();
AutoProjectTool::parseMakefileam( item->path + "/Makefile.am", &item->variables );
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = item->variables.begin(); it != item->variables.end(); ++it )
{
- QString lhs = it.key();
- QString rhs = it.data();
+ TQString lhs = it.key();
+ TQString rhs = it.data();
if ( lhs == "KDE_DOCS" )
parseKDEDOCS( item, lhs, rhs );
else if ( lhs.right( 5 ) == "_ICON" )
@@ -925,16 +925,16 @@ void AutoSubprojectView::parse( SubprojectItem *item )
/// @todo only if in a c++ project
TargetItem* noinst_HEADERS_item = findNoinstHeaders(item);
- QDir dir( item->path );
- QStringList headersList = QStringList::split( QRegExp("[ \t]"), item->variables[ "noinst_HEADERS" ] );
+ TQDir dir( item->path );
+ TQStringList headersList = TQStringList::split( TQRegExp("[ \t]"), item->variables[ "noinst_HEADERS" ] );
- headersList += dir.entryList( "*.h;*.H;*.hh;*.hxx;*.hpp;*.tcc", QDir::Files );
+ headersList += dir.entryList( "*.h;*.H;*.hh;*.hxx;*.hpp;*.tcc", TQDir::Files );
headersList.sort();
- headersList = QStringList::split(QRegExp("[ \t]"), headersList.join( " " ));
+ headersList = TQStringList::split(TQRegExp("[ \t]"), headersList.join( " " ));
- QStringList::Iterator fileIt = headersList.begin();
+ TQStringList::Iterator fileIt = headersList.begin();
while( fileIt != headersList.end() ){
- QString fname = *fileIt;
+ TQString fname = *fileIt;
++fileIt;
if( AutoProjectPrivate::isHeader(fname) && !headers.contains(fname) ){
@@ -949,7 +949,7 @@ void AutoSubprojectView::slotForceReeditSubproject( )
SubprojectItem* spitem = dynamic_cast <SubprojectItem*>( m_listView->selectedItem() );
if ( !spitem ) return;
- QString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
+ TQString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
m_part->startMakeCommand( m_part->buildDirectory() + relpath, "force-reedit" );
}
@@ -959,7 +959,7 @@ void AutoSubprojectView::slotInstallSubproject( )
SubprojectItem* spitem = dynamic_cast<SubprojectItem*>( m_listView->selectedItem() );
if ( !spitem ) return;
- QString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
+ TQString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
m_part->startMakeCommand( m_part->buildDirectory() + relpath, "install" );
}
@@ -969,7 +969,7 @@ void AutoSubprojectView::slotInstallSuSubproject( )
SubprojectItem* spitem = dynamic_cast<SubprojectItem*>( m_listView->selectedItem() );
if ( !spitem ) return;
- QString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
+ TQString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
m_part->startMakeCommand( m_part->buildDirectory() + relpath, "install", true );
}
@@ -977,7 +977,7 @@ void AutoSubprojectView::slotInstallSuSubproject( )
TargetItem * AutoSubprojectView::findNoinstHeaders( SubprojectItem *item )
{
TargetItem* noinst_HEADERS_item = 0;
- QPtrListIterator<TargetItem> itemIt( item->targets );
+ TQPtrListIterator<TargetItem> itemIt( item->targets );
while( itemIt.current() ){
TargetItem* titem = itemIt.current();
++itemIt;
@@ -1001,12 +1001,12 @@ void AutoSubprojectView::slotCleanSubproject( )
SubprojectItem* spitem = dynamic_cast<SubprojectItem*>( m_listView->selectedItem() );
if ( !spitem ) return;
- QString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
+ TQString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
m_part->startMakeCommand( m_part->buildDirectory() + relpath, "clean" );
}
-void AutoSubprojectView::focusOutEvent( QFocusEvent */* e*/ )
+void AutoSubprojectView::focusOutEvent( TQFocusEvent */* e*/ )
{
m_widget->setLastFocusedView(AutoProjectWidget::SubprojectView);
}
@@ -1015,15 +1015,15 @@ void AutoSubprojectView::slotManageBuildCommands( )
{
KConfig *config = m_part->instance()->config();
//menu item name <-> command
- QMap<QString, QString> customBuildCommands = config->entryMap("CustomCommands");
+ TQMap<TQString, TQString> customBuildCommands = config->entryMap("CustomCommands");
KDialogBase dlg(KDialogBase::Plain, i18n("Manage Custom Commands"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok);
dlg.plainPage()->setMargin(0);
- (new QVBoxLayout(dlg.plainPage(), 0, 0))->setAutoAdd(true);
+ (new TQVBoxLayout(dlg.plainPage(), 0, 0))->setAutoAdd(true);
ManageCustomCommand *widget = new ManageCustomCommand(dlg.plainPage());
- for (QMap<QString,QString>::const_iterator it = customBuildCommands.constBegin();
+ for (TQMap<TQString,TQString>::const_iterator it = customBuildCommands.constBegin();
it != customBuildCommands.constEnd(); ++it)
{
widget->commandsTable->insertRows(widget->commandsTable->numRows());
@@ -1031,13 +1031,13 @@ void AutoSubprojectView::slotManageBuildCommands( )
widget->commandsTable->setText(widget->commandsTable->numRows() - 1, 0, it.key());
widget->commandsTable->setText(widget->commandsTable->numRows() - 1, 1,
it.data().section(":::", 0, 0));
- static_cast<QComboTableItem*>(widget->commandsTable->
+ static_cast<TQComboTableItem*>(widget->commandsTable->
item(widget->commandsTable->numRows() - 1, 2))->
setCurrentItem(it.data().section(":::", 1, 1).toInt());
}
widget->commandsTable->setFocus();
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
config->deleteGroup("CustomCommands");
config->setGroup("CustomCommands");
@@ -1045,7 +1045,7 @@ void AutoSubprojectView::slotManageBuildCommands( )
{
config->writeEntry(widget->commandsTable->text(i, 0),
widget->commandsTable->text(i, 1)+":::"+
- QString("%1").arg(static_cast<QComboTableItem*>(widget->
+ TQString("%1").arg(static_cast<TQComboTableItem*>(widget->
commandsTable->item(i, 2))->currentItem()));
}
config->sync();
@@ -1055,13 +1055,13 @@ void AutoSubprojectView::slotManageBuildCommands( )
void AutoSubprojectView::slotCustomBuildCommand(int val)
{
- QString cmd = m_commandList[val].section(":::", 0, 0);
+ TQString cmd = m_commandList[val].section(":::", 0, 0);
int type = m_commandList[val].section(":::", 1, 1).toInt();
SubprojectItem* spitem = dynamic_cast<SubprojectItem*>( m_listView->selectedItem() );
if ( !spitem ) return;
- QString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
+ TQString relpath = "/" + URLUtil::getRelativePath( m_part->topsourceDirectory(), m_part->projectDirectory() ) + "/" + spitem->path.mid( m_part->projectDirectory().length() );
switch (type)
{
case 0: //make target
@@ -1099,7 +1099,7 @@ void AutoSubprojectView::slotCollapseTree()
expandCollapseFirst( m_listView->currentItem(), false );
}
-void AutoSubprojectView::expandCollapseFirst( QListViewItem * item, bool expand )
+void AutoSubprojectView::expandCollapseFirst( TQListViewItem * item, bool expand )
{
if ( !item ) return;
@@ -1118,7 +1118,7 @@ void AutoSubprojectView::expandCollapseFirst( QListViewItem * item, bool expand
}
}
-void AutoSubprojectView::expandCollapse( QListViewItem * item, bool expand )
+void AutoSubprojectView::expandCollapse( TQListViewItem * item, bool expand )
{
if ( !item ) return;