From 1bb8a9b13cbae8f0855a604eccd866322b16b47c Mon Sep 17 00:00:00 2001 From: Brad Hards <bradh@frogmouth.net> Date: Tue, 1 Mar 2005 02:59:18 +0000 Subject: [PATCH] Update to new plugin approach. svn path=/trunk/kdesupport/qca/; revision=393981 --- plugins/qca-botan/qca-botan.cpp | 19 ++++++++++++++++--- plugins/qca-botan/qca-botan.pro | 9 ++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/plugins/qca-botan/qca-botan.cpp b/plugins/qca-botan/qca-botan.cpp index e5f10adf..b7885aa5 100644 --- a/plugins/qca-botan/qca-botan.cpp +++ b/plugins/qca-botan/qca-botan.cpp @@ -17,9 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#include "QtCrypto/qcaprovider.h" +#include <QtCrypto> +#include <QtCore> + #include <qstringlist.h> -#include <iostream> #include <botan/rng.h> #include <botan/md2.h> @@ -442,4 +443,16 @@ public: } }; -QCA_EXPORT_PLUGIN(botanProvider); +class botanPlugin : public QCAPlugin +{ + Q_OBJECT +public: + virtual int version() const { return QCA_PLUGIN_VERSION; } + virtual QCA::Provider *createProvider() { return new botanProvider; } +}; + +#include "qca-botan.moc" + +Q_EXPORT_PLUGIN(botanPlugin); + + diff --git a/plugins/qca-botan/qca-botan.pro b/plugins/qca-botan/qca-botan.pro index 523b67d0..583e5063 100644 --- a/plugins/qca-botan/qca-botan.pro +++ b/plugins/qca-botan/qca-botan.pro @@ -1,12 +1,15 @@ TEMPLATE = lib CONFIG += qt thread debug plugin #CONFIG += qt thread release plugin +QT -= gui TARGET = qca-botan DEFINES += QCA_PLUGIN -INCLUDEPATH += ../../include +INCLUDEPATH += ../../include/QtCrypto SOURCES = qca-botan.cpp -include(conf.pri) -include(extra.pri) +#temp hack until build system is fixed +#include(conf.pri) +#include(extra.pri) +LIBS += -L/usr/lib -lm -lpthread -lrt -lbotan