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",
|
"mainCursor",
|
||||||
&MultiTextCursor::mainCursor,
|
&MultiTextCursor::mainCursor,
|
||||||
"cursors",
|
"cursors",
|
||||||
&MultiTextCursor::cursors);
|
[](MultiTextCursor *self) { return sol::as_table(self->cursors()); });
|
||||||
|
|
||||||
result.new_usertype<QTextCursor>(
|
result.new_usertype<QTextCursor>(
|
||||||
"TextCursor",
|
"TextCursor",
|
||||||
|
Reference in New Issue
Block a user