mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Pin AutoTypeAction's vtable to a translation unit
AutoTypeAction class had no out-of-line definitions and because of this the compiler would place its vtable everywhere the class is used. By simply defining the virtual destructor in the .cpp file, the issue goes away. Also, a few classes derived from AutoTypeAction had missing 'override' qualifiers, which have now been added.
This commit is contained in:
parent
09fbb6d35a
commit
7a823e8dc7
@ -87,3 +87,9 @@ void AutoTypeExecutor::execClearField(AutoTypeClearField* action)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(action);
|
Q_UNUSED(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AutoTypeAction::~AutoTypeAction()
|
||||||
|
{
|
||||||
|
// This makes sure that AutoTypeAction's vtable is placed
|
||||||
|
// in this translation unit.
|
||||||
|
}
|
||||||
|
@ -29,19 +29,17 @@ class AutoTypeExecutor;
|
|||||||
class KEEPASSX_EXPORT AutoTypeAction
|
class KEEPASSX_EXPORT AutoTypeAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~AutoTypeAction()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
virtual AutoTypeAction* clone() = 0;
|
virtual AutoTypeAction* clone() = 0;
|
||||||
virtual void accept(AutoTypeExecutor* executor) = 0;
|
virtual void accept(AutoTypeExecutor* executor) = 0;
|
||||||
|
virtual ~AutoTypeAction();
|
||||||
};
|
};
|
||||||
|
|
||||||
class KEEPASSX_EXPORT AutoTypeChar : public AutoTypeAction
|
class KEEPASSX_EXPORT AutoTypeChar : public AutoTypeAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit AutoTypeChar(const QChar& character);
|
explicit AutoTypeChar(const QChar& character);
|
||||||
AutoTypeAction* clone();
|
AutoTypeAction* clone() override;
|
||||||
void accept(AutoTypeExecutor* executor);
|
void accept(AutoTypeExecutor* executor) override;
|
||||||
|
|
||||||
const QChar character;
|
const QChar character;
|
||||||
};
|
};
|
||||||
@ -50,8 +48,8 @@ class KEEPASSX_EXPORT AutoTypeKey : public AutoTypeAction
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit AutoTypeKey(Qt::Key key);
|
explicit AutoTypeKey(Qt::Key key);
|
||||||
AutoTypeAction* clone();
|
AutoTypeAction* clone() override;
|
||||||
void accept(AutoTypeExecutor* executor);
|
void accept(AutoTypeExecutor* executor) override;
|
||||||
|
|
||||||
const Qt::Key key;
|
const Qt::Key key;
|
||||||
};
|
};
|
||||||
@ -60,8 +58,8 @@ class KEEPASSX_EXPORT AutoTypeDelay : public AutoTypeAction
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit AutoTypeDelay(int delayMs);
|
explicit AutoTypeDelay(int delayMs);
|
||||||
AutoTypeAction* clone();
|
AutoTypeAction* clone() override;
|
||||||
void accept(AutoTypeExecutor* executor);
|
void accept(AutoTypeExecutor* executor) override;
|
||||||
|
|
||||||
const int delayMs;
|
const int delayMs;
|
||||||
};
|
};
|
||||||
@ -70,8 +68,8 @@ class KEEPASSX_EXPORT AutoTypeClearField : public AutoTypeAction
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AutoTypeClearField();
|
AutoTypeClearField();
|
||||||
AutoTypeAction* clone();
|
AutoTypeAction* clone() override;
|
||||||
void accept(AutoTypeExecutor* executor);
|
void accept(AutoTypeExecutor* executor) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class KEEPASSX_EXPORT AutoTypeExecutor
|
class KEEPASSX_EXPORT AutoTypeExecutor
|
||||||
|
Loading…
Reference in New Issue
Block a user