summaryrefslogtreecommitdiff
path: root/widgets/LettersSpinBox.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2025-09-15 23:04:23 +0200
committerChristoph Berg <myon@debian.org>2025-09-15 23:04:23 +0200
commit0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (patch)
treed702795f99ac38e0cc17e25f0f7e50fa3e05baf9 /widgets/LettersSpinBox.cpp
parent310d05acf2c9233f7e336ae7dd9ffb7b54ca4e62 (diff)
New upstream version 3.0.0~rc1+repackupstream/3.0.0_rc1+repack
Diffstat (limited to 'widgets/LettersSpinBox.cpp')
-rwxr-xr-xwidgets/LettersSpinBox.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/widgets/LettersSpinBox.cpp b/widgets/LettersSpinBox.cpp
index 9079d8d9..05db1ead 100755
--- a/widgets/LettersSpinBox.cpp
+++ b/widgets/LettersSpinBox.cpp
@@ -1,25 +1,25 @@
-#include "LettersSpinBox.hpp"
-
-#include <QString>
-#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 <QString>
+#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;
+}