summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2012-08-29 13:37:49 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-01 11:24:57 +0200
commit4d78b867314520537dd9185f49029ff8d4c49464 (patch)
tree18c9844d6209b747c322887dbfdd4a7b165896c8 /src/tools
parent3ef3c662fecf60be1efcc315a1ae585658c1bec3 (diff)
Use QString() instead of "".
Change-Id: I42c55344663808b8362e2c9185273a00fc1c70b0 Reviewed-by: Martin Smith <martin.smith@nokia.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qdoc/cppcodemarker.cpp66
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp4
-rw-r--r--src/tools/qdoc/doc.cpp8
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp2
-rw-r--r--src/tools/qdoc/node.h10
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp4
-rw-r--r--src/tools/qdoc/tree.cpp22
7 files changed, 58 insertions, 58 deletions
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp
index 80fb75a13b..61f1b76ede 100644
--- a/src/tools/qdoc/cppcodemarker.cpp
+++ b/src/tools/qdoc/cppcodemarker.cpp
@@ -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) {
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp
index db713fcdf3..8c945a2683 100644
--- a/src/tools/qdoc/ditaxmlgenerator.cpp
+++ b/src/tools/qdoc/ditaxmlgenerator.cpp
@@ -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();
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp
index c52b44f72b..dd6fb1d1ff 100644
--- a/src/tools/qdoc/doc.cpp
+++ b/src/tools/qdoc/doc.cpp
@@ -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 {
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 0d3cbcdea3..bd4dc79f05 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -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) << '"';
diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h
index 29e293226b..d7efa46583 100644
--- a/src/tools/qdoc/node.h
+++ b/src/tools/qdoc/node.h
@@ -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);
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp
index 318ce1431a..14312df63a 100644
--- a/src/tools/qdoc/qmlvisitor.cpp
+++ b/src/tools/qdoc/qmlvisitor.cpp
@@ -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);
diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp
index 9f7eb70705..d9851c5120 100644
--- a/src/tools/qdoc/tree.cpp
+++ b/src/tools/qdoc/tree.cpp
@@ -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;