From f647d78463c1250ce9c99af664615fafccf5e959 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Tue, 7 Apr 2026 19:02:45 +0200 Subject: New upstream version 3.0.0 --- widgets/LettersSpinBox.cpp | 50 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) mode change 100755 => 100644 widgets/LettersSpinBox.cpp (limited to 'widgets/LettersSpinBox.cpp') diff --git a/widgets/LettersSpinBox.cpp b/widgets/LettersSpinBox.cpp old mode 100755 new mode 100644 index 05db1ead..9079d8d9 --- a/widgets/LettersSpinBox.cpp +++ b/widgets/LettersSpinBox.cpp @@ -1,25 +1,25 @@ -#include "LettersSpinBox.hpp" - -#include -#include "moc_LettersSpinBox.cpp" - -QString LettersSpinBox::textFromValue (int value) const -{ - QString text; - do { - auto digit = value % 26; - value /= 26; - text = QChar {lowercase_ ? 'a' + digit : 'A' + digit} + text; - } while (value); - return text; -} - -int LettersSpinBox::valueFromText (QString const& text) const -{ - int value {0}; - for (int index = text.size (); index > 0; --index) - { - value = value * 26 + text[index - 1].toLatin1 () - (lowercase_ ? 'a' : 'A'); - } - return value; -} +#include "LettersSpinBox.hpp" + +#include +#include "moc_LettersSpinBox.cpp" + +QString LettersSpinBox::textFromValue (int value) const +{ + QString text; + do { + auto digit = value % 26; + value /= 26; + text = QChar {lowercase_ ? 'a' + digit : 'A' + digit} + text; + } while (value); + return text; +} + +int LettersSpinBox::valueFromText (QString const& text) const +{ + int value {0}; + for (int index = text.size (); index > 0; --index) + { + value = value * 26 + text[index - 1].toLatin1 () - (lowercase_ ? 'a' : 'A'); + } + return value; +} -- cgit v1.2.3