Use QString() instead of "".

Change-Id: I42c55344663808b8362e2c9185273a00fc1c70b0
Reviewed-by: Martin Smith <martin.smith@nokia.com>
This commit is contained in:
Frederik Gladhorn 2012-08-29 13:37:49 +02:00 committed by Qt by Nokia
parent 3ef3c662fe
commit 4d78b86731
7 changed files with 58 additions and 58 deletions

View File

@ -486,66 +486,66 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
if (style == Summary) {
FastSection privateFunctions(classe,
"Private Functions",
"",
QString(),
"private function",
"private functions");
FastSection privateSlots(classe, "Private Slots", "", "private slot", "private slots");
FastSection privateTypes(classe, "Private Types", "", "private type", "private types");
FastSection privateSlots(classe, "Private Slots", QString(), "private slot", "private slots");
FastSection privateTypes(classe, "Private Types", QString(), "private type", "private types");
FastSection protectedFunctions(classe,
"Protected Functions",
"",
QString(),
"protected function",
"protected functions");
FastSection protectedSlots(classe,
"Protected Slots",
"",
QString(),
"protected slot",
"protected slots");
FastSection protectedTypes(classe,
"Protected Types",
"",
QString(),
"protected type",
"protected types");
FastSection protectedVariables(classe,
"Protected Variables",
"",
QString(),
"protected type",
"protected variables");
FastSection publicFunctions(classe,
"Public Functions",
"",
QString(),
"public function",
"public functions");
FastSection publicSignals(classe, "Signals", "", "signal", "signal");
FastSection publicSlots(classe, "Public Slots", "", "public slot", "public slots");
FastSection publicTypes(classe, "Public Types", "", "public type", "public types");
FastSection publicSignals(classe, "Signals", QString(), "signal", "signal");
FastSection publicSlots(classe, "Public Slots", QString(), "public slot", "public slots");
FastSection publicTypes(classe, "Public Types", QString(), "public type", "public types");
FastSection publicVariables(classe,
"Public Variables",
"",
QString(),
"public variable",
"public variables");
FastSection properties(classe, "Properties", "", "property", "properties");
FastSection properties(classe, "Properties", QString(), "property", "properties");
FastSection relatedNonMembers(classe,
"Related Non-Members",
"",
QString(),
"related non-member",
"related non-members");
FastSection staticPrivateMembers(classe,
"Static Private Members",
"",
QString(),
"static private member",
"static private members");
FastSection staticProtectedMembers(classe,
"Static Protected Members",
"",
QString(),
"static protected member",
"static protected members");
FastSection staticPublicMembers(classe,
"Static Public Members",
"",
QString(),
"static public member",
"static public members");
FastSection macros(inner, "Macros", "", "macro", "macros");
FastSection macros(inner, "Macros", QString(), "macro", "macros");
NodeList::ConstIterator r = classe->relatedNodes().constBegin();
while (r != classe->relatedNodes().constEnd()) {
@ -737,7 +737,7 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
append(sections, macros);
}
else {
FastSection all(classe,"","","member","members");
FastSection all(classe,QString(),QString(),"member","members");
QStack<const ClassNode *> stack;
stack.push(classe);
@ -767,29 +767,29 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
if (style == Summary || style == Detailed) {
FastSection namespaces(inner,
"Namespaces",
style == Detailed ? "nmspace" : "",
style == Detailed ? "nmspace" : QString(),
"namespace",
"namespaces");
FastSection classes(inner,
"Classes",
style == Detailed ? "classes" : "",
style == Detailed ? "classes" : QString(),
"class",
"classes");
FastSection types(inner,
style == Summary ? "Types" : "Type Documentation",
style == Detailed ? "types" : "",
style == Detailed ? "types" : QString(),
"type",
"types");
FastSection functions(inner,
style == Summary ?
"Functions" : "Function Documentation",
style == Detailed ? "func" : "",
style == Detailed ? "func" : QString(),
"function",
"functions");
FastSection macros(inner,
style == Summary ?
"Macros" : "Macro Documentation",
style == Detailed ? "macros" : "",
style == Detailed ? "macros" : QString(),
"macro",
"macros");
@ -928,7 +928,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
j++;
}
QString out("");
QString out;
int braceDepth = 0;
int parenDepth = 0;
int i = 0;
@ -1138,37 +1138,37 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
if (style == Summary) {
FastSection qmlproperties(qmlClassNode,
"Properties",
"",
QString(),
"property",
"properties");
FastSection qmlattachedproperties(qmlClassNode,
"Attached Properties",
"",
QString(),
"property",
"properties");
FastSection qmlsignals(qmlClassNode,
"Signals",
"",
QString(),
"signal",
"signals");
FastSection qmlsignalhandlers(qmlClassNode,
"Signal Handlers",
"",
QString(),
"signal handler",
"signal handlers");
FastSection qmlattachedsignals(qmlClassNode,
"Attached Signals",
"",
QString(),
"signal",
"signals");
FastSection qmlmethods(qmlClassNode,
"Methods",
"",
QString(),
"method",
"methods");
FastSection qmlattachedmethods(qmlClassNode,
"Attached Methods",
"",
QString(),
"method",
"methods");
@ -1324,7 +1324,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
append(sections,qmlattachedmethods);
}
else {
FastSection all(qmlClassNode,"","","member","members");
FastSection all(qmlClassNode,QString(),QString(),"member","members");
const QmlClassNode* current = qmlClassNode;
while (current != 0) {

View File

@ -2339,7 +2339,7 @@ void DitaXmlGenerator::generateDocNode(DocNode* dn, CodeMarker* marker)
generateText(text, dn, marker);
writeEndTag(); // </p>
Doc::quoteFromFile(dn->doc().location(), quoter, dn->name());
QString code = quoter.quoteTo(dn->location(), "", "");
QString code = quoter.quoteTo(dn->location(), QString(), QString());
text.clear();
text << Atom(Atom::Code, code);
generateText(text, dn, marker);
@ -2602,7 +2602,7 @@ void DitaXmlGenerator::generateTableOfContents(const Node* node,
if (toc.isEmpty())
return;
QString nodeName = "";
QString nodeName;
if (node != relative)
nodeName = node->name();

View File

@ -355,7 +355,7 @@ class DocPrivate : public Shared
public:
DocPrivate(const Location& start = Location::null,
const Location& end = Location::null,
const QString& source = "");
const QString& source = QString());
~DocPrivate();
void addAlso(const Text& also);
@ -473,7 +473,7 @@ private:
void startSection(Doc::Sections unit, int cmd);
void endSection(int unit, int endCmd);
void parseAlso();
void append(Atom::Type type, const QString& string = "");
void append(Atom::Type type, const QString& string = QString());
void append(Atom::Type type, const QString& p1, const QString& p2);
void appendChar(QChar ch);
void appendWord(const QString &word);
@ -482,7 +482,7 @@ private:
void startNewPara();
void enterPara(Atom::Type leftType = Atom::ParaLeft,
Atom::Type rightType = Atom::ParaRight,
const QString& string = "");
const QString& string = QString());
void leavePara();
void leaveValue();
void leaveValueList();
@ -1149,7 +1149,7 @@ void DocParser::parse(const QString& source,
Doc::quoteFromFile(location(), quoter, fileName);
if (!quoting) {
append(Atom::Code,
quoter.quoteTo(location(), cmdStr, ""));
quoter.quoteTo(location(), cmdStr, QString()));
quoter.reset();
}
else {

View File

@ -781,7 +781,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
<< protectEnc(atom->string()) << "]</font>";
}
else {
QString prefix = "";
QString prefix;
if (!baseDir().isEmpty())
prefix = "../";
out() << "<img src=\"" << protectEnc(prefix + fileName) << '"';

View File

@ -391,7 +391,7 @@ struct RelatedClass
RelatedClass() { }
RelatedClass(Node::Access access0,
ClassNode* node0,
const QString& dataTypeWithTemplateArgs0 = "")
const QString& dataTypeWithTemplateArgs0 = QString())
: access(access0),
node(node0),
dataTypeWithTemplateArgs(dataTypeWithTemplateArgs0) { }
@ -412,7 +412,7 @@ public:
void addBaseClass(Access access,
ClassNode* node,
const QString &dataTypeWithTemplateArgs = "");
const QString &dataTypeWithTemplateArgs = QString());
void fixBaseClasses();
const QList<RelatedClass> &baseClasses() const { return bases; }
@ -713,9 +713,9 @@ class Parameter
public:
Parameter() {}
Parameter(const QString& leftType,
const QString& rightType = "",
const QString& name = "",
const QString& defaultValue = "");
const QString& rightType = QString(),
const QString& name = QString(),
const QString& defaultValue = QString());
Parameter(const Parameter& p);
Parameter& operator=(const Parameter& p);

View File

@ -472,7 +472,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiPublicMember *member)
QList<Parameter> parameters;
for (QQmlJS::AST::UiParameterList *it = member->parameters; it; it = it->next) {
if (!it->type.isEmpty() && !it->name.isEmpty())
parameters.append(Parameter(it->type.toString(), "", it->name.toString()));
parameters.append(Parameter(it->type.toString(), QString(), it->name.toString()));
}
qmlSignal->setParameters(parameters);
@ -545,7 +545,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::FunctionDeclaration* fd)
if (formals) {
QQmlJS::AST::FormalParameterList* fpl = formals;
do {
parameters.append(Parameter(QString(""), QString(""), fpl->name.toString()));
parameters.append(Parameter(QString(), QString(), fpl->name.toString()));
fpl = fpl->next;
} while (fpl && fpl != formals);
qmlMethod->setParameters(parameters);

View File

@ -110,7 +110,7 @@ public:
The default constructor is the only constructor.
*/
Tree::Tree()
: roo(0, "")
: roo(0, QString())
{
priv = new TreePrivate;
}
@ -945,7 +945,7 @@ void Tree::readIndexFile(const QString& path)
// when the -installdir command line option is set.
QString indexUrl;
if (Config::installDir.isEmpty()) {
indexUrl = indexElement.attribute("url", "");
indexUrl = indexElement.attribute("url", QString());
}
else {
// Use a fake directory, since we will copy the output to a sub directory of
@ -1011,7 +1011,7 @@ void Tree::readIndexSection(const QDomElement& element,
QmlClassNode* qcn = new QmlClassNode(parent, name);
qcn->setTitle(element.attribute("title"));
if (element.hasAttribute("location"))
name = element.attribute("location", "");
name = element.attribute("location", QString());
if (!indexUrl.isEmpty())
location = Location(indexUrl + QLatin1Char('/') + name);
else if (!indexUrl.isNull())
@ -1022,7 +1022,7 @@ void Tree::readIndexSection(const QDomElement& element,
QmlBasicTypeNode* qbtn = new QmlBasicTypeNode(parent, name);
qbtn->setTitle(element.attribute("title"));
if (element.hasAttribute("location"))
name = element.attribute("location", "");
name = element.attribute("location", QString());
if (!indexUrl.isEmpty())
location = Location(indexUrl + QLatin1Char('/') + name);
else if (!indexUrl.isNull())
@ -1079,7 +1079,7 @@ void Tree::readIndexSection(const QDomElement& element,
docNode->setTitle(element.attribute("title"));
if (element.hasAttribute("location"))
name = element.attribute("location", "");
name = element.attribute("location", QString());
if (!indexUrl.isEmpty())
location = Location(indexUrl + QLatin1Char('/') + name);
@ -1179,7 +1179,7 @@ void Tree::readIndexSection(const QDomElement& element,
Parameter parameter(child.attribute("left"),
child.attribute("right"),
child.attribute("name"),
""); // child.attribute("default")
QString()); // child.attribute("default")
functionNode->addParameter(parameter);
child = child.nextSiblingElement("parameter");
}
@ -2189,7 +2189,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inn
QStringList pieces = gen_->fullDocumentLocation(node,true).split(QLatin1Char('#'));
writer.writeTextElement("anchorfile", pieces[0]);
writer.writeTextElement("anchor", pieces[1]);
writer.writeTextElement("arglist", "");
writer.writeTextElement("arglist", QString());
}
writer.writeEndElement(); // member
break;
@ -2200,7 +2200,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inn
writer.writeTextElement("name", objName);
QStringList pieces = gen_->fullDocumentLocation(node).split(QLatin1Char('#'));
writer.writeTextElement("anchor", pieces[1]);
writer.writeTextElement("arglist", "");
writer.writeTextElement("arglist", QString());
writer.writeEndElement(); // member
for (int i = 0; i < enumNode->items().size(); ++i) {
@ -2208,7 +2208,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inn
writer.writeStartElement("member");
writer.writeAttribute("name", item.name());
writer.writeTextElement("anchor", pieces[1]);
writer.writeTextElement("arglist", "");
writer.writeTextElement("arglist", QString());
writer.writeEndElement(); // member
}
}
@ -2220,12 +2220,12 @@ void Tree::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inn
if (typedefNode->associatedEnum())
writer.writeAttribute("type", typedefNode->associatedEnum()->fullDocumentName());
else
writer.writeAttribute("type", "");
writer.writeAttribute("type", QString());
writer.writeTextElement("name", objName);
QStringList pieces = gen_->fullDocumentLocation(node,true).split(QLatin1Char('#'));
writer.writeTextElement("anchorfile", pieces[0]);
writer.writeTextElement("anchor", pieces[1]);
writer.writeTextElement("arglist", "");
writer.writeTextElement("arglist", QString());
}
writer.writeEndElement(); // member
break;