summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2008-05-07 18:49:28 +0200
committerAlbert Astals Cid <aacid@kde.org>2008-05-07 18:50:16 +0200
commit1cf5f0fda542efef575a123622637d81b9c42053 (patch)
treeb7f30461c8958a255f29e06af68278737e6a9edd /qt
parentb5041924eb023cc095f2445935ff713cf65dacce (diff)
[Qt] Fix Document::unlock
Diffstat (limited to 'qt')
-rw-r--r--qt/poppler-document.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt/poppler-document.cc b/qt/poppler-document.cc
index 597cc0ff..a316aa4f 100644
--- a/qt/poppler-document.cc
+++ b/qt/poppler-document.cc
@@ -78,8 +78,9 @@ bool Document::unlock(const QCString &password)
{
if (data->locked) {
/* racier then it needs to be */
+ GooString *filename = new GooString(data->doc.getFileName());
GooString *pwd = new GooString(password.data());
- DocumentData *doc2 = new DocumentData(data->doc.getFileName(), pwd);
+ DocumentData *doc2 = new DocumentData(filename, pwd);
delete pwd;
if (!doc2->doc.isOk()) {
delete doc2;
@@ -87,6 +88,7 @@ bool Document::unlock(const QCString &password)
delete data;
data = doc2;
data->locked = false;
+ data->m_fontInfoScanner = new FontInfoScanner(&(data->doc));
}
}
return data->locked;