From b9dea57200502bf04ee4ac72ceb263d404f2e60e Mon Sep 17 00:00:00 2001 From: peri4 Date: Thu, 18 Jan 2024 15:28:25 +0300 Subject: [PATCH] QCodeEdit autocompletition on doc start fix --- libs/utils/qad_types.h | 2 +- libs/widgets/qcodeedit.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/utils/qad_types.h b/libs/utils/qad_types.h index 69d07c7..783209e 100644 --- a/libs/utils/qad_types.h +++ b/libs/utils/qad_types.h @@ -330,7 +330,7 @@ QByteArray qSerialize(const T & value, int version = -1) { template T qDeserialize(const QByteArray & data, int version = -1) { - T ret; + T ret = T(); if (!data.isEmpty()) { QDataStream s(data); if (version > 0) s.setVersion((QDataStream::Version)version); diff --git a/libs/widgets/qcodeedit.cpp b/libs/widgets/qcodeedit.cpp index f3e0f5c..4a5a5ed 100644 --- a/libs/widgets/qcodeedit.cpp +++ b/libs/widgets/qcodeedit.cpp @@ -348,7 +348,7 @@ int QCodeEdit::skipCWord(const QString & s, int pos) { if (pc.isLetter() || (pc.toLatin1() == '_')) return i + 1; return -1; } - return -1; + return 0; }