summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2013-09-23 10:51:15 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2013-09-23 10:51:15 (GMT)
commit975a286a82198ae70920376ca7f03d63aceb2198 (patch)
tree618dcdd8f149a80b526ca8507d4c99953dfe69bc
parenta911f82379c749e52a909912a8d5ed3735dc1a89 (diff)
downloadlibkolab-975a286a82198ae70920376ca7f03d63aceb2198.tar.gz
Including stuff from tests is not a good idea.
The include broke the compilation.
-rw-r--r--utils/kolabformatchecker.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/utils/kolabformatchecker.cpp b/utils/kolabformatchecker.cpp
index aeee18c..47120f3 100644
--- a/utils/kolabformatchecker.cpp
+++ b/utils/kolabformatchecker.cpp
@@ -21,13 +21,28 @@
#include <vector>
#include <kolabformat.h>
#include "kolabformat/errorhandler.h"
-#include "tests/testutils.h"
#include "kolabformat/kolabobject.h"
#include "qstring.h"
+#include <QFile>
namespace po = boost::program_options;
using namespace std;
+KMime::Message::Ptr readMimeFile( const QString &fileName, bool &ok)
+{
+ QFile file( fileName );
+ ok = file.open( QFile::ReadOnly );
+ if (!ok) {
+ cout << "failed to open file: " << fileName.toStdString() << endl;;
+ return KMime::Message::Ptr();
+ }
+ const QByteArray data = file.readAll();
+ KMime::Message::Ptr msg = KMime::Message::Ptr(new KMime::Message);
+ msg->setContent( data );
+ msg->parse();
+ return msg;
+}
+
int main(int argc, char *argv[])
{
// Declare the supported options.