Commit 002ae169 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Improve accesskey

parent f00f5ddc
......@@ -61,7 +61,7 @@ public:
}
QString script() const;
QList<QLabel *> mAccessKeyLabels;
//QHash<QChar, QWebElement> mAccessKeyNodes;
QHash<QChar, MessageViewer::MailWebEngineAccessKeyAnchor> mAccessKeyNodes;
QHash<QString, QChar> mDuplicateLinkElements;
QWebEngineView *mWebEngine;
AccessKeyState mAccessKeyActivated;
......@@ -160,7 +160,7 @@ void MailWebEngineAccessKey::hideAccessKeys()
label->deleteLater();
}
d->mAccessKeyLabels.clear();
//FIXME d->mAccessKeyNodes.clear();
d->mAccessKeyNodes.clear();
d->mDuplicateLinkElements.clear();
d->mAccessKeyActivated = MailWebEngineAccessKeyPrivate::NotActivated;
d->mWebEngine->update();
......@@ -228,13 +228,8 @@ void MailWebEngineAccessKey::searchAccessKey()
void MailWebEngineAccessKey::handleSearchAccessKey(const QVariant &res)
{
qDebug() << " void MailWebEngineAccessKey::handleSearchAccessKey(const QVariant &res)" << res;
//TODO
}
//TODO create QVector of MailWebEngineAccessKeyAnchor
void MailWebEngineAccessKey::showAccessKeys()
{
//TODO fix me.
searchAccessKey();
QList<QChar> unusedKeys;
unusedKeys.reserve(10 + ('Z' - 'A' + 1));
......@@ -339,3 +334,8 @@ void MailWebEngineAccessKey::showAccessKeys()
d->mAccessKeyActivated = (d->mAccessKeyLabels.isEmpty() ? MailWebEngineAccessKeyPrivate::Activated : MailWebEngineAccessKeyPrivate::NotActivated);
}
void MailWebEngineAccessKey::showAccessKeys()
{
searchAccessKey();
}
......@@ -21,5 +21,10 @@ using namespace MessageViewer;
MailWebEngineAccessKeyAnchor::MailWebEngineAccessKeyAnchor(const QVariant &result)
{
initialize(result);
}
void MailWebEngineAccessKeyAnchor::initialize(const QVariant &result)
{
//TODO
}
......@@ -26,6 +26,8 @@ class MailWebEngineAccessKeyAnchor
{
public:
MailWebEngineAccessKeyAnchor(const QVariant &result);
private:
void initialize(const QVariant &result);
};
}
#endif // MAILWEBENGINEACCESSKEYANCHOR_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment