forked from qt-creator/qt-creator
Braces cleanup
Change-Id: I8413252c90a1487d291f15d92837c30ab697b245 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -311,9 +311,8 @@ Import LinkPrivate::importFileOrDirectory(Document::Ptr doc, const ImportInfo &i
|
||||
QLocale locale;
|
||||
QStringList filePaths = ModelManagerInterface::instance()
|
||||
->filesAtQrcPath(path, &locale, 0, ModelManagerInterface::ActiveQrcResources);
|
||||
if (filePaths.isEmpty()) {
|
||||
if (filePaths.isEmpty())
|
||||
filePaths = ModelManagerInterface::instance()->filesAtQrcPath(path);
|
||||
}
|
||||
if (!filePaths.isEmpty()) {
|
||||
Document::Ptr importedDoc = snapshot.document(filePaths.at(0));
|
||||
if (importedDoc)
|
||||
|
||||
@@ -111,11 +111,10 @@ private:
|
||||
QString QrcParser::normalizedQrcFilePath(const QString &path) {
|
||||
QString normPath = path;
|
||||
int endPrefix = 0;
|
||||
if (path.startsWith(QLatin1String("qrc:/"))) {
|
||||
if (path.startsWith(QLatin1String("qrc:/")))
|
||||
endPrefix = 4;
|
||||
} else if (path.startsWith(QLatin1String(":/"))) {
|
||||
else if (path.startsWith(QLatin1String(":/")))
|
||||
endPrefix = 1;
|
||||
}
|
||||
if (endPrefix < path.size() && path.at(endPrefix) == QLatin1Char('/'))
|
||||
while (endPrefix + 1 < path.size() && path.at(endPrefix+1) == QLatin1Char('/'))
|
||||
++endPrefix;
|
||||
@@ -377,9 +376,8 @@ void QrcParserPrivate::collectFilesInPath(const QString &path, QMap<QString,QStr
|
||||
QString fileName = res.key().right(res.key().size()-key.size());
|
||||
QStringList &els = (*contents)[fileName];
|
||||
foreach (const QString &val, res.value())
|
||||
if (!els.contains(val)){
|
||||
if (!els.contains(val))
|
||||
els << val;
|
||||
}
|
||||
++res;
|
||||
} else {
|
||||
QString dirName = res.key().mid(key.size(), endDir - key.size() + 1);
|
||||
|
||||
@@ -632,8 +632,7 @@ void TypeDescriptionReader::readEnumValues(AST::UiScriptBinding *ast, LanguageUt
|
||||
continue;
|
||||
}
|
||||
PropertyGetterSetter *getterSetter = AST::cast<PropertyGetterSetter *>(it->assignment);
|
||||
if (getterSetter) {
|
||||
if (getterSetter)
|
||||
addError(objectLit->firstSourceLocation(), tr("Enum should not contain getter and setters, but only 'string: number' elements."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user