mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Fixed "beautify real name"
This commit is contained in:
@@ -168,7 +168,10 @@ namespace BlackMisc
|
||||
int lc = 0;
|
||||
for (const QChar ch : realName)
|
||||
{
|
||||
if (uc > 1 && lc > 1) { return newRealName; } // mixed case name, no need to beautify
|
||||
// Joe Doe -> valid
|
||||
// jOE dOE -> invalid
|
||||
// Joe McArthur -> valid
|
||||
if (uc > 1 && lc > 2 && lc > uc) { return newRealName; } // mixed case name, no need to beautify
|
||||
if (ch.isLower()) { lc++; continue; }
|
||||
if (ch.isUpper()) { uc++; continue;}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user