summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2013-09-23 13:06:03 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2013-09-23 13:06:03 (GMT)
commit6f5997417a8c2eed2886a8cc8869374ac4c70c46 (patch)
tree4d9d0a88af1673016dde5af6f07b6d7746afb425
parent55db6fd4c1e49def5563dddd8ad8ae9eb8ac7264 (diff)
downloadlibkolab-6f5997417a8c2eed2886a8cc8869374ac4c70c46.tar.gz
codingstyle
-rw-r--r--utils/kolabformatchecker.cpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/utils/kolabformatchecker.cpp b/utils/kolabformatchecker.cpp
index b738a1b..10dc6c2 100644
--- a/utils/kolabformatchecker.cpp
+++ b/utils/kolabformatchecker.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2012 Sofia Balicka <balicka@kolabsys.com>
+ * Copyright (C) 2013 Christian Mollekopf <mollekopf@kolabsys.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -19,11 +20,11 @@
#include <iostream>
#include <string>
#include <vector>
+#include <QString>
+#include <QFile>
#include <kolabformat.h>
#include "kolabformat/errorhandler.h"
#include "kolabformat/kolabobject.h"
-#include "qstring.h"
-#include <QFile>
namespace po = boost::program_options;
using namespace std;
@@ -50,7 +51,7 @@ int main(int argc, char *argv[])
desc.add_options()
("help", "produce help message")
("input-file", po::value<std::vector<std::string> >(), "input files")
- ;
+ ;
po::positional_options_description p;
p.add("input-file", -1);
@@ -72,35 +73,35 @@ int main(int argc, char *argv[])
cout << "Specify input-file\n";
return -1;
}
-
- int returnValue = 0;
- cout << endl;
+ int returnValue = 0;
+
+ cout << endl;
- for(vector<string>::const_iterator it = inputFiles.begin();
+ for(vector<string>::const_iterator it = inputFiles.begin();
it != inputFiles.end(); it++){
- cout << "File: " << *it << endl;
+ cout << "File: " << *it << endl;
- bool ok;
- KMime::Message::Ptr message = readMimeFile( QString::fromStdString(*it), ok);
+ bool ok;
+ KMime::Message::Ptr message = readMimeFile( QString::fromStdString(*it), ok);
- if(!ok){
- returnValue = -1;
- cout << endl;
- continue;
- }
+ if(!ok){
+ returnValue = -1;
+ cout << endl;
+ continue;
+ }
- Kolab::KolabObjectReader reader(message);
+ Kolab::KolabObjectReader reader(message);
- if (Kolab::ErrorHandler::errorOccured()){
- cout << "Errors occured during parsing." << endl;
- returnValue = -1;
- } else {
- cout << "Parsed message without error." << endl;
- }
+ if (Kolab::ErrorHandler::errorOccured()){
+ cout << "Errors occured during parsing." << endl;
+ returnValue = -1;
+ } else {
+ cout << "Parsed message without error." << endl;
+ }
- cout << endl;
+ cout << endl;
}
return returnValue;