Fix indentation & coding style.

Change-Id: Id974abca3ee2be9cb70c380a842e76c0ba1520bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
BogDan Vatra 2014-10-28 15:15:41 +02:00
parent 25948f83b4
commit 80d31849e2

View File

@ -160,30 +160,30 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName)
}
if (socketOptions & QLocalServer::WorldAccessOption) {
mode_t mode = 000;
mode_t mode = 000;
if (socketOptions & QLocalServer::UserAccessOption) {
mode |= S_IRWXU;
}
if (socketOptions & QLocalServer::GroupAccessOption) {
mode |= S_IRWXG;
}
if (socketOptions & QLocalServer::OtherAccessOption) {
mode |= S_IRWXO;
}
if (socketOptions & QLocalServer::UserAccessOption)
mode |= S_IRWXU;
if (mode) {
if (-1 == ::chmod(tempPath.toLatin1(), mode)) {
setError(QLatin1String("QLocalServer::listen"));
closeServer();
return false;
}
}
if (-1 == ::rename(tempPath.toLatin1(), fullServerName.toLatin1())){
if (socketOptions & QLocalServer::GroupAccessOption)
mode |= S_IRWXG;
if (socketOptions & QLocalServer::OtherAccessOption)
mode |= S_IRWXO;
if (mode) {
if (::chmod(tempPath.toLatin1(), mode) == -1) {
setError(QLatin1String("QLocalServer::listen"));
closeServer();
return false;
}
}
if (::rename(tempPath.toLatin1(), fullServerName.toLatin1()) == -1) {
setError(QLatin1String("QLocalServer::listen"));
closeServer();
return false;
}
}
Q_ASSERT(!socketNotifier);