diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2024-04-22 23:48:10 -0700 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-05-10 00:48:18 +0000 |
commit | 8f3f47276548459257a9cdfe970bfd0971c2952a (patch) | |
tree | 5897add3366b8d38e51132c3f0044212d16687d7 | |
parent | 3ff1f50bfaeeb386c5c6267e9ac702dc950b144a (diff) |
Change qt.pdf.links log category to qt.pdf.wigets.links in pdfwidgets
We use the qt.pdf.links logging category in the PDF library.
If we redefine qLcLink in PdfWidgets, we get a static link error;
if we redeclare it, we get a dynamic link error. So it seems
that we cannot reuse logging categories across modules.
Fixes: QTBUG-124506
Change-Id: I591f2e3af2162274c8092397cadf74ddbf687e9d
Reviewed-by: Moss Heim <moss.heim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit dde69e62978f136ad789f44009c6d959a9289224)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit c7a20c54da09a0f7e6f5fdabde9776b8a2272e1d)
-rw-r--r-- | src/pdfwidgets/qpdfview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pdfwidgets/qpdfview.cpp b/src/pdfwidgets/qpdfview.cpp index a67667fed..a19b77a7f 100644 --- a/src/pdfwidgets/qpdfview.cpp +++ b/src/pdfwidgets/qpdfview.cpp @@ -19,7 +19,7 @@ QT_BEGIN_NAMESPACE -Q_LOGGING_CATEGORY(qLcLink, "qt.pdf.links") +Q_LOGGING_CATEGORY(qLcWLink, "qt.pdf.widgets.links") //#define DEBUG_LINKS static const QColor SearchResultHighlight("#80B0C4DE"); @@ -681,7 +681,7 @@ void QPdfView::mouseMoveEvent(QMouseEvent *event) auto dest = d->m_linkModel.linkAt(posInPoints); setCursor(dest.isValid() ? Qt::PointingHandCursor : Qt::ArrowCursor); if (dest.isValid()) - qCDebug(qLcLink) << event->position() << ":" << posInPoints << "pt ->" << dest; + qCDebug(qLcWLink) << event->position() << ":" << posInPoints << "pt ->" << dest; } } } @@ -699,7 +699,7 @@ void QPdfView::mouseReleaseEvent(QMouseEvent *event) d->m_linkModel.setPage(page); auto dest = d->m_linkModel.linkAt(posInPoints); if (dest.isValid()) { - qCDebug(qLcLink) << event << ": jumping to" << dest; + qCDebug(qLcWLink) << event << ": jumping to" << dest; d->m_pageNavigator->jump(dest.page(), dest.location(), dest.zoom()); // TODO scroll and zoom to where the link tells us to } |