From 5f1e91c7808ebe97b06a5d2e483d06de37ef3a81 Mon Sep 17 00:00:00 2001 From: Johann Latocha Date: Mon, 30 Aug 2010 06:47:49 +0200 Subject: PVS output errors fixed --- src/util/util.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/util') diff --git a/src/util/util.cpp b/src/util/util.cpp index 7463ae0..8b25b12 100755 --- a/src/util/util.cpp +++ b/src/util/util.cpp @@ -205,15 +205,11 @@ QString getUserName() //Unicode string needs to be converted username = QString::fromWCharArray(lpszSystemInfo); - #elif defined __WIN32__ + #else struct passwd* passUser = getpwuid(getuid()); - - if (passwd) - username = passwd->pw_name; if (passUser) - { username = QString(passUser->pw_name); - } + #endif //#ifdef __WIN32__ if (username.isEmpty()) { -- cgit v1.2.3-55-g7522