diff --git a/src/autotype/AutoTypeAction.cpp b/src/autotype/AutoTypeAction.cpp index 0beb19b39..f9d928f0d 100644 --- a/src/autotype/AutoTypeAction.cpp +++ b/src/autotype/AutoTypeAction.cpp @@ -87,3 +87,9 @@ void AutoTypeExecutor::execClearField(AutoTypeClearField* action) { Q_UNUSED(action); } + +AutoTypeAction::~AutoTypeAction() +{ + // This makes sure that AutoTypeAction's vtable is placed + // in this translation unit. +} diff --git a/src/autotype/AutoTypeAction.h b/src/autotype/AutoTypeAction.h index 263566dd8..e598b1dcc 100644 --- a/src/autotype/AutoTypeAction.h +++ b/src/autotype/AutoTypeAction.h @@ -29,19 +29,17 @@ class AutoTypeExecutor; class KEEPASSX_EXPORT AutoTypeAction { public: - virtual ~AutoTypeAction() - { - } virtual AutoTypeAction* clone() = 0; virtual void accept(AutoTypeExecutor* executor) = 0; + virtual ~AutoTypeAction(); }; class KEEPASSX_EXPORT AutoTypeChar : public AutoTypeAction { public: explicit AutoTypeChar(const QChar& character); - AutoTypeAction* clone(); - void accept(AutoTypeExecutor* executor); + AutoTypeAction* clone() override; + void accept(AutoTypeExecutor* executor) override; const QChar character; }; @@ -50,8 +48,8 @@ class KEEPASSX_EXPORT AutoTypeKey : public AutoTypeAction { public: explicit AutoTypeKey(Qt::Key key); - AutoTypeAction* clone(); - void accept(AutoTypeExecutor* executor); + AutoTypeAction* clone() override; + void accept(AutoTypeExecutor* executor) override; const Qt::Key key; }; @@ -60,8 +58,8 @@ class KEEPASSX_EXPORT AutoTypeDelay : public AutoTypeAction { public: explicit AutoTypeDelay(int delayMs); - AutoTypeAction* clone(); - void accept(AutoTypeExecutor* executor); + AutoTypeAction* clone() override; + void accept(AutoTypeExecutor* executor) override; const int delayMs; }; @@ -70,8 +68,8 @@ class KEEPASSX_EXPORT AutoTypeClearField : public AutoTypeAction { public: AutoTypeClearField(); - AutoTypeAction* clone(); - void accept(AutoTypeExecutor* executor); + AutoTypeAction* clone() override; + void accept(AutoTypeExecutor* executor) override; }; class KEEPASSX_EXPORT AutoTypeExecutor