arrowDown->setToolTip(i18n("Next Unicode character (Arrow Down)"));
unicodeNumber->setToolTip(i18n("Enter your Unicode number here. Allowed characters: [0-9] and [a-f]."));
unicodeNumber->selectAll(); // Selection will be reset by setToolTip and similar, so set it here
-
}
UnicodeWidget::~UnicodeWidget()
{
}
-
-
/// METHODS
void UnicodeWidget::showLastUnicode()
QString UnicodeWidget::trimmedUnicodeNumber(QString text)
{
- while (text.length() > 0 && text.at(0) == QChar('0')) {
+ while (!text.isEmpty() && text.at(0) == QChar('0')) {
text = text.remove(0, 1);
}
return text;
QString right;
uint i;
- for (i = 1; i <= 4; i++) {
+ for (i = 1; i <= 4; ++i) {
if (unicode > i && !controlCharacter(unicode - i)) {
left = ' ' + left;
left = QChar(unicode - i) + left;
}
}
- for (i = 1; i <= 8; i++) {
+ for (i = 1; i <= 8; ++i) {
if (unicode + i <= MAX_UNICODE_V1 && !controlCharacter(unicode + i)) {
right += QChar(unicode + i);
right += ' ';