summaryrefslogtreecommitdiffstats
path: root/buildtools/qmake/trollprojectpart.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /buildtools/qmake/trollprojectpart.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/qmake/trollprojectpart.cpp')
-rw-r--r--buildtools/qmake/trollprojectpart.cpp188
1 files changed, 94 insertions, 94 deletions
diff --git a/buildtools/qmake/trollprojectpart.cpp b/buildtools/qmake/trollprojectpart.cpp
index d59c5b4b..54d31735 100644
--- a/buildtools/qmake/trollprojectpart.cpp
+++ b/buildtools/qmake/trollprojectpart.cpp
@@ -60,8 +60,8 @@ typedef KDevGenericFactory<TrollProjectPart> TrollProjectFactory;
static const KDevPluginInfo data("kdevtrollproject");
K_EXPORT_COMPONENT_FACTORY( libkdevtrollproject, TrollProjectFactory( data ) )
-TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQStringList& args )
- : KDevBuildTool(&data, parent, name ? name : "TrollProjectPart")
+TrollProjectPart::TrollProjectPart(TQObject *tqparent, const char *name, const TQStringList& args )
+ : KDevBuildTool(&data, tqparent, name ? name : "TrollProjectPart")
{
setInstance(TrollProjectFactory::instance());
@@ -79,20 +79,20 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
m_widget = new TrollProjectWidget(this);
m_widget->setIcon(SmallIcon("qmakerun"));
- m_widget->setCaption(i18n("QMake Manager"));
- TQWhatsThis::add(m_widget, i18n("<b>QMake manager</b><p>"
- "The QMake manager project tree consists of two parts. The 'overview' "
+ m_widget->setCaption(i18n("TQMake Manager"));
+ TQWhatsThis::add(m_widget, i18n("<b>TQMake manager</b><p>"
+ "The TQMake manager project tree consists of two parts. The 'overview' "
"in the upper half shows the subprojects, each one having a "
".pro file. The 'details' view in the lower half shows the "
"list of files for the active subproject selected in the overview."));
- mainWindow()->embedSelectViewRight(m_widget, i18n("QMake Manager"), i18n("QMake manager"));
+ mainWindow()->embedSelectViewRight(m_widget, i18n("TQMake Manager"), i18n("TQMake manager"));
KAction *action;
const TQIconSet icon(SmallIcon("compfile"));
action = new KAction( i18n("Compile &File"), "compfile", 0,
- m_widget, TQT_SLOT(slotBuildOpenFile()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildOpenFile()),
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>"
@@ -101,7 +101,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
action = new KAction( i18n("&Build Project"), "make_kdevelop", Key_F8,
- m_widget, TQT_SLOT(slotBuildProject()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildProject()),
actionCollection(), "build_build_project" );
action->setToolTip(i18n("Build project"));
action->setWhatsThis(i18n("<b>Build project</b><p>Runs <b>make</b> from the project directory.<br>"
@@ -109,7 +109,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new KAction( i18n("&Rebuild Project"),"rebuild" , 0,
- m_widget, TQT_SLOT(slotRebuildProject()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotRebuildProject()),
actionCollection(),"build_rebuild_project" );
action->setToolTip(i18n("Rebuild project"));
action->setWhatsThis(i18n("<b>Rebuild project</b><p>Runs <b>make clean</b> and then <b>make</b> from the project directory.<br>"
@@ -117,7 +117,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new KAction( i18n("&Install Project"),"install" , 0,
- m_widget, TQT_SLOT(slotInstallProject()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotInstallProject()),
actionCollection(),"build_install_project" );
action->setToolTip(i18n("Install project"));
action->setWhatsThis(i18n("<b>Install project</b><p>Runs <b>make install</b> from the project directory.<br>"
@@ -125,7 +125,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new KAction( i18n("&Clean Project"), 0,
- m_widget, TQT_SLOT(slotCleanProject()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotCleanProject()),
actionCollection(), "build_clean_project" );
action->setToolTip(i18n("Clean project"));
action->setWhatsThis(i18n("<b>Clean project</b><p>Runs <b>make clean</b> command from the project directory.<br>"
@@ -133,7 +133,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new KAction( i18n("&Dist-Clean Project"), 0,
- m_widget, TQT_SLOT(slotDistCleanProject()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotDistCleanProject()),
actionCollection(), "build_distclean_project" );
action->setToolTip(i18n("Dist-Clean project"));
action->setWhatsThis(i18n("<b>Dist-Clean project</b><p>Runs <b>make distclean</b> command from the "
@@ -147,47 +147,47 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
action->setWhatsThis(i18n("<b>Execute program</b><p>Executes the currently selected subproject if it is an application or the program specified in project settings, <b>Run Options</b> tab."));
action = new KAction( i18n("&Build Subproject"), "make_kdevelop", Key_F7,
- m_widget, TQT_SLOT(slotBuildTarget()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildTarget()),
actionCollection(), "build_build_target" );
action->setToolTip(i18n("Build subproject"));
action->setWhatsThis(i18n("<b>Build subproject</b><p>Runs <b>make</b> from the current subproject directory. "
- "Current subproject is a subproject selected in <b>QMake manager</b> 'overview' window.<br>"
+ "Current subproject is a subproject selected in <b>TQMake manager</b> 'overview' window.<br>"
"Environment variables and make arguments can be specified "
"in the project settings dialog, <b>Make Options</b> tab."));
action = new KAction( i18n("&Rebuild Subproject"), "rebuild", 0,
- m_widget, TQT_SLOT(slotRebuildTarget()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotRebuildTarget()),
actionCollection(),"build_rebuild_target" );
action->setToolTip(i18n("Rebuild subproject"));
action->setWhatsThis(i18n("<b>Rebuild subproject</b><p>Runs <b>make clean</b> and then <b>make</b> from the current subproject directory. "
- "Current subproject is a subproject selected in <b>QMake manager</b> 'overview' window.<br>"
+ "Current subproject is a subproject selected in <b>TQMake manager</b> 'overview' window.<br>"
"Environment variables and make arguments can be specified "
"in the project settings dialog, <b>Make Options</b> tab."));
action = new KAction( i18n("&Install Subproject"), "install", 0,
- m_widget, TQT_SLOT(slotInstallTarget()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotInstallTarget()),
actionCollection(),"build_install_target" );
action->setToolTip(i18n("Install subproject"));
action->setWhatsThis(i18n("<b>Install subproject</b><p>Runs <b>make install</b> from the current subproject directory. "
- "The current subproject is the subproject selected in the <b>QMake manager</b> 'overview' window.<br>"
+ "The current subproject is the subproject selected in the <b>TQMake manager</b> 'overview' window.<br>"
"Environment variables and make arguments can be specified "
"in the project settings dialog, <b>Make Options</b> tab."));
action = new KAction( i18n("&Clean Subproject"), 0,
- m_widget, TQT_SLOT(slotCleanTarget()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotCleanTarget()),
actionCollection(), "build_clean_target" );
action->setToolTip(i18n("Clean subproject"));
action->setWhatsThis(i18n("<b>Clean subproject</b><p>Runs <b>make clean</b> from the current subproject directory. "
- "The current subproject is the subproject selected in the <b>QMake manager</b> 'overview' window.<br>"
+ "The current subproject is the subproject selected in the <b>TQMake manager</b> 'overview' window.<br>"
"Environment variables and make arguments can be specified "
"in the project settings dialog, <b>Make Options</b> tab."));
action = new KAction( i18n("&Dist-Clean Subproject"), 0,
- m_widget, TQT_SLOT(slotDistCleanTarget()),
+ TQT_TQOBJECT(m_widget), TQT_SLOT(slotDistCleanTarget()),
actionCollection(), "build_distclean_target" );
action->setToolTip(i18n("Dist-Clean subproject"));
action->setWhatsThis(i18n("<b>Dist-Clean subproject</b><p>Runs <b>make distclean</b> from the current"
- " subproject directory. The current subproject is the subproject selected in the <b>QMake manager</b> 'overview' window.<br>"
+ " subproject directory. The current subproject is the subproject selected in the <b>TQMake manager</b> 'overview' window.<br>"
"Environment variables and make arguments can be specified "
"in the project settings dialog, <b>Make Options</b> tab."));
@@ -205,15 +205,15 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
connect( makeFrontend(), TQT_SIGNAL(commandFinished(const TQString&)),
this, TQT_SLOT(slotCommandFinished(const TQString&)) );
- TQString m_defaultQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
+ TQString m_defaultTQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
TQString m_qmakePath = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", "");
TQString qtversion = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/version", "3");
- if( m_defaultQtDir.isEmpty() || !isValidQtDir( m_defaultQtDir ) )
+ if( m_defaultTQtDir.isEmpty() || !isValidTQtDir( m_defaultTQtDir ) )
{
- m_defaultQtDir = findQtDir();
- kdDebug(9024) << "Setting default dir to: " << m_defaultQtDir << endl;
- DomUtil::writeEntry(*projectDom(), "/kdevcppsupport/qt/root", m_defaultQtDir );
+ m_defaultTQtDir = findTQtDir();
+ kdDebug(9024) << "Setting default dir to: " << m_defaultTQtDir << endl;
+ DomUtil::writeEntry(*projectDom(), "/kdevcppsupport/qt/root", m_defaultTQtDir );
}
if( m_qmakePath.isEmpty() || !isExecutable( m_qmakePath ) )
{
@@ -244,10 +244,10 @@ TQString TrollProjectPart::makeEnvironment()
TQString environstr;
DomUtil::PairList::ConstIterator it;
- bool hasQtDir = false;
+ bool hasTQtDir = false;
for (it = envvars.begin(); it != envvars.end(); ++it) {
- if( (*it).first == "QTDIR" )
- hasQtDir = true;
+ if( (*it).first == "TQTDIR" )
+ hasTQtDir = true;
environstr += (*it).first;
environstr += "=";
@@ -255,9 +255,9 @@ TQString TrollProjectPart::makeEnvironment()
environstr += " ";
}
- if( !hasQtDir && !isQt4Project() && !DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "").isEmpty() )
+ if( !hasTQtDir && !isTQt4Project() && !DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "").isEmpty() )
{
- environstr += TQString( "QTDIR=" ) + EnvVarTools::quote( DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "") ) + TQString( " PATH=$QTDIR/bin:$PATH " );
+ environstr += TQString( "TQTDIR=" ) + EnvVarTools::quote( DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "") ) + TQString( " PATH=$TQTDIR/bin:$PATH " );
}
KConfigGroup grp( kapp->config(), "MakeOutputView" );
@@ -276,7 +276,7 @@ void TrollProjectPart::projectConfigWidget(KDialogBase *dlg)
vbox = dlg->addVBoxPage(i18n("Make Options"), i18n("Make Options"), BarIcon( "make", KIcon::SizeMedium ));
MakeOptionsWidget *w4 = new MakeOptionsWidget(*projectDom(), "/kdevtrollproject", vbox);
- vbox = dlg->addVBoxPage(i18n("QMake Manager"), i18n("QMake Manager"), BarIcon( "make", KIcon::SizeMedium ));
+ vbox = dlg->addVBoxPage(i18n("TQMake Manager"), i18n("TQMake Manager"), BarIcon( "make", KIcon::SizeMedium ));
QMakeOptionsWidget *qm = new QMakeOptionsWidget( projectDirectory(), *projectDom(), "/kdevtrollproject", vbox);
@@ -290,32 +290,32 @@ void TrollProjectPart::openProject(const TQString &dirName, const TQString &proj
{
mainWindow()->statusBar()->message( i18n("Loading Project...") );
- TQString defaultQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
- if( !isQt4Project() && ( defaultQtDir.isEmpty() || !isValidQtDir( defaultQtDir ) ) )
+ TQString defaultTQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
+ if( !isTQt4Project() && ( defaultTQtDir.isEmpty() || !isValidTQtDir( defaultTQtDir ) ) )
{
bool doask = true;
while( doask )
{
- KURLRequesterDlg dlg( i18n("Choose Qt3 directory"),
- i18n("Choose the Qt3 directory to use. This directory needs to have an include directory containing tqt.h.")
+ KURLRequesterDlg dlg( i18n("Choose TQt3 directory"),
+ i18n("Choose the TQt3 directory to use. This directory needs to have an include directory containing tqt.h.")
, m_widget, 0);
dlg.urlRequester() ->setMode( KFile::Directory | KFile::LocalOnly );
- dlg.urlRequester() ->setURL( TQString::null );
+ dlg.urlRequester() ->setURL( TQString() );
dlg.urlRequester() ->completionObject() ->setDir( "/" );
if ( dlg.exec() == TQDialog::Accepted && !dlg.urlRequester() ->url().isEmpty() )
{
TQString qtdir = dlg.urlRequester()->url();
- if( !isValidQtDir( qtdir ) )
+ if( !isValidTQtDir( qtdir ) )
{
if( KMessageBox::warningYesNo( m_widget,
- i18n("The directory you gave is not a proper Qt directory, the "
+ i18n("The directory you gave is not a proper TQt directory, the "
"project might not work properly without one.\nPlease make "
"sure you give a directory that contains a bin with the "
- "qmake binary in it and for Qt3 project also contains an "
+ "qmake binary in it and for TQt3 project also contains an "
"include directory with tqt.h in it.\nDo you want to try "
- "setting a Qt directory again?"),
- i18n("Wrong Qt directory given"))
+ "setting a TQt directory again?"),
+ i18n("Wrong TQt directory given"))
== KMessageBox::Yes
)
doask = true;
@@ -323,17 +323,17 @@ void TrollProjectPart::openProject(const TQString &dirName, const TQString &proj
doask = false;
}else
{
- defaultQtDir = qtdir;
+ defaultTQtDir = qtdir;
doask = false;
}
}else
{
if( KMessageBox::warningYesNo( m_widget,
- i18n("You did not specify a Qt directory, and the project might not "
- "work properly without one.\nDo you want to try setting a Qt"
+ i18n("You did not specify a TQt directory, and the project might not "
+ "work properly without one.\nDo you want to try setting a TQt"
" directory again?"),
- i18n("No Qt directory given"))
+ i18n("No TQt directory given"))
== KMessageBox::Yes
)
doask = true;
@@ -348,10 +348,10 @@ void TrollProjectPart::openProject(const TQString &dirName, const TQString &proj
bool doask = true;
while( doask )
{
- KURLRequesterDlg dlg( i18n("Choose QMake executable"),
- i18n("Choose the QMake binary to use. QMake is used to generate Makefiles from the project files."), m_widget, 0);
+ KURLRequesterDlg dlg( i18n("Choose TQMake executable"),
+ i18n("Choose the TQMake binary to use. TQMake is used to generate Makefiles from the project files."), m_widget, 0);
dlg.urlRequester() ->setMode( KFile::Directory | KFile::LocalOnly );
- dlg.urlRequester() ->setURL( TQString::null );
+ dlg.urlRequester() ->setURL( TQString() );
dlg.urlRequester() ->completionObject() ->setDir( "/" );
if ( dlg.exec() == TQDialog::Accepted && !dlg.urlRequester() ->url().isEmpty() )
@@ -363,8 +363,8 @@ void TrollProjectPart::openProject(const TQString &dirName, const TQString &proj
i18n("The binary you gave is not executable, the "
"project might not work properly.\nPlease make "
"sure you give a qmake binary that is executable.\nDo you want to try "
- "setting the QMake binary again?"),
- i18n("Wrong QMake binary given"))
+ "setting the TQMake binary again?"),
+ i18n("Wrong TQMake binary given"))
== KMessageBox::Yes
)
doask = true;
@@ -379,10 +379,10 @@ void TrollProjectPart::openProject(const TQString &dirName, const TQString &proj
}else
{
if( KMessageBox::warningYesNo( m_widget,
- i18n("You did not specify a QMake binary, and the project might not "
- "work properly without one.\nDo you want to try setting a QMake"
+ i18n("You did not specify a TQMake binary, and the project might not "
+ "work properly without one.\nDo you want to try setting a TQMake"
" binary again?"),
- i18n("No QMake binary given"))
+ i18n("No TQMake binary given"))
== KMessageBox::Yes
)
doask = true;
@@ -391,7 +391,7 @@ void TrollProjectPart::openProject(const TQString &dirName, const TQString &proj
}
}
}
- DomUtil::writeEntry( *projectDom(), "/kdevcppsupport/qt/root", defaultQtDir );
+ DomUtil::writeEntry( *projectDom(), "/kdevcppsupport/qt/root", defaultTQtDir );
DomUtil::writeEntry( *projectDom(), "/kdevcppsupport/qt/qmake", qmakePath );
m_projectName = projectName;
@@ -479,8 +479,8 @@ TQString TrollProjectPart::runDirectory() const
}else
{
TQString name = m_widget->getCurrentOutputFilename();
- if( name.findRev("/") != -1 )
- name = name.right( name.length()-name.findRev("/")-1 );
+ if( name.tqfindRev("/") != -1 )
+ name = name.right( name.length()-name.tqfindRev("/")-1 );
cwd = DomUtil::readEntry( dom, "/kdevtrollproject/run/cwd/" + name );
}
if( cwd.isEmpty() )
@@ -490,7 +490,7 @@ TQString TrollProjectPart::runDirectory() const
{
destpath = m_widget->subprojectDirectory() + TQString( TQChar( TQDir::separator() ) ) + destpath;
}
- destpath = destpath.left( destpath.findRev("/") );
+ destpath = destpath.left( destpath.tqfindRev("/") );
cwd = destpath;
}
@@ -535,17 +535,17 @@ TQString TrollProjectPart::mainProgram() const
KMessageBox::error( m_widget, "There's no selected subproject!\n"
"Unable to determine the main program", "No selected subproject found" );
kdDebug ( 9020 ) << k_funcinfo << "Error! : There's no active target! -> Unable to determine the main program in TrollProjectPart::mainProgram()" << endl;
- return TQString::null;
+ return TQString();
}
- if ( m_widget->currentSubproject()->scope->variableValues("TEMPLATE").findIndex("app") == -1 )
+ if ( m_widget->currentSubproject()->scope->variableValues("TEMPLATE").tqfindIndex("app") == -1 )
{
KMessageBox::error( m_widget, "Selected Subproject \""+m_widget->currentSubproject()->scope->projectName()+"\"isn't binary ( " + m_widget->currentSubproject()->scope->variableValues("TEMPLATE").join(" ") + " ) !\n"
"Unable to determine the main program. If you want this\n"
"to be the selected subproject, set a main program under\n"
"Project -> Project Options -> Run Options", "Selected subproject is not a library" );
kdDebug ( 9020 ) << k_funcinfo << "Error! : Active target isn't binary (" << m_widget->currentSubproject()->scope->variableValues("TEMPLATE").join(" ") << ") ! -> Unable to determine the main program in TrollProjectPart::mainProgram()" << endl;
- return TQString::null;
+ return TQString();
}
TQString destpath = m_widget->getCurrentTarget();
@@ -647,10 +647,10 @@ void TrollProjectPart::startMakeCommand(const TQString &dir, const TQString &tar
TQFileInfo fi(dir + "/Makefile");
if (!fi.exists()) {
- int r = KMessageBox::questionYesNo(m_widget, i18n("There is no Makefile in this directory. Run qmake first?"), TQString::null, i18n("Run qmake"), i18n("Do Not Run"));
+ int r = KMessageBox::questionYesNo(m_widget, i18n("There is no Makefile in this directory. Run qmake first?"), TQString(), i18n("Run qmake"), i18n("Do Not Run"));
if (r == KMessageBox::No)
return;
- startQMakeCommand(dir);
+ startTQMakeCommand(dir);
}
TQDomDocument &dom = *projectDom();
@@ -692,7 +692,7 @@ void TrollProjectPart::startMakeCommand(const TQString &dir, const TQString &tar
}
*/
-void TrollProjectPart::startQMakeCommand(const TQString &dir, bool recursive)
+void TrollProjectPart::startTQMakeCommand(const TQString &dir, bool recursive)
{
TQFileInfo fi(dir);
TQString cmdline;
@@ -705,24 +705,24 @@ void TrollProjectPart::startQMakeCommand(const TQString &dir, bool recursive)
cmdline = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", "")+" ";
}
- if(isQt4Project() && recursive)
+ if(isTQt4Project() && recursive)
{
cmdline += " -recursive ";
}
- //TQString cmdline = TQString::fromLatin1( isTMakeProject() ? "tmake " : "qmake " );
+ //TQString cmdline = TQString::tqfromLatin1( isTMakeProject() ? "tmake " : "qmake " );
// cmdline += fi.baseName() + ".pro";
TQDir d(dir);
TQStringList l = d.entryList("*.pro");
- if( l.isEmpty() || ( l.count() && l.findIndex( projectName() + ".pro" ) != -1 ) )
+ if( l.isEmpty() || ( l.count() && l.tqfindIndex( projectName() + ".pro" ) != -1 ) )
cmdline += projectName()+".pro";
- else if( l.isEmpty() || (l.count() && l.findIndex( fi.baseName() + ".pro" ) != -1 ) )
+ else if( l.isEmpty() || (l.count() && l.tqfindIndex( fi.baseName() + ".pro" ) != -1 ) )
cmdline += fi.baseName() + ".pro";
else
cmdline += l[0];
-// cmdline += TQString::fromLatin1( " -o Makefile" );
+// cmdline += TQString::tqfromLatin1( " -o Makefile" );
TQString dircmd = "cd ";
dircmd += KProcess::quote(dir);
@@ -744,7 +744,7 @@ void TrollProjectPart::slotCommandFinished( const TQString& command )
// if( m_buildCommand != command )
// return;
//
-// m_buildCommand = TQString::null;
+// m_buildCommand = TQString();
m_timestamp.clear();
TQStringList fileList = allFiles();
@@ -778,7 +778,7 @@ bool TrollProjectPart::isDirty()
TQString fileName = *it;
++it;
- TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.find( fileName );
+ TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.tqfind( fileName );
TQDateTime t = TQFileInfo( projectDirectory(), fileName ).lastModified();
if( it == m_timestamp.end() || *it != t ){
return true;
@@ -790,37 +790,37 @@ bool TrollProjectPart::isDirty()
KDevProject::Options TrollProjectPart::options( ) const
{
- return UsesQMakeBuildSystem;
+ return UsesTQMakeBuildSystem;
}
-bool TrollProjectPart::isValidQtDir( const TQString& path ) const
+bool TrollProjectPart::isValidTQtDir( const TQString& path ) const
{
TQFileInfo inc( path + TQString( TQChar( TQDir::separator() ) )+
"include"+TQString( TQChar( TQDir::separator() ) )+
"tqt.h" );
- return ( isQt4Project() || ( !isQt4Project() && inc.exists() ) );
+ return ( isTQt4Project() || ( !isTQt4Project() && inc.exists() ) );
}
void TrollProjectPart::buildBinDirs( TQStringList & dirs ) const
{
- if( !isQt4Project() )
+ if( !isTQt4Project() )
{
- TQString m_defaultQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
- if( !m_defaultQtDir.isEmpty() )
- dirs << (m_defaultQtDir + TQString( TQChar( TQDir::separator() ) ) + "bin" );
- dirs << ( ::getenv("QTDIR") + TQString( TQChar( TQDir::separator() ) ) + "bin" );
+ TQString m_defaultTQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "");
+ if( !m_defaultTQtDir.isEmpty() )
+ dirs << (m_defaultTQtDir + TQString( TQChar( TQDir::separator() ) ) + "bin" );
+ dirs << ( ::getenv("TQTDIR") + TQString( TQChar( TQDir::separator() ) ) + "bin" );
}
TQStringList paths = TQStringList::split(":",::getenv("PATH"));
dirs += paths;
TQString binpath = TQDir::rootDirPath() + "bin";
- if( dirs.findIndex( binpath ) != -1 )
+ if( dirs.tqfindIndex( binpath ) != -1 )
dirs << binpath;
binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "bin";
- if( dirs.findIndex( binpath ) != -1 )
+ if( dirs.tqfindIndex( binpath ) != -1 )
dirs << binpath;
binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "local" + TQString( TQChar( TQDir::separator() ) ) + "bin";
- if( dirs.findIndex( binpath ) != -1 )
+ if( dirs.tqfindIndex( binpath ) != -1 )
dirs << binpath;
}
@@ -847,21 +847,21 @@ bool TrollProjectPart::isExecutable( const TQString& path ) const
return( fi.exists() && fi.isExecutable() );
}
-TQString TrollProjectPart::findQtDir()
+TQString TrollProjectPart::findTQtDir()
{
TQStringList qtdirs;
- if( !isQt4Project() )
- qtdirs.push_back( ::getenv("QTDIR") );
- qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) );
- qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString( TQChar( TQDir::separator() ) )+TQString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) );
- qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"share"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) );
+ if( !isTQt4Project() )
+ qtdirs.push_back( ::getenv("TQTDIR") );
+ qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").tqarg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) );
+ qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString( TQChar( TQDir::separator() ) )+TQString("%1").tqarg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) );
+ qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"share"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").tqarg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) );
qtdirs.push_back( TQDir::rootDirPath()+"usr" );
qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt" );
for( TQStringList::Iterator it=qtdirs.begin(); it!=qtdirs.end(); ++it )
{
TQString qtdir = *it;
- if( !qtdir.isEmpty() && isValidQtDir(qtdir) )
+ if( !qtdir.isEmpty() && isValidTQtDir(qtdir) )
{
return qtdir;
}
@@ -874,8 +874,8 @@ TQStringList recursiveProFind( const TQString &currDir, const TQString &baseDir
{
TQStringList fileList;
- if( !currDir.contains( TQString( TQChar ( TQDir::separator() ) ) +".." )
- && !currDir.contains( TQString( TQChar( TQDir::separator() ) )+".") )
+ if( !currDir.tqcontains( TQString( TQChar ( TQDir::separator() ) ) +".." )
+ && !currDir.tqcontains( TQString( TQChar( TQDir::separator() ) )+".") )
{
TQDir dir(currDir);
TQStringList dirList = dir.entryList(TQDir::Dirs );
@@ -909,7 +909,7 @@ TQStringList TrollProjectPart::distFiles() const
return sourceList + files;
}
-bool TrollProjectPart::isQt4Project() const
+bool TrollProjectPart::isTQt4Project() const
{
return ( DomUtil::readIntEntry( *projectDom(), "kdevcppsupport/qt/version", 3 ) == 4 );
}
@@ -926,6 +926,6 @@ void TrollProjectPart::slotBuild()
#include "trollprojectpart.moc"
-//kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on
+//kate: space-indent on; indent-width 4; tab-width 4; tqreplace-tabs on