summaryrefslogtreecommitdiffstats
path: root/parts/doxygen/config.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 /parts/doxygen/config.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 'parts/doxygen/config.cpp')
-rw-r--r--parts/doxygen/config.cpp190
1 files changed, 95 insertions, 95 deletions
diff --git a/parts/doxygen/config.cpp b/parts/doxygen/config.cpp
index a36cf682..de582013 100644
--- a/parts/doxygen/config.cpp
+++ b/parts/doxygen/config.cpp
@@ -547,12 +547,12 @@ char *yytext;
#include <ctype.h>
#include <stdarg.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qptrstack.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqptrstack.h>
#include "config.h"
#include "version.h"
@@ -593,14 +593,14 @@ void config_warn(const char *fmt, ...)
/* -----------------------------------------------------------------
*/
-QCString ConfigOption::convertToComment(const QCString &s)
+TQCString ConfigOption::convertToComment(const TQCString &s)
{
- QCString result;
+ TQCString result;
if (s.isEmpty()) return result;
else
{
result+="# ";
- QCString tmp=s.stripWhiteSpace();
+ TQCString tmp=s.stripWhiteSpace();
char *p=tmp.data();
char c;
while ((c=*p++))
@@ -613,17 +613,17 @@ QCString ConfigOption::convertToComment(const QCString &s)
return result;
}
-void ConfigOption::writeBoolValue(QTextStream &t,bool v)
+void ConfigOption::writeBoolValue(TQTextStream &t,bool v)
{
if (v) t << "YES"; else t << "NO";
}
-void ConfigOption::writeIntValue(QTextStream &t,int i)
+void ConfigOption::writeIntValue(TQTextStream &t,int i)
{
t << i;
}
-void ConfigOption::writeStringValue(QTextStream &t,QCString &s)
+void ConfigOption::writeStringValue(TQTextStream &t,TQCString &s)
{
const char *p=s.data();
char c;
@@ -650,13 +650,13 @@ void ConfigOption::writeStringValue(QTextStream &t,QCString &s)
}
}
-void ConfigOption::writeStringList(QTextStream &t,QStrList &l)
+void ConfigOption::writeStringList(TQTextStream &t,TQStrList &l)
{
const char *p = l.first();
bool first=TRUE;
while (p)
{
- QCString s=p;
+ TQCString s=p;
if (!first) t << " ";
first=FALSE;
writeStringValue(t,s);
@@ -687,7 +687,7 @@ void ConfigInt::convertStrToVal()
void ConfigBool::convertStrToVal()
{
- QCString val = m_valueString.stripWhiteSpace().lower();
+ TQCString val = m_valueString.stripWhiteSpace().lower();
if (!val.isEmpty())
{
if (val=="yes" || val=="true" || val=="1")
@@ -706,7 +706,7 @@ void ConfigBool::convertStrToVal()
}
}
-QCString &Config::getString(const char *fileName,int num,const char *name) const
+TQCString &Config::getString(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
@@ -722,7 +722,7 @@ QCString &Config::getString(const char *fileName,int num,const char *name) const
return *((ConfigString *)opt)->valueRef();
}
-QStrList &Config::getList(const char *fileName,int num,const char *name) const
+TQStrList &Config::getList(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
@@ -738,7 +738,7 @@ QStrList &Config::getList(const char *fileName,int num,const char *name) const
return *((ConfigList *)opt)->valueRef();
}
-QCString &Config::getEnum(const char *fileName,int num,const char *name) const
+TQCString &Config::getEnum(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
@@ -797,31 +797,31 @@ struct ConfigFileState
FILE *filePtr;
YY_BUFFER_STATE oldState;
YY_BUFFER_STATE newState;
- QCString fileName;
+ TQCString fileName;
};
static const char *inputString;
static int inputPosition;
static int yyLineNr;
-static QCString yyFileName;
-static QCString tmpString;
-static QCString *s=0;
+static TQCString yyFileName;
+static TQCString tmpString;
+static TQCString *s=0;
static bool *b=0;
-static QStrList *l=0;
+static TQStrList *l=0;
static int lastState;
-static QCString elemStr;
-static QCString includeName;
-static QStrList includePathList;
-static QPtrStack<ConfigFileState> includeStack;
+static TQCString elemStr;
+static TQCString includeName;
+static TQStrList includePathList;
+static TQPtrStack<ConfigFileState> includeStack;
static int includeDepth;
-static QCString tabSizeString;
-static QCString maxInitLinesString;
-static QCString colsInAlphaIndexString;
-static QCString enumValuesPerLineString;
-static QCString treeViewWidthString;
-static QCString maxDotGraphWidthString;
-static QCString maxDotGraphHeightString;
+static TQCString tabSizeString;
+static TQCString maxInitLinesString;
+static TQCString colsInAlphaIndexString;
+static TQCString enumValuesPerLineString;
+static TQCString treeViewWidthString;
+static TQCString maxDotGraphWidthString;
+static TQCString maxDotGraphHeightString;
static Config *config;
@@ -854,8 +854,8 @@ static int yyread(char *buf,int max_size)
static FILE *tryPath(const char *path,const char *fileName)
{
- QCString absName=(path ? (QCString)path+"/"+fileName : (QCString)fileName);
- QFileInfo fi(absName);
+ TQCString absName=(path ? (TQCString)path+"/"+fileName : (TQCString)fileName);
+ TQFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
FILE *f=fopen(absName,"r");
@@ -865,8 +865,8 @@ static FILE *tryPath(const char *path,const char *fileName)
return 0;
}
-static void substEnvVarsInStrList(QStrList &sl);
-static void substEnvVarsInString(QCString &s);
+static void substEnvVarsInStrList(TQStrList &sl);
+static void substEnvVarsInString(TQCString &s);
static bool isAbsolute(const char * fileName)
{
@@ -909,7 +909,7 @@ static void readIncludeFile(const char *incName)
exit(1);
}
- QCString inc = incName;
+ TQCString inc = incName;
substEnvVarsInString(inc);
inc = inc.stripWhiteSpace();
uint incLen = inc.length();
@@ -1217,7 +1217,7 @@ YY_RULE_SETUP
case 3:
YY_RULE_SETUP
#line 429 "config.l"
-{ QCString cmd=yytext;
+{ TQCString cmd=yytext;
cmd=cmd.left(cmd.length()-1).stripWhiteSpace();
ConfigOption *option = config->get(cmd);
if (option==0) // oops not known
@@ -1273,7 +1273,7 @@ YY_RULE_SETUP
case 4:
YY_RULE_SETUP
#line 481 "config.l"
-{ QCString cmd=yytext;
+{ TQCString cmd=yytext;
cmd=cmd.left(cmd.length()-2).stripWhiteSpace();
ConfigOption *option = config->get(cmd);
if (option==0) // oops not known
@@ -1446,7 +1446,7 @@ case 17:
YY_RULE_SETUP
#line 590 "config.l"
{
- QCString bs=yytext;
+ TQCString bs=yytext;
bs=bs.upper();
if (bs=="YES" || bs=="1")
*b=TRUE;
@@ -2388,17 +2388,17 @@ int main()
*/
#if 0
-static void writeBoolValue(QTextStream &t,bool v)
+static void writeBoolValue(TQTextStream &t,bool v)
{
if (v) t << "YES"; else t << "NO";
}
-static void writeIntValue(QTextStream &t,int i)
+static void writeIntValue(TQTextStream &t,int i)
{
t << i;
}
-static void writeStringValue(QTextStream &t,QCString &s)
+static void writeStringValue(TQTextStream &t,TQCString &s)
{
const char *p=s.data();
char c;
@@ -2413,7 +2413,7 @@ static void writeStringValue(QTextStream &t,QCString &s)
}
}
-static void writeStringList(QTextStream &t,QStrList &l)
+static void writeStringList(TQTextStream &t,TQStrList &l)
{
const char *p = l.first();
bool first=TRUE;
@@ -2432,7 +2432,7 @@ static void writeStringList(QTextStream &t,QStrList &l)
}
#endif
-void Config::writeTemplate(QTextStream &t,bool sl,bool upd)
+void Config::writeTemplate(TQTextStream &t,bool sl,bool upd)
{
t << "# Doxyfile " << versionString << endl << endl;
if (!sl)
@@ -2465,9 +2465,9 @@ void Config::convertStrToVal()
}
}
-static void substEnvVarsInString(QCString &s)
+static void substEnvVarsInString(TQCString &s)
{
- static QRegExp re("\\$\\([a-z_A-Z0-9]+\\)");
+ static TQRegExp re("\\$\\([a-z_A-Z0-9]+\\)");
if (s.isEmpty()) return;
int p=0;
int i,l;
@@ -2476,7 +2476,7 @@ static void substEnvVarsInString(QCString &s)
{
l = re.matchedLength();
//printf("Found environment var s.mid(%d,%d)=`%s'\n",i+2,l-3,s.mid(i+2,l-3).data());
- QCString env=getenv(s.mid(i+2,l-3));
+ TQCString env=getenv(s.mid(i+2,l-3));
substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l);
p=i+env.length(); // next time start at the end of the expanded string
@@ -2486,12 +2486,12 @@ static void substEnvVarsInString(QCString &s)
//printf("substEnvVarInString(%s) end\n",s.data());
}
-static void substEnvVarsInStrList(QStrList &sl)
+static void substEnvVarsInStrList(TQStrList &sl)
{
char *s = sl.first();
while (s)
{
- QCString result(s);
+ TQCString result(s);
// an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE.
bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1);
// here we strip the quote again
@@ -2605,7 +2605,7 @@ void Config::substituteEnvironmentVars()
}
}
-static void cleanUpPaths(QStrList &str)
+static void cleanUpPaths(TQStrList &str)
{
char *sfp = str.first();
while (sfp)
@@ -2620,20 +2620,20 @@ static void cleanUpPaths(QStrList &str)
p++;
}
}
- QCString path = sfp;
+ TQCString path = sfp;
if ((path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':')) ||
path.at(path.length()-1)!='/'
)
{
- QFileInfo fi(path);
+ TQFileInfo fi(path);
if (fi.exists() && fi.isDir())
{
int i = str.at();
str.remove();
if (str.at()==i) // did not remove last item
- str.insert(i,QFile::encodeName(fi.absFilePath()+"/"));
+ str.insert(i,TQFile::encodeName(fi.absFilePath()+"/"));
else
- str.append(QFile::encodeName(fi.absFilePath()+"/"));
+ str.append(TQFile::encodeName(fi.absFilePath()+"/"));
}
}
sfp = str.next();
@@ -2647,7 +2647,7 @@ void Config::check()
// projectName[0]=toupper(projectName[0]);
//}
- QCString &warnFormat = Config_getString("WARN_FORMAT");
+ TQCString &warnFormat = Config_getString("WARN_FORMAT");
if (warnFormat.stripWhiteSpace().isEmpty())
{
warnFormat="$file:$line $text";
@@ -2668,7 +2668,7 @@ void Config::check()
}
}
- QCString &manExtension = Config_getString("MAN_EXTENSION");
+ TQCString &manExtension = Config_getString("MAN_EXTENSION");
// set default man page extension if non is given by the user
if (manExtension.isEmpty())
@@ -2676,7 +2676,7 @@ void Config::check()
manExtension=".3";
}
- QCString &paperType = Config_getEnum("PAPER_TYPE");
+ TQCString &paperType = Config_getEnum("PAPER_TYPE");
paperType=paperType.lower().stripWhiteSpace();
if (paperType.isEmpty())
{
@@ -2688,14 +2688,14 @@ void Config::check()
config_err("Error: Unknown page type specified");
}
- QCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
+ TQCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
outputLanguage=outputLanguage.stripWhiteSpace();
if (outputLanguage.isEmpty())
{
outputLanguage = "English";
}
- QCString &htmlFileExtension=Config_getString("HTML_FILE_EXTENSION");
+ TQCString &htmlFileExtension=Config_getString("HTML_FILE_EXTENSION");
htmlFileExtension=htmlFileExtension.stripWhiteSpace();
if (htmlFileExtension.isEmpty())
{
@@ -2703,11 +2703,11 @@ void Config::check()
}
// expand the relative stripFromPath values
- QStrList &stripFromPath = Config_getList("STRIP_FROM_PATH");
+ TQStrList &stripFromPath = Config_getList("STRIP_FROM_PATH");
char *sfp = stripFromPath.first();
if (sfp==0) // by default use the current path
{
- stripFromPath.append(QFile::encodeName(QDir::currentDirPath()+"/"));
+ stripFromPath.append(TQFile::encodeName(TQDir::currentDirPath()+"/"));
}
else
{
@@ -2715,14 +2715,14 @@ void Config::check()
}
// expand the relative stripFromPath values
- QStrList &stripFromIncPath = Config_getList("STRIP_FROM_INC_PATH");
+ TQStrList &stripFromIncPath = Config_getList("STRIP_FROM_INC_PATH");
cleanUpPaths(stripFromIncPath);
// Test to see if HTML header is valid
- QCString &headerFile = Config_getString("HTML_HEADER");
+ TQCString &headerFile = Config_getString("HTML_HEADER");
if (!headerFile.isEmpty())
{
- QFileInfo fi(headerFile);
+ TQFileInfo fi(headerFile);
if (!fi.exists())
{
config_err("Error: tag HTML_HEADER: header file `%s' "
@@ -2731,10 +2731,10 @@ void Config::check()
}
}
// Test to see if HTML footer is valid
- QCString &footerFile = Config_getString("HTML_FOOTER");
+ TQCString &footerFile = Config_getString("HTML_FOOTER");
if (!footerFile.isEmpty())
{
- QFileInfo fi(footerFile);
+ TQFileInfo fi(footerFile);
if (!fi.exists())
{
config_err("Error: tag HTML_FOOTER: footer file `%s' "
@@ -2743,10 +2743,10 @@ void Config::check()
}
}
// Test to see if LaTeX header is valid
- QCString &latexHeaderFile = Config_getString("LATEX_HEADER");
+ TQCString &latexHeaderFile = Config_getString("LATEX_HEADER");
if (!latexHeaderFile.isEmpty())
{
- QFileInfo fi(latexHeaderFile);
+ TQFileInfo fi(latexHeaderFile);
if (!fi.exists())
{
config_err("Error: tag LATEX_HEADER: header file `%s' "
@@ -2755,24 +2755,24 @@ void Config::check()
}
}
// check include path
- QStrList &includePath = Config_getList("INCLUDE_PATH");
+ TQStrList &includePath = Config_getList("INCLUDE_PATH");
char *s=includePath.first();
while (s)
{
- QFileInfo fi(s);
+ TQFileInfo fi(s);
if (!fi.exists()) config_err("Warning: tag INCLUDE_PATH: include path `%s' "
"does not exist\n",s);
s=includePath.next();
}
// check aliases
- QStrList &aliasList = Config_getList("ALIASES");
+ TQStrList &aliasList = Config_getList("ALIASES");
s=aliasList.first();
while (s)
{
- QRegExp re1("[a-z_A-Z][a-z_A-Z0-9]*[ \t]*="); // alias without argument
- QRegExp re2("[a-z_A-Z][a-z_A-Z0-9]*{[0-9]*}[ \t]*="); // alias with argument
- QCString alias=s;
+ TQRegExp re1("[a-z_A-Z][a-z_A-Z0-9]*[ \t]*="); // alias without argument
+ TQRegExp re2("[a-z_A-Z][a-z_A-Z0-9]*{[0-9]*}[ \t]*="); // alias with argument
+ TQCString alias=s;
alias=alias.stripWhiteSpace();
if (alias.find(re1)!=0 && alias.find(re2)!=0)
{
@@ -2783,7 +2783,7 @@ void Config::check()
}
// check dot image format
- QCString &dotImageFormat=Config_getEnum("DOT_IMAGE_FORMAT");
+ TQCString &dotImageFormat=Config_getEnum("DOT_IMAGE_FORMAT");
dotImageFormat=dotImageFormat.stripWhiteSpace();
if (dotImageFormat.isEmpty())
{
@@ -2797,10 +2797,10 @@ void Config::check()
// check dot path
- QCString &dotPath = Config_getString("DOT_PATH");
+ TQCString &dotPath = Config_getString("DOT_PATH");
if (!dotPath.isEmpty())
{
- QFileInfo dp(dotPath+"/dot"+portable_commandExtension());
+ TQFileInfo dp(dotPath+"/dot"+portable_commandExtension());
if (!dp.exists() || !dp.isFile())
{
config_err("Warning: the dot tool could not be found at %s\n",dotPath.data());
@@ -2808,7 +2808,7 @@ void Config::check()
}
else
{
- dotPath=QFile::encodeName( dp.dirPath(TRUE)+"/" );
+ dotPath=TQFile::encodeName( dp.dirPath(TRUE)+"/" );
#if defined(_WIN32) // convert slashes
uint i=0,l=dotPath.length();
for (i=0;i<l;i++) if (dotPath.at(i)=='/') dotPath.at(i)='\\';
@@ -2821,10 +2821,10 @@ void Config::check()
}
// check mscgen path
- QCString &mscgenPath = Config_getString("MSCGEN_PATH");
+ TQCString &mscgenPath = Config_getString("MSCGEN_PATH");
if (!mscgenPath.isEmpty())
{
- QFileInfo dp(mscgenPath+"/mscgen"+portable_commandExtension());
+ TQFileInfo dp(mscgenPath+"/mscgen"+portable_commandExtension());
if (!dp.exists() || !dp.isFile())
{
config_err("Warning: the mscgen tool could not be found at %s\n",mscgenPath.data());
@@ -2832,7 +2832,7 @@ void Config::check()
}
else
{
- mscgenPath=QFile::encodeName( dp.dirPath(TRUE)+"/" );
+ mscgenPath=TQFile::encodeName( dp.dirPath(TRUE)+"/" );
#if defined(_WIN32) // convert slashes
uint i=0,l=mscgenPath.length();
for (i=0;i<l;i++) if (mscgenPath.at(i)=='/') mscgenPath.at(i)='\\';
@@ -2846,18 +2846,18 @@ void Config::check()
// check input
- QStrList &inputSources=Config_getList("INPUT");
+ TQStrList &inputSources=Config_getList("INPUT");
if (inputSources.count()==0)
{
// use current dir as the default
- inputSources.append(QFile::encodeName( QDir::currentDirPath() ));
+ inputSources.append(TQFile::encodeName( TQDir::currentDirPath() ));
}
else
{
s=inputSources.first();
while (s)
{
- QFileInfo fi(s);
+ TQFileInfo fi(s);
if (!fi.exists())
{
config_err("Warning: tag INPUT: input source `%s' does not exist\n",s);
@@ -2867,7 +2867,7 @@ void Config::check()
}
// add default pattern if needed
- QStrList &filePatternList = Config_getList("FILE_PATTERNS");
+ TQStrList &filePatternList = Config_getList("FILE_PATTERNS");
if (filePatternList.isEmpty())
{
filePatternList.append("*.c");
@@ -2926,7 +2926,7 @@ void Config::check()
}
// add default pattern if needed
- QStrList &examplePatternList = Config_getList("EXAMPLE_PATTERNS");
+ TQStrList &examplePatternList = Config_getList("EXAMPLE_PATTERNS");
if (examplePatternList.isEmpty())
{
examplePatternList.append("*");
@@ -3033,7 +3033,7 @@ void Config::check()
// add default words if needed
- QStrList &annotationFromBrief = Config_getList("ABBREVIATE_BRIEF");
+ TQStrList &annotationFromBrief = Config_getList("ABBREVIATE_BRIEF");
if (annotationFromBrief.isEmpty())
{
annotationFromBrief.append("The $name class");
@@ -5080,10 +5080,10 @@ void Config::create()
// The IMAGE_PATTERNS tag is now officially obsolete.
}
-static QCString configFileToString(const char *name)
+static TQCString configFileToString(const char *name)
{
if (name==0 || name[0]==0) return 0;
- QFile f;
+ TQFile f;
bool fileOpened=FALSE;
if (name[0]=='-' && name[1]==0) // read from stdin
@@ -5092,7 +5092,7 @@ static QCString configFileToString(const char *name)
if (fileOpened)
{
const int bSize=4096;
- QCString contents(bSize);
+ TQCString contents(bSize);
int totalSize=0;
int size;
while ((size=f.readBlock(contents.data()+totalSize,bSize))==bSize)
@@ -5109,7 +5109,7 @@ static QCString configFileToString(const char *name)
}
else // read from file
{
- QFileInfo fi(name);
+ TQFileInfo fi(name);
if (!fi.exists() || !fi.isFile())
{
config_err("Error: file `%s' not found\n",name);
@@ -5120,7 +5120,7 @@ static QCString configFileToString(const char *name)
if (fileOpened)
{
int fsize=f.size();
- QCString contents(fsize+2);
+ TQCString contents(fsize+2);
f.readBlock(contents.data(),fsize);
f.close();
if (fsize==0 || contents[fsize-1]=='\n')