QLocalServer, QLocalSocket: simpler use of startsWith()
It has a variant accepting QL1S directly, so no need to go via a QString. Change-Id: Ia8f1198ef2af7027bc9f7c2e1dad3a5f78a12eb4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
This commit is contained in:
parent
06e27b6ef9
commit
0fb7e910a9
@ -241,7 +241,7 @@ bool QLocalServerPrivate::listen(const QString &name)
|
||||
{
|
||||
Q_Q(QLocalServer);
|
||||
|
||||
QString pipePath = QLatin1String("\\\\.\\pipe\\");
|
||||
const QLatin1String pipePath("\\\\.\\pipe\\");
|
||||
if (name.startsWith(pipePath))
|
||||
fullServerName = name;
|
||||
else
|
||||
|
@ -148,7 +148,7 @@ void QLocalSocket::connectToServer(OpenMode openMode)
|
||||
return;
|
||||
}
|
||||
|
||||
QString pipePath = QLatin1String("\\\\.\\pipe\\");
|
||||
const QLatin1String pipePath("\\\\.\\pipe\\");
|
||||
if (d->serverName.startsWith(pipePath))
|
||||
d->fullServerName = d->serverName;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user