diff options
author | Jae Yang Kwak <jayskwak@gentoo.org> | 2002-07-26 03:05:15 +0000 |
---|---|---|
committer | Jae Yang Kwak <jayskwak@gentoo.org> | 2002-07-26 03:05:15 +0000 |
commit | 1b36483604ce0802d1436ff37e3561cc8c3d3248 (patch) | |
tree | 48fa7564566b542c3c7a10a515c0d132f5331117 /x11-libs/qt | |
parent | fix bug 5152 and clean up old versions (diff) | |
download | gentoo-2-1b36483604ce0802d1436ff37e3561cc8c3d3248.tar.gz gentoo-2-1b36483604ce0802d1436ff37e3561cc8c3d3248.tar.bz2 gentoo-2-1b36483604ce0802d1436ff37e3561cc8c3d3248.zip |
Modified qt-3.0.5-r1, Add patch in the FILES Dir.
Diffstat (limited to 'x11-libs/qt')
-rw-r--r-- | x11-libs/qt/files/qt-x11-free-3.0.5-ko_input.patch | 402 | ||||
-rw-r--r-- | x11-libs/qt/qt-3.0.5-r1.ebuild | 14 |
2 files changed, 408 insertions, 8 deletions
diff --git a/x11-libs/qt/files/qt-x11-free-3.0.5-ko_input.patch b/x11-libs/qt/files/qt-x11-free-3.0.5-ko_input.patch new file mode 100644 index 000000000000..b7567d88800a --- /dev/null +++ b/x11-libs/qt/files/qt-x11-free-3.0.5-ko_input.patch @@ -0,0 +1,402 @@ +--- qt-x11-free-3.0.5.orig/include/qwidget.h 2002-07-08 19:26:59.000000000 +0900 ++++ qt-x11-free-3.0.5/include/qwidget.h 2002-07-25 17:18:59.000000000 +0900 +@@ -512,7 +512,9 @@ + int metric( int ) const; + + void resetInputContext(); +- ++#ifndef KO_INPUT_PATCH ++ void clearInputContext(); ++#endif + virtual void create( WId = 0, bool initializeWindow = TRUE, + bool destroyOldWindow = TRUE ); + virtual void destroy( bool destroyWindow = TRUE, +--- qt-x11-free-3.0.5.orig/src/dialogs/qfiledialog.cpp 2002-07-08 19:26:40.000000000 +0900 ++++ qt-x11-free-3.0.5/src/dialogs/qfiledialog.cpp 2002-07-25 17:18:59.000000000 +0900 +@@ -976,7 +976,9 @@ + // this is similar to QUrl::encode but does encode "*" and + // doesn't encode whitespaces + static QString encodeFileName( const QString& fName ) { +- ++#ifndef KO_INPUT_PATCH ++ return fName; ++#else + QString newStr; + QCString cName = fName.utf8(); + const QCString sChars( +@@ -1006,6 +1008,7 @@ + } + } + return newStr; ++#endif + } + + }; +@@ -2987,6 +2990,23 @@ + } + } + } ++#ifndef KO_INPUT_PATCH ++ QString LineText = nameEdit->text(); ++ int dot_pos = LineText.find("."); ++ int line_len = LineText.length(); ++ if( f.compare("*.*") != 0 && line_len > 0 && LineText.contains('.') < 2 && index >= 0) { ++ if(dot_pos >= 0) { ++ if(dot_pos != 0 && dot_pos < (line_len-1)) { ++ LineText = LineText.left(LineText.findRev(".")); ++ LineText += f.right(f.length() - f.findRev(".")); ++ nameEdit->setText(LineText); ++ } ++ } else { ++ LineText += f.right(f.length() - f.findRev(".")); ++ nameEdit->setText(LineText); ++ } ++ } ++#endif + rereadDir(); + } + +--- qt-x11-free-3.0.5.orig/src/kernel/qapplication_x11.cpp 2002-07-08 19:26:53.000000000 +0900 ++++ qt-x11-free-3.0.5/src/kernel/qapplication_x11.cpp 2002-07-25 17:18:59.000000000 +0900 +@@ -3349,7 +3349,7 @@ + if ( inPopupMode() ) // no focus widget, see if we have a popup + keywidget = (QETWidget*) activePopupWidget(); + else if ( widget ) +- keywidget = (QETWidget*)widget->topLevelWidget(); ++ keywidget = widget->focusWidget()?(QETWidget*)widget->focusWidget():widget; + } + } + } +@@ -5555,8 +5555,14 @@ + QWidget *tlw = topLevelWidget(); + QInputContext *qic = (QInputContext *) tlw->topData()->xic; + +- if (qic && qic->composing && ! qic->lastcompose.isNull() && +- qic->lastcompose == text) { ++#ifndef KO_INPUT_PATCH ++ if (qic && qic->composing && ! qic->lastcompose.isNull() && ++ text.length() && qic->lastcompose.contains(text)) ++#else ++ if (qic && qic->composing && ! qic->lastcompose.isNull() && ++ qic->lastcompose == text) ++#endif ++ { + // keyevent with same text as last compose, skip it + return TRUE; + } +--- qt-x11-free-3.0.5.orig/src/kernel/qinputcontext_x11.cpp 2002-07-08 19:27:03.000000000 +0900 ++++ qt-x11-free-3.0.5/src/kernel/qinputcontext_x11.cpp 2002-07-25 17:18:59.000000000 +0900 +@@ -138,24 +138,42 @@ + + qic->text.remove(drawstruct->chg_first, drawstruct->chg_length); + +- KeySym sym = XKeycodeToKeysym(QPaintDevice::x11AppDisplay(), +- compose_keycode, 0); +- +- if ( qic->text.isEmpty() ) { +- if ( sym == XK_Return ) { +- // qDebug("user pressed return, send an IMEnd..."); +- QIMEvent endevent(QEvent::IMEnd, qic->lastcompose, -1); +- QApplication::sendEvent(qic->focusWidget, &endevent); +- qic->focusWidget = 0; ++#ifndef KO_INPUT_PATCH ++ if(qic->text.isEmpty() && drawstruct->chg_length > 0) { ++ int cursorPos = -1 * drawstruct->chg_length; ++ QString modifier = QString(getenv("XMODIFIERS")); ++ if(modifier.contains("Ami")) ++ cursorPos = -1; ++ ++ if(modifier.contains("vje")) { ++ QIMEvent event(QEvent::IMCompose, qic->text, drawstruct->caret); ++ QApplication::sendEvent(qic->focusWidget, &event); ++ qic->lastcompose = QString::null; + return 0; + } else { +- // qDebug("last char deleted, send an IMEnd with null string..."); +- QIMEvent endevent(QEvent::IMEnd, QString::null, -1); +- QApplication::sendEvent(qic->focusWidget, &endevent); +- qic->focusWidget = 0; +- return 0; ++ QIMEvent endevent(QEvent::IMEnd, qic->lastcompose, cursorPos); ++ ++ QApplication::sendEvent(qic->focusWidget, &endevent); ++ qic->focusWidget = 0; ++ return 0; + } + } ++#else ++ if (drawstruct->chg_length == 0 || ++ (qic->text.isEmpty() && drawstruct->chg_length > 1)) { ++ QIMEvent endevent(QEvent::IMEnd, qic->lastcompose, -1); ++ QApplication::sendEvent(qic->focusWidget, &endevent); ++ qic->focusWidget = 0; ++ return 0; ++ } else if ( qic->text.isEmpty() && ++ drawstruct->chg_first == 0 && ++ drawstruct->chg_length == 1 ) { ++ QIMEvent endevent(QEvent::IMEnd, QString::null, -1); ++ QApplication::sendEvent(qic->focusWidget, &endevent); ++ qic->focusWidget = 0; ++ return 0; ++ } ++#endif + } + + qic->lastcompose = qic->text; +@@ -328,7 +346,9 @@ + QApplication::sendEvent(focusWidget, &endevent); + focusWidget = 0; + lastcompose = text = QString::null; +- ++#ifndef KO_INPUT_PATCH ++ text = QString::null; ++#endif + char *mb = XmbResetIC((XIC) ic); + if (mb) + XFree(mb); +--- qt-x11-free-3.0.5.orig/src/kernel/qpaintdevice_x11.cpp 2002-07-08 19:27:15.000000000 +0900 ++++ qt-x11-free-3.0.5/src/kernel/qpaintdevice_x11.cpp 2002-07-25 17:18:59.000000000 +0900 +@@ -461,6 +461,9 @@ + dpiX = + (DisplayWidth(dpy,scr) * 254 + DisplayWidthMM(dpy,scr)*5) + / (DisplayWidthMM(dpy,scr)*10); ++#ifndef KO_INPUT_PATCH ++ dpiX = 75; ++#endif + } + } + return dpiX; +@@ -484,6 +487,9 @@ + (DisplayHeight(dpy,scr) * 254 + DisplayHeightMM(dpy,scr)*5) + / (DisplayHeightMM(dpy,scr)*10); + } ++#ifndef KO_INPUT_PATCH ++ dpiY = 75; ++#endif + return dpiY; + } + +--- qt-x11-free-3.0.5.orig/src/kernel/qpsprinter.cpp 2002-07-08 19:26:55.000000000 +0900 ++++ qt-x11-free-3.0.5/src/kernel/qpsprinter.cpp 2002-07-25 17:18:59.000000000 +0900 +@@ -6410,10 +6410,14 @@ + if ( last && !pageBuffer ) + return; + bool pageFonts = ( buffer == 0 ); ++#ifndef KO_INPUT_PATCH ++ if ( buffer && last || (buffer && buffer->size() > 2000000) ) ++#else + if ( buffer && + // ( last || pagesInBuffer++ > -1 || + // ( pagesInBuffer > 4 && buffer->size() > 262144 ) ) ) + (last || buffer->size() > 2000000) ) ++#endif + { + // qDebug("emiting header at page %d", pageCount ); + emitHeader( last ); +--- qt-x11-free-3.0.5.orig/src/kernel/qrichtext.cpp 2002-07-08 19:26:57.000000000 +0900 ++++ qt-x11-free-3.0.5/src/kernel/qrichtext.cpp 2002-07-25 17:18:59.000000000 +0900 +@@ -5104,10 +5104,13 @@ + } + if ( row < 0x11 ) // no asian font + return FALSE; ++#ifndef KO_INPUT_PATCH ++#else + if ( row > 0x2d && row < 0xfb || row == 0x11 ) + // asian line breaking. Everywhere allowed except directly + // in front of a punctuation character. + return TRUE; ++#endif + } + return FALSE; + } +--- qt-x11-free-3.0.5.orig/src/kernel/qwidget.h 2002-07-08 19:26:59.000000000 +0900 ++++ qt-x11-free-3.0.5/src/kernel/qwidget.h 2002-07-25 17:18:59.000000000 +0900 +@@ -512,7 +512,9 @@ + int metric( int ) const; + + void resetInputContext(); +- ++#ifndef KO_INPUT_PATCH ++ void clearInputContext(); ++#endif + virtual void create( WId = 0, bool initializeWindow = TRUE, + bool destroyOldWindow = TRUE ); + virtual void destroy( bool destroyWindow = TRUE, +--- qt-x11-free-3.0.5.orig/src/kernel/qwidget_x11.cpp 2002-07-08 19:27:01.000000000 +0900 ++++ qt-x11-free-3.0.5/src/kernel/qwidget_x11.cpp 2002-07-25 17:18:59.000000000 +0900 +@@ -131,7 +131,11 @@ + FocusChangeMask | + ExposureMask | + PropertyChangeMask | ++#ifndef KO_INPUT_PATCH ++ StructureNotifyMask ++#else + StructureNotifyMask | SubstructureRedirectMask ++#endif + ); + + const uint stdDesktopEventMask = // X event mask +@@ -2507,6 +2511,22 @@ + #endif // QT_NO_XIM + } + ++#ifndef KO_INPUT_PATCH ++void QWidget::clearInputContext() ++{ ++#ifndef QT_NO_XIM ++ if (qt_xim_style & XIMPreeditCallbacks) { ++ QWidget *tlw = topLevelWidget(); ++ QTLWExtra *topdata = tlw->topData(); ++ createInputContext(); ++ if (topdata->xic) { ++ QInputContext *qic = (QInputContext *) topdata->xic; ++ qic->lastcompose = QString::null; ++ } ++ } ++#endif // QT_NO_XIM ++} ++#endif // KO_INPUT_PATCH + + void QWidget::focusInputContext() + { +--- qt-x11-free-3.0.5.orig/src/widgets/qlineedit.cpp 2002-07-08 19:27:29.000000000 +0900 ++++ qt-x11-free-3.0.5/src/widgets/qlineedit.cpp 2002-07-25 17:18:59.000000000 +0900 +@@ -646,16 +646,18 @@ + if ( !t.isEmpty() && (!e->ascii() || e->ascii()>=32) && + e->key() != Key_Delete && + e->key() != Key_Backspace ) { +- if ( d->parag && d->parag->string() && d->parag->string()->isRightToLeft() ) { +- QChar *c = (QChar *)t.unicode(); +- int l = t.length(); +- while( l-- ) { +- if ( c->mirrored() ) +- *c = c->mirroredChar(); +- c++; +- } ++#ifndef KO_INPUT_PATCH ++ if ( (d->preeditLength > 0) && (cursorPosition() >= 0) ) { ++ d->parag->remove(d->preeditStart, d->preeditLength); ++ d->cursor->setIndex(d->preeditStart ); + } ++#endif + insert( t ); ++#ifndef KO_INPUT_PATCH ++ d->preeditStart = cursorPosition(); ++ d->preeditLength = -1; ++ clearInputContext(); ++#endif + return; + } + } +@@ -840,6 +842,12 @@ + void QLineEdit::imStartEvent( QIMEvent *e ) + { + d->preeditStart = cursorPosition(); ++ if (selectedText().length() > 0) { ++ d->preeditStart -= selectedText().length(); ++ cut(); ++ emit textChanged(text()); ++ } ++ + d->preeditLength = 0; + setMicroFocusHint( d->cursor->x() - d->offset, d->cursor->y(), 0, + d->cursor->paragraph()->rect().height(), TRUE ); +@@ -851,9 +859,21 @@ + */ + void QLineEdit::imComposeEvent( QIMEvent *e ) + { ++#ifndef KO_INPUT_PATCH ++ if (d->preeditLength > 0) { ++ d->parag->remove(d->preeditStart, d->preeditLength); ++ d->cursor->setIndex(d->preeditStart); ++ } ++ insert( e->text() ); ++ ++ if (d->preeditLength <= 0) ++ d->preeditStart = cursorPosition() - e->text().length(); ++#else ++ + if (d->preeditLength > 0) + d->parag->remove(d->preeditStart, d->preeditLength); + d->parag->insert(d->preeditStart, e->text()); ++#endif + d->preeditLength = e->text().length(); + d->cursor->setIndex(d->preeditStart + e->cursorPos()); + +@@ -866,6 +886,12 @@ + */ + void QLineEdit::imEndEvent( QIMEvent *e ) + { ++#ifndef KO_INPUT_PATCH ++ if (e->cursorPos() < -1) { ++ d->preeditStart = cursorPosition() + e->cursorPos(); ++ d->preeditLength = QABS(e->cursorPos()); ++ } ++#endif + if (d->preeditLength > 0) + d->parag->remove(d->preeditStart, d->preeditLength); + d->parag->insert(d->preeditStart, e->text()); +--- qt-x11-free-3.0.5.orig/src/widgets/qtextedit.cpp 2002-07-08 19:27:27.000000000 +0900 ++++ qt-x11-free-3.0.5/src/widgets/qtextedit.cpp 2002-07-25 17:19:00.000000000 +0900 +@@ -1107,7 +1107,18 @@ + c++; + } + } +- insert( t, TRUE, FALSE ); ++#ifndef KO_INPUT_PATCH ++ if ( d->preeditLength > 0 && cursor->paragraph() ) { ++ cursor->paragraph()->remove( d->preeditStart, d->preeditLength ); ++ cursor->setIndex( d->preeditStart ); ++ } ++#endif ++ insert( e->text(), TRUE, FALSE ); ++#ifndef KO_INPUT_PATCH ++ d->preeditStart = cursor->index(); ++ d->preeditLength = -1; ++ clearInputContext(); ++#endif + break; + } else if ( e->state() & ControlButton ) { + switch ( e->key() ) { +@@ -1208,16 +1219,28 @@ + void QTextEdit::imStartEvent( QIMEvent *e ) + { + d->preeditStart = cursor->index(); ++ if ( selectedText().length() > 0 ) ++ d->preeditStart -= selectedText().length(); + e->accept(); + } + + /*! \reimp */ + void QTextEdit::imComposeEvent( QIMEvent *e ) + { ++#ifndef KO_INPUT_PATCH ++ if ( d->preeditLength > 0 && cursor->paragraph() ) { ++ cursor->paragraph()->remove( d->preeditStart, d->preeditLength ); ++ cursor->setIndex( d->preeditStart ); ++ } ++ insert( e->text(), TRUE, FALSE ); ++ if ( d->preeditLength <= 0 ) ++ d->preeditStart = cursor->index() - e->text().length(); ++#else + if ( d->preeditLength > 0 && cursor->paragraph() ) + cursor->paragraph()->remove( d->preeditStart, d->preeditLength ); + cursor->setIndex( d->preeditStart ); + insert( e->text(), TRUE, FALSE ); ++#endif + d->preeditLength = e->text().length(); + cursor->setIndex( d->preeditStart + e->cursorPos() ); + +@@ -1229,6 +1252,12 @@ + /*! \reimp */ + void QTextEdit::imEndEvent( QIMEvent *e ) + { ++#ifndef KO_INPUT_PATCH ++ if ( e->cursorPos() < -1 ) { ++ d->preeditStart = cursor->index() + e->cursorPos(); ++ d->preeditLength = QABS(e->cursorPos()); ++ } ++#endif + if ( d->preeditLength > 0 && cursor->paragraph() ) + cursor->paragraph()->remove( d->preeditStart, d->preeditLength ); + cursor->setIndex( d->preeditStart ); diff --git a/x11-libs/qt/qt-3.0.5-r1.ebuild b/x11-libs/qt/qt-3.0.5-r1.ebuild index 429a1d251e46..1067922683b2 100644 --- a/x11-libs/qt/qt-3.0.5-r1.ebuild +++ b/x11-libs/qt/qt-3.0.5-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/qt-3.0.5-r1.ebuild,v 1.2 2002/07/25 15:11:42 jayskwak Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/qt-3.0.5-r1.ebuild,v 1.3 2002/07/26 03:05:15 jayskwak Exp $ S=${WORKDIR}/qt-x11-free-${PV} @@ -9,8 +9,7 @@ SLOT="3" LICENSE="QPL-1.0" KEYWORDS="x86" -SRC_URI="ftp://ftp.trolltech.com/qt/source/qt-x11-free-${PV}.tar.gz - ftp://ftp.nnongae.com/pub/gentoo/qt-x11-free-3.0.5-ko_input.patch" +SRC_URI="ftp://ftp.trolltech.com/qt/source/qt-x11-free-${PV}.tar.gz" HOMEPAGE="http://www.trolltech.com/" @@ -38,12 +37,11 @@ src_unpack() { # qt patch - for ami, fixed on the spot bug. cd ${S} - use nls && patch -p1 < ${DISTDIR}/qt-x11-free-3.0.5-ko_input.patch - + use nls && patch -p1 < ${FILESDIR}/qt-x11-free-3.0.5-ko_input.patch + cd ${S} cp configure configure.orig - sed -e 's:read acceptance:acceptance=yes:' \ - -e 's:|-repeater|:|-nas-sound|-repeater|:' configure.orig > configure + sed -e 's:read acceptance:acceptance=yes:' configure.orig > configure } @@ -53,7 +51,7 @@ src_compile() { export LDFLAGS="-ldl" - use nas && myconf="${myconf} -nas-sound" + use nas && myconf="${myconf} -system-nas-sound" use gif && myconf="${myconf} -qt-gif" use mysql && myconf="${myconf} -plugin-sql-mysql -I/usr/include/mysql -L/usr/lib/mysql" use postgres && myconf="${myconf} -plugin-sql-psql -I/usr/include/postgresql/server" |