diff options
author | Aki Koskinen <freedesktop@akikoskinen.info> | 2014-07-11 00:30:52 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2014-07-11 00:30:52 +0200 |
commit | 4f4ee736075d5b1d1bf4911a26c2f80a7122fe04 (patch) | |
tree | c628c5d6ec5f856c47614267aefd3ba4211475e6 | |
parent | ddd91675792d9d496b06223867e05d2a190b878b (diff) |
Fix compilation of Qt5 frontend with MinGW
-rw-r--r-- | qt5/src/poppler-private.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qt5/src/poppler-private.h b/qt5/src/poppler-private.h index 0dd40d76..df6290b9 100644 --- a/qt5/src/poppler-private.h +++ b/qt5/src/poppler-private.h @@ -8,6 +8,7 @@ * Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> * Copyright (C) 2013 Anthony Granger <grangeranthony@gmail.com> * Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com> + * Copyright (C) 2014 Aki Koskinen <freedesktop@akikoskinen.info> * Inspired on code by * Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es> * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> @@ -86,11 +87,7 @@ namespace Poppler { m_filePath = filePath; #ifdef _WIN32 - wchar_t *fileName = new WCHAR[filePath.length()]; - std::wstring wstr = (const wchar_t *)filePath.utf16(); - int length = wstr._Copy_s(fileName, filePath.length(), filePath.length()); - doc = new PDFDoc(fileName, length, ownerPassword, userPassword); - delete[] fileName; + doc = new PDFDoc((wchar_t *)filePath.utf16(), filePath.length(), ownerPassword, userPassword); #else GooString *fileName = new GooString(QFile::encodeName(filePath)); doc = new PDFDoc(fileName, ownerPassword, userPassword); |