TextEditor: Provide a function for inserting a parenthesis

... into a sorted list.

Change-Id: Ibc39a345425945437cc8b8d9237589746143b2d9
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-09-24 12:08:33 +02:00
parent 421e06393f
commit 47cd1def7a
4 changed files with 11 additions and 14 deletions

View File

@@ -38,8 +38,6 @@
#include <QPlainTextDocumentLayout>
namespace TextEditor {
struct Parenthesis;
using Parentheses = QVector<Parenthesis>;
struct TEXTEDITOR_EXPORT Parenthesis
{
@@ -55,6 +53,8 @@ struct TEXTEDITOR_EXPORT Parenthesis
bool operator==(const Parenthesis &other) const;
};
using Parentheses = QVector<Parenthesis>;
TEXTEDITOR_EXPORT void insertSorted(Parentheses &list, const Parenthesis &elem);
TEXTEDITOR_EXPORT QDebug operator<<(QDebug debug, const Parenthesis &parenthesis);