From 5dbab6f7a87661995e93ed6b632ae711434f20c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enar=20V=C3=A4ikene?= Date: Tue, 26 Jul 2011 15:06:39 +0300 Subject: [PATCH] Changed the iGenerator interface to a pure abstract class. --- src/apps/PswGen/Generator/CMakeLists.txt | 1 - src/apps/PswGen/Generator/igenerator.h | 15 +++------------ src/apps/PswGen/Generator/module.cpp | 2 +- src/apps/PswGen/Generator/module.h | 3 ++- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/apps/PswGen/Generator/CMakeLists.txt b/src/apps/PswGen/Generator/CMakeLists.txt index dbf88ef..9325fe9 100644 --- a/src/apps/PswGen/Generator/CMakeLists.txt +++ b/src/apps/PswGen/Generator/CMakeLists.txt @@ -21,7 +21,6 @@ set(SRCS # Header files for the meta-object compiler set(MOC_HDRS - igenerator.h module.h ) diff --git a/src/apps/PswGen/Generator/igenerator.h b/src/apps/PswGen/Generator/igenerator.h index a702167..3d1db68 100644 --- a/src/apps/PswGen/Generator/igenerator.h +++ b/src/apps/PswGen/Generator/igenerator.h @@ -20,8 +20,6 @@ #ifndef __PSWGEN_GENERATOR_IGENERATOR_H # define __PSWGEN_GENERATOR_IGENERATOR_H -#include "lib.h" - #include #include @@ -33,17 +31,8 @@ namespace PswGen { * * This interface is used to generate strong passwords. */ -class PSWGEN_GENERATOR_EXPORT iGenerator : public QObject +struct iGenerator { - Q_OBJECT - -public: - - /// Interface constructor - iGenerator() : QObject() {} - - /// Empty virtual destructor - virtual ~iGenerator() {} /** * Flags for the password generator. @@ -85,4 +74,6 @@ public: } // namespace eVaf::PswGen } // namespace eVaf +Q_DECLARE_INTERFACE(eVaf::PswGen::iGenerator, "eVaf.PswGen.iGenerator/1.0") + #endif // igenerator.h diff --git a/src/apps/PswGen/Generator/module.cpp b/src/apps/PswGen/Generator/module.cpp index 27354f5..e19933b 100644 --- a/src/apps/PswGen/Generator/module.cpp +++ b/src/apps/PswGen/Generator/module.cpp @@ -71,7 +71,7 @@ void Module::done() using namespace eVaf::PswGen::Generator::Internal; GeneratorImpl::GeneratorImpl() - : iGenerator() + : QObject() { setObjectName(QString("%1.iGenerator").arg(VER_MODULE_NAME_STR)); diff --git a/src/apps/PswGen/Generator/module.h b/src/apps/PswGen/Generator/module.h index a1be474..927adc6 100644 --- a/src/apps/PswGen/Generator/module.h +++ b/src/apps/PswGen/Generator/module.h @@ -74,9 +74,10 @@ namespace Internal { * Implements the iGenerator interface using MD5 cryptographic hashes. */ -class GeneratorImpl : public iGenerator +class GeneratorImpl : public QObject, public iGenerator { Q_OBJECT + Q_INTERFACES(eVaf::PswGen::iGenerator) public: -- 2.45.0