forked from qt-creator/qt-creator
Lua: Let MultiTextCusor::cursors return a table
There is a problem with sorting QList<QTextCursor> due to the implicit sharing in QTextCursor. For now just convert the list to a table which works with table.sort as well. Change-Id: Ia9bb8c7b89b5cd19f7f111eeaa6fc3ea381774ea Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -164,7 +164,7 @@ void setupTextEditorModule()
|
||||
"mainCursor",
|
||||
&MultiTextCursor::mainCursor,
|
||||
"cursors",
|
||||
&MultiTextCursor::cursors);
|
||||
[](MultiTextCursor *self) { return sol::as_table(self->cursors()); });
|
||||
|
||||
result.new_usertype<QTextCursor>(
|
||||
"TextCursor",
|
||||
|
Reference in New Issue
Block a user