mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-27 03:54:31 +00:00
Update for Qt4 requirements
svn path=/trunk/kdesupport/qca/; revision=393953
This commit is contained in:
parent
4bc8bbe725
commit
dab618be1f
@ -21,8 +21,7 @@
|
||||
|
||||
// QtCrypto/QtCrypto has the declarations for all of QCA
|
||||
#include <QtCrypto>
|
||||
// needed for printf
|
||||
#include<stdio.h>
|
||||
#include <stdio.h>
|
||||
|
||||
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.
|
||||
|
@ -1,5 +1,6 @@
|
||||
TEMPLATE = app
|
||||
CONFIG += thread console
|
||||
QT -= gui
|
||||
TARGET = hashtest
|
||||
|
||||
SOURCES += hashtest.cpp
|
||||
|
Loading…
x
Reference in New Issue
Block a user