+++ /dev/null
-qt-bugs@ issue : 15222 (part of)
-applied: no
-author: Lubos Lunak <l.lunak@kde.org>
-
-This patch should fix KDE bug #61412 and its numerous duplicates (applies
-to both Qt-3.2.x and Qt-3.3.x). I'm not opposed to trying using
-the event loop if done properly, but right now it simply fails way too
-often, and what's worse, qFatal() does exit(1), so there's usually
-even no crash dialog.
-
-
---- src/kernel/qclipboard_x11.cpp.sav 2004-01-06 19:24:40.000000000 +0100
-+++ src/kernel/qclipboard_x11.cpp 2004-01-22 19:48:32.000000000 +0100
-@@ -112,10 +112,6 @@ static bool pending_selection_changed =
-
- // event capture mechanism for qt_xclb_wait_for_event
- static bool waiting_for_data = FALSE;
--static bool has_captured_event = FALSE;
--static Window capture_event_win = None;
--static int capture_event_type = -1;
--static XEvent captured_event;
-
- class QClipboardWatcher; // forward decl
- static QClipboardWatcher *selection_watcher = 0;
-@@ -432,69 +428,36 @@ bool QClipboard::selectionModeEnabled()
- { return inSelectionMode_obsolete; }
-
-
--// event filter function... captures interesting events while
--// qt_xclb_wait_for_event is running the event loop
--static int qt_xclb_event_filter(XEvent *event)
--{
-- if (event->xany.type == capture_event_type &&
-- event->xany.window == capture_event_win) {
-- VDEBUG( "QClipboard: event_filter(): caught event type %d", event->type );
-- has_captured_event = TRUE;
-- captured_event = *event;
-- return 1;
-- }
--
-- return 0;
--}
--
- bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
- int timeout )
- {
-- if ( waiting_for_data )
-- qFatal( "QClipboard: internal error, qt_xclb_wait_for_event recursed" );
--
-- waiting_for_data = TRUE;
--
- QTime started = QTime::currentTime();
- QTime now = started;
--
-- has_captured_event = FALSE;
-- capture_event_win = win;
-- capture_event_type = type;
--
-- QX11EventFilter old_event_filter = qt_set_x11_event_filter(qt_xclb_event_filter);
-+ bool flushed = FALSE;
-
- do {
-- if ( XCheckTypedWindowEvent(dpy,win,type,event) ) {
-- waiting_for_data = FALSE;
-- qt_set_x11_event_filter(old_event_filter);
-+ if ( XCheckTypedWindowEvent(dpy,win,type,event) )
- return TRUE;
-- }
-
- now = QTime::currentTime();
- if ( started > now ) // crossed midnight
- started = now;
-
-- // 0x08 == ExcludeTimers for X11 only
-- qApp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput |
-- QEventLoop::ExcludeSocketNotifiers |
-- QEventLoop::WaitForMore | 0x08 );
--
-- if ( has_captured_event ) {
-- waiting_for_data = FALSE;
-- *event = captured_event;
-- qt_set_x11_event_filter(old_event_filter);
-- return TRUE;
-+ if(!flushed) {
-+ XFlush( dpy );
-+ flushed = TRUE;
- }
-- } while ( started.msecsTo(now) < timeout );
-
-- waiting_for_data = FALSE;
-- qt_set_x11_event_filter(old_event_filter);
-+ // sleep 50ms, so we don't use up CPU cycles all the time.
-+ struct timeval usleep_tv;
-+ usleep_tv.tv_sec = 0;
-+ usleep_tv.tv_usec = 50000;
-+ select(0, 0, 0, 0, &usleep_tv);
-+ } while ( started.msecsTo(now) < timeout );
-
- return FALSE;
- }
-
--
- static inline int maxSelectionIncr( Display *dpy )
- { return XMaxRequestSize(dpy) > 65536 ? 65536*4 : XMaxRequestSize(dpy)*4 - 100; }
-
+++ /dev/null
-diff -urN qt-x11-free-3.0.2.orig/configure qt-x11-free-3.0.2/configure
---- qt-x11-free-3.0.2.orig/configure Fri Feb 15 09:12:23 2002
-+++ qt-x11-free-3.0.2/configure Tue Feb 26 23:52:38 2002
-@@ -1655,7 +1655,8 @@
- echo >>$mkfile
- sed -e "s,@REL_QTDIR@,$relpath,g" -e "s,@OUT_QTDIR@,$outpath,g" \
- -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS," -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS," \
-- -e "s,@QT_INSTALL_BINS@,$BIN_DIR,g" -e "s,@QT_INSTALL_PREFIX@,$QT_INSTALL_PREFIX,g" \
-+ -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
-+ -e "s,@QT_INSTALL_DATA@,\$(DESTIDR)$QMAKE_DATA_DIR,g" \
- -e "s,@QMAKESPEC@,$QMAKESPEC,g" $in_mkfile >>$mkfile
- done
-
-diff -urN qt-x11-free-3.0.2.orig/qmake/generators/makefile.cpp qt-x11-free-3.0.2/qmake/generators/makefile.cpp
---- qt-x11-free-3.0.2.orig/qmake/generators/makefile.cpp Mon Feb 18 13:46:23 2002
-+++ qt-x11-free-3.0.2/qmake/generators/makefile.cpp Tue Feb 26 23:36:53 2002
-@@ -1342,7 +1342,7 @@
- }
-
- bool do_default = TRUE;
-- QString target, dst=project->variables()[pvar].first();
-+ QString target, dst=QString("$(INSTALL_ROOT)") +project->variables()[pvar].first();
- if(dst.right(1) != Option::dir_sep)
- dst += Option::dir_sep;
- QStringList tmp, &uninst = project->variables()[(*it) + ".uninstall"];
-diff -urN qt-x11-free-3.0.2.orig/qmake/generators/unix/unixmake.cpp qt-x11-free-3.0.2/qmake/generators/unix/unixmake.cpp
---- qt-x11-free-3.0.2.orig/qmake/generators/unix/unixmake.cpp Mon Feb 18 13:46:23 2002
-+++ qt-x11-free-3.0.2/qmake/generators/unix/unixmake.cpp Tue Feb 26 23:37:03 2002
-@@ -343,7 +343,9 @@
- QString ret, destdir=project->first("INSTALL_ROOT");
- if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep)
- destdir += Option::dir_sep;
-- QString targetdir = Option::fixPathToTargetOS(project->first("target.path"), FALSE);
-+ QString targetdir = Option::fixPathToTargetOS(
-+ QString("$(INSTALL_ROOT)")
-+ + project->first("target.path"), FALSE);
- if(targetdir.right(1) != Option::dir_sep)
- targetdir += Option::dir_sep;
-
+++ /dev/null
---- qt-copy/src/kernel/qfont_x11.cpp.orig Thu Oct 24 19:13:26 2002
-+++ qt-copy/src/kernel/qfont_x11.cpp Thu Oct 24 20:31:54 2002
-@@ -2404,9 +2404,9 @@
- case QFont::CanadianAboriginal: ch = 0x1410; break;
- case QFont::Mongolian: ch = 0x1800; break;
-
-- case QFont::CurrencySymbols: ch = 0x20aa; break;
-- case QFont::LetterlikeSymbols: ch = 0x2122; break;
-- case QFont::NumberForms: ch = 0x215b; break;
-+ case QFont::CurrencySymbols: ch = 0x20a0; break;
-+ case QFont::LetterlikeSymbols: ch = 0x2100; break;
-+ case QFont::NumberForms: ch = 0x2160; break;
- case QFont::MathematicalOperators: ch = 0x222b; break;
- case QFont::TechnicalSymbols: ch = 0x2440; break;
- case QFont::GeometricSymbols: ch = 0x2500; break;
+++ /dev/null
---- configs/linux-g++-shared.orig Fri Jul 27 19:44:50 2001
-+++ configs/linux-g++-shared Fri Jul 27 19:48:59 2001
-@@ -32,7 +32,7 @@
- SYSCONF_LIBS_YACC =
-
- # Linking applications
--SYSCONF_LINK = g++
-+SYSCONF_LINK = objprelink $(OBJECTS) $(OBJMOC) && g++
- SYSCONF_LFLAGS =
- SYSCONF_LIBS =
-
-@@ -58,7 +58,8 @@
- #
- SYSCONF_LINK_SHLIB = g++
- SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
--SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
-+SYSCONF_LINK_LIB_SHARED = objprelink $(OBJECTS) $(OBJMOC) && \
-+ $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
- $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
- $(OBJECTS) $(OBJMOC) $(LIBS) && \
- mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
+++ /dev/null
-diff -ur qt-x11-free-3.0.5.orig/configure qt-x11-free-3.0.5/configure
---- qt-x11-free-3.0.5.orig/configure Thu Jul 4 08:37:30 2002
-+++ qt-x11-free-3.0.5/configure Wed Jul 31 12:53:08 2002
-@@ -2297,8 +2297,8 @@
- #define QT_BUILD_KEY "$QT_BUILD_KEY"
- EOF
- [ '!' -z "$LicenseKey" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKey\"" >>$outpath/include/qconfig.h.new
--[ '!' -z "$QT_INSTALL_PLUGINS" ] && echo "#define QT_INSTALL_PLUGINS ${QT_INSTALL_PLUGINS}" >>$outpath/include/qconfig.h.new
--[ '!' -z "$QT_INSTALL_DATA" ] && echo "#define QT_INSTALL_DATA ${QT_INSTALL_DATA}" >>$outpath/include/qconfig.h.new
-+[ '!' -z "$QT_INSTALL_PLUGINS" ] && echo "#define QT_INSTALL_PLUGINS \"${QT_INSTALL_PLUGINS}\"" >>$outpath/include/qconfig.h.new
-+[ '!' -z "$QT_INSTALL_DATA" ] && echo "#define QT_INSTALL_DATA \"${QT_INSTALL_DATA}\"" >>$outpath/include/qconfig.h.new
-
- # avoid unecessary rebuilds by copying only if qconfig.h has changed
- if cmp -s $outpath/include/qconfig.h $outpath/include/qconfig.h.new; then
-Only in qt-x11-free-3.0.5.orig/include: qt_windows.h
+++ /dev/null
-[Desktop Entry]
-Name=Designer
-Comment=RAD tool for QT
-Comment[pl]=Narzędzie RAD dla QT
-Exec=designer
-Terminal=false
-Type=Application
-Encoding=UTF-8
-# vi: encoding=utf-8
+++ /dev/null
---- qt-3.0.5/src/codecs/qtextcodec.cpp.old 2002-07-08 13:26:48.000000000 +0300
-+++ qt-3.0.5/src/codecs/qtextcodec.cpp 2002-08-08 15:57:08.000000000 +0300
-@@ -619,7 +619,7 @@
- "eo", 0 };
-
- static const char * const iso8859_4locales[] = {
-- "ee", "ee_EE", "lv", "lv_LV", 0 };
-+ "ee", "ee_EE", 0 };
-
- static const char * const iso8859_5locales[] = {
- "mk", "mk_MK", "sp", "sp_YU", 0 };
-@@ -643,7 +643,7 @@
- "tr", "tr_TR", "turkish", 0 };
-
- static const char * const iso8859_13locales[] = {
-- "lt", "lt_LT", 0 };
-+ "lt", "lt_LT", "lv", "lv_LV", 0 };
-
- static const char * const iso8859_15locales[] = {
- "fr", "fi", "french", "finnish", "et", "et_EE", 0 };
+++ /dev/null
---- qt-x11-free-3.0.1/src/tools/qlibrary_unix.cpp.gcc31 Mon Dec 17 15:24:42 2001
-+++ qt-x11-free-3.0.1/src/tools/qlibrary_unix.cpp Mon Dec 17 15:25:25 2001
-@@ -104,7 +104,7 @@
-
- QString filename = library->library();
-
-- pHnd = dlopen( filename.latin1() , RTLD_LAZY );
-+ pHnd = dlopen( filename.latin1() , RTLD_LAZY|RTLD_GLOBAL );
- #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
- if ( !pHnd )
- qWarning( "%s", dlerror() );
+++ /dev/null
---- qt-2.1.0/src/widgets/qvalidator.cpp
-+++ qt-2.1.0/src/widgets/qvalidator.cpp
-@@ -308,6 +308,13 @@
- Constructs a validator object which accepts all doubles.
- */
-
-+#undef HUGE_VAL
-+# define HUGE_VAL \
-+ (__extension__ \
-+ ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
-+ { __l: 0x7ff0000000000000ULL }).__d)
-+
-+
- QDoubleValidator::QDoubleValidator( QWidget * parent, const char *name )
- : QValidator( parent, name )
- {
+++ /dev/null
-diff -urN qt-x11-free-3.0.2-snapshot-20020222.orig/src/sql/drivers/mysql/qsql_mysql.h qt-x11-free-3.0.2-snapshot-20020222/src/sql/drivers/mysql/qsql_mysql.h
---- qt-x11-free-3.0.2-snapshot-20020222.orig/src/sql/drivers/mysql/qsql_mysql.h Fri Feb 8 14:38:37 2002
-+++ qt-x11-free-3.0.2-snapshot-20020222/src/sql/drivers/mysql/qsql_mysql.h Sun Feb 24 23:25:37 2002
-@@ -46,7 +46,7 @@
- #include <qt_windows.h>
- #endif
-
--#include <mysql.h>
-+#include <mysql/mysql.h>
-
- class QMYSQLDriverPrivate;
- class QMYSQLResultPrivate;
+++ /dev/null
-diff -urN qt-x11-free-3.0.2.orig/src/sql/drivers/psql/qsql_psql.cpp qt-x11-free-3.0.2/src/sql/drivers/psql/qsql_psql.cpp
---- qt-x11-free-3.0.2.orig/src/sql/drivers/psql/qsql_psql.cpp Mon Jan 21 16:50:44 2002
-+++ qt-x11-free-3.0.2/src/sql/drivers/psql/qsql_psql.cpp Sat Feb 16 15:46:02 2002
-@@ -347,6 +347,8 @@
- case QVariant::Invalid:
- #ifdef QT_CHECK_RANGE
- qWarning("QPSQLResult::data: unknown data type");
-+#else
-+ ;
- #endif
- }
- return QVariant();
+++ /dev/null
-===================================================================
-RCS file: /home2/webcvs/mirror/qt-copy/src/kernel/qdnd_x11.cpp,v
-retrieving revision 1.56
-retrieving revision 1.57
-diff -u -p -r1.56 -r1.57
---- qt-copy/src/kernel/qdnd_x11.cpp 2003/05/16 13:02:39 1.56
-+++ qt-copy/src/kernel/qdnd_x11.cpp 2003/09/23 16:01:19 1.57
-@@ -1437,7 +1437,7 @@ static QByteArray qt_xdnd_obtain_data( c
- return result; // should never happen?
-
- QWidget* tw = qt_xdnd_current_widget;
-- if ( qt_xdnd_current_widget->isDesktop() ) {
-+ if ( qt_xdnd_current_widget && qt_xdnd_current_widget->isDesktop() ) {
- tw = new QWidget;
- }
- XConvertSelection( QPaintDevice::x11AppDisplay(),
-@@ -1475,7 +1475,7 @@ static QByteArray qt_xdnd_obtain_data( c
- #endif
- }
- }
-- if ( qt_xdnd_current_widget->isDesktop() ) {
-+ if ( qt_xdnd_current_widget && qt_xdnd_current_widget->isDesktop() ) {
- delete tw;
- }
- }
-===================================================================
-RCS file: /home2/webcvs/mirror/qt-copy/src/kernel/qpsprinter.cpp,v
-retrieving revision 1.73
-retrieving revision 1.74
-diff -u -p -r1.73 -r1.74
---- qt-copy/src/kernel/qpsprinter.cpp 2003/08/27 14:31:46 1.73
-+++ qt-copy/src/kernel/qpsprinter.cpp 2003/09/09 09:54:18 1.74
-@@ -2376,7 +2376,7 @@ QPSPrinterFontTTF::QPSPrinterFontTTF(con
- Trademark.setLatin1(strings+offset,length);
-
- }
--
-+ psname = psname.replace(' ','-');
- //read_cmap(font);
-
- /* We need to have the PostScript table around. */
+++ /dev/null
---- qt-copy/src/qt.pro.orig Fri Sep 6 14:31:40 2002
-+++ qt-copy/src/qt.pro Sat Sep 28 16:17:36 2002
-@@ -91,6 +91,9 @@
- XML_H = $$XML_CPP
- STYLES_H = $$STYLES_CPP
- !embedded:!mac:CONFIG += x11 x11inc
-+
-+ QMAKE_CFLAGS += -I/usr/include/postgresql/server
-+ QMAKE_CXXFLAGS += -I/usr/include/postgresql/server
- }
-
- aix-g++ {
---- qt-copy/plugins/src/sqldrivers/psql/psql.pro.orig Thu Feb 21 02:11:16 2002
-+++ qt-copy/plugins/src/sqldrivers/psql/psql.pro Mon Feb 25 13:47:12 2002
-@@ -8,6 +8,10 @@
- !contains( LIBS, .*pq.* ) {
- LIBS *= -lpq
- }
-+
-+ QMAKE_CFLAGS += -I/usr/include/postgresql/server
-+ QMAKE_CXXFLAGS += -I/usr/include/postgresql/server
-+
- }
-
- win32 {
+++ /dev/null
-===================================================================
-RCS file: /home2/webcvs/mirror/qt-copy/src/widgets/qlineedit.cpp,v
-retrieving revision 1.62
-retrieving revision 1.63
-diff -u -p -r1.62 -r1.63
---- qt-copy/src/widgets/qlineedit.cpp 2003/08/27 14:31:51 1.62
-+++ qt-copy/src/widgets/qlineedit.cpp 2003/08/29 07:50:17 1.63
-@@ -2401,7 +2401,7 @@ void QLineEditPrivate::setText( const QS
- text = maskString( 0, txt, TRUE );
- text += clearString( text.length(), maxLength - text.length() );
- } else {
-- text = txt.isEmpty() ? QString::fromLatin1( "" ) : txt.left( maxLength );
-+ text = txt.isEmpty() ? txt : txt.left( maxLength );
- }
- history.clear();
- undoState = 0;
+++ /dev/null
---- qt-x11-free-3.2.1/qmake/generators/unix/unixmake2.cpp.orig 2003-09-07 00:06:56.761045136 +0200
-+++ qt-x11-free-3.2.1/qmake/generators/unix/unixmake2.cpp 2003-09-07 00:06:17.088076344 +0200
-@@ -1319,28 +1319,36 @@
- }
-
- QString
--UnixMakefileGenerator::libtoolFileName()
-+UnixMakefileGenerator::libShortName(int withlib /* = 0 */)
- {
- QString ret = var("TARGET");
- int slsh = ret.findRev(Option::dir_sep);
- if(slsh != -1)
-- ret = ret.right(ret.length() - slsh);
-+ ret = ret.mid(slsh + 1);
-+ if(!withlib && ret.startsWith("lib"))
-+ ret = ret.mid(3);
- int dot = ret.find('.');
- if(dot != -1)
- ret = ret.left(dot);
-+ return ret;
-+}
-+
-+QString
-+UnixMakefileGenerator::libtoolFileName()
-+{
-+ QString ret = libShortName(1);
- ret += Option::libtool_ext;
-- if(!project->isEmpty("DESTDIR"))
-+ if(!project->isEmpty("DESTDIR")) {
-+ ret.prepend(Option::dir_sep);
- ret.prepend(var("DESTDIR"));
-+ }
- return ret;
- }
-
- void
- UnixMakefileGenerator::writeLibtoolFile()
- {
-- QString fname = libtoolFileName(), lname = fname;
-- int slsh = lname.findRev(Option::dir_sep);
-- if(slsh != -1)
-- lname = lname.right(lname.length() - slsh);
-+ QString fname = libtoolFileName(), lname = libShortName(1);
- QFile ft(fname);
- if(!ft.open(IO_WriteOnly))
- return;
-@@ -1406,17 +1414,10 @@
- QString
- UnixMakefileGenerator::pkgConfigFileName()
- {
-- QString ret = var("TARGET");
-- int slsh = ret.findRev(Option::dir_sep);
-- if(slsh != -1)
-- ret = ret.right(ret.length() - slsh);
-- if(ret.startsWith("lib"))
-- ret = ret.mid(3);
-- int dot = ret.find('.');
-- if(dot != -1)
-- ret = ret.left(dot);
-+ QString ret = libShortName(0);
- ret += Option::pkgcfg_ext;
- if(!project->isEmpty("DESTDIR")) {
-+ ret.prepend(Option::dir_sep);
- ret.prepend(var("DESTDIR"));
- ret = Option::fixPathToLocalOS(fileFixify(ret,QDir::currentDirPath(), Option::output_dir));
- }
-@@ -1426,10 +1427,7 @@
- void
- UnixMakefileGenerator::writePkgConfigFile() // ### does make sense only for libqt so far
- {
-- QString fname = pkgConfigFileName(), lname = fname;
-- int slsh = lname.findRev(Option::dir_sep);
-- if(slsh != -1)
-- lname = lname.right(lname.length() - slsh);
-+ QString fname = pkgConfigFileName(), lname = libShortName(0);
- QFile ft(fname);
- if(!ft.open(IO_WriteOnly))
- return;
---- qt-x11-free-3.2.1/qmake/generators/unix/unixmake.h.orig 2003-08-20 15:08:14.000000000 +0200
-+++ qt-x11-free-3.2.1/qmake/generators/unix/unixmake.h 2003-09-07 00:19:11.653324528 +0200
-@@ -43,6 +43,7 @@
- bool init_flag, include_deps;
- bool writeMakefile(QTextStream &);
- void writeExtraVariables(QTextStream &);
-+ QString libShortName(int withlib = 0);
- QString libtoolFileName();
- void writeLibtoolFile(); // for libtool
- QString pkgConfigFileName();
+++ /dev/null
-diff -urN qt-x11-free-3.0.4.org/mkspecs/linux-g++/qmake.conf qt-x11-free-3.0.4/mkspecs/linux-g++/qmake.conf
---- qt-x11-free-3.0.4.org/mkspecs/linux-g++/qmake.conf Mon Jan 28 00:35:43 2002
-+++ qt-x11-free-3.0.4/mkspecs/linux-g++/qmake.conf Mon Jan 28 00:36:41 2002
-@@ -44,8 +44,8 @@
- QMAKE_INCDIR_OPENGL = /usr/X11R6/include
- QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
-
--QMAKE_LINK = g++
--QMAKE_LINK_SHLIB = g++
-+QMAKE_LINK = objprelink $(OBJECTS) $(OBJMOC) && g++
-+QMAKE_LINK_SHLIB = objprelink $(OBJECTS) $(OBJMOC) && g++
- QMAKE_LFLAGS =
- QMAKE_LFLAGS_RELEASE =
- QMAKE_LFLAGS_DEBUG =
+++ /dev/null
-diff -urN qt-x11-free-3.0.2-snapshot-20020222.orig/plugins/src/styles/windowsxp/main.cpp qt-x11-free-3.0.2-snapshot-20020222/plugins/src/styles/windowsxp/main.cpp
---- qt-x11-free-3.0.2-snapshot-20020222.orig/plugins/src/styles/windowsxp/main.cpp Mon Nov 26 22:35:51 2001
-+++ qt-x11-free-3.0.2-snapshot-20020222/plugins/src/styles/windowsxp/main.cpp Mon Feb 25 17:53:31 2002
-@@ -1,5 +1,6 @@
- #include <private/qstyleinterface_p.h>
- #include <qobjectcleanuphandler.h>
-+#include <qglobal.h>
-
- #include "qwindowsxpstyle.h"
-
+++ /dev/null
-Use of tainted arguments in exec is deprecated at /var/www/cgi-bin/cvsweb.cgi line 2043.
-===================================================================
-RCS file: /home2/webcvs/mirror/qt-copy/src/widgets/qtextedit.cpp,v
-retrieving revision 1.43
-retrieving revision 1.44
-diff -u -p -r1.43 -r1.44
---- qt-copy/src/widgets/qtextedit.cpp 2004/02/04 14:25:04 1.43
-+++ qt-copy/src/widgets/qtextedit.cpp 2004/02/06 12:48:36 1.44
-@@ -5478,12 +5478,9 @@ QPopupMenu *QTextEdit::createPopupMenu(
- #endif
- popup->setItemEnabled( d->id[ IdPaste ], !isReadOnly() && !QApplication::clipboard()->text( d->clipboard_mode ).isEmpty() );
- #endif
-- popup->setItemEnabled( d->id[ IdClear ], !isReadOnly() && !text().isEmpty() );
--#ifdef QT_TEXTEDIT_OPTIMIZATION
-- popup->setItemEnabled( d->id[ IdSelectAll ], d->optimMode ? d->od->len : (bool)text().length() );
--#else
-- popup->setItemEnabled( d->id[ IdSelectAll ], (bool)text().length() );
--#endif
-+ const bool isEmptyDocument = (length() == 0);
-+ popup->setItemEnabled( d->id[ IdClear ], !isReadOnly() && !isEmptyDocument );
-+ popup->setItemEnabled( d->id[ IdSelectAll ], !isEmptyDocument );
- return popup;
- #else
- return 0;
+++ /dev/null
---- qt-copy/src/tools/qstring.cpp.orig 2 Mar 2004 12:50:34 -0000 1.63
-+++ qt-copy/src/tools/qstring.cpp 26 Mar 2004 20:40:06 -0000
-@@ -6731,14 +6731,11 @@ bool QString::startsWith( const QString&
- if ( isNull() )
- return s.isNull();
- if ( s.length() > length() )
- return FALSE;
- if ( cs ) {
-- for ( int i = 0; i < (int) s.length(); i++ ) {
-- if ( d->unicode[i] != s[i] )
-- return FALSE;
-- }
-+ return memcmp((char*)d->unicode,(char*)s.unicode(), s.length()*sizeof(QChar)) == 0;
- } else {
- for ( int i = 0; i < (int) s.length(); i++ ) {
- if ( d->unicode[i].lower() != s[i].lower() )
- return FALSE;
- }
-@@ -6772,14 +6769,11 @@ bool QString::endsWith( const QString& s
- return s.isNull();
- int pos = length() - s.length();
- if ( pos < 0 )
- return FALSE;
- if ( cs ) {
-- for ( int i = 0; i < (int) s.length(); i++ ) {
-- if ( d->unicode[pos + i] != s[i] )
-- return FALSE;
-- }
-+ return memcmp((char*)&d->unicode[pos],(char*)s.unicode(), s.length()*sizeof(QChar)) == 0;
- } else {
- for ( int i = 0; i < (int) s.length(); i++ ) {
- if ( d->unicode[pos + i].lower() != s[i].lower() )
- return FALSE;
- }
+++ /dev/null
-diff -Nur qt-x11-free-3.3.2.orig/src/kernel/qapplication_x11.cpp qt-x11-free-3.3.2/src/kernel/qapplication_x11.cpp
---- qt-x11-free-3.3.2.orig/src/kernel/qapplication_x11.cpp 2004-04-19 11:36:02.000000000 +0200
-+++ qt-x11-free-3.3.2/src/kernel/qapplication_x11.cpp 2004-05-12 23:10:49.895694064 +0200
-@@ -241,7 +241,11 @@
- Atom qt_gbackground_properties = 0;
- Atom qt_x_incr = 0;
- Atom qt_utf8_string = 0;
-+
-+// detect broken window managers
-+Atom qt_sgi_desks_manager = 0;
- bool qt_broken_wm = FALSE;
-+static void qt_detect_broken_window_manager();
-
- // NET WM support
- Atom qt_net_supported = 0;
-@@ -1013,7 +1017,7 @@
- }
-
- qt_broken_wm =
-- settings.readBoolEntry("/qt/brokenWindowManager", FALSE);
-+ settings.readBoolEntry("/qt/brokenWindowManager", qt_broken_wm);
-
- qt_resolve_symlinks =
- settings.readBoolEntry("/qt/resolveSymlinks", TRUE);
-@@ -1289,6 +1293,27 @@
- }
-
-
-+static void qt_detect_broken_window_manager()
-+{
-+ Atom type;
-+ int format;
-+ ulong nitems, after;
-+ uchar *data = 0;
-+
-+ // look for SGI's 4Dwm
-+ int e = XGetWindowProperty(appDpy, QPaintDevice::x11AppRootWindow(),
-+ qt_sgi_desks_manager, 0, 1, False, XA_WINDOW,
-+ &type, &format, &nitems, &after, &data);
-+ if (data)
-+ XFree(data);
-+
-+ if (e == Success && type == XA_WINDOW && format == 32 && nitems == 1 && after == 0) {
-+ // detected SGI 4Dwm
-+ qt_broken_wm = TRUE;
-+ }
-+}
-+
-+
- // update the supported array
- void qt_get_net_supported()
- {
-@@ -1892,6 +1917,7 @@
- qt_x11_intern_atom( "_NET_WM_NAME", &qt_net_wm_name );
- qt_x11_intern_atom( "_NET_WM_ICON_NAME", &qt_net_wm_icon_name );
- qt_x11_intern_atom( "UTF8_STRING", &qt_utf8_string );
-+ qt_x11_intern_atom( "_SGI_DESKS_MANAGER", &qt_sgi_desks_manager );
-
- qt_xdnd_setup();
- qt_x11_motifdnd_init();
-@@ -1899,6 +1925,9 @@
- // Finally create all atoms
- qt_x11_process_intern_atoms();
-
-+ // look for broken window managers
-+ qt_detect_broken_window_manager();
-+
- // initialize NET lists
- qt_get_net_supported();
- qt_get_net_virtual_roots();
-diff -Nur qt-x11-free-3.3.2.orig/src/kernel/qfontdatabase.cpp qt-x11-free-3.3.2/src/kernel/qfontdatabase.cpp
---- qt-x11-free-3.3.2.orig/src/kernel/qfontdatabase.cpp 2004-04-19 11:36:07.000000000 +0200
-+++ qt-x11-free-3.3.2/src/kernel/qfontdatabase.cpp 2004-05-12 23:10:49.897693768 +0200
-@@ -467,7 +467,7 @@
- // Ogham,
- 0x1680,
- // SpacingModifiers,
-- 0x02b0,
-+ 0x02c7,
- // CombiningMarks,
- 0x0300,
-
-@@ -543,15 +543,15 @@
- // LetterlikeSymbols,
- 0x2122,
- // NumberForms,
-- 0x215b,
-+ 0x2160,
- // MathematicalOperators,
- 0x222b,
- // TechnicalSymbols,
-- 0x2440,
-+ 0x2312,
- // GeometricSymbols,
- 0x2500,
- // MiscellaneousSymbols,
-- 0x2600,
-+ 0x2640,
- // EnclosedAndSquare,
- 0x2460,
- // Braille,
-@@ -920,12 +920,14 @@
- script, scriptName( script ).latin1(),
- request.weight, request.italic, request.stretch, request.pixelSize, pitch );
-
-+ bool usesFontConfig = FALSE;
- #ifdef QT_XFT2
- if (family_name.isEmpty()
- || family_name == "Sans Serif"
- || family_name == "Serif"
- || family_name == "Monospace") {
- fe = loadFontConfigFont(fp, request, script);
-+ usesFontConfig = (fe != 0);
- }
- if (!fe)
- #endif
-@@ -949,7 +951,7 @@
- #ifdef Q_WS_WIN
- && ucstricmp( try_family->english_name, family_name ) != 0
- #endif
-- )
-+ )
- continue;
-
- if ( family_name.isEmpty() )
-@@ -969,7 +971,7 @@
- override_script = QFont::Han_SimplifiedChinese;
- score_adjust = 200;
- } else if (override_script == QFont::Han_SimplifiedChinese
-- && (try_family->scripts[QFont::Han_TraditionalChinese] & QtFontFamily::Supported)) {
-+ && (try_family->scripts[QFont::Han_TraditionalChinese] & QtFontFamily::Supported)) {
- override_script = QFont::Han_TraditionalChinese;
- score_adjust = 200;
- } else {
-@@ -978,20 +980,20 @@
- }
- } else
- #endif
-- if (family_name.isEmpty()) {
-- continue;
-- } else if (try_family->scripts[QFont::UnknownScript] & QtFontFamily::Supported) {
-- // try with the unknown script (for a symbol font)
-- override_script = QFont::UnknownScript;
-+ if (family_name.isEmpty()) {
-+ continue;
-+ } else if (try_family->scripts[QFont::UnknownScript] & QtFontFamily::Supported) {
-+ // try with the unknown script (for a symbol font)
-+ override_script = QFont::UnknownScript;
- #ifndef QT_XFT2
-- } else if (try_family->scripts[QFont::Unicode] & QtFontFamily::Supported) {
-- // try with the unicode script instead
-- override_script = QFont::Unicode;
--#endif
-- } else {
-- // family not supported by unicode/unknown scripts
-- continue;
-- }
-+ } else if (try_family->scripts[QFont::Unicode] & QtFontFamily::Supported) {
-+ // try with the unicode script instead
-+ override_script = QFont::Unicode;
-+#endif
-+ } else {
-+ // family not supported by unicode/unknown scripts
-+ continue;
-+ }
- }
-
- QtFontFoundry *try_foundry = 0;
-@@ -1134,7 +1136,12 @@
- }
-
- if ( fp ) {
-- QFontCache::Key key( request, script,
-+ QFontDef def = request;
-+ if (def.family.isEmpty()) {
-+ def.family = fp->request.family;
-+ def.family = def.family.left(def.family.find(','));
-+ }
-+ QFontCache::Key key( def, script,
- #ifdef Q_WS_WIN
- (int)fp->paintdevice
- #else
-@@ -1142,15 +1149,17 @@
- #endif
- );
- QFontCache::instance->insertEngine( key, fe );
-- for ( int i = 0; i < QFont::NScripts; ++i ) {
-- if ( i == script ) continue;
--
-- if (!canRender(fe, (QFont::Script) i))
-- continue;
--
-- key.script = i;
-- QFontCache::instance->insertEngine( key, fe );
-- }
-+ if (!usesFontConfig) {
-+ for ( int i = 0; i < QFont::NScripts; ++i ) {
-+ if ( i == script ) continue;
-+
-+ if (!canRender(fe, (QFont::Script) i))
-+ continue;
-+
-+ key.script = i;
-+ QFontCache::instance->insertEngine( key, fe );
-+ }
-+ }
- }
- } else {
- if ( request.family.isEmpty() ) {
-diff -Nur qt-x11-free-3.3.2.orig/src/kernel/qfontdatabase_x11.cpp qt-x11-free-3.3.2/src/kernel/qfontdatabase_x11.cpp
---- qt-x11-free-3.3.2.orig/src/kernel/qfontdatabase_x11.cpp 2004-04-19 11:36:05.000000000 +0200
-+++ qt-x11-free-3.3.2/src/kernel/qfontdatabase_x11.cpp 2004-05-12 23:10:49.899693472 +0200
-@@ -973,8 +973,11 @@
- QtFontFoundry *foundry
- = family->foundry( QString::null, TRUE );
-
-- for ( int i = 0; i < QFont::LastPrivateScript; ++i )
-+ for ( int i = 0; i < QFont::LastPrivateScript; ++i ) {
-+ if (i == QFont::UnknownScript)
-+ continue;
- family->scripts[i] = QtFontFamily::Supported;
-+ }
-
- QtFontStyle::Key styleKey;
- styleKey.oblique = FALSE;
-diff -Nur qt-x11-free-3.3.2.orig/src/kernel/qfontengine_x11.cpp qt-x11-free-3.3.2/src/kernel/qfontengine_x11.cpp
---- qt-x11-free-3.3.2.orig/src/kernel/qfontengine_x11.cpp 2004-04-19 11:36:09.000000000 +0200
-+++ qt-x11-free-3.3.2/src/kernel/qfontengine_x11.cpp 2004-05-12 23:10:49.891694657 +0200
-@@ -1395,29 +1395,17 @@
- xftfs->charmap = -1;
- }
- #else
-- int symbol = -1;
-- int charmap = -1;
-+ _cmap = -1;
-+ // Xft maps Unicode and adobe roman for us.
- for (int i = 0; i < _face->num_charmaps; ++i) {
-- FT_CharMap cm = _face->charmaps[i];
--// qDebug("font has charmap %x", cm->encoding);
-- if (charmap == -1 && cm->encoding == ft_encoding_unicode)
-- charmap = i;
-- // we don't use FT_ENCODING_MS_SYMBOL in 3.3, as it maps to U+0xf0xx. All of the fonts
-- // tested also provide a FT_ENCODING_APPLE_ROMAN table that works for the basic range.
-- if (symbol == -1
-- && (/*cm->encoding == FT_ENCODING_MS_SYMBOL ||*/
-- cm->encoding == ft_encoding_adobe_custom
-- || cm->encoding == ft_encoding_apple_roman)) {
-- symbol = i;
-- }
-- }
--
-- // symbol font
-- if (symbol != -1 && (charmap == -1 || cmap))
-- charmap = symbol;
-- if (charmap != -1) {
--// qDebug("using charmap %x", _face->charmaps[charmap]->encoding);
-- FT_Set_Charmap(_face, _face->charmaps[charmap]);
-+ FT_CharMap cm = _face->charmaps[i];
-+// qDebug("font has charmap %x", cm->encoding);
-+ if (cm->encoding == ft_encoding_adobe_custom
-+ || cm->encoding == ft_encoding_symbol) {
-+// qDebug("font has adobe custom or ms symbol charmap");
-+ _cmap = i;
-+ break;
-+ }
- }
- #endif // QT_XFT2
-
-@@ -1458,6 +1446,15 @@
- }
- }
-
-+static glyph_t getAdobeCharIndex(XftFont *font, int cmap, uint ucs4)
-+{
-+ FT_Face _face = XftLockFace( font );
-+ FT_Set_Charmap(_face, _face->charmaps[cmap]);
-+ glyph_t g = FT_Get_Char_Index(_face, ucs4);
-+ XftUnlockFace(font);
-+ return g;
-+}
-+
- QFontEngine::Error QFontEngineXft::stringToCMap( const QChar *str, int len, glyph_t *glyphs, advance_t *advances, int *nglyphs, bool mirrored ) const
- {
- if ( *nglyphs < len ) {
-@@ -1473,7 +1470,7 @@
- if ( !glyphs[i] ) {
- if (uc == 0xa0)
- uc = 0x20;
-- glyph_t glyph = FT_Get_Char_Index(_face, uc);
-+ glyph_t glyph = XftCharIndex(0, _font, uc);
- glyphs[i] = glyph;
- if ( uc < cmapCacheSize )
- ((QFontEngineXft *)this)->cmapCache[uc] = glyph;
-@@ -1486,7 +1483,7 @@
- if ( !glyphs[i] ) {
- if (uc == 0xa0)
- uc = 0x20;
-- glyph_t glyph = FT_Get_Char_Index(_face, uc);
-+ glyph_t glyph = XftCharIndex(0, _font, uc);
- glyphs[i] = glyph;
- if ( uc < cmapCacheSize )
- ((QFontEngineXft *)this)->cmapCache[uc] = glyph;
-@@ -2067,13 +2064,22 @@
- bool allExist = TRUE;
-
- #ifdef QT_XFT2
-- for ( int i = 0; i < len; i++ ) {
-- if (!FT_Get_Char_Index(_face, string[i].unicode())) {
-- allExist = FALSE;
-- break;
-- }
-+ if (_cmap != -1) {
-+ for ( int i = 0; i < len; i++ ) {
-+ if (!XftCharExists(0, _font, string[i].unicode())
-+ && getAdobeCharIndex(_font, _cmap, string[i].unicode()) == 0) {
-+ allExist = FALSE;
-+ break;
-+ }
-+ }
-+ } else {
-+ for ( int i = 0; i < len; i++ ) {
-+ if (!XftCharExists(0, _font, string[i].unicode())) {
-+ allExist = FALSE;
-+ break;
-+ }
-+ }
- }
--
- #else
- glyph_t glyphs[256];
- int nglyphs = 255;
-diff -Nur qt-x11-free-3.3.2.orig/src/kernel/qscriptengine_x11.cpp qt-x11-free-3.3.2/src/kernel/qscriptengine_x11.cpp
---- qt-x11-free-3.3.2.orig/src/kernel/qscriptengine_x11.cpp 2004-04-19 11:36:07.000000000 +0200
-+++ qt-x11-free-3.3.2/src/kernel/qscriptengine_x11.cpp 2004-05-12 23:10:49.906692436 +0200
-@@ -1533,7 +1533,8 @@
-
- openType->applyGSUBFeature(FT_MAKE_TAG( 'c', 'c', 'm', 'p' ));
-
-- where[0] = TRUE;
-+ where[0] = (from == 0
-+ || !(string.unicode()[from-1].isLetter() || string.unicode()[from-1].isMark()));
- openType->applyGSUBFeature(FT_MAKE_TAG( 'i', 'n', 'i', 't' ), where);
- openType->applyGSUBFeature(FT_MAKE_TAG( 'n', 'u', 'k', 't' ));
-
-@@ -1720,7 +1721,7 @@
- switch( newState ) {
- case Control:
- newState = state;
-- if (state == Halant)
-+ if (state == Halant && uc[pos].unicode() == 0x200d /* ZWJ */)
- break;
- goto finish;
- case Consonant:
-@@ -2257,8 +2258,8 @@
- KHDEBUG("state[%d]=%d (uc=%4x)", pos, state, uc[pos].unicode() );
- pos++;
-
-- if (state != Khmer_Cons) {
-- if (state != Khmer_IndV && state != Khmer_Other)
-+ if (state != Khmer_Cons && state != Khmer_IndV) {
-+ if (state != Khmer_Other)
- *invalid = TRUE;
- goto finish;
- }
-diff -Nur qt-x11-free-3.3.2.orig/src/kernel/qtextengine.cpp qt-x11-free-3.3.2/src/kernel/qtextengine.cpp
---- qt-x11-free-3.3.2.orig/src/kernel/qtextengine.cpp 2004-04-19 11:36:07.000000000 +0200
-+++ qt-x11-free-3.3.2/src/kernel/qtextengine.cpp 2004-05-12 23:10:49.907692288 +0200
-@@ -53,6 +53,7 @@
- #define BIDI_DEBUG 0//2
- #if (BIDI_DEBUG >= 1)
- #include <iostream>
-+using namespace std;
-
- static const char *directions[] = {
- "DirL", "DirR", "DirEN", "DirES", "DirET", "DirAN", "DirCS", "DirB", "DirS", "DirWS", "DirON",
-@@ -419,7 +420,8 @@
- case QChar::DirON:
- if( status.eor != QChar::DirR && status.eor != QChar::DirAL ) {
- //last stuff takes embedding dir
-- if(control.direction() == QChar::DirR || status.lastStrong == QChar::DirR) {
-+ if(control.direction() == QChar::DirR
-+ || status.lastStrong == QChar::DirR || status.lastStrong == QChar::DirAL) {
- appendItems(engine, sor, eor, control, dir);
- dir = QChar::DirON; status.eor = QChar::DirON;
- dir = QChar::DirR;
+++ /dev/null
-diff -Nru qt-1.40/Makefile qt-1.40.new/Makefile
---- qt-1.40/Makefile Thu Jul 9 21:25:06 1998
-+++ qt-1.40.new/Makefile Mon Aug 3 21:42:59 1998
-@@ -4,7 +4,7 @@
- # Read PORTING for instructions how to port Qt to a new platform.
-
-
--all: moc src tutorial examples
-+all: moc src
- @echo
- @echo "The Qt library is now built in ./lib"
- @echo "The Qt examples are built in the directories in ./examples"