Bug 100311 - Fix compile with -DQT_NO_CAST_FROM_BYTEARRAY
Summary: Fix compile with -DQT_NO_CAST_FROM_BYTEARRAY
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: qt frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-22 06:46 UTC by Christoph Cullmann
Modified: 2017-03-22 22:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to add it (539 bytes, patch)
2017-03-22 06:46 UTC, Christoph Cullmann
Details | Splinter Review

Description Christoph Cullmann 2017-03-22 06:46:10 UTC
Created attachment 130369 [details] [review]
Patch to add it

Fix compile with -DQT_NO_CAST_FROM_BYTEARRAY, explicit .constData() needed.

diff --git a/qt5/src/poppler-private.h b/qt5/src/poppler-private.h
index ac384a4..fed4f26 100644
--- a/qt5/src/poppler-private.h
+++ b/qt5/src/poppler-private.h
@@ -92,7 +92,7 @@ namespace Poppler {
 #ifdef _WIN32
                doc = new PDFDoc((wchar_t *)filePath.utf16(), filePath.length(), ownerPassword, userPassword);
 #else
-               GooString *fileName = new GooString(QFile::encodeName(filePath));
+               GooString *fileName = new GooString(QFile::encodeName(filePath).constData());
                doc = new PDFDoc(fileName, ownerPassword, userPassword);
 #endif
Comment 1 Albert Astals Cid 2017-03-22 22:46:13 UTC
Pushed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.