[Uml-devel] KDE/kdesdk/umbrello/umbrello/codegenerators
Oliver Kellogg
okellogg at users.sourceforge.net
Mon Aug 13 21:02:51 UTC 2007
SVN commit 699664 by okellogg:
Patch by Andi Fischer lifts a few Qt4 deprecation warnings. Thanks Andi.
CCMAIL:andi.fischer at hispeed.ch
M +6 -6 adawriter.cpp
M +2 -2 aswriter.cpp
M +1 -1 classifierinfo.cpp
M +10 -10 tclwriter.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/adawriter.cpp #699663:699664
@@ -153,7 +153,7 @@
const bool isClass = !c->isInterface();
QString classname = cleanName(c->getName());
- QString fileName = packageName(c).lower();
+ QString fileName = packageName(c).toLower();
fileName.replace('.', '-');
//find an appropriate name for our file
@@ -177,7 +177,7 @@
str = getHeadingFile(".ads");
if (!str.isEmpty()) {
str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), file.name());
+ str.replace(QRegExp("%filepath%"), file.fileName());
ada << str << endl;
}
@@ -262,7 +262,7 @@
QString typeName = at->getTypeName();
ada << getIndent() << name << " : " << typeName;
QString initialVal = at->getInitialValue();
- if (initialVal.latin1() && ! initialVal.isEmpty())
+ if (! initialVal.isEmpty() && ! initialVal.toLatin1().isEmpty())
ada << " := " << initialVal;
ada << ";" << m_endl;
}
@@ -401,7 +401,7 @@
continue;
ada << getIndent() << cleanName(at->getName()) << " : "
<< at->getTypeName();
- if (at && at->getInitialValue().latin1() && ! at->getInitialValue().isEmpty())
+ if (at && ! at->getInitialValue().isEmpty() && ! at->getInitialValue().toLatin1().isEmpty())
ada << " := " << at->getInitialValue();
ada << ";" << m_endl;
}
@@ -424,7 +424,7 @@
if (at->getVisibility() == Uml::Visibility::Private)
ada << "-- Private: ";
ada << cleanName(at->getName()) << " : " << at->getTypeName();
- if (at && at->getInitialValue().latin1() && ! at->getInitialValue().isEmpty())
+ if (at && ! at->getInitialValue().isEmpty() && ! at->getInitialValue().toLatin1().isEmpty() )
ada << " := " << at->getInitialValue();
ada << ";" << m_endl;
}
@@ -550,7 +550,7 @@
QStringList::ConstIterator it;
for (it = keywords.begin(); it != keywords.end(); ++it)
- if ((*it).lower() == rPossiblyReservedKeyword.lower())
+ if ((*it).toLower() == rPossiblyReservedKeyword.toLower())
return true;
return false;
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/aswriter.cpp #699663:699664
@@ -39,7 +39,7 @@
}
QString classname = cleanName(c->getName());
- QString fileName = c->getName().lower();
+ QString fileName = c->getName().toLower();
//find an appropriate name for our file
fileName = findFileName(c,".as");
@@ -68,7 +68,7 @@
if(!str.isEmpty())
{
str.replace(QRegExp("%filename%"),fileName+".as");
- str.replace(QRegExp("%filepath%"),fileas.name());
+ str.replace(QRegExp("%filepath%"),fileas.fileName());
as << str << m_endl;
}
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/classifierinfo.cpp #699663:699664
@@ -36,7 +36,7 @@
// set default class, file names
className = c->getName();
- fileName = c->getName().lower();
+ fileName = c->getName().toLower();
// determine up-front what we are dealing with
isInterface = c->isInterface();
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/tclwriter.cpp #699663:699664
@@ -166,7 +166,7 @@
QString str = getHeadingFile(".tcl");
if (!str.isEmpty()) {
str.replace(QRegExp("%filename%"), classifierInfo->fileName);
- str.replace(QRegExp("%filepath%"), fileh.name());
+ str.replace(QRegExp("%filepath%"), fileh.fileName());
writeCode(str);
}
// set current namespace
@@ -338,7 +338,7 @@
str = getHeadingFile(".tclbody");
if (!str.isEmpty()) {
str.replace(QRegExp("%filename%"), classifierInfo->fileName + "body");
- str.replace(QRegExp("%filepath%"), filetcl.name());
+ str.replace(QRegExp("%filepath%"), filetcl.fileName());
writeCode(str);
}
// Start body of class
@@ -371,7 +371,7 @@
void
TclWriter::writeComm(const QString &text)
{
- QStringList lines = QStringList::split("\n", text, true);
+ QStringList lines = text.split(QRegExp("\n"));
for (int i = 0; i < lines.count(); i++) {
*mStream << getIndent() << "# " << lines[i] << m_endl;
}
@@ -380,7 +380,7 @@
void
TclWriter::writeDocu(const QString &text)
{
- QStringList lines = QStringList::split("\n", text, true);
+ QStringList lines = text.split(QRegExp("\n"));
for (int i = 0; i < lines.count(); i++) {
*mStream << getIndent() << "## " << lines[i] << m_endl;
}
@@ -600,11 +600,11 @@
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
if (multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
- QString fieldVarName = roleName.lower();
+ QString fieldVarName = roleName.toLower();
// record this for later consideration of initialization IF the
// multi value requires 1 of these objects
- if (ObjectFieldVariables.findIndex(fieldVarName) == -1 &&
+ if (ObjectFieldVariables.indexOf(fieldVarName) == -1 &&
multi.contains(QRegExp("^1$"))
) {
// ugh. UGLY. Storing variable name and its class in pairs.
@@ -615,11 +615,11 @@
"> " + fieldVarName + m_endl + doc);
writeCode(scope + " variable " + fieldVarName + m_endl);
} else {
- QString fieldVarName = roleName.lower();
+ QString fieldVarName = roleName.toLower();
// record unique occurrences for later when we want to check
// for initialization of this vector
- if (VectorFieldVariables.findIndex(fieldVarName) == -1)
+ if (VectorFieldVariables.indexOf(fieldVarName) == -1)
VectorFieldVariables.append(fieldVarName);
writeDocu(m_endl + "@var" + scope + " variable <" + fieldClassName +
"*> " + fieldVarName + m_endl + doc);
@@ -889,7 +889,7 @@
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
if (multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
- QString fieldVarName = roleName.lower();
+ QString fieldVarName = roleName.toLower();
writeCode("configbody " + mClassGlobal + "::" + fieldVarName + " {} {");
m_indentLevel++;
@@ -902,7 +902,7 @@
m_indentLevel--;
} else {
- QString fieldVarName = roleName.lower();
+ QString fieldVarName = roleName.toLower();
writeCode("configbody " + mClassGlobal + "::" + fieldVarName + " {} {");
m_indentLevel++;
More information about the umbrello-devel
mailing list