Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ debian/*.log


build/
.vscode/
.vscode/

# AI configuration
.promptx/
.spec-workflow/
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
deepin-pdfium (1.5.7) unstable; urgency=medium

* update version to 1.5.7
* fix: coredump when application destruction.

-- re2zero <yangwu@uniontech.com> Wed, 22 Oct 2025 15:25:13 +0800

deepin-pdfium (1.5.6) unstable; urgency=medium

* update version to 1.5.6
Expand Down
16 changes: 8 additions & 8 deletions src/dpdfannot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@

DPdfAnnot::AnnotType DPdfAnnot::type()
{
qDebug() << "Getting annotation type:" << m_type;
// qDebug() << "Getting annotation type:" << m_type;
return m_type;
}

void DPdfAnnot::setText(QString text)
{
qDebug() << "Setting annotation text:" << text;
// qDebug() << "Setting annotation text:" << text;
m_text = text;
}

QString DPdfAnnot::text()
{
qDebug() << "Getting annotation text:" << m_text;
// qDebug() << "Getting annotation text:" << m_text;
return m_text;
}

Expand Down Expand Up @@ -173,19 +173,19 @@ void DPdfLinkAnnot::setUrl(QString url)

QString DPdfLinkAnnot::url() const
{
qDebug() << "Getting link annotation URL:" << m_url;
// qDebug() << "Getting link annotation URL:" << m_url;
return m_url;
}

void DPdfLinkAnnot::setFilePath(QString filePath)
{
qDebug() << "Setting link annotation file path:" << filePath;
// qDebug() << "Setting link annotation file path:" << filePath;
m_filePath = filePath;
}

QString DPdfLinkAnnot::filePath() const
{
qDebug() << "Getting link annotation file path:" << m_filePath;
// qDebug() << "Getting link annotation file path:" << m_filePath;
return m_filePath;
}

Expand All @@ -199,7 +199,7 @@ void DPdfLinkAnnot::setPage(int index, float left, float top)

int DPdfLinkAnnot::pageIndex() const
{
qDebug() << "Getting link annotation page index:" << m_index;
// qDebug() << "Getting link annotation page index:" << m_index;
return m_index;
}

Expand All @@ -223,7 +223,7 @@ int DPdfLinkAnnot::linkType() const
bool DPdfLinkAnnot::isValid() const
{
bool valid = (Goto == m_linkType) ? (m_index != -1) : true;
qDebug() << "Checking link annotation validity:" << valid;
// qDebug() << "Checking link annotation validity:" << valid;
return valid;
}

Expand Down
6 changes: 3 additions & 3 deletions src/dpdfdoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,18 @@ DPdfDocPrivate::DPdfDocPrivate()
DPdfDocPrivate::~DPdfDocPrivate()
{
DPdfMutexLocker locker("DPdfDocPrivate::~DPdfDocPrivate()");
qDebug() << "Cleaning up DPdfDocPrivate resources";
// qDebug() << "Cleaning up DPdfDocPrivate resources";

qDeleteAll(m_pages);

if (nullptr != m_docHandler) {
qDebug() << "Closing PDF document handler";
// qDebug() << "Closing PDF document handler";
FPDF_CloseDocument(reinterpret_cast<FPDF_DOCUMENT>(m_docHandler));
}

if (!m_tempFilePath.isEmpty() && QFile::exists(m_tempFilePath)) {
QFile::remove(m_tempFilePath);
qDebug() << "Temporary file deleted:" << m_tempFilePath;
// qDebug() << "Temporary file deleted:" << m_tempFilePath;
}
}

Expand Down
11 changes: 6 additions & 5 deletions src/dpdfglobal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,26 @@ void DPdfGlobal::init()

void DPdfGlobal::destory()
{
qDebug() << "Destroying PDF library";
// qDebug() << "Destroying PDF library";
if (initialized) {
FPDF_DestroyLibrary();
initialized = false;
qDebug() << "PDF library destroyed successfully";
// qDebug() << "PDF library destroyed successfully";
} else {
qDebug() << "PDF library was not initialized";
// qDebug() << "PDF library was not initialized";
}
}

DPdfGlobal::DPdfGlobal()
{
qDebug() << "Creating DPdfGlobal instance";
// qDebug() << "Creating DPdfGlobal instance";
init();
}

DPdfGlobal::~DPdfGlobal()
{
qDebug() << "Destroying DPdfGlobal instance";
// don’t print logs when application destruction which cause coredump
// qDebug() << "Destroying DPdfGlobal instance";
destory();
}

Expand Down
6 changes: 3 additions & 3 deletions src/dpdfpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ DPdfPagePrivate::DPdfPagePrivate(DPdfDocHandler *handler, int index, qreal xRes,

DPdfPagePrivate::~DPdfPagePrivate()
{
qDebug() << "Destroying page private object for index:" << m_index;
// qDebug() << "Destroying page private object for index:" << m_index;
if (m_textPage) {
qDebug() << "Closing text page";
// qDebug() << "Closing text page";
FPDFText_ClosePage(m_textPage);
}

if (m_page) {
qDebug() << "Closing PDF page";
// qDebug() << "Closing PDF page";
FPDF_ClosePage(m_page);
}

Expand Down
Loading