diff options
Diffstat (limited to 'experimental/tqtinterface/qt4/qmake/generators/win32/msvc_vcproj.cpp')
-rw-r--r-- | experimental/tqtinterface/qt4/qmake/generators/win32/msvc_vcproj.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/experimental/tqtinterface/qt4/qmake/generators/win32/msvc_vcproj.cpp b/experimental/tqtinterface/qt4/qmake/generators/win32/msvc_vcproj.cpp index 5e8018850..f646962ea 100644 --- a/experimental/tqtinterface/qt4/qmake/generators/win32/msvc_vcproj.cpp +++ b/experimental/tqtinterface/qt4/qmake/generators/win32/msvc_vcproj.cpp @@ -109,7 +109,7 @@ DotNET which_dotnet_version() continue; TQStringList::iterator it; for(it = pathlist.begin(); it != pathlist.end(); ++it) { - if((*it).tqcontains(productPath)) { + if((*it).contains(productPath)) { ++installed; current_version = dotNetCombo[i].version; warnPath += TQString("%1 in path").arg(dotNetCombo[i].versionStr); @@ -142,7 +142,7 @@ const char* _slnHeader80 = "Microsoft Visual Studio Solution File, Format // The following UUID _may_ change for later servicepacks... // If so we need to search through the registry at // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects - // to tqfind the subkey that tqcontains a "PossibleProjectExtension" + // to find the subkey that contains a "PossibleProjectExtension" // containing "vcproj"... // Use the hardcoded value for now so projects generated on other // platforms are actually usable. @@ -233,7 +233,7 @@ TQUuid VcprojGenerator::getProjectUUID(const TQString &filename) if (uuid.isNull() || !validUUID) { uuid = TQUuid::createUuid(); fprintf(stderr, - "qmake couldn't create a GUID based on filepath, and we couldn't\ntqfind a valid GUID in the .pro file (Consider adding\n'GUID = %s' to the .pro file)\n", + "qmake couldn't create a GUID based on filepath, and we couldn't\nfind a valid GUID in the .pro file (Consider adding\n'GUID = %s' to the .pro file)\n", uuid.toString().upper().latin1()); } @@ -519,7 +519,7 @@ void VcprojGenerator::init() precompObj = origTarget + Option::obj_ext; precompPch = origTarget + ".pch"; // Add PRECOMPILED_HEADER to HEADERS - if (!project->variables()["HEADERS"].tqcontains(precompH)) + if (!project->variables()["HEADERS"].contains(precompH)) project->variables()["HEADERS"] += precompH; // Return to variable pool project->variables()["PRECOMPILED_OBJECT"] = precompObj; @@ -645,10 +645,10 @@ void VcprojGenerator::initConfiguration() RConf.linker.parseOptions(project->variables()["TQMAKE_LFLAGS_RELEASE"]); RConf.compiler.parseOptions(project->variables()["TQMAKE_CFLAGS_RELEASE"]); RConf.compiler.parseOptions(project->variables()["TQMAKE_CXXFLAGS_RELEASE"]); - if (!project->variables()["TQMAKE_CXXFLAGS_RELEASE"].tqcontains("Gm") - && project->variables()["TQMAKE_CXXFLAGS_DEBUG"].tqcontains("Gm")) + if (!project->variables()["TQMAKE_CXXFLAGS_RELEASE"].contains("Gm") + && project->variables()["TQMAKE_CXXFLAGS_DEBUG"].contains("Gm")) RConf.compiler.parseOption("-Gm-"); - if (RConf.compiler.PreprocessorDefinitions.tqfindIndex("TQT_NO_DEBUG") == -1) + if (RConf.compiler.PreprocessorDefinitions.findIndex("TQT_NO_DEBUG") == -1) RConf.compiler.PreprocessorDefinitions += "TQT_NO_DEBUG"; } else { DConf.IntermediateDirectory = @@ -733,7 +733,7 @@ void VcprojGenerator::initCompilerTool() for(it=RConf.compiler.PreprocessorDefinitions.begin(); it!=RConf.compiler.PreprocessorDefinitions.end(); ++it) - (*it).tqreplace('\"', """); + (*it).replace('\"', """); RConf.compiler.parseOptions( project->variables()["MSVCPROJ_INCPATH"] ); } @@ -741,7 +741,7 @@ void VcprojGenerator::initCompilerTool() void VcprojGenerator::initLibrarianTool() { VCConfiguration &RConf = vcProject.Configuration[0]; - RConf.librarian.OutputFile = project->first( "DESTDIR" ).tqreplace("&", "&"); + RConf.librarian.OutputFile = project->first( "DESTDIR" ).replace("&", "&"); if( RConf.librarian.OutputFile.isEmpty() ) RConf.librarian.OutputFile = ".\\"; @@ -813,8 +813,8 @@ void VcprojGenerator::initPostBuildEventTools() if ( !project->variables()["TQMAKE_POST_LINK"].isEmpty() ) { RConf.postBuild.Description = var("TQMAKE_POST_LINK"); RConf.postBuild.CommandLine = var("TQMAKE_POST_LINK"); - RConf.postBuild.Description.tqreplace(" && ", " && "); - RConf.postBuild.CommandLine.tqreplace(" && ", " && "); + RConf.postBuild.Description.replace(" && ", " && "); + RConf.postBuild.CommandLine.replace(" && ", " && "); } if ( !project->variables()["MSVCPROJ_COPY_DLL"].isEmpty() ) { if ( !RConf.postBuild.CommandLine.isEmpty() ) @@ -838,7 +838,7 @@ void VcprojGenerator::initPostBuildEventTools() idc + " "$(TargetPath)" -idl " + objdir + name + ".idl -version 1.0 && " + // call midl to create implementations of the .idl file project->first( "TQMAKE_IDL" ) + " /nologo " + objdir + name + ".idl /tlb " + objdir + name + ".tlb && " + - // call idc to tqreplace tlb... + // call idc to replace tlb... idc + " "$(TargetPath)" /tlb " + objdir + name + ".tlb && " + // register server idc + " "$(TargetPath)" /regserver"; @@ -848,7 +848,7 @@ void VcprojGenerator::initPostBuildEventTools() ""$(TargetPath)" -dumpidl " + objdir + name + ".idl -version 1.0 && " + // call midl to create implementations of the .idl file project->first( "TQMAKE_IDL" ) + " /nologo " + objdir + name + ".idl /tlb " + objdir + name + ".tlb && " + - // call idc to tqreplace tlb... + // call idc to replace tlb... idc + " "$(TargetPath)" /tlb " + objdir + name + ".tlb && " + // call app to register ""$(TargetPath)" -regserver"; @@ -867,8 +867,8 @@ void VcprojGenerator::initPreLinkEventTools() inline bool XLessThanY( TQString &x, TQString &y, bool flat_mode ) { if ( flat_mode ) { - TQString subX = x.mid( x.tqfindRev('\\')+1 ); - TQString subY = y.mid( y.tqfindRev('\\')+1 ); + TQString subX = x.mid( x.findRev('\\')+1 ); + TQString subY = y.mid( y.findRev('\\')+1 ); return TQString::compare(subX, subY) < 0; } @@ -877,8 +877,8 @@ inline bool XLessThanY( TQString &x, TQString &y, bool flat_mode ) int xSlashPos; int ySlashPos; for (;;) { - xSlashPos = x.tqfind('\\', xPos); - ySlashPos = y.tqfind('\\', yPos); + xSlashPos = x.find('\\', xPos); + ySlashPos = y.find('\\', yPos); if (xSlashPos == -1 && ySlashPos != -1) { return FALSE; @@ -954,7 +954,7 @@ void VcprojGenerator::initHeaderFiles() vcProject.HeaderFiles.Filter = "h;hpp;hxx;hm;inl"; vcProject.HeaderFiles.Files += project->variables()["HEADERS"]; if (usePCH) { // Generated PCH cpp file - if (!vcProject.HeaderFiles.Files.tqcontains(precompH)) + if (!vcProject.HeaderFiles.Files.contains(precompH)) vcProject.HeaderFiles.Files += precompH; } nonflatDir_BubbleSort( vcProject.HeaderFiles.Files, @@ -1106,7 +1106,7 @@ void VcprojGenerator::initOld() project->variables()["DEFINES"].append( "TQT_DLL" ); if ( project->isActiveConfig( "qt_dll" ) && - configs.tqfindIndex("qt") == -1 ) + configs.findIndex("qt") == -1 ) configs.append("qt"); if ( project->isActiveConfig( "qt" ) ) { @@ -1114,9 +1114,9 @@ void VcprojGenerator::initOld() project->variables()["CONFIG"].append( "dll" ); project->variables()["DEFINES"].append( "TQT_PLUGIN" ); } - if ( ( project->variables()["DEFINES"].tqfindIndex( "TQT_NODLL" ) == -1 ) && - (( project->variables()["DEFINES"].tqfindIndex( "TQT_MAKEDLL" ) != -1 || - project->variables()["DEFINES"].tqfindIndex( "TQT_DLL" ) != -1 ) || + if ( ( project->variables()["DEFINES"].findIndex( "TQT_NODLL" ) == -1 ) && + (( project->variables()["DEFINES"].findIndex( "TQT_MAKEDLL" ) != -1 || + project->variables()["DEFINES"].findIndex( "TQT_DLL" ) != -1 ) || ( getenv( "TQT_DLL" ) && !getenv( "TQT_NODLL" ))) ) { project->variables()["TQMAKE_TQT_DLL"].append( "1" ); if ( is_qt && !project->variables()["TQMAKE_LIB_FLAG"].isEmpty() ) @@ -1140,10 +1140,10 @@ void VcprojGenerator::initOld() // Decode version, and add it to $$MSVCPROJ_VERSION -------------- if ( !project->variables()["VERSION"].isEmpty() ) { TQString version = project->variables()["VERSION"][0]; - int firstDot = version.tqfind( "." ); + int firstDot = version.find( "." ); TQString major = version.left( firstDot ); TQString minor = version.right( version.length() - firstDot - 1 ); - minor.tqreplace( TQRegExp( "\\." ), "" ); + minor.replace( TQRegExp( "\\." ), "" ); project->variables()["MSVCPROJ_VERSION"].append( "/VERSION:" + major + "." + minor ); } @@ -1164,9 +1164,9 @@ void VcprojGenerator::initOld() else project->variables()["TQMAKE_LIBS"] += project->variables()["TQMAKE_LIBS_QT"]; if ( !project->variables()["TQMAKE_TQT_DLL"].isEmpty() ) { - int hver = tqfindHighestVersion(project->first("TQMAKE_LIBDIR_QT"), "qt"); + int hver = findHighestVersion(project->first("TQMAKE_LIBDIR_QT"), "qt"); if( hver==-1 ) { - hver = tqfindHighestVersion( project->first("TQMAKE_LIBDIR_QT"), "qt-mt" ); + hver = findHighestVersion( project->first("TQMAKE_LIBDIR_QT"), "qt-mt" ); } if(hver != -1) { @@ -1174,7 +1174,7 @@ void VcprojGenerator::initOld() ver.sprintf("qt%s" TQTDLL_POSTFIX "%d.lib", (project->isActiveConfig("thread") ? "-mt" : ""), hver); TQStringList &libs = project->variables()["TQMAKE_LIBS"]; for(TQStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) - (*libit).tqreplace(TQRegExp("qt(-mt)?\\.lib"), ver); + (*libit).replace(TQRegExp("qt(-mt)?\\.lib"), ver); } } if ( project->isActiveConfig( "activeqt" ) ) { @@ -1210,7 +1210,7 @@ void VcprojGenerator::initOld() if ( project->isActiveConfig("thread") ) { if(project->isActiveConfig("qt")) project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("TQT_THREAD_SUPPORT" ); - if ( !project->variables()["DEFINES"].tqcontains("TQT_DLL") && is_qt + if ( !project->variables()["DEFINES"].contains("TQT_DLL") && is_qt && project->first("TARGET") != "qtmain" ) project->variables()["TQMAKE_LFLAGS"].append("/NODEFAULTLIB:libc"); } @@ -1227,7 +1227,7 @@ void VcprojGenerator::initOld() if ( project->isActiveConfig("dll") ) { if ( !project->variables()["TQMAKE_LIB_FLAG"].isEmpty() ) { TQString ver_xyz(project->first("VERSION")); - ver_xyz.tqreplace(TQRegExp("\\."), ""); + ver_xyz.replace(TQRegExp("\\."), ""); project->variables()["TARGET_EXT"].append(ver_xyz + ".dll"); } else { project->variables()["TARGET_EXT"].append(".dll"); @@ -1258,10 +1258,10 @@ void VcprojGenerator::initOld() // /VERSION:x.yz ------------------------------------------------- if ( !project->variables()["VERSION"].isEmpty() ) { TQString version = project->variables()["VERSION"][0]; - int firstDot = version.tqfind( "." ); + int firstDot = version.find( "." ); TQString major = version.left( firstDot ); TQString minor = version.right( version.length() - firstDot - 1 ); - minor.tqreplace( ".", "" ); + minor.replace( ".", "" ); project->variables()["TQMAKE_LFLAGS"].append( "/VERSION:" + major + "." + minor ); } @@ -1270,7 +1270,7 @@ void VcprojGenerator::initOld() TQStringList &libList = project->variables()["TQMAKE_LIBS"]; for( it = libList.begin(); it != libList.end(); ) { TQString s = *it; - s.tqreplace("&", "&"); + s.replace("&", "&"); if( s.startsWith( "-l" ) ) { it = libList.remove( it ); it = libList.insert( it, s.mid( 2 ) + ".lib" ); @@ -1313,15 +1313,15 @@ void VcprojGenerator::initOld() if ( msvcproj_project.isEmpty() ) msvcproj_project = Option::output.name(); - msvcproj_project = msvcproj_project.right( msvcproj_project.length() - msvcproj_project.tqfindRev( "\\" ) - 1 ); - msvcproj_project = msvcproj_project.left( msvcproj_project.tqfindRev( "." ) ); - msvcproj_project.tqreplace(TQRegExp("-"), ""); + msvcproj_project = msvcproj_project.right( msvcproj_project.length() - msvcproj_project.findRev( "\\" ) - 1 ); + msvcproj_project = msvcproj_project.left( msvcproj_project.findRev( "." ) ); + msvcproj_project.replace(TQRegExp("-"), ""); project->variables()["MSVCPROJ_PROJECT"].append(msvcproj_project); TQStringList &proj = project->variables()["MSVCPROJ_PROJECT"]; for(it = proj.begin(); it != proj.end(); ++it) - (*it).tqreplace(TQRegExp("\\.[a-zA-Z0-9_]*$"), ""); + (*it).replace(TQRegExp("\\.[a-zA-Z0-9_]*$"), ""); // SUBSYSTEM ----------------------------------------------------- if ( !project->variables()["TQMAKE_APP_FLAG"].isEmpty() ) { @@ -1353,7 +1353,7 @@ void VcprojGenerator::initOld() TQStringList strl = project->variables()["TQMAKE_LIBDIR"]; TQStringList::iterator stri; for ( stri = strl.begin(); stri != strl.end(); ++stri ) { - (*stri).tqreplace("&", "&"); + (*stri).replace("&", "&"); if ( !(*stri).startsWith("/LIBPATH:") ) (*stri).prepend( "/LIBPATH:" ); } @@ -1366,8 +1366,8 @@ void VcprojGenerator::initOld() TQStringList &incs = project->variables()["INCLUDEPATH"]; for(TQStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) { TQString inc = (*incit); - inc.tqreplace("&", "&"); - inc.tqreplace(TQRegExp("\""), ""); + inc.replace("&", "&"); + inc.replace(TQRegExp("\""), ""); project->variables()["MSVCPROJ_INCPATH"].append("/I" + inc ); } project->variables()["MSVCPROJ_INCPATH"].append("/I" + specdir()); @@ -1377,7 +1377,7 @@ void VcprojGenerator::initOld() Option::fixPathToTargetOS(project->first("TARGET")); dest = project->first("TARGET") + project->first( "TARGET_EXT" ); if ( project->first("TARGET").startsWith("$(TQTDIR)") ) - dest.tqreplace( TQRegExp("\\$\\(TQTDIR\\)"), getenv("TQTDIR") ); + dest.replace( TQRegExp("\\$\\(TQTDIR\\)"), getenv("TQTDIR") ); project->variables()["MSVCPROJ_TARGET"] = dest; // DLL COPY ------------------------------------------------------ @@ -1491,20 +1491,20 @@ bool VcprojGenerator::openOutput(TQFile &file) const TQString VcprojGenerator::fixFilename(TQString ofile) const { - int slashtqfind = ofile.tqfindRev('\\'); - if (slashtqfind == -1) { - ofile = ofile.tqreplace('-', '_'); + int slashfind = ofile.findRev('\\'); + if (slashfind == -1) { + ofile = ofile.replace('-', '_'); } else { - int hypentqfind = ofile.tqfind('-', slashtqfind); - while (hypentqfind != -1 && slashtqfind < hypentqfind) { - ofile = ofile.tqreplace(hypentqfind, 1, '_'); - hypentqfind = ofile.tqfind('-', hypentqfind + 1); + int hypenfind = ofile.find('-', slashfind); + while (hypenfind != -1 && slashfind < hypenfind) { + ofile = ofile.replace(hypenfind, 1, '_'); + hypenfind = ofile.find('-', hypenfind + 1); } } return ofile; } -TQString VcprojGenerator::tqfindTemplate(TQString file) +TQString VcprojGenerator::findTemplate(TQString file) { TQString ret; if(!TQFile::exists((ret = file)) && @@ -1522,7 +1522,7 @@ void VcprojGenerator::processPrlVariable(const TQString &var, const TQStringList if(var == "TQMAKE_PRL_DEFINES") { TQStringList &out = project->variables()["MSVCPROJ_DEFINES"]; for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { - if(out.tqfindIndex((*it)) == -1) + if(out.findIndex((*it)) == -1) out.append((" /D " + *it )); } } else { |