Commit 88f33326 authored by Friedemann Kleint's avatar Friedemann Kleint

Fix Krazy code scanning tool warnings (QString, loops, spelling).

parent 49311aa3
......@@ -127,7 +127,7 @@ static const CommandDescription commandDescriptions[] = {
"Prints local variables of symbol group in GDBMI or debug format",
"[-t token] [-v] [T formats] [-I formats] [-f debugfilter] [-c] [-h] [-d]\n[-e expand-list] [-u uninitialized-list]\n"
"[-W] [-w watch-iname watch-expression] <frame-number> [iname]\n"
"-h human-readable ouput\n"
"-h human-readable output\n"
"-v increase verboseness of dumping\n"
"-d debug output\n"
"-f debug_filter\n"
......@@ -142,7 +142,7 @@ static const CommandDescription commandDescriptions[] = {
{"watches",
"Prints watches variables of symbol group in GDBMI or debug format",
"[-t token] [-v] [T formats] [-I formats] [-f debugfilter] [-c] [-h] [-d] <iname>\n"
"-h human-readable ouput\n"
"-h human-readable output\n"
"-v increase verboseness of dumping\n"
"-d debug output\n"
"-f debug_filter\n"
......
......@@ -610,7 +610,7 @@ std::string SymbolGroupValue::resolveType(const std::string &typeIn,
// Use the module of the current symbol group for templates.
// This is because resolving some template types (std::list<> has been
// observed to result in 'QtGui4d!std::list', which subseqently fails.
// observed to result in 'QtGui4d!std::list', which subsequently fails.
if (!currentModule.empty() && stripped.find('<') != std::string::npos) {
std::string trc = currentModule;
trc.push_back('!');
......
......@@ -59,7 +59,7 @@ static QString quoteWinCommand(const QString &program)
{
const QChar doubleQuote = QLatin1Char('"');
// add the programm as the first arg ... it works better
// add the program as the first arg ... it works better
QString programName = program;
programName.replace(QLatin1Char('/'), QLatin1Char('\\'));
if (!programName.startsWith(doubleQuote) && !programName.endsWith(doubleQuote)
......
......@@ -325,7 +325,7 @@ void EnvironmentModel::unsetVariable(const QString &name)
int pos = m_d->findInChanges(name);
if (pos != -1) {
m_d->m_items[pos].unset = true;
m_d->m_items[pos].value = QString();
m_d->m_items[pos].value.clear();
m_d->updateResultEnvironment();
emit dataChanged(index(row, 0, QModelIndex()), index(row, 1, QModelIndex()));
emit userChangesChanged();
......
......@@ -500,7 +500,7 @@ bool ExternalTool::save(QString *errorMessage) const
return true;
}
bool ExternalTool::operator==(const ExternalTool &other)
bool ExternalTool::operator==(const ExternalTool &other) const
{
return m_id == other.m_id
&& m_description == other.m_description
......@@ -537,9 +537,9 @@ bool ExternalToolRunner::resolve()
{
if (!m_tool)
return false;
m_resolvedExecutable = QString::null;
m_resolvedArguments = QString::null;
m_resolvedWorkingDirectory = QString::null;
m_resolvedExecutable.clear();
m_resolvedArguments.clear();
m_resolvedWorkingDirectory.clear();
{ // executable
foreach (const QString &executable, m_tool->executables()) {
QString resolved = Utils::expandMacros(executable,
......@@ -813,7 +813,7 @@ void ExternalToolManager::setToolsByCategory(const QMap<QString, QList<Internal:
it.next();
ActionContainer *container = 0;
const QString &containerName = it.key();
if (containerName == QString()) { // no displayCategory, so put into external tools menu directly
if (containerName.isEmpty()) { // no displayCategory, so put into external tools menu directly
container = mexternaltools;
} else {
if (m_containers.contains(containerName)) {
......
......@@ -93,8 +93,8 @@ public:
bool save(QString *errorMessage = 0) const;
bool operator==(const ExternalTool &other);
bool operator!=(const ExternalTool &other) { return !((*this) == other); }
bool operator==(const ExternalTool &other) const;
bool operator!=(const ExternalTool &other) const { return !((*this) == other); }
ExternalTool &operator=(const ExternalTool &other);
void setId(const QString &id);
......
......@@ -339,7 +339,7 @@ void FileManager::renamedFile(const QString &from, const QString &to)
}
}
/* Removes all occurrances of the IFile from m_filesWithWatch and m_states.
/* Removes all occurrences of the IFile from m_filesWithWatch and m_states.
If that results in a file no longer being referenced by any IFile, this
also removes the file watcher.
*/
......
......@@ -112,7 +112,7 @@ public:
QList<IFile *> saveModifiedFiles(const QList<IFile *> &files,
bool *cancelled = 0,
const QString &message = QString(),
const QString &alwaysSaveMessage = QString::null,
const QString &alwaysSaveMessage = QString(),
bool *alwaysSave = 0);
......@@ -167,7 +167,7 @@ private:
QList<IFile *> saveModifiedFiles(const QList<IFile *> &files,
bool *cancelled, bool silently,
const QString &message,
const QString &alwaysSaveMessage = QString::null,
const QString &alwaysSaveMessage = QString(),
bool *alwaysSave = 0);
Internal::FileManagerPrivate *d;
......
......@@ -61,7 +61,7 @@ namespace Internal {
// breakpoint type. The controls not applicable to the current type
// (say function name for file-and-line) are disabled and cleared out.
// However,the values are saved and restored once the respective mode
// is again choosen, which is done using m_savedParameters and
// is again chosen, which is done using m_savedParameters and
// setters/getters taking the parts mask enumeration parameter.
//
///////////////////////////////////////////////////////////////////////
......
......@@ -2472,7 +2472,7 @@ static inline void formatCdbBreakPointResponse(BreakpointId id, const Breakpoint
void CdbEngine::handleBreakPoints(const CdbExtensionCommandPtr &reply)
{
if (debugBreakpoints)
qDebug("CdbEngine::handleBreakPoints: sucess=%d: %s", reply->success, reply->reply.constData());
qDebug("CdbEngine::handleBreakPoints: success=%d: %s", reply->success, reply->reply.constData());
if (!reply->success) {
showMessage(QString::fromAscii(reply->errorMessage), LogError);
return;
......
......@@ -310,7 +310,7 @@ void ConsoleWindow::showOutput(int channel, const QString &output)
line.truncate(n);
line += QLatin1String(" [...] <cut off>");
}
m_console->appendPlainText(charForChannel(channel) + line + "\n");
m_console->appendPlainText(charForChannel(channel) + line + '\n');
}
QTextCursor cursor = m_console->textCursor();
cursor.movePosition(QTextCursor::End);
......
......@@ -271,12 +271,12 @@ void DisassemblerAgent::setContents(const DisassemblerLines &contents)
for (int i = 0, n = contents.size(); i != n; ++i) {
const DisassemblerLine &dl = contents.at(i);
if (dl.address) {
str += QString("0x");
str += QLatin1String("0x");
str += QString::number(dl.address, 16);
str += " ";
str += QLatin1String(" ");
}
str += dl.data;
str += "\n";
str += QLatin1Char('\n');
}
plainTextEdit->setPlainText(str);
plainTextEdit->setReadOnly(true);
......
......@@ -280,7 +280,7 @@ void GdbEngine::updateSubItemClassic(const WatchData &data0)
if (debuggerCore()->boolSetting(AutoDerefPointers)) {
// Try automatic dereferentiation
data.exp = "(*(" + data.exp + "))";
data.type = data.type + "."; // FIXME: fragile HACK to avoid recursion
data.type = data.type + '.'; // FIXME: fragile HACK to avoid recursion
insertData(data);
} else {
data.setChildrenUnneeded();
......
......@@ -597,7 +597,7 @@ void CodaGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
sendGdbServerAck();
logMessage(_("Not implemented 'Continue with signal' %1: ").arg(signalNumber),
LogWarning);
sendGdbServerMessage("O" + QByteArray("Console output").toHex());
sendGdbServerMessage('O' + QByteArray("Console output").toHex());
sendGdbServerMessage("W81"); // "Process exited with result 1
sendTrkContinue();
}
......
......@@ -2782,7 +2782,7 @@ void GdbEngine::requestModuleSymbols(const QString &moduleName)
QString fileName = tf.fileName();
tf.close();
postCommand("maint print msymbols " + fileName.toLocal8Bit()
+ " " + moduleName.toLocal8Bit(),
+ ' ' + moduleName.toLocal8Bit(),
NeedsStop, CB(handleShowModuleSymbols),
QVariant(moduleName + QLatin1Char('@') + fileName));
}
......
......@@ -837,7 +837,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
}
} // qPart/qXfer
else if (cmd.startsWith("X")) {
else if (cmd.startsWith('X')) {
logMessage(msgGdbPacket(QLatin1String("Write memory")));
// X addr,length
sendGdbServerAck();
......
......@@ -350,7 +350,7 @@ void LldbEngineGuest::requestUpdateWatchData(const Internal::WatchData &data,
void LldbEngineGuest::getWatchDataR(lldb::SBValue v, int level,
const QByteArray &p_iname, QList<WatchData> &wd)
{
QByteArray iname = p_iname + "." + QByteArray(v.GetName());
QByteArray iname = p_iname + '.' + QByteArray(v.GetName());
m_localesCache.insert(QString::fromLocal8Bit(iname), v);
#if defined(HAVE_LLDB_PRIVATE)
......@@ -584,7 +584,7 @@ void LldbEngineGuest::updateThreads()
ThreadData thread;
thread.id = t.GetThreadID();
thread.targetId = QString::number(t.GetThreadID());
thread.core = QString();
thread.core.clear();
thread.state = QString::number(t.GetStopReason());
switch (t.GetStopReason()) {
......
......@@ -368,7 +368,7 @@ void QmlCppEngine::interruptInferior()
void QmlCppEngine::requestInterruptInferior()
{
EDEBUG("\nMASTER REQUEST INTERUPT INFERIOR");
EDEBUG("\nMASTER REQUEST INTERRUPT INFERIOR");
DebuggerEngine::requestInterruptInferior();
d->m_cppEngine->requestInterruptInferior();
}
......
......@@ -826,9 +826,9 @@ void QmlEngine::messageReceived(const QByteArray &message)
logMessage(LogReceive, logString);
QString msg = stackFrames.isEmpty()
? tr("<p>An Uncaught Exception occured:</p><p>%2</p>")
? tr("<p>An Uncaught Exception occurred:</p><p>%2</p>")
.arg(Qt::escape(error))
: tr("<p>An Uncaught Exception occured in <i>%1</i>:</p><p>%2</p>")
: tr("<p>An Uncaught Exception occurred in <i>%1</i>:</p><p>%2</p>")
.arg(stackFrames.value(0).file, Qt::escape(error));
showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg);
} else {
......
......@@ -61,7 +61,7 @@ void dumpBacktrace(int maxdepth)
proc.start("addr2line", args);
proc.waitForStarted();
for (int i = 0; i < qMin(size, maxdepth); i++)
proc.write("0x" + QByteArray::number(quintptr(bt[i]), 16) + "\n");
proc.write("0x" + QByteArray::number(quintptr(bt[i]), 16) + '\n');
proc.closeWriteChannel();
QByteArray out = proc.readAllStandardOutput();
qDebug() << QCoreApplication::arguments().at(0);
......
......@@ -1963,7 +1963,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(const Input &input)
m_movetype = MoveExclusive;
m_subsubmode = SearchSubSubMode;
m_commandPrefix = QLatin1Char(m_lastSearchForward ? '/' : '?');
m_commandBuffer = QString();
m_commandBuffer.clear();
updateMiniBuffer();
}
} else if (input.is('`')) {
......
......@@ -1432,7 +1432,7 @@ QString PerforcePlugin::fileNameFromPerforceName(const QString& perforceName,
const PerforceResponse response = runP4Cmd(m_settings.topLevelSymLinkTarget(), args, flags);
if (response.error) {
*errorMessage = msgWhereFailed(perforceName, response.message);
return QString::null;
return QString();
}
QString output = response.stdOut;
......
......@@ -270,7 +270,7 @@ QString Abi::toString(const OSFlavor &of)
return QLatin1String("msys");
case ProjectExplorer::Abi::WindowsCEFlavor:
return QLatin1String("ce");
case ProjectExplorer::Abi::UnknownFlavor: // fall throught!
case ProjectExplorer::Abi::UnknownFlavor: // fall through!
default:
return QLatin1String("unknown");
}
......
......@@ -171,10 +171,10 @@ void OutputParserTester::taskAdded(const ProjectExplorer::Task &task)
void OutputParserTester::reset()
{
m_receivedStdErrChildLine = QString();
m_receivedStdOutChildLine = QString();
m_receivedStdErrChildLine.clear();
m_receivedStdOutChildLine.clear();
m_receivedTasks.clear();
m_receivedOutput = QString();
m_receivedOutput.clear();
}
#endif
......@@ -1353,7 +1353,8 @@ void ProjectExplorerPlugin::restoreSession()
// Converts "filename" "+45" or "filename" ":23"
// into "filename+45" and "filename:23"
foreach (const QString &str, arguments) {
if (!combinedList.isEmpty() && (str.startsWith("+") || str.startsWith(":"))) {
if (!combinedList.isEmpty() && (str.startsWith(QLatin1Char('+'))
|| str.startsWith(QLatin1Char(':')))) {
combinedList.last().append(str);
} else {
combinedList << str;
......@@ -2209,7 +2210,7 @@ QString ProjectExplorerPlugin::directoryFor(Node *node)
// We figure out a commonPath from the subfolders
QStringList list;
foreach (FolderNode *f, folder->subFolderNodes())
list << f->path() + "/";
list << f->path() + QLatin1Char('/');
if (list.isEmpty())
location = path.left(path.indexOf('#'));
else
......@@ -2432,7 +2433,7 @@ void ProjectExplorerPlugin::renameFile(Node *node, const QString &to)
return;
QString orgFilePath = QFileInfo(node->path()).absoluteFilePath();
QString dir = QFileInfo(orgFilePath).absolutePath();
QString newFilePath = dir + "/" + to;
QString newFilePath = dir + QLatin1Char('/') + to;
Core::ICore *core = Core::ICore::instance();
Core::IVersionControl *vc = core->vcsManager()->findVersionControlForDirectory(dir);
bool result = false;
......
......@@ -81,7 +81,7 @@ public slots:
signals:
void removeButtonClicked();
// This signal is emited whenever the target pointed to by the indices
// This signal is emitted whenever the target pointed to by the indices
// has changed.
void currentChanged(int targetIndex, int subIndex);
......
......@@ -386,7 +386,8 @@ bool ItemLibraryModel::isItemVisible(int itemLibId)
QString entryToImport(const ItemLibraryEntry &entry)
{
return entry.requiredImport() + " " + QString::number(entry.majorVersion()) + "." + QString::number(entry.minorVersion());
return entry.requiredImport() + QLatin1Char(' ') + QString::number(entry.majorVersion())
+ QLatin1Char('.') + QString::number(entry.minorVersion());
}
void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
......@@ -401,7 +402,7 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
QStringList imports;
foreach (const Import &import, model->imports())
if (import.isLibraryImport())
imports << import.url() + " " + import.version();
imports << import.url() + QLatin1Char(' ') + import.version();
foreach (ItemLibraryEntry entry, itemLibraryInfo->entries()) {
......
......@@ -573,7 +573,7 @@ QString NavigatorTreeModel::qmlTypeInQtContainer(const QString &qtContainerType)
{
QString typeName(qtContainerType);
if (typeName.startsWith("QDeclarativeListProperty<") &&
typeName.endsWith(">")) {
typeName.endsWith('>')) {
typeName.remove(0, 25);
typeName.chop(1);
}
......
......@@ -581,7 +581,7 @@ QString templateGeneration(NodeMetaInfo type, NodeMetaInfo superType, const QmlO
foreach (const QString &name, orderedList) {
QString properName = name;
properName.replace(".", "_");
properName.replace('.', '_');
QString typeName = type.propertyTypeName(name);
//alias resolution only possible with instance
......
......@@ -55,7 +55,7 @@ QImage StatesEditorImageProvider::requestImage(const QString &id, QSize *size, c
if (newSize.isEmpty())
newSize = QSize (100, 100);
QString imageId = id.split("-").first();
QString imageId = id.split(QLatin1Char('-')).first();
QImage image;
if (imageId == "baseState") {
......
......@@ -283,7 +283,7 @@ void QMLRewriter::includeLeadingEmptyLine(int &start) const
// FIXME: duplicate code in the QmlJS::Rewriter class, remove this
UiObjectMemberList *QMLRewriter::searchMemberToInsertAfter(UiObjectMemberList *members, const QStringList &propertyOrder)
{
const int objectDefinitionInsertionPoint = propertyOrder.indexOf(QString::null);
const int objectDefinitionInsertionPoint = propertyOrder.indexOf(QString());
UiObjectMemberList *lastObjectDef = 0;
UiObjectMemberList *lastNonObjectDef = 0;
......
......@@ -81,7 +81,7 @@ class CORESHARED_EXPORT NodeInstanceView : public AbstractView, public NodeInsta
public:
typedef QWeakPointer<NodeInstanceView> Pointer;
NodeInstanceView(QObject *parent = 0, NodeInstanceServerInterface::RunModus runModus = NodeInstanceServerInterface::NormalModus);
explicit NodeInstanceView(QObject *parent = 0, NodeInstanceServerInterface::RunModus runModus = NodeInstanceServerInterface::NormalModus);
~NodeInstanceView();
void modelAttached(Model *model);
......
......@@ -353,12 +353,12 @@ void NodeInstanceServer::addImports(const QVector<AddImportContainer> &container
importStatement += container.url().toString();
if (!container.version().isEmpty())
importStatement += " " + container.version();
importStatement += ' ' + container.version();
if (!container.alias().isEmpty())
importStatement += " as " + container.alias();
importStatement.append("\n");
importStatement.append('\n');
if (!m_importList.contains(importStatement))
m_importList.append(importStatement);
......
......@@ -74,7 +74,7 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const QString &
&& QDeclarativeMetaType::isQObject(metaProperty.userType())) {
QObject *propertyObject = QDeclarativeMetaType::toQObject(metaProperty.read(spiedObject));
if (propertyObject)
registerObject(propertyObject, prefix + metaProperty.name() + ".");
registerObject(propertyObject, prefix + metaProperty.name() + QLatin1Char('.'));
} else if (metaProperty.hasNotifySignal()) {
QMetaMethod metaMethod = metaProperty.notifySignal();
bool isConnecting = QMetaObject::connect(spiedObject, metaMethod.methodIndex(), this, methodeOffset, Qt::DirectConnection);
......@@ -90,7 +90,7 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const QString &
&& QDeclarativeMetaType::isQObject(metaProperty.userType())) {
QObject *propertyObject = QDeclarativeMetaType::toQObject(metaProperty.read(spiedObject));
if (propertyObject)
registerObject(propertyObject, prefix + metaProperty.name() + "/");
registerObject(propertyObject, prefix + metaProperty.name() + QLatin1Char('/'));
}
// search recursive in objects list
......@@ -101,7 +101,7 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const QString &
for (int i = 0; i < list.count(); i++) {
QObject *propertyObject = list.at(i);
if (propertyObject)
registerObject(propertyObject, prefix + metaProperty.name() + "/");
registerObject(propertyObject, prefix + metaProperty.name() + QLatin1Char('/'));
}
}
}
......
......@@ -99,13 +99,13 @@ public:
{
const Interpreter::ASTPropertyReference *ref = dynamic_cast<const Interpreter::ASTPropertyReference*>(value);
if (ref) {
QString type = "unkown";
QString type = "unknown";
if (ref->ast()->memberType)
type = ref->ast()->memberType->asString();
m_properties.append(qMakePair(name, type));
} else {
if (const Interpreter::QmlObjectValue * ov = dynamic_cast<const Interpreter::QmlObjectValue *>(value)) {
QString qualifiedTypeName = ov->packageName().isEmpty() ? ov->className() : ov->packageName() + "/" + ov->className();
QString qualifiedTypeName = ov->packageName().isEmpty() ? ov->className() : ov->packageName() + '/' + ov->className();
m_properties.append(qMakePair(name, qualifiedTypeName));
} else {
Interpreter::TypeId typeId;
......@@ -158,11 +158,11 @@ QStringList prototypes(const Interpreter::ObjectValue *ov, LookupContext::Ptr co
const Interpreter::QmlObjectValue * qmlValue = dynamic_cast<const Interpreter::QmlObjectValue *>(ov);
if (qmlValue) {
if (versions) {
list << qmlValue->packageName() + "/" + qmlValue->className() +
" " + QString::number(qmlValue->version().majorVersion()) +
"." + QString::number(qmlValue->version().minorVersion());
list << qmlValue->packageName() + '/' + qmlValue->className() +
' ' + QString::number(qmlValue->version().majorVersion()) +
'.' + QString::number(qmlValue->version().minorVersion());
} else {
list << qmlValue->packageName() + "/" + qmlValue->className();
list << qmlValue->packageName() + '/' + qmlValue->className();
}
} else {
if (versions) {
......@@ -385,7 +385,7 @@ QHash<QString, NodeMetaInfoPrivate::Pointer> NodeMetaInfoPrivate::m_nodeMetaInfo
static inline QString stringIdentifier( const QString &type, int maj, int min)
{
return type + QString::number(maj) + "_" + QString::number(min);
return type + QString::number(maj) + '_' + QString::number(min);
}
NodeMetaInfoPrivate::Pointer NodeMetaInfoPrivate::create(Model *model, const QString &type, int maj, int min)
......@@ -492,8 +492,9 @@ bool NodeMetaInfoPrivate::isPropertyWritable(const QString &propertyName) const
return false;
if (propertyName.contains('.')) {
const QString objectName = propertyName.split(".").first();
const QString rawPropertyName = propertyName.split(".").last();
const QStringList parts = propertyName.split('.');
const QString objectName = parts.first();
const QString rawPropertyName = parts.last();
const QString objectType = propertyType(objectName);
if (isValueType(objectType)) {
......@@ -523,8 +524,9 @@ bool NodeMetaInfoPrivate::isPropertyList(const QString &propertyName) const
return false;
if (propertyName.contains('.')) {
const QString objectName = propertyName.split(".").first();
const QString rawPropertyName = propertyName.split(".").last();
const QStringList parts = propertyName.split('.');
const QString objectName = parts.first();
const QString rawPropertyName = parts.last();
const QString objectType = propertyType(objectName);
if (isValueType(objectType)) {
......@@ -550,8 +552,9 @@ bool NodeMetaInfoPrivate::isPropertyPointer(const QString &propertyName) const
return false;
if (propertyName.contains('.')) {
const QString objectName = propertyName.split(".").first();
const QString rawPropertyName = propertyName.split(".").last();
const QStringList parts = propertyName.split('.');
const QString objectName = parts.first();
const QString rawPropertyName = parts.last();
const QString objectType = propertyType(objectName);
if (isValueType(objectType)) {
......@@ -577,8 +580,9 @@ bool NodeMetaInfoPrivate::isPropertyEnum(const QString &propertyName) const
return false;
if (propertyName.contains('.')) {
const QString objectName = propertyName.split(".").first();
const QString rawPropertyName = propertyName.split(".").last();
const QStringList parts = propertyName.split('.');
const QString objectName = parts.first();
const QString rawPropertyName = parts.last();
const QString objectType = propertyType(objectName);
if (isValueType(objectType)) {
......@@ -612,8 +616,9 @@ QString NodeMetaInfoPrivate::propertyEnumScope(const QString &propertyName) cons
return QString();
if (propertyName.contains('.')) {
const QString objectName = propertyName.split(".").first();
const QString rawPropertyName = propertyName.split(".").last();
const QStringList parts = propertyName.split('.');
const QString objectName = parts.first();
const QString rawPropertyName = parts.last();
const QString objectType = propertyType(objectName);
if (isValueType(objectType)) {
......@@ -797,7 +802,7 @@ void NodeMetaInfoPrivate::setupPrototypes()
description.minorVersion = qmlValue->version().minorVersion();
description.majorVersion = qmlValue->version().majorVersion();
if (!qmlValue->packageName().isEmpty())
description.className = qmlValue->packageName() + "/" + description.className;
description.className = qmlValue->packageName() + '/' + description.className;
m_prototypes.append(description);
} else {
if (lookupContext()->context()->lookupType(document(), QStringList() << ov->className()))
......
......@@ -69,7 +69,7 @@ public:
bool operator()(QmlJS::AST::UiProgram *sourceAST) {
m_inStates = false;
m_stateName = QString();
m_stateName.clear();
Node::accept(sourceAST->imports, this);
......
......@@ -138,7 +138,7 @@ QString QmlTextGenerator::toQml(const ModelNode &node, int indentDepth) const
QString type = node.type();
QString url;
if (type.contains('/')) {
QStringList nameComponents = type.split("/");
const QStringList nameComponents = type.split('/');
url = nameComponents.first();
type = nameComponents.last();
}
......@@ -158,7 +158,7 @@ QString QmlTextGenerator::toQml(const ModelNode &node, int indentDepth) const
QString result;
if (!alias.isEmpty())
result = alias + ".";
result = alias + '.';
result += type;
result += QLatin1String(" {\n");
......
......@@ -73,9 +73,10 @@ ViewLogger::ViewLogger(QObject *parent)
#else
const QString tempPath = QDir::tempPath();
#endif