| 2931 | } |
| 2932 | |
| 2933 | QString WizDatabase::getDocumentAuthorAlias(const WIZDOCUMENTDATA& doc) |
| 2934 | { |
| 2935 | if (!doc.strAuthor.isEmpty()) |
| 2936 | return doc.strAuthor; |
| 2937 | |
| 2938 | WizDatabase* personDb = personalDatabase(); |
| 2939 | if (!personDb) |
| 2940 | return QString(); |
| 2941 | |
| 2942 | if (doc.strKbGUID.isEmpty() || doc.strKbGUID == personDb->kbGUID()) |
| 2943 | { |
| 2944 | QString displayName; |
| 2945 | if (personDb->getUserDisplayName(displayName)) |
| 2946 | return displayName; |
| 2947 | } |
| 2948 | |
| 2949 | QString strUserID = doc.strOwner; |
| 2950 | WIZBIZUSER bizUser; |
| 2951 | personDb->userFromID(doc.strKbGUID, strUserID, bizUser); |
| 2952 | if (bizUser.alias.isEmpty()) |
| 2953 | { |
| 2954 | int index = doc.strOwner.indexOf('@'); |
| 2955 | return index == -1 ? doc.strOwner : doc.strOwner.left(index); |
| 2956 | } |
| 2957 | return bizUser.alias; |
| 2958 | } |
| 2959 | |
| 2960 | QString WizDatabase::getDocumentOwnerAlias(const WIZDOCUMENTDATA& doc) |
| 2961 | { |
nothing calls this directly
no test coverage detected