Libraries: Fix single-character string literals.
Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
f9bf737d74
commit
bba86a01c9
@ -186,7 +186,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
|
||||
}
|
||||
if (!found) {
|
||||
QWindowsFileSystemWatcherEngineThread *thread = new QWindowsFileSystemWatcherEngineThread();
|
||||
DEBUG() << " ###Creating new thread" << thread << "(" << (threads.count()+1) << "threads)";
|
||||
DEBUG() << " ###Creating new thread" << thread << '(' << (threads.count()+1) << "threads)";
|
||||
thread->handles.append(handle.handle);
|
||||
thread->handleForDir.insert(QFileSystemWatcherPathKey(absolutePath), handle);
|
||||
|
||||
|
@ -386,7 +386,7 @@ QMacSettingsPrivate::QMacSettingsPrivate(QSettings::Scope scope, const QString &
|
||||
if (main_bundle_identifier != NULL) {
|
||||
QString bundle_identifier(qtKey(main_bundle_identifier));
|
||||
// CFBundleGetIdentifier returns identifier separated by slashes rather than periods.
|
||||
QStringList bundle_identifier_components = bundle_identifier.split(QLatin1String("/"));
|
||||
QStringList bundle_identifier_components = bundle_identifier.split(QLatin1Char('/'));
|
||||
// pre-reverse them so that when they get reversed again below, they are in the com.company.product format.
|
||||
QStringList bundle_identifier_components_reversed;
|
||||
for (int i=0; i<bundle_identifier_components.size(); ++i) {
|
||||
|
@ -574,7 +574,7 @@ QDebug operator<<(QDebug dbg, const QJsonDocument &o)
|
||||
QJsonPrivate::Writer::objectToJson(static_cast<QJsonPrivate::Object *>(o.d->header->root()), json, 0, true);
|
||||
dbg.nospace() << "QJsonDocument("
|
||||
<< json.constData() // print as utf-8 string without extra quotation marks
|
||||
<< ")";
|
||||
<< ')';
|
||||
return dbg;
|
||||
}
|
||||
#endif
|
||||
|
@ -738,23 +738,23 @@ QDebug operator<<(QDebug dbg, const QJsonValue &o)
|
||||
dbg << "QJsonValue(null)";
|
||||
break;
|
||||
case QJsonValue::Bool:
|
||||
dbg.nospace() << "QJsonValue(bool, " << o.toBool() << ")";
|
||||
dbg.nospace() << "QJsonValue(bool, " << o.toBool() << ')';
|
||||
break;
|
||||
case QJsonValue::Double:
|
||||
dbg.nospace() << "QJsonValue(double, " << o.toDouble() << ")";
|
||||
dbg.nospace() << "QJsonValue(double, " << o.toDouble() << ')';
|
||||
break;
|
||||
case QJsonValue::String:
|
||||
dbg.nospace() << "QJsonValue(string, " << o.toString() << ")";
|
||||
dbg.nospace() << "QJsonValue(string, " << o.toString() << ')';
|
||||
break;
|
||||
case QJsonValue::Array:
|
||||
dbg.nospace() << "QJsonValue(array, ";
|
||||
dbg << o.toArray();
|
||||
dbg << ")";
|
||||
dbg << ')';
|
||||
break;
|
||||
case QJsonValue::Object:
|
||||
dbg.nospace() << "QJsonValue(object, ";
|
||||
dbg << o.toObject();
|
||||
dbg << ")";
|
||||
dbg << ')';
|
||||
break;
|
||||
}
|
||||
return dbg;
|
||||
|
@ -137,13 +137,13 @@ static void valueToJson(const QJsonPrivate::Base *b, const QJsonPrivate::Value &
|
||||
json += compact ? "[" : "[\n";
|
||||
arrayContentToJson(static_cast<QJsonPrivate::Array *>(v.base(b)), json, indent + (compact ? 0 : 1), compact);
|
||||
json += QByteArray(4*indent, ' ');
|
||||
json += "]";
|
||||
json += ']';
|
||||
break;
|
||||
case QJsonValue::Object:
|
||||
json += compact ? "{" : "{\n";
|
||||
objectContentToJson(static_cast<QJsonPrivate::Object *>(v.base(b)), json, indent + (compact ? 0 : 1), compact);
|
||||
json += QByteArray(4*indent, ' ');
|
||||
json += "}";
|
||||
json += '}';
|
||||
break;
|
||||
case QJsonValue::Null:
|
||||
default:
|
||||
|
@ -1288,7 +1288,7 @@ QVariant QStateMachinePrivate::savedValueForRestorable(const QList<QAbstractStat
|
||||
QObject *object, const QByteArray &propertyName) const
|
||||
{
|
||||
#ifdef QSTATEMACHINE_RESTORE_PROPERTIES_DEBUG
|
||||
qDebug() << q_func() << ": savedValueForRestorable(" << exitedStates_sorted << object << propertyName << ")";
|
||||
qDebug() << q_func() << ": savedValueForRestorable(" << exitedStates_sorted << object << propertyName << ')';
|
||||
#endif
|
||||
for (int i = exitedStates_sorted.size() - 1; i >= 0; --i) {
|
||||
QAbstractState *s = exitedStates_sorted.at(i);
|
||||
@ -1311,7 +1311,7 @@ void QStateMachinePrivate::registerRestorable(QAbstractState *state, QObject *ob
|
||||
const QVariant &value)
|
||||
{
|
||||
#ifdef QSTATEMACHINE_RESTORE_PROPERTIES_DEBUG
|
||||
qDebug() << q_func() << ": registerRestorable(" << state << object << propertyName << value << ")";
|
||||
qDebug() << q_func() << ": registerRestorable(" << state << object << propertyName << value << ')';
|
||||
#endif
|
||||
RestorableId id(object, propertyName);
|
||||
QHash<RestorableId, QVariant> &restorables = registeredRestorablesForState[state];
|
||||
@ -1327,7 +1327,7 @@ void QStateMachinePrivate::unregisterRestorables(const QList<QAbstractState *> &
|
||||
const QByteArray &propertyName)
|
||||
{
|
||||
#ifdef QSTATEMACHINE_RESTORE_PROPERTIES_DEBUG
|
||||
qDebug() << q_func() << ": unregisterRestorables(" << states << object << propertyName << ")";
|
||||
qDebug() << q_func() << ": unregisterRestorables(" << states << object << propertyName << ')';
|
||||
#endif
|
||||
RestorableId id(object, propertyName);
|
||||
for (int i = 0; i < states.size(); ++i) {
|
||||
|
@ -2479,7 +2479,7 @@ QDataStream &operator>>(QDataStream &in, QRegularExpression &re)
|
||||
QDebug operator<<(QDebug debug, const QRegularExpression &re)
|
||||
{
|
||||
QDebugStateSaver saver(debug);
|
||||
debug.nospace() << "QRegularExpression(" << re.pattern() << ", " << re.patternOptions() << ")";
|
||||
debug.nospace() << "QRegularExpression(" << re.pattern() << ", " << re.patternOptions() << ')';
|
||||
return debug;
|
||||
}
|
||||
|
||||
@ -2521,7 +2521,7 @@ QDebug operator<<(QDebug debug, QRegularExpression::PatternOptions patternOption
|
||||
flags.chop(1);
|
||||
}
|
||||
|
||||
debug.nospace() << "QRegularExpression::PatternOptions(" << flags << ")";
|
||||
debug.nospace() << "QRegularExpression::PatternOptions(" << flags << ')';
|
||||
|
||||
return debug;
|
||||
}
|
||||
@ -2550,7 +2550,7 @@ QDebug operator<<(QDebug debug, const QRegularExpressionMatch &match)
|
||||
for (int i = 0; i <= match.lastCapturedIndex(); ++i) {
|
||||
debug << i
|
||||
<< ":(" << match.capturedStart(i) << ", " << match.capturedEnd(i)
|
||||
<< ", " << match.captured(i) << ")";
|
||||
<< ", " << match.captured(i) << ')';
|
||||
if (i < match.lastCapturedIndex())
|
||||
debug << ", ";
|
||||
}
|
||||
@ -2558,12 +2558,12 @@ QDebug operator<<(QDebug debug, const QRegularExpressionMatch &match)
|
||||
debug << ", has partial match: ("
|
||||
<< match.capturedStart(0) << ", "
|
||||
<< match.capturedEnd(0) << ", "
|
||||
<< match.captured(0) << ")";
|
||||
<< match.captured(0) << ')';
|
||||
} else {
|
||||
debug << ", no match";
|
||||
}
|
||||
|
||||
debug << ")";
|
||||
debug << ')';
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
@ -1793,7 +1793,7 @@ void QPdfEnginePrivate::printString(const QString &string) {
|
||||
array.append(part[j]);
|
||||
}
|
||||
}
|
||||
array.append(")");
|
||||
array.append(')');
|
||||
write(array);
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ void QHttpNetworkConnectionPrivate::prepareRequest(HttpMessagePair &messagePair)
|
||||
QByteArray host;
|
||||
if (add.setAddress(hostName)) {
|
||||
if (add.protocol() == QAbstractSocket::IPv6Protocol)
|
||||
host = "[" + hostName.toLatin1() + "]";//format the ipv6 in the standard way
|
||||
host = '[' + hostName.toLatin1() + ']'; //format the ipv6 in the standard way
|
||||
else
|
||||
host = hostName.toLatin1();
|
||||
|
||||
|
@ -1704,7 +1704,7 @@ QNetworkRequest QNetworkAccessManagerPrivate::prepareMultipart(const QNetworkReq
|
||||
break;
|
||||
}
|
||||
// putting the boundary into quotes, recommended in RFC 2046 section 5.1.1
|
||||
contentType += "; boundary=\"" + multiPart->d_func()->boundary + "\"";
|
||||
contentType += "; boundary=\"" + multiPart->d_func()->boundary + '"';
|
||||
newRequest.setHeader(QNetworkRequest::ContentTypeHeader, QVariant(contentType));
|
||||
}
|
||||
|
||||
|
@ -693,13 +693,13 @@ QByteArray QAuthenticatorPrivate::digestMd5Response(const QByteArray &challenge,
|
||||
credentials += "uri=\"" + path + "\", ";
|
||||
if (!opaque.isEmpty())
|
||||
credentials += "opaque=\"" + opaque + "\", ";
|
||||
credentials += "response=\"" + response + '\"';
|
||||
credentials += "response=\"" + response + '"';
|
||||
if (!options.value("algorithm").isEmpty())
|
||||
credentials += ", algorithm=" + options.value("algorithm");
|
||||
if (!options.value("qop").isEmpty()) {
|
||||
credentials += ", qop=" + qop + ", ";
|
||||
credentials += "nc=" + nonceCountString + ", ";
|
||||
credentials += "cnonce=\"" + cnonce + '\"';
|
||||
credentials += "cnonce=\"" + cnonce + '"';
|
||||
}
|
||||
|
||||
return credentials;
|
||||
|
@ -1605,7 +1605,7 @@ QDebug operator<<(QDebug debug, const QNetworkProxy &proxy)
|
||||
debug << "Unknown proxy " << int(type);
|
||||
break;
|
||||
}
|
||||
debug << "\"" << proxy.hostName() << ":" << proxy.port() << "\" ";
|
||||
debug << '"' << proxy.hostName() << ':' << proxy.port() << "\" ";
|
||||
QNetworkProxy::Capabilities caps = proxy.capabilities();
|
||||
QStringList scaps;
|
||||
if (caps & QNetworkProxy::TunnelingCapability)
|
||||
@ -1618,7 +1618,7 @@ QDebug operator<<(QDebug debug, const QNetworkProxy &proxy)
|
||||
scaps << QStringLiteral("Caching");
|
||||
if (caps & QNetworkProxy::HostNameLookupCapability)
|
||||
scaps << QStringLiteral("NameLookup");
|
||||
debug << "[" << scaps.join(QLatin1Char(' ')) << "]";
|
||||
debug << '[' << scaps.join(QLatin1Char(' ')) << ']';
|
||||
return debug;
|
||||
}
|
||||
#endif
|
||||
|
@ -58,7 +58,7 @@ static bool ignoreProxyFor(const QNetworkProxyQuery &query)
|
||||
QString peerHostName = query.peerHostName();
|
||||
|
||||
// Since we use suffix matching, "*" is our 'default' behaviour
|
||||
if (token.startsWith("*"))
|
||||
if (token.startsWith('*'))
|
||||
token = token.mid(1);
|
||||
|
||||
// Harmonize trailing dot notation
|
||||
|
@ -481,7 +481,7 @@ void QHttpSocketEngine::slotSocketConnected()
|
||||
QUrl::toAce(d->peerName);
|
||||
QByteArray path = peerAddress + ':' + QByteArray::number(d->peerPort);
|
||||
QByteArray data = method;
|
||||
data += " ";
|
||||
data += ' ';
|
||||
data += path;
|
||||
data += " HTTP/1.1\r\n";
|
||||
data += "Proxy-Connection: keep-alive\r\n";
|
||||
|
@ -209,7 +209,7 @@ bool QLocalServerPrivate::listen(qintptr socketDescriptor)
|
||||
QString name = QString::fromLatin1(addr.sun_path);
|
||||
if (!name.isEmpty()) {
|
||||
fullServerName = name;
|
||||
serverName = fullServerName.mid(fullServerName.lastIndexOf(QLatin1String("/"))+1);
|
||||
serverName = fullServerName.mid(fullServerName.lastIndexOf(QLatin1Char('/')) + 1);
|
||||
if (serverName.isEmpty()) {
|
||||
serverName = fullServerName;
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ QDebug operator<<(QDebug debug, QSslEllipticCurve curve)
|
||||
{
|
||||
QDebugStateSaver saver(debug);
|
||||
debug.resetFormat().nospace();
|
||||
debug << "QSslEllipticCurve(" << curve.shortName() << ")";
|
||||
debug << "QSslEllipticCurve(" << curve.shortName() << ')';
|
||||
return debug;
|
||||
}
|
||||
#endif
|
||||
|
@ -1242,7 +1242,7 @@ void QSslSocket::setCiphers(const QString &ciphers)
|
||||
{
|
||||
Q_D(QSslSocket);
|
||||
d->configuration.ciphers.clear();
|
||||
foreach (const QString &cipherName, ciphers.split(QLatin1String(":"),QString::SkipEmptyParts)) {
|
||||
foreach (const QString &cipherName, ciphers.split(QLatin1Char(':'), QString::SkipEmptyParts)) {
|
||||
QSslCipher cipher(cipherName);
|
||||
if (!cipher.isNull())
|
||||
d->configuration.ciphers << cipher;
|
||||
|
@ -225,7 +225,7 @@ QSslCipher QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(SSL_CIPHER *ciph
|
||||
char buf [256];
|
||||
QString descriptionOneLine = QString::fromLatin1(q_SSL_CIPHER_description(cipher, buf, sizeof(buf)));
|
||||
|
||||
QStringList descriptionList = descriptionOneLine.split(QLatin1String(" "), QString::SkipEmptyParts);
|
||||
QStringList descriptionList = descriptionOneLine.split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||
if (descriptionList.size() > 5) {
|
||||
// ### crude code.
|
||||
ciph.d->isNull = false;
|
||||
@ -290,7 +290,7 @@ int q_X509Callback(int ok, X509_STORE_CTX *ctx)
|
||||
<< "OU=" << cert.subjectInfo(QSslCertificate::OrganizationalUnitName)
|
||||
<< "C=" << cert.subjectInfo(QSslCertificate::CountryName)
|
||||
<< "ST=" << cert.subjectInfo(QSslCertificate::StateOrProvinceName);
|
||||
qCDebug(lcSsl) << "Valid:" << cert.effectiveDate() << "-" << cert.expiryDate();
|
||||
qCDebug(lcSsl) << "Valid:" << cert.effectiveDate() << '-' << cert.expiryDate();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ QDebug operator<<(QDebug d, const QDBusMenuItem &item)
|
||||
{
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace();
|
||||
d << "QDBusMenuItem(id=" << item.m_id << ", properties=" << item.m_properties << ")";
|
||||
d << "QDBusMenuItem(id=" << item.m_id << ", properties=" << item.m_properties << ')';
|
||||
return d;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ QStringList QDeviceDiscoveryStatic::scanConnectedDevices()
|
||||
if (m_types & Device_InputMask) {
|
||||
dir.setPath(QString::fromLatin1(QT_EVDEV_DEVICE_PATH));
|
||||
foreach (const QString &deviceFile, dir.entryList()) {
|
||||
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
|
||||
QString absoluteFilePath = dir.absolutePath() + QLatin1Char('/') + deviceFile;
|
||||
if (checkDeviceType(absoluteFilePath))
|
||||
devices << absoluteFilePath;
|
||||
}
|
||||
@ -100,7 +100,7 @@ QStringList QDeviceDiscoveryStatic::scanConnectedDevices()
|
||||
if (m_types & Device_VideoMask) {
|
||||
dir.setPath(QString::fromLatin1(QT_DRM_DEVICE_PATH));
|
||||
foreach (const QString &deviceFile, dir.entryList()) {
|
||||
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
|
||||
QString absoluteFilePath = dir.absolutePath() + QLatin1Char('/') + deviceFile;
|
||||
if (checkDeviceType(absoluteFilePath))
|
||||
devices << absoluteFilePath;
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ bool QDeviceDiscoveryUDev::checkDeviceType(udev_device *dev)
|
||||
|
||||
if ((m_types & Device_Keyboard) && (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_KEYBOARD"), "1") == 0 )) {
|
||||
const char *capabilities_key = udev_device_get_sysattr_value(dev, "capabilities/key");
|
||||
QStringList val = QString::fromUtf8(capabilities_key).split(QString::fromUtf8(" "), QString::SkipEmptyParts);
|
||||
QStringList val = QString::fromUtf8(capabilities_key).split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||
if (!val.isEmpty()) {
|
||||
bool ok;
|
||||
unsigned long long keys = val.last().toULongLong(&ok, 16);
|
||||
|
@ -188,7 +188,7 @@ QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByt
|
||||
error = FT_New_Face(library, file.constData(), index, &face);
|
||||
}
|
||||
if (error != FT_Err_Ok) {
|
||||
qDebug() << "FT_New_Face failed with index" << index << ":" << hex << error;
|
||||
qDebug() << "FT_New_Face failed with index" << index << ':' << hex << error;
|
||||
break;
|
||||
}
|
||||
numFaces = face->num_faces;
|
||||
|
@ -148,7 +148,7 @@ bool QEvdevMouseHandler::getHardwareMaximum()
|
||||
qCDebug(qLcEvdevMouse) << "Absolute pointing device"
|
||||
<< "hardware max x" << m_hardwareWidth
|
||||
<< "hardware max y" << m_hardwareHeight
|
||||
<< "hardware scalers x" << m_hardwareScalerX << "y" << m_hardwareScalerY;
|
||||
<< "hardware scalers x" << m_hardwareScalerX << 'y' << m_hardwareScalerY;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2312,7 +2312,7 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString
|
||||
(column < 0) ||
|
||||
(row >= interface->tableInterface()->rowCount()) ||
|
||||
(column >= interface->tableInterface()->columnCount())) {
|
||||
qAtspiDebug() << "WARNING: invalid index for tableInterface GetAccessibleAt (" << row << ", " << column << ")";
|
||||
qAtspiDebug() << "WARNING: invalid index for tableInterface GetAccessibleAt (" << row << ", " << column << ')';
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2331,7 +2331,7 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString
|
||||
int column = message.arguments().at(1).toInt();
|
||||
QAccessibleInterface *cell = interface->tableInterface()->cellAt(row, column);
|
||||
if (!cell) {
|
||||
qAtspiDebug() << "WARNING: AtSpiAdaptor::GetIndexAt(" << row << "," << column << ") did not find a cell. " << interface;
|
||||
qAtspiDebug() << "WARNING: AtSpiAdaptor::GetIndexAt(" << row << ',' << column << ") did not find a cell. " << interface;
|
||||
return false;
|
||||
}
|
||||
int index = interface->indexOfChild(cell);
|
||||
|
@ -845,7 +845,7 @@ QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QStri
|
||||
QHashIterator<QString, QOfonoDataConnectionManagerInterface*> i(ofonoContextManagers);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
const QString path = i.key() +"/"+contextPart;
|
||||
const QString path = i.key() + QLatin1Char('/') +contextPart;
|
||||
if (isActiveContext(path)) {
|
||||
cpPriv->state |= QNetworkConfiguration::Active;
|
||||
break;
|
||||
@ -1024,7 +1024,7 @@ QNetworkConfiguration::BearerType QNetworkManagerEngine::currentBearerType(const
|
||||
QHashIterator<QString, QOfonoDataConnectionManagerInterface*> i(ofonoContextManagers);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
QString contextPath = i.key() +"/"+contextPart;
|
||||
QString contextPath = i.key() + QLatin1Char('/') +contextPart;
|
||||
|
||||
if (i.value()->contexts().contains(contextPath)) {
|
||||
|
||||
|
@ -202,7 +202,7 @@ void QTuioHandler::process2DCurAlive(const QOscMessage &message)
|
||||
|
||||
for (int i = 1; i < arguments.count(); ++i) {
|
||||
if (QMetaType::Type(arguments.at(i).type()) != QMetaType::Int) {
|
||||
qWarning() << "Ignoring malformed TUIO alive message (bad argument on position" << i << arguments << ")";
|
||||
qWarning() << "Ignoring malformed TUIO alive message (bad argument on position" << i << arguments << ')';
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ namespace QtAndroidInput
|
||||
}
|
||||
|
||||
#ifdef QT_DEBUG_ANDROID_STYLUS
|
||||
qDebug() << action << pointerType << buttonState << "@" << x << y << "pressure" << pressure << ": buttons" << buttons;
|
||||
qDebug() << action << pointerType << buttonState << '@' << x << y << "pressure" << pressure << ": buttons" << buttons;
|
||||
#endif
|
||||
|
||||
QWindowSystemInterface::handleTabletEvent(tlw, ulong(time),
|
||||
@ -681,7 +681,7 @@ namespace QtAndroidInput
|
||||
return Qt::Key_AudioCycleTrack;
|
||||
|
||||
default:
|
||||
qWarning() << "Unhandled key code " << key << "!";
|
||||
qWarning() << "Unhandled key code " << key << '!';
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ namespace QtAndroid
|
||||
QString manufacturer = QJNIObjectPrivate::getStaticObjectField("android/os/Build", "MANUFACTURER", "Ljava/lang/String;").toString();
|
||||
QString model = QJNIObjectPrivate::getStaticObjectField("android/os/Build", "MODEL", "Ljava/lang/String;").toString();
|
||||
|
||||
return manufacturer + QStringLiteral(" ") + model;
|
||||
return manufacturer + QLatin1Char(' ') + model;
|
||||
}
|
||||
|
||||
int createSurface(AndroidSurfaceClient *client, const QRect &geometry, bool onTop, int imageDepth)
|
||||
|
@ -122,8 +122,8 @@ public:
|
||||
m_assetFile = 0;
|
||||
m_assetDir = asset;
|
||||
m_fileName = fileName;
|
||||
if (!m_fileName.endsWith(QChar(QLatin1Char('/'))))
|
||||
m_fileName += "/";
|
||||
if (!m_fileName.endsWith(QLatin1Char('/')))
|
||||
m_fileName += QLatin1Char('/');
|
||||
}
|
||||
|
||||
~AndroidAbstractFileEngine()
|
||||
@ -231,8 +231,8 @@ public:
|
||||
return;
|
||||
|
||||
m_fileName = file;
|
||||
if (!m_fileName.endsWith(QChar(QLatin1Char('/'))))
|
||||
m_fileName += "/";
|
||||
if (!m_fileName.endsWith(QLatin1Char('/')))
|
||||
m_fileName += QLatin1Char('/');
|
||||
|
||||
close();
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ QAndroidInputContext::QAndroidInputContext()
|
||||
if (clazz == NULL) {
|
||||
qCritical() << "Native registration unable to find class '"
|
||||
<< QtNativeInputConnectionClassName
|
||||
<< "'";
|
||||
<< '\'';
|
||||
return;
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ QAndroidInputContext::QAndroidInputContext()
|
||||
if (env->RegisterNatives(clazz, methods, sizeof(methods) / sizeof(methods[0])) < 0) {
|
||||
qCritical() << "RegisterNatives failed for '"
|
||||
<< QtNativeInputConnectionClassName
|
||||
<< "'";
|
||||
<< '\'';
|
||||
return;
|
||||
}
|
||||
|
||||
@ -358,7 +358,7 @@ QAndroidInputContext::QAndroidInputContext()
|
||||
if (clazz == NULL) {
|
||||
qCritical() << "Native registration unable to find class '"
|
||||
<< QtExtractedTextClassName
|
||||
<< "'";
|
||||
<< '\'';
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -69,11 +69,11 @@ QStringList QAndroidPlatformFontDatabase::fallbacksForFamily(const QString &fami
|
||||
{
|
||||
QStringList result;
|
||||
if (styleHint == QFont::Monospace || styleHint == QFont::Courier)
|
||||
result.append(QString(qgetenv("QT_ANDROID_FONTS_MONOSPACE")).split(";"));
|
||||
result.append(QString(qgetenv("QT_ANDROID_FONTS_MONOSPACE")).split(QLatin1Char(';')));
|
||||
else if (styleHint == QFont::Serif)
|
||||
result.append(QString(qgetenv("QT_ANDROID_FONTS_SERIF")).split(";"));
|
||||
result.append(QString(qgetenv("QT_ANDROID_FONTS_SERIF")).split(QLatin1Char(';')));
|
||||
else
|
||||
result.append(QString(qgetenv("QT_ANDROID_FONTS")).split(";"));
|
||||
result.append(QString(qgetenv("QT_ANDROID_FONTS")).split(QLatin1Char(';')));
|
||||
result.append(QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script));
|
||||
|
||||
return result;
|
||||
|
@ -622,7 +622,7 @@ QString qt_mac_applicationName()
|
||||
if (appName.isEmpty()) {
|
||||
QString arg0 = QGuiApplicationPrivate::instance()->appName();
|
||||
if (arg0.contains("/")) {
|
||||
QStringList parts = arg0.split("/");
|
||||
QStringList parts = arg0.split(QLatin1Char('/'));
|
||||
appName = parts.at(parts.count() - 1);
|
||||
} else {
|
||||
appName = arg0;
|
||||
|
@ -219,7 +219,7 @@ QEglFSKmsScreen *QEglFSKmsDevice::screenForConnector(drmModeResPtr resources, dr
|
||||
for (int i = 0; i < connector->count_modes; i++) {
|
||||
const drmModeModeInfo &mode = connector->modes[i];
|
||||
qCDebug(qLcEglfsKmsDebug) << "mode" << i << mode.hdisplay << "x" << mode.vdisplay
|
||||
<< "@" << mode.vrefresh << "hz";
|
||||
<< '@' << mode.vrefresh << "hz";
|
||||
modes << connector->modes[i];
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ QEglFSKmsScreen *QEglFSKmsDevice::screenForConnector(drmModeResPtr resources, dr
|
||||
int height = modes[selected_mode].vdisplay;
|
||||
int refresh = modes[selected_mode].vrefresh;
|
||||
qCDebug(qLcEglfsKmsDebug) << "Selected mode" << selected_mode << ":" << width << "x" << height
|
||||
<< "@" << refresh << "hz for output" << connectorName;
|
||||
<< '@' << refresh << "hz for output" << connectorName;
|
||||
}
|
||||
|
||||
QEglFSKmsOutput output = {
|
||||
|
@ -121,7 +121,7 @@ bool QQnxVirtualKeyboardPps::connect()
|
||||
if (m_fd == -1)
|
||||
{
|
||||
qVirtualKeyboardDebug() << Q_FUNC_INFO << ": Unable to open" << ms_PPSPath
|
||||
<< ":" << strerror(errno);
|
||||
<< ':' << strerror(errno);
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ void QXcbConnection::initializeScreens()
|
||||
// Push the screens to QApplication
|
||||
QXcbIntegration *integration = QXcbIntegration::instance();
|
||||
foreach (QXcbScreen* screen, m_screens) {
|
||||
qCDebug(lcQpaScreen) << "adding" << screen << "(Primary:" << screen->isPrimary() << ")";
|
||||
qCDebug(lcQpaScreen) << "adding" << screen << "(Primary:" << screen->isPrimary() << ')';
|
||||
integration->screenAdded(screen, screen->isPrimary());
|
||||
}
|
||||
|
||||
|
@ -735,7 +735,7 @@ QDebug operator<<(QDebug debug, const QXcbScreen *screen)
|
||||
formatSizeF(debug, screen->physicalSize());
|
||||
// TODO 5.6 if (debug.verbosity() > 2) {
|
||||
debug << ", screenNumber=" << screen->screenNumber();
|
||||
debug << ", virtualSize=" << screen->virtualSize().width() << "x" << screen->virtualSize().height() << " (";
|
||||
debug << ", virtualSize=" << screen->virtualSize().width() << 'x' << screen->virtualSize().height() << " (";
|
||||
formatSizeF(debug, screen->virtualSize());
|
||||
debug << "), nativeGeometry=";
|
||||
formatRect(debug, screen->nativeGeometry());
|
||||
|
@ -1150,7 +1150,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
d->updateMetrics();
|
||||
d->doReinit();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_Orientation," << orientation << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_Orientation," << orientation << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
break;
|
||||
@ -1173,7 +1173,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
d->setPageSize(pageSize);
|
||||
d->doReinit();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_PageSize," << value.toInt() << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_PageSize," << value.toInt() << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
}
|
||||
@ -1189,7 +1189,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
d->setPageSize(pageSize);
|
||||
d->doReinit();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_PaperName," << value.toString() << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_PaperName," << value.toString() << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
}
|
||||
@ -1228,7 +1228,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
d->stretch_y = d->dpi_y / double(d->resolution);
|
||||
d->updateMetrics();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_Resolution," << value.toInt() << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_Resolution," << value.toInt() << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
break;
|
||||
@ -1242,7 +1242,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
d->setPageSize(pageSize);
|
||||
d->doReinit();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_WindowsPageSize," << value.toInt() << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_WindowsPageSize," << value.toInt() << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
break;
|
||||
@ -1258,7 +1258,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
d->setPageSize(pageSize);
|
||||
d->doReinit();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_CustomPaperSize," << value.toSizeF() << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_CustomPaperSize," << value.toSizeF() << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
}
|
||||
@ -1273,7 +1273,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
margins.at(2).toReal(), margins.at(3).toReal()));
|
||||
d->updateMetrics();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_PageMargins," << margins << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_PageMargins," << margins << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
break;
|
||||
@ -1288,7 +1288,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
d->setPageSize(pageSize);
|
||||
d->doReinit();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_QPageSize," << pageSize << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_QPageSize," << pageSize << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
}
|
||||
@ -1301,7 +1301,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
d->m_pageLayout.setMargins(pair.first);
|
||||
d->updateMetrics();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_QPageMargins," << pair.first << pair.second << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_QPageMargins," << pair.first << pair.second << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
break;
|
||||
@ -1317,7 +1317,7 @@ void QWin32PrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &
|
||||
d->m_pageLayout.setMargins(pageLayout.margins());
|
||||
d->updateMetrics();
|
||||
#ifdef QT_DEBUG_METRICS
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_QPageLayout," << pageLayout << ")";
|
||||
qDebug() << "QWin32PrintEngine::setProperty(PPK_QPageLayout," << pageLayout << ')';
|
||||
d->debugMetrics();
|
||||
#endif // QT_DEBUG_METRICS
|
||||
}
|
||||
|
@ -2452,7 +2452,7 @@ QStringList QOCIDriver::tables(QSql::TableType type) const
|
||||
t.exec(query + whereList.join(QLatin1String(" or ")));
|
||||
while (t.next()) {
|
||||
if (t.value(0).toString() != d->user)
|
||||
tl.append(t.value(0).toString() + QLatin1String(".") + t.value(1).toString());
|
||||
tl.append(t.value(0).toString() + QLatin1Char('.') + t.value(1).toString());
|
||||
else
|
||||
tl.append(t.value(1).toString());
|
||||
}
|
||||
|
@ -744,7 +744,7 @@ static QSqlIndex qGetTableInfo(QSqlQuery &q, const QString &tableName, bool only
|
||||
schema = tableName.left(indexOfSeparator).append(QLatin1Char('.'));
|
||||
table = tableName.mid(indexOfSeparator + 1);
|
||||
}
|
||||
q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info (") + _q_escapeIdentifier(table) + QLatin1String(")"));
|
||||
q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info (") + _q_escapeIdentifier(table) + QLatin1Char(')'));
|
||||
|
||||
QSqlIndex ind;
|
||||
while (q.next()) {
|
||||
|
@ -174,7 +174,7 @@ static bool isGPUTestBlacklisted(const char *slot, const char *data = 0)
|
||||
if (gpuFeatures->find(disableKey) != gpuFeatures->end()) {
|
||||
QByteArray msg = QByteArrayLiteral("Skipped due to GPU blacklist: ") + disableKey;
|
||||
if (data)
|
||||
msg += QByteArrayLiteral(":") + QByteArray(data);
|
||||
msg += ':' + QByteArray(data);
|
||||
QTest::qSkip(msg.constData(), __FILE__, __LINE__);
|
||||
return true;
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||
{
|
||||
if (!pathElements.at(0).contains(QLatin1String(":"))) {
|
||||
if (!pathElements.at(0).contains(QLatin1Char(':'))) {
|
||||
QString rootPath = QDir(longPath).rootPath();
|
||||
pathElements.prepend(rootPath);
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ QList<QSpanCollection::Span *> QSpanCollection::spansInRect(int x, int y, int w,
|
||||
#ifdef DEBUG_SPAN_UPDATE
|
||||
QDebug operator<<(QDebug str, const QSpanCollection::Span &span)
|
||||
{
|
||||
str << "(" << span.top() << "," << span.left() << "," << span.bottom() << "," << span.right() << ")";
|
||||
str << '(' << span.top() << ',' << span.left() << ',' << span.bottom() << ',' << span.right() << ')';
|
||||
return str;
|
||||
}
|
||||
#endif
|
||||
|
@ -109,7 +109,7 @@ static void streamDebug(QDebug dbg, const QVariant &v)
|
||||
dbg.nospace() << *v_cast<QSizePolicy>(d);
|
||||
break;
|
||||
default:
|
||||
dbg.nospace() << "QMetaType::Type(" << d->type << ")";
|
||||
dbg.nospace() << "QMetaType::Type(" << d->type << ')';
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -976,7 +976,7 @@ bool QScroller::handleInput(Input input, const QPointF &position, qint64 timesta
|
||||
{
|
||||
Q_D(QScroller);
|
||||
|
||||
qScrollerDebug() << "QScroller::handleInput(" << input << ", " << d->stateName(d->state) << ", " << position << ", " << timestamp << ")";
|
||||
qScrollerDebug() << "QScroller::handleInput(" << input << ", " << d->stateName(d->state) << ", " << position << ", " << timestamp << ')';
|
||||
struct statechange {
|
||||
State state;
|
||||
Input input;
|
||||
@ -1296,7 +1296,7 @@ void QScrollerPrivate::createScrollingSegments(qreal v, qreal startPos,
|
||||
qreal lowerSnapPos = nextSnapPos(startPos, -1, orientation);
|
||||
qreal higherSnapPos = nextSnapPos(startPos, 1, orientation);
|
||||
|
||||
qScrollerDebug() << " Real Delta:" << lowerSnapPos <<"-"<<nextSnap <<"-"<<higherSnapPos;
|
||||
qScrollerDebug() << " Real Delta:" << lowerSnapPos << '-' << nextSnap << '-' <<higherSnapPos;
|
||||
|
||||
// - check if we can reach another snap point
|
||||
if (nextSnap > higherSnapPos || qIsNaN(higherSnapPos))
|
||||
@ -1703,7 +1703,7 @@ void QScrollerPrivate::setState(QScroller::State newstate)
|
||||
if (state == newstate)
|
||||
return;
|
||||
|
||||
qScrollerDebug() << q << "QScroller::setState(" << stateName(newstate) << ")";
|
||||
qScrollerDebug() << q << "QScroller::setState(" << stateName(newstate) << ')';
|
||||
|
||||
switch (newstate) {
|
||||
case QScroller::Inactive:
|
||||
|
Loading…
x
Reference in New Issue
Block a user