diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /buildtools/autotools/autoprojectpart.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-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/autotools/autoprojectpart.cpp')
-rw-r--r-- | buildtools/autotools/autoprojectpart.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/buildtools/autotools/autoprojectpart.cpp b/buildtools/autotools/autoprojectpart.cpp index 38604ee0..a2c500a4 100644 --- a/buildtools/autotools/autoprojectpart.cpp +++ b/buildtools/autotools/autoprojectpart.cpp @@ -65,8 +65,8 @@ static const KDevPluginInfo data("kdevautoproject"); K_EXPORT_COMPONENT_FACTORY( libkdevautoproject, AutoProjectFactory( data ) ) -AutoProjectPart::AutoProjectPart(TQObject *parent, const char *name, const TQStringList &args) - : KDevBuildTool(&data, parent, name ? name : "AutoProjectPart") +AutoProjectPart::AutoProjectPart(TQObject *tqparent, const char *name, const TQStringList &args) + : KDevBuildTool(&data, tqparent, name ? name : "AutoProjectPart") , m_lastCompilationFailed(false) { setInstance(AutoProjectFactory::instance()); @@ -407,16 +407,16 @@ TQString AutoProjectPart::mainProgram() const KMessageBox::error( m_widget, i18n("There is no active target.\n" "Unable to determine the main program."), i18n("No active target found") ); kdDebug ( 9020 ) << k_funcinfo << "Error! : There's no active target! -> Unable to determine the main program in AutoProjectPart::mainProgram()" << endl; - return TQString::null; + return TQString(); } if ( titem->primary != "PROGRAMS" ) { KMessageBox::error( m_widget, i18n("Active target \"%1\" is not binary ( %2 ).\n" "Unable to determine the main program. If you want this\n" "to be the active target, set a main program under\n" - "Project -> Project Options -> Run Options").arg(titem->name).arg(titem->primary), i18n("Active target is not a library") ); + "Project -> Project Options -> Run Options").tqarg(titem->name).tqarg(titem->primary), i18n("Active target is not a library") ); kdDebug ( 9020 ) << k_funcinfo << "Error! : Active target isn't binary (" << titem->primary << ") ! -> Unable to determine the main program in AutoProjectPart::mainProgram()" << endl; - return TQString::null; + return TQString(); } TQString relprojectpath = URLUtil::getRelativePath( topsourceDirectory(), projectDirectory() ); @@ -525,7 +525,7 @@ void AutoProjectPart::addFiles ( const TQStringList& fileList ) for ( it = fileList.begin(); it != fileList.end(); ++it ) { - int pos = ( *it ).findRev('/'); + int pos = ( *it ).tqfindRev('/'); if (pos != -1) { directory = ( *it ).left(pos); @@ -597,7 +597,7 @@ TQString AutoProjectPart::currentBuildConfig() const TQDomDocument &dom = *projectDom(); TQString config = DomUtil::readEntry(dom, "/kdevautoproject/general/useconfiguration"); - if (config.isEmpty() || !allBuildConfigs().contains(config)) + if (config.isEmpty() || !allBuildConfigs().tqcontains(config)) config = "default"; return config; @@ -643,20 +643,20 @@ TQString AutoProjectPart::constructMakeCommandLine(const TQString &dir, const TQ { int r = KMessageBox::questionYesNo(m_widget, i18n("%1\nThere is no Makefile in this directory\n" "and no configure script for this project.\n" - "Run automake & friends and configure first?").arg(buildDirectory()), TQString::null, i18n("Run Them"), i18n("Do Not Run")); + "Run automake & friends and configure first?").tqarg(buildDirectory()), TQString(), i18n("Run Them"), i18n("Do Not Run")); if (r == KMessageBox::No) - return TQString::null; + return TQString(); preCommand = makefileCvsCommand(); if (preCommand.isNull()) - return TQString::null; + return TQString(); preCommand += " && "; preCommand += configureCommand() + " && "; } else { - int r = KMessageBox::questionYesNo(m_widget, i18n("%1\nThere is no Makefile in this directory. Run 'configure' first?").arg(dir), TQString::null, i18n("Run configure"), i18n("Do Not Run")); + int r = KMessageBox::questionYesNo(m_widget, i18n("%1\nThere is no Makefile in this directory. Run 'configure' first?").tqarg(dir), TQString(), i18n("Run configure"), i18n("Do Not Run")); if (r == KMessageBox::No) - return TQString::null; + return TQString(); preCommand = configureCommand() + " && "; } } @@ -668,7 +668,7 @@ TQString AutoProjectPart::constructMakeCommandLine(const TQString &dir, const TQ kdDebug(9020) << k_funcinfo << "nice = " << prio<< endl; if (prio != 0) { - nice = TQString("nice -n%1 ").arg(prio); + nice = TQString("nice -n%1 ").tqarg(prio); } if (cmdline.isEmpty()) @@ -732,13 +732,13 @@ bool AutoProjectPart::queueInternalLibDependenciesBuild(TargetItem* titem, TQStr // These are the internal libraries dependency.remove("$(top_builddir)/"); - if( !alreadyScheduledDeps.contains(*l2it) ) + if( !alreadyScheduledDeps.tqcontains(*l2it) ) { alreadyScheduledDeps << *l2it; tdir = buildDirectory(); if (!tdir.endsWith("/") && !tdir.isEmpty()) tdir += "/"; - int pos = dependency.findRev('/'); + int pos = dependency.tqfindRev('/'); if (pos == -1) { tname = dependency; @@ -782,7 +782,7 @@ bool AutoProjectPart::queueInternalLibDependenciesBuild(TargetItem* titem, TQStr tdir = buildDirectory(); if (!tdir.endsWith("/") && !tdir.isEmpty()) tdir += "/"; - int pos = dependency.findRev('/'); + int pos = dependency.tqfindRev('/'); if (pos == -1) { tname = dependency; @@ -792,7 +792,7 @@ bool AutoProjectPart::queueInternalLibDependenciesBuild(TargetItem* titem, TQStr tdir += dependency.left(pos+1); tname = dependency.mid(pos+1); } - KMessageBox::error( 0, i18n("Found a circular dependency in the project, between this target and %1.\nCannot build this project until this is resolved.").arg(tname), i18n("Circular Dependency found") ); + KMessageBox::error( 0, i18n("Found a circular dependency in the project, between this target and %1.\nCannot build this project until this is resolved.").tqarg(tname), i18n("Circular Dependency found") ); return false; } } @@ -812,7 +812,7 @@ void AutoProjectPart::slotBuild() m_needMakefileCvs = false; } - startMakeCommand(buildDirectory(), TQString::fromLatin1("")); + startMakeCommand(buildDirectory(), TQString::tqfromLatin1("")); } @@ -912,28 +912,28 @@ TQString AutoProjectPart::configureCommand() const cmdline += "/configure\""; TQString cc = DomUtil::readEntry(dom, prefix + "ccompilerbinary"); if (!cc.isEmpty()) - cmdline.prepend(TQString("CC=%1 ").arg(cc)); + cmdline.prepend(TQString("CC=%1 ").tqarg(cc)); TQString cflags = DomUtil::readEntry(dom, prefix + "cflags"); if (!cflags.isEmpty()) - cmdline.prepend(TQString("CFLAGS=\"%1\" ").arg(cflags)); + cmdline.prepend(TQString("CFLAGS=\"%1\" ").tqarg(cflags)); TQString cxx = DomUtil::readEntry(dom, prefix + "cxxcompilerbinary"); if (!cxx.isEmpty()) - cmdline.prepend(TQString("CXX=%1 ").arg(cxx)); + cmdline.prepend(TQString("CXX=%1 ").tqarg(cxx)); TQString cxxflags = DomUtil::readEntry(dom, prefix + "cxxflags"); if (!cxxflags.isEmpty()) - cmdline.prepend(TQString("CXXFLAGS=\"%1\" ").arg(cxxflags)); + cmdline.prepend(TQString("CXXFLAGS=\"%1\" ").tqarg(cxxflags)); TQString f77 = DomUtil::readEntry(dom, prefix + "f77compilerbinary"); if (!f77.isEmpty()) - cmdline.prepend(TQString("F77=%1 ").arg(f77)); + cmdline.prepend(TQString("F77=%1 ").tqarg(f77)); TQString fflags = DomUtil::readEntry(dom, prefix + "f77flags"); if (!fflags.isEmpty()) - cmdline.prepend(TQString("FFLAGS=\"%1\" ").arg(fflags)); + cmdline.prepend(TQString("FFLAGS=\"%1\" ").tqarg(fflags)); TQString cppflags = DomUtil::readEntry(dom, prefix + "cppflags"); if (!cppflags.isEmpty()) - cmdline.prepend(TQString("CPPFLAGS=\"%1\" ").arg(cppflags)); + cmdline.prepend(TQString("CPPFLAGS=\"%1\" ").tqarg(cppflags)); TQString ldflags = DomUtil::readEntry(dom, prefix + "ldflags"); if (!ldflags.isEmpty()) - cmdline.prepend(TQString("LDFLAGS=\"%1\" ").arg(ldflags)); + cmdline.prepend(TQString("LDFLAGS=\"%1\" ").tqarg(ldflags)); TQString configargs = DomUtil::readEntry(dom, prefix + "configargs"); if (!configargs.isEmpty()) { @@ -997,7 +997,7 @@ TQString AutoProjectPart::makefileCvsCommand() const TQString nice; kdDebug(9020) << "makefileCvsCommand() nice = " << prio<< endl; if (prio != 0) { - nice = TQString("nice -n%1 ").arg(prio); + nice = TQString("nice -n%1 ").tqarg(prio); } if (TQFile::exists(topsourceDirectory() + "/Makefile.cvs")) @@ -1009,7 +1009,7 @@ TQString AutoProjectPart::makefileCvsCommand() const else { KMessageBox::sorry(m_widget, i18n("There is neither a Makefile.cvs file nor an " "autogen.sh script in the project directory.")); - return TQString::null; + return TQString(); } cmdline.prepend(nice); @@ -1034,7 +1034,7 @@ void AutoProjectPart::slotMakefilecvs() void AutoProjectPart::slotInstall() { - startMakeCommand(buildDirectory(), TQString::fromLatin1("install")); + startMakeCommand(buildDirectory(), TQString::tqfromLatin1("install")); } @@ -1045,25 +1045,25 @@ void AutoProjectPart::slotInstallWithKdesu() slotBuild(); // After that issue "make install" with the root user - startMakeCommand(buildDirectory(), TQString::fromLatin1("install"), true); + startMakeCommand(buildDirectory(), TQString::tqfromLatin1("install"), true); } void AutoProjectPart::slotClean() { - startMakeCommand(buildDirectory(), TQString::fromLatin1("clean")); + startMakeCommand(buildDirectory(), TQString::tqfromLatin1("clean")); } void AutoProjectPart::slotDistClean() { - startMakeCommand(buildDirectory(), TQString::fromLatin1("distclean")); + startMakeCommand(buildDirectory(), TQString::tqfromLatin1("distclean")); } void AutoProjectPart::slotMakeMessages() { - startMakeCommand(buildDirectory(), TQString::fromLatin1("package-messages")); + startMakeCommand(buildDirectory(), TQString::tqfromLatin1("package-messages")); } @@ -1103,7 +1103,7 @@ void AutoProjectPart::slotExecute() if( DomUtil::readBoolEntry(dom, "/kdevautoproject/run/autokdesu", false) ){ //slotInstallWithKdesu assumes that it hasn't just been build... kdDebug(9020) << "slotExecute: before startMakeCommand" << endl; - _auto ? slotInstallWithKdesu() : startMakeCommand(buildDirectory(), TQString::fromLatin1("install"), true); + _auto ? slotInstallWithKdesu() : startMakeCommand(buildDirectory(), TQString::tqfromLatin1("install"), true); } else{ kdDebug(9020) << "slotExecute: before slotInstall" << endl; @@ -1171,7 +1171,7 @@ void AutoProjectPart::executeTarget(const TQDir& dir, const TargetItem* titem) KMessageBox::error( m_widget, i18n("Active target \"%1\" is not binary ( %2 ).\n" "Unable to determine the main program. If you want this\n" "to be the active target, set a main program under\n" - "Project -> Project Options -> Run Options").arg(titem->name).arg(titem->primary), i18n("Active target is not a library") ); + "Project -> Project Options -> Run Options").tqarg(titem->name).tqarg(titem->primary), i18n("Active target is not a library") ); kdDebug ( 9020 ) << k_funcinfo << "Error! : Active target isn't binary (" << titem->primary << ") ! -> Unable to determine the main program in AutoProjectPart::mainProgram()" << endl; program += titem->name; }else @@ -1282,7 +1282,7 @@ void AutoProjectPart::slotBuildConfigAboutToShow() { TQStringList l = allBuildConfigs(); buildConfigAction->setItems(l); - buildConfigAction->setCurrentItem(l.findIndex(currentBuildConfig())); + buildConfigAction->setCurrentItem(l.tqfindIndex(currentBuildConfig())); } void AutoProjectPart::restorePartialProjectSession ( const TQDomElement* el ) @@ -1316,7 +1316,7 @@ void AutoProjectPart::slotCommandFinished( const TQString& command ) if( m_buildCommand != command ) return; - m_buildCommand = TQString::null; + m_buildCommand = TQString(); m_timestamp.clear(); TQStringList fileList = allFiles(); @@ -1356,7 +1356,7 @@ bool AutoProjectPart::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; @@ -1386,7 +1386,7 @@ TQStringList recursiveATFind( const TQString &currDir, const TQString &baseDir ) kdDebug(9020) << "Dir " << currDir << endl; TQStringList fileList; - if( !currDir.contains( "/..") && !currDir.contains("/.") ) + if( !currDir.tqcontains( "/..") && !currDir.tqcontains("/.") ) { TQDir dir(currDir); TQStringList dirList = dir.entryList(TQDir::Dirs ); |