Browse Source

fix mingw-w64 build by removing the __WKHTMLTOX_UNDEF_QT_DLL__ hack

This was broken since cd6331b1aed95d3810fbb2a02517f8e2273d69ba 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
Ashish Kulkarni 11 years ago
parent
commit
c22928d151

+ 0 - 5
src/lib/converter.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "converter_p.hh"
 #include "multipageloader.hh"
 #include "multipageloader.hh"

+ 0 - 5
src/lib/converter.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __CONVERTER_HH__
 #ifndef __CONVERTER_HH__
 #define __CONVERTER_HH__
 #define __CONVERTER_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <QObject>
 #include <QObject>
 #include <wkhtmltox/loadsettings.hh>
 #include <wkhtmltox/loadsettings.hh>

+ 0 - 5
src/lib/converter_p.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __CONVERTER_P_HH__
 #ifndef __CONVERTER_P_HH__
 #define __CONVERTER_P_HH__
 #define __CONVERTER_P_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include "converter.hh"
 #include "converter.hh"
 #include "websettings.hh"
 #include "websettings.hh"

+ 0 - 5
src/lib/image_c_bindings.cc

@@ -41,11 +41,6 @@
  * - \b quality The compression factor to use when outputting a JPEG image. E.g. "94".
  * - \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 "image_c_bindings_p.hh"
 #include "pdf.h"
 #include "pdf.h"

+ 0 - 5
src/lib/image_c_bindings_p.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __IMAGE_C_BINDINGS_P_HH__
 #ifndef __IMAGE_C_BINDINGS_P_HH__
 #define __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 "image.h"
 #include "imageconverter.hh"
 #include "imageconverter.hh"

+ 0 - 5
src/lib/imageconverter.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "imageconverter_p.hh"
 #include "imagesettings.hh"
 #include "imagesettings.hh"

+ 0 - 5
src/lib/imageconverter.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __IMAGECONVERTER_HH__
 #ifndef __IMAGECONVERTER_HH__
 #define __IMAGECONVERTER_HH__
 #define __IMAGECONVERTER_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/imagesettings.hh>
 #include <wkhtmltox/imagesettings.hh>

+ 0 - 5
src/lib/imageconverter_p.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __IMAGECONVERTER_P_HH__
 #ifndef __IMAGECONVERTER_P_HH__
 #define __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 "converter_p.hh"
 #include "imageconverter.hh"
 #include "imageconverter.hh"

+ 0 - 5
src/lib/imagesettings.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "imagesettings.hh"
 #include "reflect.hh"
 #include "reflect.hh"

+ 0 - 5
src/lib/imagesettings.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __IMAGESETTINGS_HH__
 #ifndef __IMAGESETTINGS_HH__
 #define __IMAGESETTINGS_HH__
 #define __IMAGESETTINGS_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <QString>
 #include <QString>
 #include <wkhtmltox/loadsettings.hh>
 #include <wkhtmltox/loadsettings.hh>

+ 1 - 1
src/lib/lib.pro

@@ -22,7 +22,7 @@ include(../../common.pri)
 include(lib.pri)
 include(lib.pri)
 
 
 DEF_FILE = lib.def
 DEF_FILE = lib.def
-contains(QMAKE_PRL_CONFIG, static): DEFINES += __WKHTMLTOX_UNDEF_QT_DLL__
+contains(QMAKE_PRL_CONFIG, static): DEFINES += QT_NODLL
 
 
 unix {
 unix {
    headers.target=headers
    headers.target=headers

+ 0 - 5
src/lib/loadsettings.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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
 #ifdef _MSC_VER
 #define strcasecmp _stricmp
 #define strcasecmp _stricmp

+ 0 - 5
src/lib/loadsettings.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __LOADSETTINGS_HH__
 #ifndef __LOADSETTINGS_HH__
 #define __LOADSETTINGS_HH__
 #define __LOADSETTINGS_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <QNetworkProxy>
 #include <QNetworkProxy>
 #include <QString>
 #include <QString>

+ 0 - 5
src/lib/multipageloader.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "multipageloader_p.hh"
 #include <QFile>
 #include <QFile>

+ 0 - 5
src/lib/multipageloader.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __MULTIPAGELOADER_HH__
 #ifndef __MULTIPAGELOADER_HH__
 #define __MULTIPAGELOADER_HH__
 #define __MULTIPAGELOADER_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <QFile>
 #include <QFile>
 #include <QObject>
 #include <QObject>

+ 0 - 5
src/lib/multipageloader_p.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __MULTIPAGELOADER_P_HH__
 #ifndef __MULTIPAGELOADER_P_HH__
 #define __MULTIPAGELOADER_P_HH__
 #define __MULTIPAGELOADER_P_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include "multipageloader.hh"
 #include "multipageloader.hh"
 #include "tempfile.hh"
 #include "tempfile.hh"

+ 0 - 5
src/lib/outline.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "outline_p.hh"
 #include <fstream>
 #include <fstream>

+ 0 - 5
src/lib/outline.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __OUTLINE_HH__
 #ifndef __OUTLINE_HH__
 #define __OUTLINE_HH__
 #define __OUTLINE_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include "pdfsettings.hh"
 #include "pdfsettings.hh"
 #include <QWebElement>
 #include <QWebElement>

+ 0 - 5
src/lib/outline_p.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __OUTLINE_P_HH__
 #ifndef __OUTLINE_P_HH__
 #define __OUTLINE_P_HH__
 #define __OUTLINE_P_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include "outline.hh"
 #include "outline.hh"
 #ifdef __EXTENSIVE_WKHTMLTOPDF_QT_HACK__
 #ifdef __EXTENSIVE_WKHTMLTOPDF_QT_HACK__

+ 0 - 5
src/lib/pdf_c_bindings.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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
  * \file pdf.h

+ 0 - 5
src/lib/pdf_c_bindings_p.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __PDF_C_BINDINGS_P_HH__
 #ifndef __PDF_C_BINDINGS_P_HH__
 #define __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 "pdf.h"
 #include "pdfconverter.hh"
 #include "pdfconverter.hh"

+ 0 - 5
src/lib/pdfconverter.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "pdfconverter_p.hh"
 #include <QAuthenticator>
 #include <QAuthenticator>

+ 0 - 5
src/lib/pdfconverter.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __PDFCONVERTER_HH__
 #ifndef __PDFCONVERTER_HH__
 #define __PDFCONVERTER_HH__
 #define __PDFCONVERTER_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/pdfsettings.hh>
 #include <wkhtmltox/pdfsettings.hh>

+ 0 - 5
src/lib/pdfconverter_p.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __PDFCONVERTER_P_HH__
 #ifndef __PDFCONVERTER_P_HH__
 #define __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 "converter_p.hh"
 #include "multipageloader.hh"
 #include "multipageloader.hh"

+ 0 - 5
src/lib/pdfsettings.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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
 #ifdef _MSC_VER
 #define strcasecmp _stricmp
 #define strcasecmp _stricmp

+ 0 - 5
src/lib/pdfsettings.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __PDFSETTINGS_HH__
 #ifndef __PDFSETTINGS_HH__
 #define __PDFSETTINGS_HH__
 #define __PDFSETTINGS_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <QNetworkProxy>
 #include <QNetworkProxy>
 #include <QPrinter>
 #include <QPrinter>

+ 0 - 5
src/lib/refcount.hh

@@ -21,11 +21,6 @@
 #ifndef __REFCOUNT_HH__
 #ifndef __REFCOUNT_HH__
 #define __REFCOUNT_HH__
 #define __REFCOUNT_HH__
 
 
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <wkhtmltox/dllbegin.inc>
 #include <wkhtmltox/dllbegin.inc>
 
 

+ 0 - 5
src/lib/reflect.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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"
 #include "reflect.hh"
 
 

+ 0 - 5
src/lib/reflect.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __REFLECT_HH__
 #ifndef __REFLECT_HH__
 #define __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
 #if defined(_MSC_VER) && _MSC_VER == 1500
 namespace msvc_typeof_impl {
 namespace msvc_typeof_impl {

+ 0 - 5
src/lib/tempfile.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "tempfile.hh"
 #include <QDir>
 #include <QDir>

+ 0 - 5
src/lib/tempfile.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __TEMPFILE_HH__
 #ifndef __TEMPFILE_HH__
 #define __TEMPFILE_HH__
 #define __TEMPFILE_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <QString>
 #include <QString>
 
 

+ 0 - 5
src/lib/tocstylesheet.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "outline_p.hh"
 #include "pdfsettings.hh"
 #include "pdfsettings.hh"

+ 0 - 5
src/lib/utilities.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "utilities.hh"
 #include <QDebug>
 #include <QDebug>

+ 0 - 5
src/lib/utilities.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __UTILITIES_HH__
 #ifndef __UTILITIES_HH__
 #define __UTILITIES_HH__
 #define __UTILITIES_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <QProxyStyle>
 #include <QProxyStyle>
 #include <QFile>
 #include <QFile>

+ 0 - 5
src/lib/websettings.cc

@@ -18,11 +18,6 @@
 // You should have received a copy of the GNU Lesser General Public License
 // You should have received a copy of the GNU Lesser General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // 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 "websettings.hh"
 #include "websettings.hh"
 namespace wkhtmltopdf {
 namespace wkhtmltopdf {

+ 0 - 5
src/lib/websettings.hh

@@ -20,11 +20,6 @@
 
 
 #ifndef __WEBSETTINGS_HH__
 #ifndef __WEBSETTINGS_HH__
 #define __WEBSETTINGS_HH__
 #define __WEBSETTINGS_HH__
-#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
-#ifdef QT_DLL
-#undef QT_DLL
-#endif
-#endif
 
 
 #include <QNetworkProxy>
 #include <QNetworkProxy>
 #include <QString>
 #include <QString>