mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kio: use simple server name in the connection backend
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
281e841358
commit
7a73afe026
1 changed files with 2 additions and 7 deletions
|
@ -34,8 +34,6 @@
|
||||||
#include <ktemporaryfile.h>
|
#include <ktemporaryfile.h>
|
||||||
#include <kurl.h>
|
#include <kurl.h>
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
using namespace KIO;
|
using namespace KIO;
|
||||||
|
|
||||||
class KIO::ConnectionPrivate
|
class KIO::ConnectionPrivate
|
||||||
|
@ -175,11 +173,8 @@ bool SocketConnectionBackend::listenForRemote()
|
||||||
Q_ASSERT(!socket);
|
Q_ASSERT(!socket);
|
||||||
Q_ASSERT(!localServer);
|
Q_ASSERT(!localServer);
|
||||||
|
|
||||||
#if QT_VERSION >= 0x041200
|
// NOTE: using long/complex server name can cause reconnection issues
|
||||||
const QString serveraddress = QString::fromLatin1(qRandomUuid());
|
const QString serveraddress = QString::fromLatin1("kio_") + QString::number(qrand());
|
||||||
#else
|
|
||||||
const QString serveraddress = QString::fromLatin1("kio_") + QString::number(::getpid());
|
|
||||||
#endif
|
|
||||||
localServer = new QLocalServer(this);
|
localServer = new QLocalServer(this);
|
||||||
localServer->listen(serveraddress);
|
localServer->listen(serveraddress);
|
||||||
if (!localServer->isListening()) {
|
if (!localServer->isListening()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue