Index: ossp-pkg/as/as-gui/as_assist.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v rcsdiff -q -kk '-r1.44' '-r1.45' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v' 2>/dev/null --- as_assist.cpp 2002/12/04 14:50:08 1.44 +++ as_assist.cpp 2002/12/04 15:50:29 1.45 @@ -79,18 +79,27 @@ // Start the show by getting the username #if defined(Q_WS_WIN) - DWORD winUserNameSize = sizeof(winUserName); + { + DWORD dwWinusernamesize = sizeof(dwWinusernamesize); #if defined(UNICODE) - TCHAR winUserName[UNLEN + 1]; // UNLEN is defined in lmcons.h - GetUserName(winUserName, &winUserNameSize); - userName = qt_winQString(winUserName); -#endif // #if defined(UNICODE) - char winUserName[UNLEN + 1]; // UNLEN is defined in lmcons.h - GetUserNameA(winUserName, &winUserNameSize); - userName = QString::fromLocal8Bit(winUserName); -#else // #if defined(Q_WS_WIN) - Username = QString::fromLocal8Bit(getlogin()); -#endif + TCHAR szWinusername[UNLEN + 1]; // UNLEN is defined in lmcons.h + GetUserName(szWinusername, &dwWinusernamesize); + Username = qt_winQString(szWinusername); +#else // not unicode + char szWinusername[UNLEN + 1]; // UNLEN is defined in lmcons.h + GetUserNameA(szWinusername, &dwWinusernamesize); + Username = QString::fromLocal8Bit(szWinusername); + } +#endif // #if defined(UNICODE) +#else // not windows + { +//#include +// char *szUser = NULL; +// szUser = cuserid(); +// Username = QString::fromLocal8Bit(szUser); + Username = QString::fromLocal8Bit(getlogin()); + } +#endif // #if defined(Q_WS_WIN) m_pPrefs = new Preferences(TITRAQ_PREFNAME, TITRAQ_APPTITLE, TITRAQ_PREFVER); if (!m_pPrefs->fileState()) { // No file was found, so assume a null state