Hello community,
here is the log from the commit of package qt3
checked in at Sun Feb 25 23:37:00 CET 2007.
--------
--- KDE/qt3/qt3.changes 2007-02-21 13:00:58.000000000 +0100
+++ /mounts/work_src_done/STABLE/qt3/qt3.changes 2007-02-25 20:12:02.000000000 +0100
@@ -1,0 +2,6 @@
+Sun Feb 25 11:52:26 CET 2007 - dmueller@suse.de
+
+- update to 3.3.8:
+ * changelog is under /usr/share/doc/packages/qt3/changes-3.3.8
+
+-------------------------------------------------------------------
qt3-devel-doc.changes: same change
qt3-extensions.changes: same change
qt3-static.changes: same change
Old:
----
0070-fix-broken-fonts.patch
0074-indic-script-fix.patch
fix-han-localisation.diff
pedantic-headers.diff
qt3-3.3.7-translations.tar.bz2
qt-x11-free-3.3.7.tar.bz2
qt-x11-immodule-unified-qt3.3.6-20060318.diff
restore-qtextedit-performance.diff
New:
----
qt3-3.3.8-translations.tar.bz2
qt-x11-free-3.3.8.tar.bz2
qt-x11-immodule-unified-qt3.3.8-20060318.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qt3-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.cQ7648/_old 2007-02-25 23:36:33.000000000 +0100
+++ /var/tmp/diff_new_pack.cQ7648/_new 2007-02-25 23:36:33.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package qt3-devel-doc (Version 3.3.7)
+# spec file for package qt3-devel-doc (Version 3.3.8)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -17,8 +17,8 @@
Autoreqprov: on
Summary: Qt 3 Development Kit
Group: Documentation/HTML
-Version: 3.3.7
-Release: 29
+Version: 3.3.8
+Release: 1
PreReq: /bin/grep
BuildArch: noarch
Provides: qt3-devel-tutorial
@@ -57,7 +57,7 @@
Patch23: fix-accessible.diff
# From http://www.freedesktop.org/wiki/Software_2fImmoduleQtDownload
# Current version from http://freedesktop.org/~daisuke/qt-x11-immodule-unified-qt3.3.5-20060318.dif...
-Patch25: qt-x11-immodule-unified-qt3.3.6-20060318.diff
+Patch25: qt-x11-immodule-unified-qt3.3.8-20060318.diff
Patch28: fix-key-release-event-with-imm.diff
Patch29: 0047-fix-kmenu-width.diff
Patch31: limit-image-size.diff
@@ -78,13 +78,8 @@
Patch101: qt3-arm-gcc4.patch
Patch102: xinerama.patch
Patch113: fix-assistant-path.patch
-Patch114: 0070-fix-broken-fonts.patch
-Patch115: restore-qtextedit-performance.diff
-Patch116: pedantic-headers.diff
Patch117: qtimer-debug.diff
-Patch118: fix-han-localisation.diff
Patch119: xinerama-qpopupmenu.diff
-Patch120: 0074-indic-script-fix.patch
Patch121: qt3-warnings.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -122,7 +117,7 @@
%patch20
%endif
%patch23
-%patch25 -p1
+%patch25
%patch28
%patch29
%patch31
@@ -142,13 +137,8 @@
%patch55
%patch101
%patch113
-%patch114
-%patch115
-%patch116
%patch117
-%patch118
%patch119
-%patch120
%patch121
ln -sf $PWD/src/inputmethod/qinputcontextfactory.h include/
ln -sf $PWD/src/inputmethod/qinputcontextplugin.h include/
@@ -164,7 +154,6 @@
cp %SOURCE100 %SOURCE101 src/kernel/
cp %SOURCE101 include/private/
cd translations
-rm -v *.qm
tar xvjf %SOURCE12
cd ..
# COMMON-END
@@ -233,6 +222,9 @@
/usr/share/pixmaps/assistant3.png
%changelog
+* Sun Feb 25 2007 - dmueller@suse.de
+- update to 3.3.8:
+ * changelog is under /usr/share/doc/packages/qt3/changes-3.3.8
* Wed Feb 21 2007 - dmueller@suse.de
- fix build for 9.3
* Wed Feb 07 2007 - dmueller@suse.de
++++++ qt3-extensions.spec ++++++
--- /var/tmp/diff_new_pack.cQ7648/_old 2007-02-25 23:36:33.000000000 +0100
+++ /var/tmp/diff_new_pack.cQ7648/_new 2007-02-25 23:36:33.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package qt3-extensions (Version 3.3.7)
+# spec file for package qt3-extensions (Version 3.3.8)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,8 +13,8 @@
Name: qt3-extensions
BuildRequires: cups-devel krb5-devel libjpeg-devel mysql-devel postgresql-devel qt3-devel sqlite2-devel unixODBC-devel update-desktop-files
License: GNU General Public License (GPL), THE Q PUBLIC LICENSE (QPL)
-Version: 3.3.7
-Release: 30
+Version: 3.3.8
+Release: 1
Autoreqprov: on
Requires: qt3 = %version
Group: Development/Tools/Other
@@ -52,7 +52,7 @@
Patch23: fix-accessible.diff
# From http://www.freedesktop.org/wiki/Software_2fImmoduleQtDownload
# Current version from http://freedesktop.org/~daisuke/qt-x11-immodule-unified-qt3.3.5-20060318.dif...
-Patch25: qt-x11-immodule-unified-qt3.3.6-20060318.diff
+Patch25: qt-x11-immodule-unified-qt3.3.8-20060318.diff
Patch28: fix-key-release-event-with-imm.diff
Patch29: 0047-fix-kmenu-width.diff
Patch31: limit-image-size.diff
@@ -73,13 +73,8 @@
Patch101: qt3-arm-gcc4.patch
Patch102: xinerama.patch
Patch113: fix-assistant-path.patch
-Patch114: 0070-fix-broken-fonts.patch
-Patch115: restore-qtextedit-performance.diff
-Patch116: pedantic-headers.diff
Patch117: qtimer-debug.diff
-Patch118: fix-han-localisation.diff
Patch119: xinerama-qpopupmenu.diff
-Patch120: 0074-indic-script-fix.patch
Patch121: qt3-warnings.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -115,7 +110,7 @@
%patch20
%endif
%patch23
-%patch25 -p1
+%patch25
%patch28
%patch29
%patch31
@@ -135,13 +130,8 @@
%patch55
%patch101
%patch113
-%patch114
-%patch115
-%patch116
%patch117
-%patch118
%patch119
-%patch120
%patch121
ln -sf $PWD/src/inputmethod/qinputcontextfactory.h include/
ln -sf $PWD/src/inputmethod/qinputcontextplugin.h include/
@@ -157,7 +147,6 @@
cp %SOURCE100 %SOURCE101 src/kernel/
cp %SOURCE101 include/private/
cd translations
-rm -v *.qm
tar xvjf %SOURCE12
cd ..
# COMMON-END
@@ -477,6 +466,9 @@
%{_mandir}/man*/*
%changelog
+* Sun Feb 25 2007 - dmueller@suse.de
+- update to 3.3.8:
+ * changelog is under /usr/share/doc/packages/qt3/changes-3.3.8
* Wed Feb 21 2007 - dmueller@suse.de
- fix build for 9.3
* Wed Feb 07 2007 - dmueller@suse.de
++++++ qt3.spec ++++++
--- /var/tmp/diff_new_pack.cQ7648/_old 2007-02-25 23:36:33.000000000 +0100
+++ /var/tmp/diff_new_pack.cQ7648/_new 2007-02-25 23:36:33.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package qt3 (Version 3.3.7)
+# spec file for package qt3 (Version 3.3.8)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -18,8 +18,8 @@
Group: System/Libraries
Autoreqprov: on
Summary: A library for developing applications with graphical user interfaces
-Version: 3.3.7
-Release: 29
+Version: 3.3.8
+Release: 1
Provides: qt_library_%version
PreReq: /bin/grep
%define x11_free -x11-free-
@@ -54,7 +54,7 @@
Patch23: fix-accessible.diff
# From http://www.freedesktop.org/wiki/Software_2fImmoduleQtDownload
# Current version from http://freedesktop.org/~daisuke/qt-x11-immodule-unified-qt3.3.5-20060318.dif...
-Patch25: qt-x11-immodule-unified-qt3.3.6-20060318.diff
+Patch25: qt-x11-immodule-unified-qt3.3.8-20060318.diff
Patch28: fix-key-release-event-with-imm.diff
Patch29: 0047-fix-kmenu-width.diff
Patch31: limit-image-size.diff
@@ -75,13 +75,8 @@
Patch101: qt3-arm-gcc4.patch
Patch102: xinerama.patch
Patch113: fix-assistant-path.patch
-Patch114: 0070-fix-broken-fonts.patch
-Patch115: restore-qtextedit-performance.diff
-Patch116: pedantic-headers.diff
Patch117: qtimer-debug.diff
-Patch118: fix-han-localisation.diff
Patch119: xinerama-qpopupmenu.diff
-Patch120: 0074-indic-script-fix.patch
Patch121: qt3-warnings.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -126,7 +121,7 @@
%patch20
%endif
%patch23
-%patch25 -p1
+%patch25
%patch28
%patch29
%patch31
@@ -146,13 +141,8 @@
%patch55
%patch101
%patch113
-%patch114
-%patch115
-%patch116
%patch117
-%patch118
%patch119
-%patch120
%patch121
ln -sf $PWD/src/inputmethod/qinputcontextfactory.h include/
ln -sf $PWD/src/inputmethod/qinputcontextplugin.h include/
@@ -168,7 +158,6 @@
cp %SOURCE100 %SOURCE101 src/kernel/
cp %SOURCE101 include/private/
cd translations
-rm -v *.qm
tar xvjf %SOURCE12
cd ..
# COMMON-END
@@ -265,8 +254,6 @@
else
ln -sf linux-g++ ${RPM_BUILD_ROOT}/usr/lib/qt3/mkspecs/default
fi
-install -m 0644 README* LICENSE* MANIFEST FAQ \
- ${RPM_BUILD_ROOT}/%{_docdir}/qt3/
#
# create links in ld.so.conf path
#
@@ -316,12 +303,8 @@
%files
%defattr(-,root,root,755)
-%dir %{_docdir}/qt3
+%doc changes-%{version} README* LICENSE* MANIFEST FAQ
%dir /usr/lib/qt3/translations
-%{_docdir}/qt3/FAQ
-%{_docdir}/qt3/LICENSE.*
-%{_docdir}/qt3/MANIFEST
-%{_docdir}/qt3/README*
%dir /usr/lib/qt3
%dir /usr/lib/qt3/bin
%dir /usr/lib/qt3/%{_lib}
@@ -336,6 +319,7 @@
/usr/lib/qt3/bin/assistant
%lang(de) /usr/lib/qt3/translations/assistant_de.qm
%lang(ar) /usr/lib/qt3/translations/qt_ar.qm
+%lang(ca) /usr/lib/qt3/translations/qt_ca.qm
%lang(cs) /usr/lib/qt3/translations/qt_cs.qm
%lang(de) /usr/lib/qt3/translations/qt_de.qm
%lang(es) /usr/lib/qt3/translations/qt_es.qm
@@ -358,6 +342,7 @@
%files devel
%defattr(-,root,root,755)
+%doc changes-%{version}
/usr/lib/qt3/bin/moc
/usr/lib/qt3/bin/qmake
/usr/lib/qt3/bin/uic
@@ -373,6 +358,9 @@
/etc/profile.d/qt3.*
%changelog
+* Sun Feb 25 2007 - dmueller@suse.de
+- update to 3.3.8:
+ * changelog is under /usr/share/doc/packages/qt3/changes-3.3.8
* Wed Feb 21 2007 - dmueller@suse.de
- fix build for 9.3
* Wed Feb 07 2007 - dmueller@suse.de
++++++ qt3-static.spec ++++++
--- /var/tmp/diff_new_pack.cQ7648/_old 2007-02-25 23:36:33.000000000 +0100
+++ /var/tmp/diff_new_pack.cQ7648/_new 2007-02-25 23:36:33.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package qt3-static (Version 3.3.7)
+# spec file for package qt3-static (Version 3.3.8)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -16,8 +16,8 @@
Group: Development/Libraries/X11
Autoreqprov: on
Summary: static program library for developing applications with graphical user interfaces
-Version: 3.3.7
-Release: 29
+Version: 3.3.8
+Release: 1
%define x11_free -x11-free-
%define rversion %version
# COMMON-BEGIN
@@ -51,7 +51,7 @@
Patch23: fix-accessible.diff
# From http://www.freedesktop.org/wiki/Software_2fImmoduleQtDownload
# Current version from http://freedesktop.org/~daisuke/qt-x11-immodule-unified-qt3.3.5-20060318.dif...
-Patch25: qt-x11-immodule-unified-qt3.3.6-20060318.diff
+Patch25: qt-x11-immodule-unified-qt3.3.8-20060318.diff
Patch28: fix-key-release-event-with-imm.diff
Patch29: 0047-fix-kmenu-width.diff
Patch31: limit-image-size.diff
@@ -72,13 +72,8 @@
Patch101: qt3-arm-gcc4.patch
Patch102: xinerama.patch
Patch113: fix-assistant-path.patch
-Patch114: 0070-fix-broken-fonts.patch
-Patch115: restore-qtextedit-performance.diff
-Patch116: pedantic-headers.diff
Patch117: qtimer-debug.diff
-Patch118: fix-han-localisation.diff
Patch119: xinerama-qpopupmenu.diff
-Patch120: 0074-indic-script-fix.patch
Patch121: qt3-warnings.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -125,7 +120,7 @@
%patch20
%endif
%patch23
-%patch25 -p1
+%patch25
%patch28
%patch29
%patch31
@@ -145,13 +140,8 @@
%patch55
%patch101
%patch113
-%patch114
-%patch115
-%patch116
%patch117
-%patch118
%patch119
-%patch120
%patch121
ln -sf $PWD/src/inputmethod/qinputcontextfactory.h include/
ln -sf $PWD/src/inputmethod/qinputcontextplugin.h include/
@@ -167,7 +157,6 @@
cp %SOURCE100 %SOURCE101 src/kernel/
cp %SOURCE101 include/private/
cd translations
-rm -v *.qm
tar xvjf %SOURCE12
cd ..
# COMMON-END
@@ -223,6 +212,9 @@
/usr/lib/qt3/%{_lib}/libqt-mt.a
%changelog
+* Sun Feb 25 2007 - dmueller@suse.de
+- update to 3.3.8:
+ * changelog is under /usr/share/doc/packages/qt3/changes-3.3.8
* Wed Feb 21 2007 - dmueller@suse.de
- fix build for 9.3
* Wed Feb 07 2007 - dmueller@suse.de
++++++ 0005-qpixmap_mitshm.patch ++++++
--- /var/tmp/diff_new_pack.cQ7648/_old 2007-02-25 23:36:33.000000000 +0100
+++ /var/tmp/diff_new_pack.cQ7648/_new 2007-02-25 23:36:33.000000000 +0100
@@ -1,12 +1,73 @@
---- mkspecs/linux-g++/qplatformdefs.h
-+++ mkspecs/linux-g++/qplatformdefs.h
-@@ -102,5 +102,6 @@
- #define QT_VSNPRINTF ::vsnprintf
- #endif
-
-+#define QT_MITSHM
-
- #endif // QPLATFORMDEFS_H
+qt-bugs@ issue : 11790 (part of)
+applied: no
+author: Lubos Lunak
+
+NOTE: Needs #define QT_MITSHM in the matching qplatformdefs.h file. This
+ patch does so only for linux-g++ and linux-g++-distcc platforms.
+
+MITSHM extension support for QPixmap<->QImage conversions.
+
+Hello,
+
+ the review and apply the attached patches that improve performance of
+QImage->QPixmap conversions. They should be applied in order
+'mitshm','more_local' and 'fast', but they're independent from each other
+(well, besides merging problems).
+
+ Mitshm patch adds MITSHM extension support for both
+QPixmap::convertFromImage() and QPixmap::convertToImage(). I've noticed there
+was some MITSHM support already, turned off by default, but it was used only
+for QPixmap::xForm() , and it used shared pixmaps (and I'd bet nobody uses
+it). My patch adds shared ximages support for faster pixmap<->image
+conversions. Since I don't understand the xForm() code much, and I didn't
+want to do anything with it, I added three #define's:
+ - QT_MITSHM generally enabling MITSHM support, which should be set in
+qplatformsdefs.h (or wherever you setup platform specific stuff), it can be
+enabled at least on Linux
+ - QT_MITSHM_CONVERSIONS - this is for my new code
+ - QT_MITSHM_XFORM - this is for the xForm() code
+ There's one more #define, QT_MITSHM_RMID_IGNORES_REFCOUNT. Glibc
+documentation of shmctl( ... IPC_RMID ) quite clearly says that the memory
+segment is freed only after the refcount increased by shmat() and decreased
+by shmdt() is 0. However, at least according to
+http://bugs.kde.org/show_bug.cgi?id=27517 , this doesn't happen on other
+platforms for some strange reason. Such platforms should have this #define if
+you ever consider supporting MITSHM on them.
+
+ The lower limit for using MITSHM for the image is about 8KiB
+(width*height*depth > 100*100*32 ). Also, BestOptim in such case doesn't keep
+the ximage, as the shared ximage is always freed before the function returns
+(I don't know if it's worth copying it).
+
+ The second patch ('more_local'), in short, does nothing. Besides improving
+performance by about 10% by making variables more "local", making few of them
+const, and also making some of them unsigned (this help gcc for some reason).
+
+ The last one, 'fast', moves some if's out of the loops, and handles some most
+common case specially (15bpp, 16bpp and 32bpp ximage depths). 32bpp case, if
+the endianess matches, is simply uses memcpy(), for the 15/16bpp depth,
+variables are replaced directly by matching values, statements are a bit
+reordered and merged when suitable, and again, in case endianess matches,
+pixels are written simply as Q_INT16. Most probably it would also help to
+process two pixels at once and write them as Q_INT32, but I didn't want to
+complicate the code too much (later >;) ).
+
+ The last snippet of 'fast' handles case when xi->bytes_per_line is not equal
+to width for 8bpp ximage. I'm not actually sure if that can ever happen, but
+since I've already written it *shrug*.
+
+ The 'more_local' and 'fast' patches change only convertFromImage(), as I
+don't think convertToImage() is that performance critical (but it's as
+unoptimized as convertFromImage() was).
+
+ Maybe some numbers. The difference is of course mainly visible with larger
+pixmaps. The two optimizations alone reduce the time to 50% for 32bpp, to 70%
+for 16bpp. The MITSHM support, when other patches are already applied too,
+for 32bpp images saves about 33%. Together, the total time is reduced to
+about 40% for 32bpp. Imlib probably still beats that, but at least this
+obsoletes KPixmapIO.
+
+
--- src/kernel/qpixmap_x11.cpp
+++ src/kernel/qpixmap_x11.cpp
@@ -37,7 +37,19 @@
@@ -48,7 +109,7 @@
#include "qbitmap.h"
#include "qpaintdevicemetrics.h"
#include "qimage.h"
-@@ -91,7 +102,7 @@
+@@ -91,7 +102,7 @@ inline static void qSafeXDestroyImage( X
MIT Shared Memory Extension support: makes xForm noticeably (~20%) faster.
*****************************************************************************/
@@ -57,13 +118,13 @@
static bool xshminit = FALSE;
static XShmSegmentInfo xshminfo;
-@@ -173,8 +184,100 @@
+@@ -173,8 +184,100 @@ static bool qt_create_mitshm_buffer( con
// return FALSE;
// }
-#endif // QT_MITSHM
+#endif // QT_MITSHM_XFORM
-
++
+#ifdef QT_MITSHM_CONVERSIONS
+
+static bool qt_mitshm_error = false;
@@ -93,7 +154,7 @@
+ if( xi == NULL )
+ return NULL;
+ shminfo->shmid = shmget( IPC_PRIVATE, xi->bytes_per_line * xi->height,
-+ IPC_CREAT|0777);
++ IPC_CREAT|0600);
+ if( shminfo->shmid < 0 ) {
+ XDestroyImage( xi );
+ return NULL;
@@ -154,17 +215,16 @@
+ }
+ return xi;
+}
-+
+
+#endif // QT_MITSHM_CONVERSIONS
/*****************************************************************************
Internal functions
-@@ -628,9 +731,20 @@
+@@ -627,9 +730,20 @@ QImage QPixmap::convertToImage() const
d = 32; // > 8 ==> 32
XImage *xi = (XImage *)data->ximage; // any cached ximage?
- if ( !xi ) // fetch data from X server
-- xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes,
+#ifdef QT_MITSHM_CONVERSIONS
+ bool mitshm_ximage = false;
+ XShmSegmentInfo shminfo;
@@ -176,13 +236,13 @@
+ mitshm_ximage = true;
+ } else
+#endif
-+ xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes,
+ xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes,
mono ? XYPixmap : ZPixmap );
+ }
Q_CHECK_PTR( xi );
-
- QImage::Endian bitOrder = QImage::IgnoreEndian;
-@@ -639,15 +753,31 @@
+ if (!xi)
+ return image; // null image
+@@ -640,15 +754,31 @@ QImage QPixmap::convertToImage() const
QImage::LittleEndian : QImage::BigEndian;
}
image.create( w, h, d, 0, bitOrder );
@@ -216,21 +276,19 @@
if (axi) {
image.setAlphaBuffer( TRUE );
-@@ -661,7 +791,12 @@
+@@ -662,6 +792,11 @@ QImage QPixmap::convertToImage() const
src += axi->bytes_per_line;
}
-- qSafeXDestroyImage( axi );
+#ifdef QT_MITSHM_CONVERSIONS
+ if( mitshm_aximage )
+ qt_XShmDestroyImage( axi, &ashminfo );
+ else
+#endif
-+ qSafeXDestroyImage( axi );
+ qSafeXDestroyImage( axi );
}
} else if (msk) {
- image.setAlphaBuffer( TRUE );
-@@ -803,6 +938,12 @@
+@@ -804,6 +939,12 @@ QImage QPixmap::convertToImage() const
xi->bits_per_pixel );
#endif
image.reset();
@@ -243,17 +301,16 @@
return image;
}
-@@ -908,10 +1049,22 @@
+@@ -909,10 +1050,22 @@ QImage QPixmap::convertToImage() const
delete [] carr;
}
if ( data->optim != BestOptim ) { // throw away image data
-- qSafeXDestroyImage( xi );
+#ifdef QT_MITSHM_CONVERSIONS
+ if( mitshm_ximage )
+ qt_XShmDestroyImage( xi, &shminfo );
+ else
+#endif
-+ qSafeXDestroyImage( xi );
+ qSafeXDestroyImage( xi );
((QPixmap*)this)->data->ximage = 0;
- } else // keep ximage data
+ } else { // keep ximage data
@@ -268,8 +325,8 @@
return image;
}
-@@ -1081,6 +1234,11 @@
- bool trucol = (visual->c_class == TrueColor);
+@@ -1085,6 +1238,11 @@ bool QPixmap::convertFromImage( const QI
+ bool trucol = (visual->c_class == TrueColor || visual->c_class == DirectColor);
int nbytes = image.numBytes();
uchar *newbits= 0;
+ int newbits_size = 0;
@@ -280,28 +337,27 @@
if ( trucol ) { // truecolor display
QRgb pix[256]; // pixel translation table
-@@ -1109,9 +1267,18 @@
+@@ -1113,10 +1271,18 @@ bool QPixmap::convertFromImage( const QI
}
}
-- xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
+#ifdef QT_MITSHM_CONVERSIONS
-+ xi = qt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, &shminfo );
-+ if( xi != NULL ) {
-+ mitshm_ximage = true;
-+ newbits = (uchar*)xi->data;
-+ }
-+ else
-+#endif
-+ xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
- Q_CHECK_PTR( xi );
-- newbits = (uchar *)malloc( xi->bytes_per_line*h );
-+ if( newbits == NULL )
-+ newbits = (uchar *)malloc( xi->bytes_per_line*h );
++ xi = qt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, &shminfo );
++ if( xi != NULL ) {
++ mitshm_ximage = true;
++ newbits = (uchar*)xi->data;
++ }
++ else
++#endif
+ xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
+- Q_CHECK_PTR( xi );
+ if (!xi)
+ return false;
++ if( newbits == NULL )
+ newbits = (uchar *)malloc( xi->bytes_per_line*h );
Q_CHECK_PTR( newbits );
if ( !newbits ) // no memory
- return FALSE;
-@@ -1438,6 +1605,7 @@
+@@ -1323,6 +1489,7 @@ bool QPixmap::convertFromImage( const QI
}
newbits = (uchar *)malloc( nbytes ); // copy image into newbits
@@ -309,18 +365,17 @@
Q_CHECK_PTR( newbits );
if ( !newbits ) // no memory
return FALSE;
-@@ -1555,11 +1723,18 @@
+@@ -1440,11 +1607,18 @@ bool QPixmap::convertFromImage( const QI
}
if ( !xi ) { // X image not created
-- xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
+#ifdef QT_MITSHM_CONVERSIONS
+ xi = qt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, &shminfo );
+ if( xi != NULL )
+ mitshm_ximage = true;
+ else
+#endif
-+ xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
+ xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
if ( xi->bits_per_pixel == 16 ) { // convert 8 bpp ==> 16 bpp
ushort *p2;
int p2inc = xi->bytes_per_line/sizeof(ushort);
@@ -329,11 +384,10 @@
Q_CHECK_PTR( newerbits );
if ( !newerbits ) // no memory
return FALSE;
-@@ -1577,7 +1752,15 @@
+@@ -1462,6 +1636,14 @@ bool QPixmap::convertFromImage( const QI
"(bpp=%d)", xi->bits_per_pixel );
#endif
}
-- xi->data = (char *)newbits;
+#ifdef QT_MITSHM_CONVERSIONS
+ if( newbits_size > 0 && mitshm_ximage ) { // need to copy to shared memory
+ memcpy( xi->data, newbits, newbits_size );
@@ -342,24 +396,21 @@
+ }
+ else
+#endif
-+ xi->data = (char *)newbits;
+ xi->data = (char *)newbits;
}
- if ( hd && (width() != (int)w || height() != (int)h || this->depth() != dd) ) {
-@@ -1610,19 +1793,24 @@
+@@ -1495,19 +1677,24 @@ bool QPixmap::convertFromImage( const QI
}
-- XPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE ),
-- xi, 0, 0, 0, 0, w, h );
+#ifdef QT_MITSHM_CONVERSIONS
+ if( mitshm_ximage )
+ XShmPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE ),
+ xi, 0, 0, 0, 0, w, h, False );
+ else
+#endif
-+ XPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE ),
-+ xi, 0, 0, 0, 0, w, h );
+ XPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE ),
+ xi, 0, 0, 0, 0, w, h );
- if ( data->optim != BestOptim ) { // throw away image
- qSafeXDestroyImage( xi );
@@ -379,46 +430,41 @@
if ( image.hasAlphaBuffer() ) {
QBitmap m;
m = image.createAlphaMask( conversion_flags );
-@@ -1658,13 +1846,22 @@
+@@ -1543,13 +1730,22 @@ bool QPixmap::convertFromImage( const QI
data->alphapm->rendhd =
(HANDLE) XftDrawCreateAlpha( x11Display(), data->alphapm->hd, 8 );
- XImage *axi = XCreateImage(x11Display(), (Visual *) x11Visual(),
-- 8, ZPixmap, 0, 0, w, h, 8, 0);
+#ifdef QT_MITSHM_CONVERSIONS
-+ axi = qt_XShmCreateImage( x11Display(), (Visual*)x11Visual(),
-+ 8, ZPixmap, 0, 0, w, h, 8, 0, &ashminfo );
-+ if( axi != NULL )
-+ mitshm_aximage = true;
-+ else
++ axi = qt_XShmCreateImage( x11Display(), (Visual*)x11Visual(),
++ 8, ZPixmap, 0, 0, w, h, 8, 0, &ashminfo );
++ if( axi != NULL )
++ mitshm_aximage = true;
++ else
+#endif
-+ axi = XCreateImage(x11Display(), (Visual *) x11Visual(),
-+ 8, ZPixmap, 0, 0, w, h, 8, 0);
++ axi = XCreateImage(x11Display(), (Visual *) x11Visual(),
+ 8, ZPixmap, 0, 0, w, h, 8, 0);
if (axi) {
-- // the data is deleted by qSafeXDestroyImage
-- axi->data = (char *) malloc(h * axi->bytes_per_line);
-- Q_CHECK_PTR( axi->data );
-+ if( axi->data==NULL ) {
-+ // the data is deleted by qSafeXDestroyImage
-+ axi->data = (char *) malloc(h * axi->bytes_per_line);
-+ Q_CHECK_PTR( axi->data );
-+ }
- char *aptr = axi->data;
-
- if (image.depth() == 32) {
-@@ -1691,14 +1888,48 @@
- }
-
- GC gc = XCreateGC(x11Display(), data->alphapm->hd, 0, 0);
-- XPutImage(dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h);
-+#ifdef QT_MITSHM_CONVERSIONS
-+ if( mitshm_aximage )
-+ XShmPutImage( dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h, False );
-+ else
++ if( axi->data==NULL ) {
+ // the data is deleted by qSafeXDestroyImage
+ axi->data = (char *) malloc(h * axi->bytes_per_line);
+ Q_CHECK_PTR( axi->data );
++ }
+ char *aptr = axi->data;
+
+ if (image.depth() == 32) {
+@@ -1567,14 +1763,48 @@ bool QPixmap::convertFromImage( const QI
+ }
+
+ GC gc = XCreateGC(x11Display(), data->alphapm->hd, 0, 0);
++ #ifdef QT_MITSHM_CONVERSIONS
++ if( mitshm_aximage )
++ XShmPutImage( dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h, False );
++ else
+#endif
-+ XPutImage(dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h);
- XFreeGC(x11Display(), gc);
+ XPutImage(dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h);
+ XFreeGC(x11Display(), gc);
- qSafeXDestroyImage(axi);
}
}
@@ -430,22 +476,22 @@
+ XSync( x11Display(), False ); // wait until processed
+#endif
+
-+ if ( data->optim != BestOptim ) { // throw away image
++ if ( data->optim != BestOptim ) { // throw away image
+#ifdef QT_MITSHM_CONVERSIONS
+ if( mitshm_ximage )
+ qt_XShmDestroyImage( xi, &shminfo );
+ else
+#endif
-+ qSafeXDestroyImage( xi );
-+ data->ximage = 0;
-+ } else { // keep ximage that we created
++ qSafeXDestroyImage( xi );
++ data->ximage = 0;
++ } else { // keep ximage that we created
+#ifdef QT_MITSHM_CONVERSIONS
+ if( mitshm_ximage ) { // copy the XImage?
+ qt_XShmDestroyImage( xi, &shminfo );
+ xi = 0;
+ }
+#endif
-+ data->ximage = xi;
++ data->ximage = xi;
+ }
+ if( axi ) {
+#ifdef QT_MITSHM_CONVERSIONS
@@ -458,7 +504,7 @@
return TRUE;
}
-@@ -1855,7 +2086,7 @@
+@@ -1737,7 +1967,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
return pm;
}
@@ -467,7 +513,7 @@
static bool try_once = TRUE;
if (try_once) {
try_once = FALSE;
-@@ -1888,7 +2119,7 @@
+@@ -1770,7 +2000,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
dbpl = ((w*bpp+31)/32)*4;
dbytes = dbpl*h;
@@ -476,7 +522,7 @@
if ( use_mitshm ) {
dptr = (uchar *)xshmimg->data;
uchar fillbyte = bpp == 8 ? white.pixel() : 0xff;
-@@ -1904,7 +2135,7 @@
+@@ -1786,7 +2016,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
memset( dptr, Qt::white.pixel( x11Screen() ), dbytes );
else
memset( dptr, 0xff, dbytes );
@@ -485,7 +531,7 @@
}
#endif
-@@ -1935,7 +2166,7 @@
+@@ -1817,7 +2047,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
} else {
xbpl = (w*bpp)/8;
p_inc = dbpl - xbpl;
@@ -494,7 +540,7 @@
if ( use_mitshm )
p_inc = xshmimg->bytes_per_line - xbpl;
#endif
-@@ -1972,7 +2203,7 @@
+@@ -1854,7 +2084,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
QPixmap pm( w, h );
pm.data->uninit = FALSE;
pm.x11SetScreen( x11Screen() );
@@ -503,7 +549,7 @@
if ( use_mitshm ) {
XCopyArea( dpy, xshmpm, pm.handle(), gc, 0, 0, w, h, 0, 0 );
} else {
-@@ -1981,7 +2212,7 @@
+@@ -1863,7 +2093,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
ZPixmap, 0, (char *)dptr, w, h, 32, 0 );
XPutImage( dpy, pm.handle(), gc, xi, 0, 0, 0, 0, w, h);
qSafeXDestroyImage( xi );
@@ -512,3 +558,12 @@
}
#endif
+--- mkspecs/linux-g++/qplatformdefs.h
++++ mkspecs/linux-g++/qplatformdefs.h
+@@ -102,5 +102,6 @@
+ #define QT_VSNPRINTF ::vsnprintf
+ #endif
+
++#define QT_MITSHM
+
+ #endif // QPLATFORMDEFS_H
++++++ 0007-qpixmap_constants.patch ++++++
--- /var/tmp/diff_new_pack.cQ7648/_old 2007-02-25 23:36:33.000000000 +0100
+++ /var/tmp/diff_new_pack.cQ7648/_new 2007-02-25 23:36:33.000000000 +0100
@@ -1,6 +1,13 @@
+qt-bugs@ issue : 11790 (part of)
+applied: no
+author: Lubos Lunak
+
+See 0005-qpixmap_mitshm.patch for details.
+
+
--- src/kernel/qpixmap_x11.cpp
+++ src/kernel/qpixmap_x11.cpp
-@@ -1116,9 +1116,6 @@
+@@ -1123,9 +1123,6 @@ bool QPixmap::convertFromImage( const QI
return FALSE;
int bppc = xi->bits_per_pixel;
@@ -10,7 +17,7 @@
bool contig_bits = n_bits(red_mask) == rbits &&
n_bits(green_mask) == gbits &&
n_bits(blue_mask) == bbits;
-@@ -1167,32 +1164,70 @@
+@@ -1174,32 +1171,70 @@ bool QPixmap::convertFromImage( const QI
}
init=TRUE;
}
@@ -97,7 +104,7 @@
#define GET_PIXEL_DITHER_TC \
int r = qRed ( *p ); \
int g = qGreen( *p ); \
-@@ -1213,91 +1248,177 @@
+@@ -1220,91 +1255,177 @@ bool QPixmap::convertFromImage( const QI
? g << green_shift : g >> -green_shift; \
b = blue_shift > 0 \
? b << blue_shift : b >> -blue_shift; \
@@ -347,17 +354,17 @@
}
if ( d == 8 && !trucol ) { // 8 bit pixmap
-@@ -1547,15 +1668,24 @@
+@@ -1554,15 +1675,24 @@ bool QPixmap::convertFromImage( const QI
- if (image.depth() == 32) {
- const int *iptr = (const int *) image.bits();
-- int max = w * h;
-- while (max--)
-- *aptr++ = *iptr++ >> 24; // squirt
+ if (image.depth() == 32) {
+ const int *iptr = (const int *) image.bits();
+- int max = w * h;
+- while (max--)
+- *aptr++ = *iptr++ >> 24; // squirt
+ if( axi->bytes_per_line == (int)w ) {
-+ int max = w * h;
-+ while (max--)
-+ *aptr++ = *iptr++ >> 24; // squirt
++ int max = w * h;
++ while (max--)
++ *aptr++ = *iptr++ >> 24; // squirt
+ } else {
+ for (uint i = 0; i < h; ++i ) {
+ for (uint j = 0; j < w; ++j )
@@ -365,13 +372,13 @@
+ aptr += ( axi->bytes_per_line - w );
+ }
+ }
- } else if (image.depth() == 8) {
- const QRgb * const rgb = image.colorTable();
- for (uint y = 0; y < h; ++y) {
- const uchar *iptr = image.scanLine(y);
- for (uint x = 0; x < w; ++x)
- *aptr++ = qAlpha(rgb[*iptr++]);
+ } else if (image.depth() == 8) {
+ const QRgb * const rgb = image.colorTable();
+ for (uint y = 0; y < h; ++y) {
+ const uchar *iptr = image.scanLine(y);
+ for (uint x = 0; x < w; ++x)
+ *aptr++ = qAlpha(rgb[*iptr++]);
+ aptr += ( axi->bytes_per_line - w );
- }
- }
+ }
+ }
++++++ qt3-3.3.7-translations.tar.bz2 -> qt3-3.3.8-translations.tar.bz2 ++++++
++++ 28772 lines of diff (skipped)
++++++ qt3-devel-doc.spec.in ++++++
--- KDE/qt3/qt3-devel-doc.spec.in 2006-10-20 15:53:38.000000000 +0200
+++ /mounts/work_src_done/STABLE/qt3/qt3-devel-doc.spec.in 2007-02-25 03:50:18.000000000 +0100
@@ -17,7 +17,7 @@
Autoreqprov: on
Summary: Qt 3 Development Kit
Group: Documentation/HTML
-Version: 3.3.7
+Version: 3.3.8
Release: 1
PreReq: /bin/grep
BuildArch: noarch
++++++ qt3-extensions.spec.in ++++++
--- KDE/qt3/qt3-extensions.spec.in 2007-02-07 10:39:09.000000000 +0100
+++ /mounts/work_src_done/STABLE/qt3/qt3-extensions.spec.in 2007-02-23 01:26:44.000000000 +0100
@@ -13,7 +13,7 @@
Name: qt3-extensions
BuildRequires: cups-devel krb5-devel libjpeg-devel mysql-devel postgresql-devel qt3-devel sqlite2-devel unixODBC-devel update-desktop-files
License: GPL, QPL
-Version: 3.3.7
+Version: 3.3.8
Release: 1
Autoreqprov: on
Requires: qt3 = %version
++++++ qt3-static.spec.in ++++++
--- KDE/qt3/qt3-static.spec.in 2007-02-06 22:37:16.000000000 +0100
+++ /mounts/work_src_done/STABLE/qt3/qt3-static.spec.in 2007-02-25 15:34:53.000000000 +0100
@@ -7,7 +7,7 @@
Group: Development/Libraries/X11
Autoreqprov: on
Summary: static program library for developing applications with graphical user interfaces
-Version: 3.3.7
+Version: 3.3.8
Release: 1
%define x11_free -x11-free-
%define rversion %version
++++++ qt-x11-free-3.3.7.tar.bz2 -> qt-x11-free-3.3.8.tar.bz2 ++++++
KDE/qt3/qt-x11-free-3.3.7.tar.bz2 /mounts/work_src_done/STABLE/qt3/qt-x11-free-3.3.8.tar.bz2 differ: byte 11, line 1
++++++ qt-x11-immodule-unified-qt3.3.6-20060318.diff -> qt-x11-immodule-unified-qt3.3.8-20060318.diff ++++++
++++ 1921 lines (skipped)
++++ between KDE/qt3/qt-x11-immodule-unified-qt3.3.6-20060318.diff
++++ and /mounts/work_src_done/STABLE/qt3/qt-x11-immodule-unified-qt3.3.8-20060318.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org