diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp index c2812e54f8..dae1f82063 100644 --- a/src/network/socket/qlocalserver_win.cpp +++ b/src/network/socket/qlocalserver_win.cpp @@ -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 diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index 4e8ae41479..70a738864b 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -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