Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'icalconverterverbose' into 'master'
[nemo-qml-plugin-calendar] Fix verbose output from icalconverter. Contributes to MER#1568

This commit ensures that icalconverter produces the appropriate
verbose output when the -v flag is set.  It also increases the amount
of debug output generated while in verbose mode, by setting the
KCALDEBUG=1 environment variable prior to calling into any kcalcore
APIs.

Contributes to MER#1568

See merge request !3
  • Loading branch information
chriadam committed Apr 19, 2016
2 parents 0ecdd51 + 983b68d commit 1bc1791
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/icalconverter/main.cpp
Expand Up @@ -642,6 +642,7 @@ namespace NemoCalendarImportExport {
KCalCore::MemoryCalendar::Ptr cal(new KCalCore::MemoryCalendar(KDateTime::UTC));
if (!iCalFormat.fromString(cal, icsData)) {
qWarning() << "unable to parse iCal data";
return false;
}

// Reorganize the list of imported incidences into lists of incidences segregated by UID.
Expand Down Expand Up @@ -795,7 +796,7 @@ int main(int argc, char *argv[])
// parse arguments
bool verbose = false, destructive = false;
if (args.size() == 4) {
if (args[3] == QStringLiteral("-d") || args[3] != QStringLiteral("destructive")) {
if (args[3] == QStringLiteral("-d") || args[3] == QStringLiteral("destructive")) {
destructive = true;
} else {
verbose = true;
Expand All @@ -806,6 +807,9 @@ int main(int argc, char *argv[])
}

// perform required operation
if (verbose) {
qputenv("KCALDEBUG", "1");
}
if (args[1] == QStringLiteral("import")) {
if (!QFile::exists(args[2])) {
qWarning() << "no such file exists:" << args[2] << "; cannot import.";
Expand Down

0 comments on commit 1bc1791

Please sign in to comment.