diff --git a/examples/hashtest/hashtest.cpp b/examples/hashtest/hashtest.cpp index 98b46a11..c5c4f164 100644 --- a/examples/hashtest/hashtest.cpp +++ b/examples/hashtest/hashtest.cpp @@ -21,8 +21,7 @@ // QtCrypto/QtCrypto has the declarations for all of QCA #include -// needed for printf -#include +#include int main(int argc, char **argv) { @@ -30,6 +29,8 @@ int main(int argc, char **argv) // also does cleanup when it goes out of scope QCA::Initializer init; + QCoreApplication app(argc, argv); + // we use the first argument if provided, or // use "hello" if no arguments QSecureArray arg = (argc >= 2) ? argv[1] : "hello"; @@ -50,7 +51,7 @@ int main(int argc, char **argv) // this shows the incremental approach. Naturally // for this simple job, we could use the "all in one" // approach - this is an example, after all :-) - QSecureArray part1(arg.toByteArray().left(3)); // three chars - "hel" + QSecureArray part1(arg.toByteArray().left(3)); // three chars - "hel" QSecureArray part2(arg.toByteArray().mid(3)); // the rest - "lo" // create the required object. diff --git a/examples/hashtest/hashtest.pro b/examples/hashtest/hashtest.pro index d642131e..acd5dacf 100644 --- a/examples/hashtest/hashtest.pro +++ b/examples/hashtest/hashtest.pro @@ -1,5 +1,6 @@ TEMPLATE = app CONFIG += thread console +QT -= gui TARGET = hashtest SOURCES += hashtest.cpp