Extend auto-type test.

This commit is contained in:
Florian Geyer
2012-10-28 18:13:49 +01:00
parent d7cbec1a02
commit ac56ac98f7
5 changed files with 60 additions and 4 deletions

View File

@@ -17,6 +17,11 @@
#include "AutoTypeTest.h"
QString AutoTypePlatformTest::keyToString(Qt::Key key)
{
return QString("[Key0x%1]").arg(key, 0, 16);
}
QStringList AutoTypePlatformTest::windowTitles()
{
return QStringList();
@@ -68,9 +73,9 @@ QString AutoTypePlatformTest::actionChars()
return m_actionChars;
}
QList<AutoTypeAction*> AutoTypePlatformTest::actionList()
int AutoTypePlatformTest::actionCount()
{
return m_actionList;
return m_actionList.size();
}
void AutoTypePlatformTest::clearActions()
@@ -90,6 +95,7 @@ void AutoTypePlatformTest::addActionChar(AutoTypeChar* action)
void AutoTypePlatformTest::addActionKey(AutoTypeKey* action)
{
m_actionList.append(action->clone());
m_actionChars.append(keyToString(action->key));
}

View File

@@ -33,6 +33,8 @@ class AutoTypePlatformTest : public QObject,
Q_INTERFACES(AutoTypePlatformInterface AutoTypeTestInterface)
public:
QString keyToString(Qt::Key key);
QStringList windowTitles();
WId activeWindow();
QString activeWindowTitle();
@@ -44,7 +46,7 @@ public:
void setActiveWindowTitle(const QString& title);
QString actionChars();
QList<AutoTypeAction*> actionList();
int actionCount();
void clearActions();
void addActionChar(AutoTypeChar* action);

View File

@@ -27,8 +27,10 @@ public:
virtual void setActiveWindowTitle(const QString& title) = 0;
virtual QString actionChars() = 0;
virtual QList<AutoTypeAction*> actionList() = 0;
virtual int actionCount() = 0;
virtual void clearActions() = 0;
virtual QString keyToString(Qt::Key key) = 0;
};
Q_DECLARE_INTERFACE(AutoTypeTestInterface, "org.keepassx.AutoTypeTestInterface/1")