Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Commit

Permalink
fix mingw-w64 build by removing the __WKHTMLTOX_UNDEF_QT_DLL__ hack
Browse files Browse the repository at this point in the history
This was broken since cd6331b due to
usage of QT resources. When building the library project, QT_DLL was
being defined which caused linkage issues. Earlier, this was worked
around by defining __WKHTMLTOX_UNDEF_QT_DLL__ which in turn caused
QT_DLL to be undefined in each source file, but this does not work
for the source file generated by rcc. A more sane approach is to
simply define QT_NODLL in case of static builds, which ensures that
QT_DLL is not defined at all via mkspecs/features/qt.prf
  • Loading branch information
ashkulz committed Apr 29, 2014
1 parent d1dc688 commit c22928d
Show file tree
Hide file tree
Showing 36 changed files with 1 addition and 176 deletions.
5 changes: 0 additions & 5 deletions src/lib/converter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "converter_p.hh"
#include "multipageloader.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/converter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __CONVERTER_HH__
#define __CONVERTER_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include <QObject>
#include <wkhtmltox/loadsettings.hh>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/converter_p.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __CONVERTER_P_HH__
#define __CONVERTER_P_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "converter.hh"
#include "websettings.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/image_c_bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
* - \b quality The compression factor to use when outputting a JPEG image. E.g. "94".
*/

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "image_c_bindings_p.hh"
#include "pdf.h"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/image_c_bindings_p.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __IMAGE_C_BINDINGS_P_HH__
#define __IMAGE_C_BINDINGS_P_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "image.h"
#include "imageconverter.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/imageconverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "imageconverter_p.hh"
#include "imagesettings.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/imageconverter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __IMAGECONVERTER_HH__
#define __IMAGECONVERTER_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include <wkhtmltox/converter.hh>
#include <wkhtmltox/imagesettings.hh>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/imageconverter_p.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __IMAGECONVERTER_P_HH__
#define __IMAGECONVERTER_P_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "converter_p.hh"
#include "imageconverter.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/imagesettings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "imagesettings.hh"
#include "reflect.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/imagesettings.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __IMAGESETTINGS_HH__
#define __IMAGESETTINGS_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include <QString>
#include <wkhtmltox/loadsettings.hh>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/lib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ include(../../common.pri)
include(lib.pri)

DEF_FILE = lib.def
contains(QMAKE_PRL_CONFIG, static): DEFINES += __WKHTMLTOX_UNDEF_QT_DLL__
contains(QMAKE_PRL_CONFIG, static): DEFINES += QT_NODLL

unix {
headers.target=headers
Expand Down
5 changes: 0 additions & 5 deletions src/lib/loadsettings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#ifdef _MSC_VER
#define strcasecmp _stricmp
Expand Down
5 changes: 0 additions & 5 deletions src/lib/loadsettings.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __LOADSETTINGS_HH__
#define __LOADSETTINGS_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include <QNetworkProxy>
#include <QString>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/multipageloader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "multipageloader_p.hh"
#include <QFile>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/multipageloader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __MULTIPAGELOADER_HH__
#define __MULTIPAGELOADER_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include <QFile>
#include <QObject>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/multipageloader_p.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __MULTIPAGELOADER_P_HH__
#define __MULTIPAGELOADER_P_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "multipageloader.hh"
#include "tempfile.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/outline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "outline_p.hh"
#include <fstream>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/outline.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __OUTLINE_HH__
#define __OUTLINE_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "pdfsettings.hh"
#include <QWebElement>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/outline_p.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __OUTLINE_P_HH__
#define __OUTLINE_P_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "outline.hh"
#ifdef __EXTENSIVE_WKHTMLTOPDF_QT_HACK__
Expand Down
5 changes: 0 additions & 5 deletions src/lib/pdf_c_bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

/**
* \file pdf.h
Expand Down
5 changes: 0 additions & 5 deletions src/lib/pdf_c_bindings_p.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __PDF_C_BINDINGS_P_HH__
#define __PDF_C_BINDINGS_P_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "pdf.h"
#include "pdfconverter.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/pdfconverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "pdfconverter_p.hh"
#include <QAuthenticator>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/pdfconverter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __PDFCONVERTER_HH__
#define __PDFCONVERTER_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include <wkhtmltox/converter.hh>
#include <wkhtmltox/pdfsettings.hh>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/pdfconverter_p.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __PDFCONVERTER_P_HH__
#define __PDFCONVERTER_P_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "converter_p.hh"
#include "multipageloader.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/pdfsettings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#ifdef _MSC_VER
#define strcasecmp _stricmp
Expand Down
5 changes: 0 additions & 5 deletions src/lib/pdfsettings.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __PDFSETTINGS_HH__
#define __PDFSETTINGS_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include <QNetworkProxy>
#include <QPrinter>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/refcount.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
#ifndef __REFCOUNT_HH__
#define __REFCOUNT_HH__

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include <wkhtmltox/dllbegin.inc>

Expand Down
5 changes: 0 additions & 5 deletions src/lib/reflect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "reflect.hh"

Expand Down
5 changes: 0 additions & 5 deletions src/lib/reflect.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __REFLECT_HH__
#define __REFLECT_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#if defined(_MSC_VER) && _MSC_VER == 1500
namespace msvc_typeof_impl {
Expand Down
5 changes: 0 additions & 5 deletions src/lib/tempfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "tempfile.hh"
#include <QDir>
Expand Down
5 changes: 0 additions & 5 deletions src/lib/tempfile.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

#ifndef __TEMPFILE_HH__
#define __TEMPFILE_HH__
#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include <QString>

Expand Down
5 changes: 0 additions & 5 deletions src/lib/tocstylesheet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "outline_p.hh"
#include "pdfsettings.hh"
Expand Down
5 changes: 0 additions & 5 deletions src/lib/utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.

#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
#ifdef QT_DLL
#undef QT_DLL
#endif
#endif

#include "utilities.hh"
#include <QDebug>
Expand Down
Loading

0 comments on commit c22928d

Please sign in to comment.