diff options
Diffstat (limited to 'experimental/tqtinterface/qt4/qmake/generators/win32/mingw_make.cpp')
-rw-r--r-- | experimental/tqtinterface/qt4/qmake/generators/win32/mingw_make.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/experimental/tqtinterface/qt4/qmake/generators/win32/mingw_make.cpp b/experimental/tqtinterface/qt4/qmake/generators/win32/mingw_make.cpp index c4f87365e..4053e5dc0 100644 --- a/experimental/tqtinterface/qt4/qmake/generators/win32/mingw_make.cpp +++ b/experimental/tqtinterface/qt4/qmake/generators/win32/mingw_make.cpp @@ -50,7 +50,7 @@ MingwMakefileGenerator::MingwMakefileGenerator(TQMakeProject *p) : Win32Makefile } bool -MingwMakefileGenerator::tqfindLibraries() // todo - pascal +MingwMakefileGenerator::findLibraries() // todo - pascal { return TRUE; } @@ -119,8 +119,8 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t) TQStringList &incs = project->variables()["INCLUDEPATH"]; for(TQStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) { TQString inc = (*incit); - inc.tqreplace(TQRegExp("\\\\$"), ""); - inc.tqreplace(TQRegExp("\""), ""); + inc.replace(TQRegExp("\\\\$"), ""); + inc.replace(TQRegExp("\""), ""); t << " -I" << "\"" << inc << "\""; } t << " -I" << "\"" << specdir() << "\"" << endl; @@ -130,7 +130,7 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t) t << "LIBS = "; if ( !project->variables()["TQMAKE_LIBDIR"].isEmpty() ) t << varGlue("TQMAKE_LIBDIR","-L\"","\" -L\"","\"") << " "; - t << var("TQMAKE_LIBS").tqreplace(TQRegExp("(\\slib|^lib)")," -l") << endl; + t << var("TQMAKE_LIBS").replace(TQRegExp("(\\slib|^lib)")," -l") << endl; } else { t << "LIB = " << var("TQMAKE_LIB") << endl; @@ -160,11 +160,11 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t) t << "####### Output directory" << endl << endl; if (! project->variables()["OBJECTS_DIR"].isEmpty()) - t << "OBJECTS_DIR = " << var("OBJECTS_DIR").tqreplace(TQRegExp("\\\\$"),"") << endl; + t << "OBJECTS_DIR = " << var("OBJECTS_DIR").replace(TQRegExp("\\\\$"),"") << endl; else t << "OBJECTS_DIR = . " << endl; if (! project->variables()["TQMOC_DIR"].isEmpty()) - t << "TQMOC_DIR = " << var("TQMOC_DIR").tqreplace(TQRegExp("\\\\$"),"") << endl; + t << "TQMOC_DIR = " << var("TQMOC_DIR").replace(TQRegExp("\\\\$"),"") << endl; else t << "TQMOC_DIR = . " << endl; t << endl; @@ -264,9 +264,9 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t) if(!project->variables()["RC_FILE"].isEmpty()) { t << var("RES_FILE") << ": " << var("RC_FILE") << "\n\t" - << var("TQMAKE_RC") << " -i " << var("RC_FILE") << " -o " << var("RC_FILE").tqreplace(TQRegExp("\\.rc"),".o") << " --include-dir=" << TQFileInfo(var("RC_FILE")).dirPath() << endl << endl; + << var("TQMAKE_RC") << " -i " << var("RC_FILE") << " -o " << var("RC_FILE").replace(TQRegExp("\\.rc"),".o") << " --include-dir=" << TQFileInfo(var("RC_FILE")).dirPath() << endl << endl; } - project->variables()["RES_FILE"].first().tqreplace(TQRegExp("\\.rc"),".o"); + project->variables()["RES_FILE"].first().replace(TQRegExp("\\.rc"),".o"); t << "tqmocables: $(SRCTQMOC)" << endl << endl; @@ -283,9 +283,9 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t) << var("PROJECT") << ".pro $(SOURCES) $(HEADERS) $(DIST) $(FORMS)" << endl << endl; t << "clean:" - << varGlue("OBJECTS","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","").tqreplace(TQRegExp("\\.obj"),".o") + << varGlue("OBJECTS","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","").replace(TQRegExp("\\.obj"),".o") << varGlue("SRCTQMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","") - << varGlue("OBJTQMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","").tqreplace(TQRegExp("\\.obj"),".o") + << varGlue("OBJTQMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","").replace(TQRegExp("\\.obj"),".o") << varGlue("UICDECLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","") << varGlue("UICIMPLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","") << "\n\t-$(DEL_FILE) $(TARGET)" @@ -335,17 +335,17 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t) TQFileInfo fi(Option::fixPathToLocalOS((*input))); TQString in = Option::fixPathToTargetOS((*input), FALSE), out = tmp_out, cmd = tmp_cmd, deps; - out.tqreplace("${TQMAKE_FILE_BASE}", fi.baseName()); - out.tqreplace("${TQMAKE_FILE_NAME}", fi.filePath()); - cmd.tqreplace("${TQMAKE_FILE_BASE}", fi.baseName()); - cmd.tqreplace("${TQMAKE_FILE_OUT}", out); - cmd.tqreplace("${TQMAKE_FILE_NAME}", fi.filePath()); + out.replace("${TQMAKE_FILE_BASE}", fi.baseName()); + out.replace("${TQMAKE_FILE_NAME}", fi.filePath()); + cmd.replace("${TQMAKE_FILE_BASE}", fi.baseName()); + cmd.replace("${TQMAKE_FILE_OUT}", out); + cmd.replace("${TQMAKE_FILE_NAME}", fi.filePath()); for(TQStringList::Iterator it3 = vars.begin(); it3 != vars.end(); ++it3) - cmd.tqreplace("$(" + (*it3) + ")", "$(TQMAKE_COMP_" + (*it3)+")"); + cmd.replace("$(" + (*it3) + ")", "$(TQMAKE_COMP_" + (*it3)+")"); if(!tmp_dep.isEmpty()) { char buff[256]; TQString dep_cmd = tmp_dep; - dep_cmd.tqreplace("${TQMAKE_FILE_NAME}", fi.filePath()); + dep_cmd.replace("${TQMAKE_FILE_NAME}", fi.filePath()); if(FILE *proc = TQT_POPEN(dep_cmd.latin1(), "r")) { while(!feof(proc)) { int read_in = int(fread(buff, 1, 255, proc)); @@ -410,7 +410,7 @@ MingwMakefileGenerator::init() project->variables()["DEFINES"].append("TQT_DLL"); if (project->isActiveConfig("qt_dll")) - if (configs.tqfindIndex("qt") == -1) + if (configs.findIndex("qt") == -1) configs.append("qt"); if ( project->isActiveConfig("qt") ) { @@ -419,9 +419,9 @@ MingwMakefileGenerator::init() if(project->isActiveConfig("qt")) 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() ) @@ -457,7 +457,7 @@ MingwMakefileGenerator::init() if ( project->isActiveConfig("debug") ) { if ( project->isActiveConfig("thread") ) { // use the DLL RT even here - if ( project->variables()["DEFINES"].tqcontains("TQT_DLL") ) { + if ( project->variables()["DEFINES"].contains("TQT_DLL") ) { project->variables()["TQMAKE_CFLAGS"] += project->variables()["TQMAKE_CFLAGS_MT_DLLDBG"]; project->variables()["TQMAKE_CXXFLAGS"] += project->variables()["TQMAKE_CXXFLAGS_MT_DLLDBG"]; } else { @@ -470,7 +470,7 @@ MingwMakefileGenerator::init() project->variables()["TQMAKE_LFLAGS"] += project->variables()["TQMAKE_LFLAGS_DEBUG"]; } else { if ( project->isActiveConfig("thread") ) { - if ( project->variables()["DEFINES"].tqcontains("TQT_DLL") ) { + if ( project->variables()["DEFINES"].contains("TQT_DLL") ) { project->variables()["TQMAKE_CFLAGS"] += project->variables()["TQMAKE_CFLAGS_MT_DLL"]; project->variables()["TQMAKE_CXXFLAGS"] += project->variables()["TQMAKE_CXXFLAGS_MT_DLL"]; } else { @@ -507,16 +507,16 @@ MingwMakefileGenerator::init() 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) { TQString ver; ver.sprintf("-lqt%s" TQTDLL_POSTFIX "%d", (project->isActiveConfig("thread") ? "-mt" : ""), hver); TQStringList &libs = project->variables()["TQMAKE_LIBS"]; -// @@@HGTODO maybe we must change the tqreplace regexp if we understand what's going on +// @@@HGTODO maybe we must change the replace regexp if we understand what's going on for(TQStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) - (*libit).tqreplace(TQRegExp("-lqt(-mt)?"), ver); + (*libit).replace(TQRegExp("-lqt(-mt)?"), ver); } } if ( project->isActiveConfig( "activeqt" ) ) { @@ -641,10 +641,10 @@ MingwMakefileGenerator::init() #if 0 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 ); } #endif @@ -656,7 +656,7 @@ MingwMakefileGenerator::init() exit(666); } project->variables()["RES_FILE"] = project->variables()["RC_FILE"]; - project->variables()["RES_FILE"].first().tqreplace(".rc",".o"); + project->variables()["RES_FILE"].first().replace(".rc",".o"); project->variables()["POST_TARGETDEPS"] += project->variables()["RES_FILE"]; project->variables()["CLEAN_FILES"] += project->variables()["RES_FILE"]; } @@ -688,9 +688,9 @@ MingwMakefileGenerator::init() TQFileInfo fi(Option::fixPathToLocalOS((*input))); TQString in = Option::fixPathToTargetOS((*input), FALSE), out = tmp_out; - out.tqreplace("${TQMAKE_FILE_BASE}", fi.baseName()); - out.tqreplace("${TQMAKE_FILE_NAME}", fi.filePath()); - if(project->variables()[(*it) + ".CONFIG"].tqfindIndex("no_link") == -1) + out.replace("${TQMAKE_FILE_BASE}", fi.baseName()); + out.replace("${TQMAKE_FILE_NAME}", fi.filePath()); + if(project->variables()[(*it) + ".CONFIG"].findIndex("no_link") == -1) project->variables()["OBJCOMP"] += out; } } @@ -709,8 +709,8 @@ MingwMakefileGenerator::writeSubDirs(TQTextStream &t) while ( -1 != (pos = rx.search( qs, pos))) { TQString qsMatch = rx.cap(2); - qsMatch.tqreplace("\n\t"," && \\\n\t"); - qs.tqreplace(pos+rx.cap(1).length(), rx.cap(2).length(), qsMatch ); + qsMatch.replace("\n\t"," && \\\n\t"); + qs.replace(pos+rx.cap(1).length(), rx.cap(2).length(), qsMatch ); pos += (rx.cap(1).length()+qsMatch.length()); } t << qs ; |