Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
11bd502f
Commit
11bd502f
authored
Jul 19, 2022
by
Volker Krause
Browse files
Add support for Code 39 ticket tokens
parent
11844b5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/datatypes/token.cpp
View file @
11bd502f
...
...
@@ -22,6 +22,8 @@ Token::TokenType Token::tokenType(QStringView token)
return
DataMatrix
;
}
else
if
(
token
.
startsWith
(
QLatin1String
(
"pdf417"
),
Qt
::
CaseInsensitive
))
{
return
PDF417
;
}
else
if
(
token
.
startsWith
(
QLatin1String
(
"code39:"
),
Qt
::
CaseInsensitive
))
{
return
Code39
;
}
else
if
(
token
.
startsWith
(
QLatin1String
(
"http"
),
Qt
::
CaseInsensitive
))
{
return
Url
;
}
...
...
@@ -44,6 +46,9 @@ QVariant Token::tokenData(const QString &token)
return
token
.
mid
(
7
);
}
else
if
(
token
.
startsWith
(
QLatin1String
(
"pdf417bin:"
),
Qt
::
CaseInsensitive
))
{
return
QByteArray
::
fromBase64
(
QStringView
(
token
).
mid
(
10
).
toLatin1
());
}
else
if
(
token
.
startsWith
(
QLatin1String
(
"code39:"
),
Qt
::
CaseInsensitive
))
{
return
token
.
mid
(
7
);
}
return
token
;
}
src/lib/datatypes/token.h
View file @
11bd502f
...
...
@@ -33,6 +33,7 @@ public:
Code128
,
///< Code 128 barcode
DataMatrix
,
///< A DataMatrix barcode
PDF417
,
///< A PDF417 barcode
Code39
,
///< A Code 39 barcode
};
Q_ENUM
(
TokenType
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment