[Poppler-bugs] [Bug 100311] New: Fix compile with -DQT_NO_CAST_FROM_BYTEARRAY

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 22 06:46:10 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=100311

            Bug ID: 100311
           Summary: Fix compile with -DQT_NO_CAST_FROM_BYTEARRAY
           Product: poppler
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: qt frontend
          Assignee: poppler-bugs at lists.freedesktop.org
          Reporter: cullmann at kde.org

Created attachment 130369
  --> https://bugs.freedesktop.org/attachment.cgi?id=130369&action=edit
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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20170322/5c4f3728/attachment.html>


More information about the Poppler-bugs mailing list