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
Akonadi Data Import Wizard
Commits
7922089d
Commit
7922089d
authored
Aug 02, 2022
by
Laurent Montel
Browse files
Use QCommandLineOption directly => avoid potential bug with QString value
parent
7bc967b1
Pipeline
#212022
passed with stage
in 1 minute and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main.cpp
View file @
7922089d
...
...
@@ -52,7 +52,8 @@ int main(int argc, char *argv[])
KAboutData
::
setApplicationData
(
aboutData
);
QCommandLineParser
parser
;
parser
.
addOption
(
QCommandLineOption
(
QStringList
()
<<
QStringLiteral
(
"mode"
),
i18n
(
"Mode: %1"
,
QStringLiteral
(
"manual|automatic"
))));
const
QCommandLineOption
modeOption
(
QStringList
()
<<
QStringLiteral
(
"mode"
),
i18n
(
"Mode: %1"
,
QStringLiteral
(
"manual|automatic"
)));
parser
.
addOption
(
modeOption
);
aboutData
.
setupCommandLine
(
&
parser
);
parser
.
process
(
app
);
aboutData
.
processCommandLine
(
&
parser
);
...
...
@@ -60,7 +61,7 @@ int main(int argc, char *argv[])
KDBusService
service
(
KDBusService
::
Unique
);
ImportWizard
::
WizardMode
mode
=
ImportWizard
::
WizardMode
::
AutoDetect
;
if
(
parser
.
isSet
(
QStringLiteral
(
"mode"
)
))
{
if
(
parser
.
isSet
(
modeOption
))
{
if
(
!
parser
.
positionalArguments
().
isEmpty
())
{
const
QString
modeStr
=
parser
.
positionalArguments
().
at
(
0
);
if
(
modeStr
==
QLatin1String
(
"manual"
))
{
...
...
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