Magellan Linux

Contents of /trunk/kdenetwork/patches/kdenetwork-4.10.0-giflib5.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2073 - (show annotations) (download)
Thu Feb 14 09:41:42 2013 UTC (11 years, 2 months ago) by niro
File size: 1995 byte(s)
-reworked patch for 4.10.0
1 diff -Naur kdenetwork-4.10.0/kopete/protocols/wlm/wlmchatsession.cpp kdenetwork-4.10.0-giflib5/kopete/protocols/wlm/wlmchatsession.cpp
2 --- kdenetwork-4.10.0/kopete/protocols/wlm/wlmchatsession.cpp 2013-01-23 22:16:32.000000000 +0000
3 +++ kdenetwork-4.10.0-giflib5/kopete/protocols/wlm/wlmchatsession.cpp 2013-02-11 15:38:10.483000000 +0000
4 @@ -467,11 +467,20 @@
5 {
6 #ifdef HAVE_GIFLIB
7 #ifdef HAVE_GIF_ERROR_STRING // giflib 4.2.0+
8 +#if GIFLIB_MAJOR >= 5
9 + int ErrorCode;
10 + const char * errorString = GifErrorString(ErrorCode);
11 +#else
12 const char * errorString = GifErrorString();
13 +#endif
14 if (errorString)
15 fprintf(stderr, "GIF-LIB error: %s\n", errorString);
16 else
17 +#if GIFLIB_MAJOR >= 5
18 + fprintf(stderr, "GIF-LIB undefined error.\n");
19 +#else
20 fprintf(stderr, "GIF-LIB undefined error: %d\n", GifError());
21 +#endif
22 #else // older giflib versions, libungif
23 PrintGifError();
24 #endif // HAVE_GIF_ERROR_STRING
25 @@ -489,12 +498,20 @@
26 ColorMapObject *imageColourmap;
27 QImage img = ink.toImage().convertToFormat(QImage::Format_Indexed8);
28
29 +#if GIFLIB_MAJOR >= 5
30 + imageColourmap= GifMakeMapObject(256, NULL);
31 +#else
32 imageColourmap= MakeMapObject(256, NULL);
33 +#endif
34 if (!imageColourmap) {
35 return;
36 }
37
38 +#if GIFLIB_MAJOR >= 5
39 + screenColourmap= GifMakeMapObject(256, NULL);
40 +#else
41 screenColourmap= MakeMapObject(256, NULL);
42 +#endif
43 if (!screenColourmap) {
44 return;
45 }
46 @@ -525,10 +542,19 @@
47 }
48 }
49
50 +#if GIFLIB_MAJOR >= 5
51 + GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0, NULL);
52 +#else
53 GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0);
54 +#endif
55 if (!GifFile) {
56 +#if GIFLIB_MAJOR >= 5
57 + GifFreeMapObject(imageColourmap);
58 + GifFreeMapObject(screenColourmap);
59 +#else
60 FreeMapObject(imageColourmap);
61 FreeMapObject(screenColourmap);
62 +#endif
63 return;
64 }
65