summaryrefslogtreecommitdiffstats
path: root/src/pdf/qpdflinkmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf/qpdflinkmodel.cpp')
-rw-r--r--src/pdf/qpdflinkmodel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pdf/qpdflinkmodel.cpp b/src/pdf/qpdflinkmodel.cpp
index 900d3cd9e..5c2596bb9 100644
--- a/src/pdf/qpdflinkmodel.cpp
+++ b/src/pdf/qpdflinkmodel.cpp
@@ -66,7 +66,7 @@ QHash<int, QByteArray> QPdfLinkModel::roleNames() const
int QPdfLinkModel::rowCount(const QModelIndex &parent) const
{
Q_D(const QPdfLinkModel);
- Q_UNUSED(parent)
+ Q_UNUSED(parent);
return d->links.count();
}
@@ -239,10 +239,11 @@ void QPdfLinkModelPrivate::update()
if (len < 1) {
qCWarning(qLcLink) << "skipping link" << i << "with empty URL";
} else {
- QVector<unsigned short> buf(len);
+ QList<unsigned short> buf(len);
int got = FPDFLink_GetURL(webLinks, i, buf.data(), len);
Q_ASSERT(got == len);
- linkData.url = QString::fromUtf16(buf.data(), got - 1);
+ linkData.url = QString::fromUtf16(
+ reinterpret_cast<const char16_t *>(buf.data()), got - 1);
}
FPDFLink_GetTextRange(webLinks, i, &linkData.textStart, &linkData.textCharCount);
len = FPDFLink_CountRects(webLinks, i);