diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2024-04-22 23:48:10 -0700 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2024-05-09 01:10:45 +0000 |
commit | dde69e62978f136ad789f44009c6d959a9289224 (patch) | |
tree | 1fcf27559b643f5c045e82965c022f16ba4f5c80 | |
parent | 97450d6b54d8601f50f2b097ace478956b973821 (diff) |
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
Pick-to: 6.5 6.7
Change-Id: I591f2e3af2162274c8092397cadf74ddbf687e9d
Reviewed-by: Moss Heim <moss.heim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-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 } |