QDebugMessageService::QDebugMessageService(QObject *parent) :
QQmlDebugService(*(new QDebugMessageServicePrivate()),
- QLatin1String("DebugMessages"), 2, parent)
+ QStringLiteral("DebugMessages"), 2, parent)
{
Q_D(QDebugMessageService);
pluginNames << service->name();
pluginVersions << service->version();
}
- out << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << pluginNames << pluginVersions;
+ out << QString(QStringLiteral("QDeclarativeDebugClient")) << 1 << pluginNames << pluginVersions;
}
QMetaObject::invokeMethod(q, "_q_sendMessages", Qt::QueuedConnection, Q_ARG(QList<QByteArray>, QList<QByteArray>() << message));
connection->setPort(m_port, m_block);
} else {
QCoreApplicationPrivate *appD = static_cast<QCoreApplicationPrivate*>(QObjectPrivate::get(qApp));
- qWarning() << QString::fromAscii("QML Debugger: Ignoring \"-qmljsdebugger=%1\". "
- "Remote debugger plugin has not been found.").arg(appD->qmljsDebugArgumentsString());
+ qWarning() << QString(QLatin1String("QML Debugger: Ignoring \"-qmljsdebugger=%1\". "
+ "Remote debugger plugin has not been found.")).arg(appD->qmljsDebugArgumentsString());
}
exec();
// format: qmljsdebugger=port:3768[,block] OR qmljsdebugger=ost[,block]
if (!appD->qmljsDebugArgumentsString().isEmpty()) {
if (!QQmlEnginePrivate::qml_debugging_enabled) {
- qWarning() << QString::fromLatin1(
+ qWarning() << QString(QLatin1String(
"QML Debugger: Ignoring \"-qmljsdebugger=%1\". "
- "Debugging has not been enabled.").arg(
+ "Debugging has not been enabled.")).arg(
appD->qmljsDebugArgumentsString());
return 0;
}
if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) {
int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(','));
port = appD->qmljsDebugArgumentsString().mid(5, separatorIndex - 5).toInt(&ok);
- pluginName = QLatin1String("qmldbg_tcp");
+ pluginName = QStringLiteral("qmldbg_tcp");
} else if (appD->qmljsDebugArgumentsString().contains(QLatin1String("ost"))) {
- pluginName = QLatin1String("qmldbg_ost");
+ pluginName = QStringLiteral("qmldbg_ost");
ok = true;
}
}
} else {
- qWarning() << QString::fromLatin1(
+ qWarning() << QString(QLatin1String(
"QML Debugger: Ignoring \"-qmljsdebugger=%1\". "
- "Format is -qmljsdebugger=port:<port>[,block]").arg(
+ "Format is -qmljsdebugger=port:<port>[,block]")).arg(
appD->qmljsDebugArgumentsString());
}
}
#else
if (!appD->qmljsDebugArgumentsString().isEmpty()) {
- qWarning() << QString::fromLatin1(
+ qWarning() << QString(QLatin1String(
"QML Debugger: Ignoring \"-qmljsdebugger=%1\". "
- "QtQml is not configured for debugging.").arg(
+ "QtQml is not configured for debugging.")).arg(
appD->qmljsDebugArgumentsString());
}
#endif
pluginVersions << service->version();
}
- out << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << pluginNames << pluginVersions;
+ out << QString(QStringLiteral("QDeclarativeDebugClient")) << 0 << protocolVersion << pluginNames << pluginVersions;
}
d->connection->send(QList<QByteArray>() << helloAnswer);
QString QQmlDebugService::objectToString(QObject *obj)
{
if(!obj)
- return QLatin1String("NULL");
+ return QStringLiteral("NULL");
QString objectName = obj->objectName();
if(objectName.isEmpty())
- objectName = QLatin1String("<unnamed>");
+ objectName = QStringLiteral("<unnamed>");
QString rv = QString::fromUtf8(obj->metaObject()->className()) +
QLatin1String(": ") + objectName;
}
QQmlEngineDebugService::QQmlEngineDebugService(QObject *parent)
- : QQmlDebugService(QLatin1String("QDeclarativeEngine"), 1, parent),
+ : QQmlDebugService(QStringLiteral("QDeclarativeEngine"), 1, parent),
m_watch(new QQmlWatcher(this)),
m_statesDelegate(0)
{
if (o) {
QString name = o->objectName();
if (name.isEmpty())
- name = QLatin1String("<unnamed object>");
+ name = QStringLiteral("<unnamed object>");
return name;
}
}
- return QLatin1String("<unknown value>");
+ return QStringLiteral("<unknown value>");
}
void QQmlEngineDebugService::buildObjectDump(QDataStream &message,
prop.value = expr->expression();
QObject *scope = expr->scopeObject();
if (scope) {
- QString sig = QLatin1String(scope->metaObject()->method(signal->index()).signature());
+ QString sig = QString::fromLatin1(scope->metaObject()->method(signal->index()).signature());
int lparen = sig.indexOf(QLatin1Char('('));
if (lparen >= 0) {
QString methodName = sig.mid(0, lparen);
bool undefined = false;
QVariant value = exprObj.evaluate(&undefined);
if (undefined)
- result = QLatin1String("<undefined>");
+ result = QString(QStringLiteral("<undefined>"));
else
result = valueContents(value);
} else {
- result = QLatin1String("<unknown context>");
+ result = QString(QStringLiteral("<unknown context>"));
}
QByteArray reply;
QString paramStr;
for (int ii = 0; ii < paramNames.count(); ++ii) {
- if (ii != 0) paramStr.append(QLatin1String(","));
+ if (ii != 0) paramStr.append(QLatin1Char(','));
paramStr.append(QString::fromUtf8(paramNames.at(ii)));
}
- QString jsfunction = QLatin1String("(function ") + method + QLatin1String("(") + paramStr +
+ QString jsfunction = QLatin1String("(function ") + method + QLatin1Char('(') + paramStr +
QLatin1String(") {");
jsfunction += body;
jsfunction += QLatin1String("\n})");
Q_GLOBAL_STATIC(QQmlInspectorService, serviceInstance)
QQmlInspectorService::QQmlInspectorService()
- : QQmlDebugService(QLatin1String("QDeclarativeObserverMode"), 1)
+ : QQmlDebugService(QStringLiteral("QDeclarativeObserverMode"), 1)
, m_currentInspectorPlugin(0)
{
registerService();
}
QQmlProfilerService::QQmlProfilerService()
- : QQmlDebugService(QLatin1String("CanvasFrameRate"), 1),
+ : QQmlDebugService(QStringLiteral("CanvasFrameRate"), 1),
m_enabled(false), m_messageReceived(false)
{
m_timer.start();
QV8DebugService::QV8DebugService(QObject *parent)
: QQmlDebugService(*(new QV8DebugServicePrivate()),
- QLatin1String("V8Debugger"), 2, parent)
+ QStringLiteral("V8Debugger"), 2, parent)
{
Q_D(QV8DebugService);
v8ServiceInstancePtr = this;
};
QV8ProfilerService::QV8ProfilerService(QObject *parent)
- : QQmlDebugService(*(new QV8ProfilerServicePrivate()), QLatin1String("V8Profiler"), 1, parent)
+ : QQmlDebugService(*(new QV8ProfilerServicePrivate()), QStringLiteral("V8Profiler"), 1, parent)
{
Q_D(QV8ProfilerService);