<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fix compile with -DQT_NO_CAST_FROM_BYTEARRAY"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100311">100311</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Fix compile with -DQT_NO_CAST_FROM_BYTEARRAY
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>poppler
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>qt frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>poppler-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>cullmann@kde.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=130369" name="attach_130369" title="Patch to add it">attachment 130369</a> <a href="attachment.cgi?id=130369&action=edit" title="Patch to add it">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=100311&attachment=130369'>[review]</a>
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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>