Fix trailing whitespace
This commit is contained in:
parent
570b8776c6
commit
1013f23e1b
1 changed files with 5 additions and 5 deletions
|
@ -290,11 +290,11 @@ SmsCharCount SmsHelper::getCharCount(const QString& message)
|
||||||
bool enc7bit = true; // 7-bit is used when true, UCS-2 if false
|
bool enc7bit = true; // 7-bit is used when true, UCS-2 if false
|
||||||
quint32 septets = 0; // GSM encoding character count (characters in extension are counted as 2 chars)
|
quint32 septets = 0; // GSM encoding character count (characters in extension are counted as 2 chars)
|
||||||
int length = message.length();
|
int length = message.length();
|
||||||
|
|
||||||
// Count characters and detect encoding
|
// Count characters and detect encoding
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
QChar ch = message[i];
|
QChar ch = message[i];
|
||||||
|
|
||||||
if (isInGsmAlphabet(ch)) {
|
if (isInGsmAlphabet(ch)) {
|
||||||
septets++;
|
septets++;
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,7 @@ SmsCharCount SmsHelper::getCharCount(const QString& message)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length == 0) {
|
if (length == 0) {
|
||||||
count.bitsPerChar = 7;
|
count.bitsPerChar = 7;
|
||||||
count.octets = 0;
|
count.octets = 0;
|
||||||
|
@ -337,14 +337,14 @@ SmsCharCount SmsHelper::getCharCount(const QString& message)
|
||||||
count.remaining = (charsInSingleUcs2Sms - length) % charsInSingleUcs2Sms;
|
count.remaining = (charsInSingleUcs2Sms - length) % charsInSingleUcs2Sms;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SmsHelper::isInGsmAlphabet(const QChar& ch)
|
bool SmsHelper::isInGsmAlphabet(const QChar& ch)
|
||||||
{
|
{
|
||||||
wchar_t unicode = ch.unicode();
|
wchar_t unicode = ch.unicode();
|
||||||
|
|
||||||
if ((unicode & ~0x7f) == 0) { // If the character is ASCII
|
if ((unicode & ~0x7f) == 0) { // If the character is ASCII
|
||||||
// use map
|
// use map
|
||||||
return gsm_ascii_map[unicode];
|
return gsm_ascii_map[unicode];
|
||||||
|
|
Loading…
Reference in a new issue