Update to 3.3.8

This commit is contained in:
Michael Nottebrock 2007-03-20 21:06:59 +00:00
parent 251f9c5e76
commit d332bfdb4d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=187818
10 changed files with 261 additions and 47 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= qmake
PORTVERSION= 3.3.7
PORTVERSION= 3.3.8
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_QT}
DISTNAME= qt-x11-free-${PORTVERSION}

View File

@ -1,3 +1,3 @@
MD5 (KDE/qt-x11-free-3.3.7.tar.bz2) = 655e21cf6a7e66daf8ec6ceda81aae1e
SHA256 (KDE/qt-x11-free-3.3.7.tar.bz2) = 48c05b501029f0640db665fbc7f981a0efbf69ad3cf87a43c5eea4872f4f7ba1
SIZE (KDE/qt-x11-free-3.3.7.tar.bz2) = 14564513
MD5 (KDE/qt-x11-free-3.3.8.tar.bz2) = cf3c43a7dfde5bfb76f8001102fe6e85
SHA256 (KDE/qt-x11-free-3.3.8.tar.bz2) = e8c3f703d00a4e2ab9ba63fd474caa8a9d0aa3d7f1d5451dd162bec9d778a449
SIZE (KDE/qt-x11-free-3.3.8.tar.bz2) = 14360483

View File

@ -7,8 +7,7 @@
#
PORTNAME= qt
PORTVERSION= 3.3.7
PORTREVISION= 1
PORTVERSION= 3.3.8
CATEGORIES?= x11-toolkits ipv6
MASTER_SITES= ${MASTER_SITE_QT}
DISTNAME= qt-x11-free-${PORTVERSION}
@ -139,7 +138,10 @@ EXTRA_PATCHES= ${PATCHDIR}/0001-dnd_optimization.patch \
${PATCHDIR}/0056-khotkeys_input_84434.patch \
${PATCHDIR}/0059-qpopup_has_mouse.patch \
${PATCHDIR}/0060-qpopup_ignore_mousepos.patch \
${PATCHDIR}/0061-qscrollview-propagate-horizontal-wheelevent.patch
${PATCHDIR}/0061-qscrollview-propagate-horizontal-wheelevent.patch \
${PATCHDIR}/0073-xinerama-aware-qpopup.patch \
${PATCHDIR}/0076-fix-qprocess.diff \
${PATCHDIR}/xxxx-qt-font-default-subst.patch
PKGNAMESUFFIX= -copy
COMMENT+= (+ KDE patches)
CONFLICTS+= qt-3.3.*

View File

@ -1,3 +1,3 @@
MD5 (KDE/qt-x11-free-3.3.7.tar.bz2) = 655e21cf6a7e66daf8ec6ceda81aae1e
SHA256 (KDE/qt-x11-free-3.3.7.tar.bz2) = 48c05b501029f0640db665fbc7f981a0efbf69ad3cf87a43c5eea4872f4f7ba1
SIZE (KDE/qt-x11-free-3.3.7.tar.bz2) = 14564513
MD5 (KDE/qt-x11-free-3.3.8.tar.bz2) = cf3c43a7dfde5bfb76f8001102fe6e85
SHA256 (KDE/qt-x11-free-3.3.8.tar.bz2) = e8c3f703d00a4e2ab9ba63fd474caa8a9d0aa3d7f1d5451dd162bec9d778a449
SIZE (KDE/qt-x11-free-3.3.8.tar.bz2) = 14360483

View File

@ -5,8 +5,9 @@ author: Lubos Lunak <l.lunak@kde.org>
See http://lists.kde.org/?t=104388858900001&r=1&w=2
--- src/kernel/qdnd_x11.cpp.sav 2003-02-05 16:09:45.000000000 +0100
+++ src/kernel/qdnd_x11.cpp 2003-02-07 16:14:49.000000000 +0100
--- src/kernel/qdnd_x11.cpp
+++ src/kernel/qdnd_x11.cpp
@@ -49,13 +49,15 @@
#include "qdragobject.h"
#include "qobjectlist.h"
@ -25,7 +26,7 @@ See http://lists.kde.org/?t=104388858900001&r=1&w=2
#undef KeyPress
#undef KeyRelease
@@ -249,20 +251,47 @@ class QShapedPixmapWidget : public QWidg
@@ -253,20 +255,47 @@ class QShapedPixmapWidget : public QWidg
public:
QShapedPixmapWidget(int screen = -1) :
QWidget(QApplication::desktop()->screen( screen ),
@ -75,8 +76,8 @@ See http://lists.kde.org/?t=104388858900001&r=1&w=2
+ QPoint oldhot;
};
QShapedPixmapWidget * qt_xdnd_deco = 0;
@@ -859,6 +888,45 @@ void QDragManager::timerEvent( QTimerEve
static QShapedPixmapWidget * qt_xdnd_deco = 0;
@@ -872,6 +901,45 @@ void QDragManager::timerEvent( QTimerEve
move( QCursor::pos() );
}
@ -122,7 +123,7 @@ See http://lists.kde.org/?t=104388858900001&r=1&w=2
bool QDragManager::eventFilter( QObject * o, QEvent * e)
{
if ( beingCancelled ) {
@@ -881,8 +949,10 @@ bool QDragManager::eventFilter( QObject
@@ -894,8 +962,10 @@ bool QDragManager::eventFilter( QObject
if ( e->type() == QEvent::MouseMove ) {
QMouseEvent* me = (QMouseEvent *)e;
@ -135,16 +136,16 @@ See http://lists.kde.org/?t=104388858900001&r=1&w=2
return TRUE;
} else if ( e->type() == QEvent::MouseButtonRelease ) {
qApp->removeEventFilter( this );
@@ -1106,7 +1176,7 @@ void QDragManager::move( const QPoint &
delete qt_xdnd_deco;
qt_xdnd_deco = new QShapedPixmapWidget( screen );
@@ -1136,7 +1206,7 @@ void QDragManager::move( const QPoint &
qt_xdnd_deco->grabMouse();
}
}
- updatePixmap();
+ updatePixmap( globalPos );
if ( qt_xdnd_source_sameanswer.contains( globalPos ) &&
qt_xdnd_source_sameanswer.isValid() ) {
@@ -1679,7 +1749,7 @@ bool QDragManager::drag( QDragObject * o
@@ -1729,7 +1799,7 @@ bool QDragManager::drag( QDragObject * o
// qt_xdnd_source_object persists until we get an xdnd_finish message
}
@ -153,7 +154,7 @@ See http://lists.kde.org/?t=104388858900001&r=1&w=2
{
if ( qt_xdnd_deco ) {
QPixmap pm;
@@ -1694,9 +1764,8 @@ void QDragManager::updatePixmap()
@@ -1744,9 +1814,8 @@ void QDragManager::updatePixmap()
defaultPm = new QPixmap(default_pm);
pm = *defaultPm;
}
@ -165,7 +166,7 @@ See http://lists.kde.org/?t=104388858900001&r=1&w=2
//if ( willDrop ) {
qt_xdnd_deco->show();
//} else {
@@ -1705,4 +1774,9 @@ void QDragManager::updatePixmap()
@@ -1755,4 +1824,9 @@ void QDragManager::updatePixmap()
}
}
@ -175,8 +176,8 @@ See http://lists.kde.org/?t=104388858900001&r=1&w=2
+}
+
#endif // QT_NO_DRAGANDDROP
--- src/kernel/qdragobject.h.sav 2002-11-01 19:25:07.000000000 +0100
+++ src/kernel/qdragobject.h 2001-01-01 01:01:00.000000000 +0100
--- src/kernel/qdragobject.h
+++ src/kernel/qdragobject.h
@@ -245,6 +245,7 @@ private:
void move( const QPoint & );
void drop();

View File

@ -4,9 +4,10 @@ author: Lubos Lunak <l.lunak@kde.org>
See 0005-qpixmap_mitshm.patch for details.
--- src/kernel/qpixmap_x11.cpp.sav Tue Nov 26 15:32:21 2002
+++ src/kernel/qpixmap_x11.cpp Tue Nov 26 15:37:21 2002
@@ -1278,9 +1278,6 @@ bool QPixmap::convertFromImage( const QI
--- src/kernel/qpixmap_x11.cpp
+++ src/kernel/qpixmap_x11.cpp
@@ -1123,9 +1123,6 @@ bool QPixmap::convertFromImage( const QI
return FALSE;
int bppc = xi->bits_per_pixel;
@ -16,7 +17,7 @@ See 0005-qpixmap_mitshm.patch for details.
bool contig_bits = n_bits(red_mask) == rbits &&
n_bits(green_mask) == gbits &&
n_bits(blue_mask) == bbits;
@@ -1329,32 +1326,70 @@ bool QPixmap::convertFromImage( const QI
@@ -1174,32 +1171,70 @@ bool QPixmap::convertFromImage( const QI
}
init=TRUE;
}
@ -103,7 +104,7 @@ See 0005-qpixmap_mitshm.patch for details.
#define GET_PIXEL_DITHER_TC \
int r = qRed ( *p ); \
int g = qGreen( *p ); \
@@ -1374,91 +1409,177 @@ bool QPixmap::convertFromImage( const QI
@@ -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; \
@ -353,17 +354,17 @@ See 0005-qpixmap_mitshm.patch for details.
}
if ( d == 8 && !trucol ) { // 8 bit pixmap
@@ -1738,15 +1859,24 @@ bool QPixmap::convertFromImage( const QI
@@ -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 )
@ -371,13 +372,13 @@ See 0005-qpixmap_mitshm.patch for details.
+ 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 );
}
}
}
}

View File

@ -0,0 +1,113 @@
qt-bugs@ issue : none
bugs.kde.org number : none
applied: no
author: Lubos Lunak <l.lunak@kde.org>
Makes QPopupMenu aware of Xinerama (see e.g. https://bugzilla.novell.com/show_bug.cgi?id=216235).
--- src/widgets/qpopupmenu.cpp
+++ src/widgets/qpopupmenu.cpp
@@ -454,6 +454,15 @@ void QPopupMenu::frameChanged()
menuContentsChanged();
}
+QRect QPopupMenu::screenRect( const QPoint& pos )
+{
+ int screen_num = QApplication::desktop()->screenNumber( pos );
+#ifdef Q_WS_MAC
+ return QApplication::desktop()->availableGeometry( screen_num );
+#else
+ return QApplication::desktop()->screenGeometry( screen_num );
+#endif
+}
/*!
Displays the popup menu so that the item number \a indexAtPoint
will be at the specified \e global position \a pos. To translate a
@@ -498,6 +507,15 @@ void QPopupMenu::popup( const QPoint &po
// point.
#endif
+ QRect screen = screenRect( geometry().center());
+ QRect screen2 = screenRect( QApplication::reverseLayout()
+ ? pos+QPoint(width(),0) : pos );
+ // if the widget is not in the screen given by the position, move it
+ // there, so that updateSize() uses the right size of the screen
+ if( screen != screen2 ) {
+ screen = screen2;
+ move( screen.x(), screen.y());
+ }
if(d->scroll.scrollable) {
d->scroll.scrollable = QPopupMenuPrivate::Scroll::ScrollNone;
d->scroll.topScrollableIndex = d->scroll.scrollableSize = 0;
@@ -517,18 +535,6 @@ void QPopupMenu::popup( const QPoint &po
updateSize(TRUE);
}
- int screen_num;
- if (QApplication::desktop()->isVirtualDesktop())
- screen_num =
- QApplication::desktop()->screenNumber( QApplication::reverseLayout() ?
- pos+QPoint(width(),0) : pos );
- else
- screen_num = QApplication::desktop()->screenNumber( this );
-#ifdef Q_WS_MAC
- QRect screen = QApplication::desktop()->availableGeometry( screen_num );
-#else
- QRect screen = QApplication::desktop()->screenGeometry( screen_num );
-#endif
int sw = screen.width(); // screen width
int sh = screen.height(); // screen height
int sx = screen.x(); // screen pos
@@ -1056,7 +1062,7 @@ QSize QPopupMenu::updateSize(bool force_
mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4 );
}
- int dh = QApplication::desktop()->height();
+ int dh = screenRect( geometry().center()).height();
ncols = 1;
for ( QMenuItemListIt it2( *mitems ); it2.current(); ++it2 ) {
@@ -2297,9 +2303,9 @@ void QPopupMenu::subMenuTimer() {
bool right = FALSE;
if ( ( parentMenu && parentMenu->isPopupMenu &&
((QPopupMenu*)parentMenu)->geometry().x() < geometry().x() ) ||
- p.x() < 0 )
+ p.x() < screenRect( p ).left())
right = TRUE;
- if ( right && (ps.width() > QApplication::desktop()->width() - mapToGlobal( r.topRight() ).x() ) )
+ if ( right && (ps.width() > screenRect( p ).right() - mapToGlobal( r.topRight() ).x() ) )
right = FALSE;
if ( right )
p.setX( mapToGlobal( r.topRight() ).x() );
@@ -2310,7 +2316,7 @@ void QPopupMenu::subMenuTimer() {
bool left = FALSE;
if ( ( parentMenu && parentMenu->isPopupMenu &&
((QPopupMenu*)parentMenu)->geometry().x() > geometry().x() ) ||
- p.x() + ps.width() > QApplication::desktop()->width() )
+ p.x() + ps.width() > screenRect( p ).right() )
left = TRUE;
if ( left && (ps.width() > mapToGlobal( r.topLeft() ).x() ) )
left = FALSE;
@@ -2318,8 +2324,8 @@ void QPopupMenu::subMenuTimer() {
p.setX( mapToGlobal( r.topLeft() ).x() - ps.width() );
}
QRect pr = popup->itemGeometry(popup->count() - 1);
- if (p.y() + ps.height() > QApplication::desktop()->height() &&
- p.y() - ps.height() + (QCOORD) pr.height() >= 0)
+ if (p.y() + ps.height() > screenRect( p ).bottom() &&
+ p.y() - ps.height() + (QCOORD) pr.height() >= screenRect( p ).top())
p.setY( p.y() - ps.height() + (QCOORD) pr.height());
if ( style().styleHint(QStyle::SH_PopupMenu_SloppySubMenus, this )) {
Index: src/widgets/qpopupmenu.h
===================================================================
--- src/widgets/qpopupmenu.h (revision 636368)
+++ src/widgets/qpopupmenu.h (working copy)
@@ -152,6 +152,7 @@ private:
QSize updateSize(bool force_recalc=FALSE, bool do_resize=TRUE);
void updateRow( int row );
+ QRect screenRect(const QPoint& pos);
#ifndef QT_NO_ACCEL
void updateAccel( QWidget * );
void enableAccel( bool );

View File

@ -0,0 +1,19 @@
qt-bugs@ issue : none
bugs.kde.org number : none
applied: no
author: from trolltech
Fixes a regression in QProgress::writeToStdin()
--- src/kernel/qprocess.cpp
+++ src/kernel/qprocess.cpp
@@ -727,7 +727,7 @@ void QProcess::closeStdinLaunch()
void QProcess::writeToStdin( const QString& buf )
{
QByteArray tmp = buf.local8Bit();
- tmp.resize( tmp.size() - 1 ); // drop the implicit \0
+ tmp.resize( qstrlen( tmp.data() ) );
writeToStdin( tmp );
}

View File

@ -0,0 +1,77 @@
--- src/kernel/qfontdatabase_x11.cpp
+++ src/kernel/qfontdatabase_x11.cpp
@@ -1589,15 +1589,6 @@ QFontEngine *loadEngine( QFont::Script s
if (script == QFont::Latin)
// add Euro character
FcCharSetAddChar(cs, 0x20ac);
- if (script == QFont::Han_SimplifiedChinese)
- FcCharSetAddChar(cs, 0x3400);
- if (script == QFont::Han_TraditionalChinese){
- FcCharSetAddChar(cs, 0x3435);
- FcCharSetAddChar(cs, 0xE000);
- FcCharSetAddChar(cs, 0xF6B1);
- }
- if (script == QFont::MiscellaneousSymbols)
- FcCharSetAddChar(cs, 0x2714);
FcPatternAddCharSet(pattern, FC_CHARSET, cs);
FcCharSetDestroy(cs);
}
@@ -1813,7 +1804,11 @@ static QFontEngine *loadFontConfigFont(c
FcPatternPrint(pattern);
#endif
+ // XftFontMatch calls the right ConfigSubstitute variants, but as we use
+ // FcFontMatch/Sort here we have to do it manually.
FcConfigSubstitute(0, pattern, FcMatchPattern);
+ XftDefaultSubstitute(QPaintDevice::x11AppDisplay(), QPaintDevice::x11AppScreen(), pattern);
+
// qDebug("1: pattern contains:");
// FcPatternPrint(pattern);
@@ -1847,10 +1842,6 @@ static QFontEngine *loadFontConfigFont(c
value.u.s = (const FcChar8 *)cs.data();
FcPatternAddWeak(pattern, FC_FAMILY, value, FcTrue);
}
-#ifdef FONT_MATCH_DEBUG
- printf("final pattern contains:\n");
- FcPatternPrint(pattern);
-#endif
}
if (script != QFont::Unicode) {
@@ -1860,19 +1851,15 @@ static QFontEngine *loadFontConfigFont(c
if (script == QFont::Latin)
// add Euro character
FcCharSetAddChar(cs, 0x20ac);
- if (script == QFont::Han_SimplifiedChinese)
- FcCharSetAddChar(cs, 0x3400);
- if (script == QFont::Han_TraditionalChinese) {
- FcCharSetAddChar(cs, 0x3435);
- FcCharSetAddChar(cs, 0xE000);
- FcCharSetAddChar(cs, 0xF6B1);
- }
- if (script == QFont::MiscellaneousSymbols)
- FcCharSetAddChar(cs, 0x2714);
FcPatternAddCharSet(pattern, FC_CHARSET, cs);
FcCharSetDestroy(cs);
}
+#ifdef FONT_MATCH_DEBUG
+ printf("final pattern contains:\n");
+ FcPatternPrint(pattern);
+#endif
+
QFontEngine *fe = 0;
for( int jj = (FcGetVersion() >= 20392 ? 0 : 1); jj < 2; ++jj ) {
--- src/kernel/qfontdatabase.cpp
+++ src/kernel/qfontdatabase.cpp
@@ -554,7 +554,7 @@ static const unsigned short sample_chars
// GeometricSymbols,
{ 0x2500, 0x0 },
// MiscellaneousSymbols,
- { 0x2640, 0x0 },
+ { 0x2640, 0x2714, 0x0 },
// EnclosedAndSquare,
{ 0x2460, 0x0 },
// Braille,

View File

@ -415,7 +415,7 @@ lib/libqt-mt.prl
lib/libqt-mt.so
lib/libqt-mt.so.3
lib/libqt-mt.so.3.3
lib/libqt-mt.so.3.3.7
lib/libqt-mt.so.3.3.8
lib/libqui.prl
lib/libqui.so
lib/libqui.so.1
@ -2365,6 +2365,7 @@ share/qt/templates/Dialog_with_Buttons_(Right).ui
share/qt/templates/Tab_Dialog.ui
translations/assistant_de.qm
translations/qt_ar.qm
translations/qt_ca.qm
translations/qt_cs.qm
translations/qt_de.qm
translations/qt_es.qm