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 /lib/util/filetemplate.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 'lib/util/filetemplate.cpp')
-rw-r--r-- | lib/util/filetemplate.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/util/filetemplate.cpp b/lib/util/filetemplate.cpp index cbf4f8bb..f153642f 100644 --- a/lib/util/filetemplate.cpp +++ b/lib/util/filetemplate.cpp @@ -56,7 +56,7 @@ TQString FileTemplate::readFile(KDevPlugin *part, const TQString &fileName) TQFile f(fileName); if (!f.open(IO_ReadOnly)) - return TQString::null; + return TQString(); TQTextStream stream(&f); TQString str = stream.read(); @@ -69,19 +69,19 @@ TQString FileTemplate::makeSubstitutions( TQDomDocument & dom, const TQString & TQString email = DomUtil::readEntry(dom, "/general/email"); TQString version = DomUtil::readEntry(dom, "/general/version"); TQString appname = DomUtil::readEntry(dom, "/general/projectname"); - TQString date = TQDate::currentDate().toString(); - TQString year = TQString::number(TQDate::currentDate().year()); + TQString date = TQDate::tqcurrentDate().toString(); + TQString year = TQString::number(TQDate::tqcurrentDate().year()); TQString str = text; - str.replace(TQRegExp("\\$EMAIL\\$"),email); - str.replace(TQRegExp("\\$AUTHOR\\$"),author); - str.replace(TQRegExp("\\$VERSION\\$"),version); - str.replace(TQRegExp("\\$DATE\\$"),date); - str.replace(TQRegExp("\\$YEAR\\$"),year); - str.replace(TQRegExp("\\$APPNAME\\$"),appname); - str.replace(TQRegExp("\\$APPNAME\\$"),appname); - str.replace(TQRegExp("\\$APPNAMEUC\\$"),appname.upper()); - str.replace(TQRegExp("\\$APPNAMELC\\$"),appname.lower()); + str.tqreplace(TQRegExp("\\$EMAIL\\$"),email); + str.tqreplace(TQRegExp("\\$AUTHOR\\$"),author); + str.tqreplace(TQRegExp("\\$VERSION\\$"),version); + str.tqreplace(TQRegExp("\\$DATE\\$"),date); + str.tqreplace(TQRegExp("\\$YEAR\\$"),year); + str.tqreplace(TQRegExp("\\$APPNAME\\$"),appname); + str.tqreplace(TQRegExp("\\$APPNAME\\$"),appname); + str.tqreplace(TQRegExp("\\$APPNAMEUC\\$"),appname.upper()); + str.tqreplace(TQRegExp("\\$APPNAMELC\\$"),appname.lower()); return str; } @@ -99,8 +99,8 @@ bool FileTemplate::copy(KDevPlugin *part, const TQString &name, TQFileInfo fi(f); TQString module = fi.baseName(); TQString basefilename = fi.baseName(true); - text.replace(TQRegExp("\\$MODULE\\$"),module); - text.replace(TQRegExp("\\$FILENAME\\$"),basefilename); + text.tqreplace(TQRegExp("\\$MODULE\\$"),module); + text.tqreplace(TQRegExp("\\$FILENAME\\$"),basefilename); TQTextStream stream(&f); stream << text; |