diff options
author | Kevin Ottens <ervin@kde.org> | 2013-02-21 23:50:02 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-06 21:50:28 +0100 |
commit | 2d1f3d7c514ab1c9f725a0a5e940656278d53f34 (patch) | |
tree | 7681a463b5c9087c069039b8f1820f4f7a3da848 /src/gui/kernel/qkeysequence.h | |
parent | 6d0a685fc63355d355b576d5f47b3b93d777fedf (diff) |
Add methods to convert lists of QKeySequence to/from strings
QKeySequence provides conversion to and from strings. But a similar
convenience was missing for QList<QKeySequence>. It would come in handy
when you want for instance to save/restore the shortcuts of a QAction.
Change-Id: I9e4f2001c58a595392a5019a57c564992c39bf88
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Diffstat (limited to 'src/gui/kernel/qkeysequence.h')
-rw-r--r-- | src/gui/kernel/qkeysequence.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h index 6324e203f0..423fc279a3 100644 --- a/src/gui/kernel/qkeysequence.h +++ b/src/gui/kernel/qkeysequence.h @@ -163,6 +163,9 @@ public: QString toString(SequenceFormat format = PortableText) const; static QKeySequence fromString(const QString &str, SequenceFormat format = PortableText); + static QList<QKeySequence> listFromString(const QString &str, SequenceFormat format = PortableText); + static QString listToString(const QList<QKeySequence> &list, SequenceFormat format = PortableText); + SequenceMatch matches(const QKeySequence &seq) const; static QKeySequence mnemonic(const QString &text); static QList<QKeySequence> keyBindings(StandardKey key); |