summaryrefslogtreecommitdiffstats
path: root/src/pdf
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-02-17 17:02:52 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-02-17 17:50:22 +0100
commit3b3970776c99b6ad7ac13cd8b743fc77a455b98c (patch)
tree9fee23ed0873e0f54102cd3f94b090ce85e18ae1 /src/pdf
parentd0e96aa21daa8601254cffd584d33f38d62ff1df (diff)
Fix operators and includes in QPdfDestination
Amends 09a6eac4a63b32548ecc1ff5b16a5d8fc3ba1c04. Change-Id: Id321d016a758d4f58d82a32575d034df226e083e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/api/qpdfdestination.h9
-rw-r--r--src/pdf/qpdfdestination.cpp23
2 files changed, 20 insertions, 12 deletions
diff --git a/src/pdf/api/qpdfdestination.h b/src/pdf/api/qpdfdestination.h
index cad041982..325863226 100644
--- a/src/pdf/api/qpdfdestination.h
+++ b/src/pdf/api/qpdfdestination.h
@@ -38,9 +38,10 @@
#define QPDFDESTINATION_H
#include <QtPdf/qtpdfglobal.h>
-#include <QExplicitlySharedDataPointer>
-#include <QObject>
-#include <QPointF>
+#include <QtCore/qdebug.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qpoint.h>
+#include <QtCore/qshareddata.h>
QT_BEGIN_NAMESPACE
@@ -76,6 +77,8 @@ protected:
QExplicitlySharedDataPointer<QPdfDestinationPrivate> d;
};
+Q_PDF_EXPORT QDebug operator<<(QDebug, const QPdfDestination &);
+
QT_END_NAMESPACE
#endif // QPDFDESTINATION_H
diff --git a/src/pdf/qpdfdestination.cpp b/src/pdf/qpdfdestination.cpp
index 86e429dcf..b347445e9 100644
--- a/src/pdf/qpdfdestination.cpp
+++ b/src/pdf/qpdfdestination.cpp
@@ -77,6 +77,12 @@ QPdfDestination::~QPdfDestination()
{
}
+QPdfDestination &QPdfDestination::operator=(const QPdfDestination &other)
+{
+ d = other.d;
+ return *this;
+}
+
/*!
\property QPdfDestination::valid
@@ -118,16 +124,15 @@ qreal QPdfDestination::zoom() const
return d->zoom;
}
-//QDataStream& operator<<(QDataStream& stream, const QPdfDestination& dest)
-//{
-// stream << *dest.d.data();
-// return stream;
-//}
-
-QDataStream& operator<<(QDataStream& stream, const QPdfDestinationPrivate& dest)
+QDebug operator<<(QDebug dbg, const QPdfDestination& dest)
{
- stream << QStringLiteral("QPdfDestination") << dest.page << dest.location ; // << dest.zoom();
- return stream;
+ QDebugStateSaver saver(dbg);
+ dbg.nospace();
+ dbg << "QPdfDestination(page=" << dest.page()
+ << " location=" << dest.location()
+ << " zoom=" << dest.zoom();
+ dbg << ')';
+ return dbg;
}
QT_END_NAMESPACE