example 'cl-repl': add resize handle above line edit; fix mobile QML auto reload

This commit is contained in:
pls.153 2022-06-17 12:54:18 +02:00
parent 4059f5593f
commit 8d026cf2f0
7 changed files with 361 additions and 329 deletions

View file

@ -97,7 +97,7 @@ QVariant QT::block2(const QVariant& vCursor) {
QTextCursor* cursor = VAL(vCursor, TextCursor*);
if (cursor != nullptr) {
TextBlock* tmp = new TextBlock(cursor->block());
tmp->deleteLater();
QTimer::singleShot(0, tmp, &QObject::deleteLater);
return VAR(TextBlock*, tmp);
}
return QVariant();
@ -173,7 +173,7 @@ QVariant QT::findBlockByLineNumber(const QVariant& vDocument, const QVariant& vN
QTextDocument* document = VAL(vDocument, QTextDocument*);
if (document != nullptr) {
TextBlock* tmp = new TextBlock(document->findBlockByLineNumber(vNumber.toInt()));
tmp->deleteLater();
QTimer::singleShot(0, tmp, &QObject::deleteLater);
return VAR(TextBlock*, tmp);
}
return QVariant();
@ -191,7 +191,7 @@ QVariant QT::next(const QVariant& vBlock) {
QTextBlock* block = VAL(vBlock, TextBlock*);
if (block != nullptr) {
TextBlock* tmp = new TextBlock(block->next());
tmp->deleteLater();
QTimer::singleShot(0, tmp, &QObject::deleteLater);
return VAR(TextBlock*, tmp);
}
return QVariant();
@ -217,7 +217,7 @@ QVariant QT::previous(const QVariant& vBlock) {
QTextBlock* block = VAL(vBlock, TextBlock*);
if (block != nullptr) {
TextBlock* tmp = new TextBlock(block->previous());
tmp->deleteLater();
QTimer::singleShot(0, tmp, &QObject::deleteLater);
return VAR(TextBlock*, tmp);
}
return QVariant();