summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qjpeghandler.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-01-15 22:15:29 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-01-17 06:31:20 +0100
commit9d46189a64769d44842accfe427ebf5cdbc9d73b (patch)
tree47e09e6cac6dc4a7432941a1cf7e2ab3a7265e8b /src/gui/image/qjpeghandler.cpp
parent2f010390adba67996de687dd8d3bc427fb2305bf (diff)
Remove Q_C_CALLBACKS
This is useless. The C++ language does require callbacks passed to C functions to also be extern "C". That's what this macro was doing. But #ifdef'ing for the macro only made the code uglier. Just let the extern "C" be there for all compilers. PS: C++ classes can't be extern "C"... Change-Id: Ic5d393bfd36e48a193fcffff13b9c9b3923443dd Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui/image/qjpeghandler.cpp')
-rw-r--r--src/gui/image/qjpeghandler.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
index 7b669b1181..eb580c81f1 100644
--- a/src/gui/image/qjpeghandler.cpp
+++ b/src/gui/image/qjpeghandler.cpp
@@ -86,9 +86,7 @@ struct my_error_mgr : public jpeg_error_mgr {
jmp_buf setjmp_buffer;
};
-#if defined(Q_C_CALLBACKS)
extern "C" {
-#endif
static void my_error_exit (j_common_ptr cinfo)
{
@@ -106,9 +104,7 @@ static void my_output_message(j_common_ptr cinfo)
qWarning("%s", buffer);
}
-#if defined(Q_C_CALLBACKS)
}
-#endif
static const int max_buf = 4096;
@@ -123,9 +119,7 @@ public:
my_jpeg_source_mgr(QIODevice *device);
};
-#if defined(Q_C_CALLBACKS)
extern "C" {
-#endif
static void qt_init_source(j_decompress_ptr)
{
@@ -185,9 +179,7 @@ static void qt_term_source(j_decompress_ptr cinfo)
src->device->seek(src->device->pos() - src->bytes_in_buffer);
}
-#if defined(Q_C_CALLBACKS)
}
-#endif
inline my_jpeg_source_mgr::my_jpeg_source_mgr(QIODevice *device)
{
@@ -458,9 +450,7 @@ public:
};
-#if defined(Q_C_CALLBACKS)
extern "C" {
-#endif
static void qt_init_destination(j_compress_ptr)
{
@@ -490,9 +480,7 @@ static void qt_term_destination(j_compress_ptr cinfo)
(*cinfo->err->error_exit)((j_common_ptr)cinfo);
}
-#if defined(Q_C_CALLBACKS)
}
-#endif
inline my_jpeg_destination_mgr::my_jpeg_destination_mgr(QIODevice *device)
{