summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-13 09:26:59 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-13 16:37:37 +0000
commitbba86a01c9828d03b1564984a08561d62686d329 (patch)
treec9e559a34e884239c8a082fd48f5e4f2b97b731e /src
parentf9bf737d74c2493f7a535048cb4992d3e4cd3c99 (diff)
Libraries: Fix single-character string literals.
Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfilesystemwatcher_win.cpp2
-rw-r--r--src/corelib/io/qsettings_mac.cpp2
-rw-r--r--src/corelib/json/qjsondocument.cpp2
-rw-r--r--src/corelib/json/qjsonvalue.cpp10
-rw-r--r--src/corelib/json/qjsonwriter.cpp4
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp6
-rw-r--r--src/corelib/tools/qregularexpression.cpp10
-rw-r--r--src/gui/painting/qpdf.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp2
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp2
-rw-r--r--src/network/kernel/qauthenticator.cpp4
-rw-r--r--src/network/kernel/qnetworkproxy.cpp4
-rw-r--r--src/network/kernel/qnetworkproxy_generic.cpp2
-rw-r--r--src/network/socket/qhttpsocketengine.cpp2
-rw-r--r--src/network/socket/qlocalserver_unix.cpp2
-rw-r--r--src/network/ssl/qsslellipticcurve.cpp2
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp4
-rw-r--r--src/platformsupport/dbusmenu/qdbusmenutypes.cpp2
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_static.cpp4
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp2
-rw-r--r--src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp2
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp2
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor.cpp4
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp4
-rw-r--r--src/plugins/generic/tuiotouch/qtuiohandler.cpp2
-rw-r--r--src/plugins/platforms/android/androidjniinput.cpp4
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp2
-rw-r--r--src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp8
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp6
-rw-r--r--src/plugins/platforms/android/qandroidplatformfontdatabase.cpp6
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsdevice.cpp4
-rw-r--r--src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp2
-rw-r--r--src/printsupport/kernel/qprintengine_win.cpp20
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp2
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp2
-rw-r--r--src/testlib/qtestblacklist.cpp2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp2
-rw-r--r--src/widgets/itemviews/qtableview.cpp2
-rw-r--r--src/widgets/kernel/qwidgetsvariant.cpp2
-rw-r--r--src/widgets/util/qscroller.cpp6
44 files changed, 81 insertions, 81 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp
index 4907a20a5f..410753868e 100644
--- a/src/corelib/io/qfilesystemwatcher_win.cpp
+++ b/src/corelib/io/qfilesystemwatcher_win.cpp
@@ -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);
diff --git a/src/corelib/io/qsettings_mac.cpp b/src/corelib/io/qsettings_mac.cpp
index f1d2e81bdc..e0b317b4c2 100644
--- a/src/corelib/io/qsettings_mac.cpp
+++ b/src/corelib/io/qsettings_mac.cpp
@@ -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) {
diff --git a/src/corelib/json/qjsondocument.cpp b/src/corelib/json/qjsondocument.cpp
index f5bad32233..3ef006d82d 100644
--- a/src/corelib/json/qjsondocument.cpp
+++ b/src/corelib/json/qjsondocument.cpp
@@ -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
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index ae6a3678bd..4c7a44b4a0 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -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;
diff --git a/src/corelib/json/qjsonwriter.cpp b/src/corelib/json/qjsonwriter.cpp
index 99f83554c2..45a05e93a3 100644
--- a/src/corelib/json/qjsonwriter.cpp
+++ b/src/corelib/json/qjsonwriter.cpp
@@ -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:
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index c5e251b37b..3ffe191093 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -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) {
diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp
index d8b0bf6e9f..81b108059b 100644
--- a/src/corelib/tools/qregularexpression.cpp
+++ b/src/corelib/tools/qregularexpression.cpp
@@ -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;
}
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 0814e0494d..0f81f09f60 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1793,7 +1793,7 @@ void QPdfEnginePrivate::printString(const QString &string) {
array.append(part[j]);
}
}
- array.append(")");
+ array.append(')');
write(array);
}
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index e6f1918da8..c4cb8e65c0 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -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();
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 7147823309..086140f967 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -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));
}
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index d626d0bcfc..95994653e6 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -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;
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index d219d72136..4c7c0c5442 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -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
diff --git a/src/network/kernel/qnetworkproxy_generic.cpp b/src/network/kernel/qnetworkproxy_generic.cpp
index d3295376da..145ba18e3f 100644
--- a/src/network/kernel/qnetworkproxy_generic.cpp
+++ b/src/network/kernel/qnetworkproxy_generic.cpp
@@ -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
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index 1a90abd22c..92ca76b560 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -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";
diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp
index 634074d91f..a356e21214 100644
--- a/src/network/socket/qlocalserver_unix.cpp
+++ b/src/network/socket/qlocalserver_unix.cpp
@@ -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;
}
diff --git a/src/network/ssl/qsslellipticcurve.cpp b/src/network/ssl/qsslellipticcurve.cpp
index b4396d567b..0824a61e8d 100644
--- a/src/network/ssl/qsslellipticcurve.cpp
+++ b/src/network/ssl/qsslellipticcurve.cpp
@@ -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
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index b62cfd2fde..0472a9a198 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -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;
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 0a4c68d7c0..a8e4c61e9a 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -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
}
diff --git a/src/platformsupport/dbusmenu/qdbusmenutypes.cpp b/src/platformsupport/dbusmenu/qdbusmenutypes.cpp
index 94df0f53dd..8d5d96353c 100644
--- a/src/platformsupport/dbusmenu/qdbusmenutypes.cpp
+++ b/src/platformsupport/dbusmenu/qdbusmenutypes.cpp
@@ -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;
}
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
index 1bc834b5ef..3aab785b34 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
@@ -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;
}
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
index 8fa82e2ad7..f285e61a9f 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
@@ -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);
diff --git a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
index b04ae8ee52..728b166b71 100644
--- a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
+++ b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
@@ -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;
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
index 2e9723329e..c4ebc5c51d 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
+++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
@@ -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;
}
diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
index d155cecd89..0293c74fb9 100644
--- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
+++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
@@ -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);
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 7258877eb7..3b8a85a26b 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -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)) {
diff --git a/src/plugins/generic/tuiotouch/qtuiohandler.cpp b/src/plugins/generic/tuiotouch/qtuiohandler.cpp
index dd161570e8..2b42889cb1 100644
--- a/src/plugins/generic/tuiotouch/qtuiohandler.cpp
+++ b/src/plugins/generic/tuiotouch/qtuiohandler.cpp
@@ -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;
}
diff --git a/src/plugins/platforms/android/androidjniinput.cpp b/src/plugins/platforms/android/androidjniinput.cpp
index b410e5f68e..8982787ec9 100644
--- a/src/plugins/platforms/android/androidjniinput.cpp
+++ b/src/plugins/platforms/android/androidjniinput.cpp
@@ -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;
}
}
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index cd40b7eec2..c7c82e255c 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -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)
diff --git a/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp b/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
index 64be75b63f..6ad3d2dc9a 100644
--- a/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
+++ b/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
@@ -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();
}
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp
index b44340106d..e3ea048e84 100644
--- a/src/plugins/platforms/android/qandroidinputcontext.cpp
+++ b/src/plugins/platforms/android/qandroidinputcontext.cpp
@@ -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;
}
diff --git a/src/plugins/platforms/android/qandroidplatformfontdatabase.cpp b/src/plugins/platforms/android/qandroidplatformfontdatabase.cpp
index be1a3d7bdf..a8bbec9400 100644
--- a/src/plugins/platforms/android/qandroidplatformfontdatabase.cpp
+++ b/src/plugins/platforms/android/qandroidplatformfontdatabase.cpp
@@ -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;
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm
index bb493ef2be..8ad80333f8 100644
--- a/src/plugins/platforms/cocoa/qcocoahelpers.mm
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm
@@ -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;
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsdevice.cpp
index 40cd8b8763..c29d64c06d 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsdevice.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsdevice.cpp
@@ -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 = {
diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
index 392d45c5b4..2c7a28e835 100644
--- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
+++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
@@ -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;
}
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index c35b019f7e..13d73c7194 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -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());
}
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 2e0c55eea8..64645b92f6 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -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());
diff --git a/src/printsupport/kernel/qprintengine_win.cpp b/src/printsupport/kernel/qprintengine_win.cpp
index a4209d833a..c8ce2e482d 100644
--- a/src/printsupport/kernel/qprintengine_win.cpp
+++ b/src/printsupport/kernel/qprintengine_win.cpp
@@ -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
}
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index 33e3b96276..f0c0b224bd 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -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());
}
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp
index 06e849ccd5..4286f5b338 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp
@@ -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()) {
diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp
index a30936a23b..c2643a2304 100644
--- a/src/testlib/qtestblacklist.cpp
+++ b/src/testlib/qtestblacklist.cpp
@@ -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;
}
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index fd49246e9f..556e927cbf 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -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);
}
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index 3e3e3099c8..0af4a26494 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -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
diff --git a/src/widgets/kernel/qwidgetsvariant.cpp b/src/widgets/kernel/qwidgetsvariant.cpp
index b0dcc4aa1b..fc02c9c77d 100644
--- a/src/widgets/kernel/qwidgetsvariant.cpp
+++ b/src/widgets/kernel/qwidgetsvariant.cpp
@@ -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
diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp
index de12983f21..563c501356 100644
--- a/src/widgets/util/qscroller.cpp
+++ b/src/widgets/util/qscroller.cpp
@@ -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: