X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Funicodedialog.cpp;h=134ab720da58ffe9d31d359cae9fb2a284d8e53d;hb=1404e8f1d631c81399e0e92ffce7dfac0195fabb;hp=0fcbc253df643901258f06915c4e73a5c1ee13fc;hpb=7a74d9caf3689aa42070ecff84ba67fc8d3de216;p=kdenlive diff --git a/src/unicodedialog.cpp b/src/unicodedialog.cpp index 0fcbc253..134ab720 100644 --- a/src/unicodedialog.cpp +++ b/src/unicodedialog.cpp @@ -70,7 +70,6 @@ UnicodeWidget::UnicodeWidget(UnicodeDialog::InputMethod inputMeth, QWidget *pare 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() @@ -123,7 +122,7 @@ bool UnicodeWidget::controlCharacter(uint value) 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; @@ -222,14 +221,14 @@ void UnicodeWidget::updateOverviewChars(uint unicode) 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 += ' ';