[Kde-cygwin-cvs] CVS: qt-3/src/kernel qapplication.cpp,1.1.1.19,1.1.1.20 qapplication.h,1.1.1.14,1.1
Status: Inactive
Brought to you by:
habacker
From: Christian E. <che...@us...> - 2005-10-01 06:09:48
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6831/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qapplication.cpp qapplication.h qclipboard.cpp qeventloop_p.h qt.h qt_kernel.pri qt_x11_p.h qtextengine.cpp qwidget_x11.cpp Log Message: reapply patches which were lost during my not so good update to 3.3.5 Index: qapplication.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qapplication.cpp,v retrieving revision 1.1.1.19 retrieving revision 1.1.1.20 diff -u -r1.1.1.19 -r1.1.1.20 --- qapplication.cpp 22 Sep 2005 12:55:41 -0000 1.1.1.19 +++ qapplication.cpp 30 Sep 2005 16:58:31 -0000 1.1.1.20 @@ -36,6 +36,9 @@ **********************************************************************/ #include "qobjectlist.h" +#ifdef Q_OS_CYGWIN +#define QT_NO_INLINE_GLOBALSTRUT +#endif #include "qapplication.h" #include "qeventloop.h" #include "qeventloop_p.h" @@ -1542,6 +1545,17 @@ app_strut = strut; } +// before cygwin qt release 3.3 release, the runtime pseudo relocation support (using vars from a dll with offset) +// wasn't present and inlining globalsStrut wasn't possible. Applications build with older qt releases expects this +// symbol, so we define it for compatibility. Please note, thas for compiling qt applications with this release +// globalStrut is inlined. +#ifdef QT_NO_INLINE_GLOBALSTRUT +QSize &QApplication::globalStrut() +{ + return app_strut; +} +#endif + #if defined( Q_WS_WIN ) || defined( Q_WS_MAC ) extern const char *qAppFileName(); #endif @@ -1634,7 +1648,7 @@ QFileInfo filePath; QT_WA({ WCHAR module_name[256]; - GetModuleFileNameW(0, module_name, sizeof(module_name)); + GetModuleFileNameW(0, module_name, sizeof(module_name)/sizeof(WCHAR)); filePath = QString::fromUcs2((const unsigned short *)module_name); }, { char module_name[256]; @@ -2890,7 +2904,9 @@ of Qt only. */ -#if defined(Q_OS_CYGWIN) +#if defined(Q_OS_CYGWIN) && !defined(Q_CYGWIN_WIN) +#include "qapplication_p.h" + Qt::WindowsVersion QApplication::winVersion() { return qt_winver; Index: qapplication.h =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qapplication.h,v retrieving revision 1.1.1.14 retrieving revision 1.1.1.15 diff -u -r1.1.1.14 -r1.1.1.15 --- qapplication.h 22 Sep 2005 12:55:24 -0000 1.1.1.14 +++ qapplication.h 30 Sep 2005 16:58:31 -0000 1.1.1.15 @@ -206,7 +206,11 @@ static int wheelScrollLines(); #endif static void setGlobalStrut( const QSize & ); +#ifdef QT_NO_INLINE_GLOBALSTRUT + static QSize &globalStrut(); +#else static QSize globalStrut(); +#endif #ifndef QT_NO_COMPONENT static void setLibraryPaths( const QStringList & ); @@ -487,10 +491,12 @@ return session_key ? *session_key : QString::null; } #endif +#ifndef QT_NO_INLINE_GLOBALSTRUT inline QSize QApplication::globalStrut() { return app_strut; } +#endif inline bool QApplication::sendEvent( QObject *receiver, QEvent *event ) { if ( event ) event->spont = FALSE; return qApp ? qApp->notify( receiver, event ) : FALSE; } Index: qclipboard.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qclipboard.cpp,v retrieving revision 1.1.1.13 retrieving revision 1.1.1.14 diff -u -r1.1.1.13 -r1.1.1.14 --- qclipboard.cpp 22 Sep 2005 12:55:16 -0000 1.1.1.13 +++ qclipboard.cpp 30 Sep 2005 16:58:31 -0000 1.1.1.14 @@ -154,7 +154,7 @@ // nothing } -#ifndef Q_WS_WIN32 +#if !defined(Q_WS_WIN) /*! \internal Index: qeventloop_p.h =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qeventloop_p.h,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -r1.1.1.12 -r1.1.1.13 --- qeventloop_p.h 22 Sep 2005 12:55:17 -0000 1.1.1.12 +++ qeventloop_p.h 30 Sep 2005 16:58:31 -0000 1.1.1.13 @@ -85,7 +85,7 @@ }; #endif // Q_OS_UNIX -#if defined(Q_WS_WIN) +#if defined(Q_WS_WIN) && !defined(Q_CYGWIN_WIN) struct QSockNot { QSocketNotifier *obj; int fd; @@ -134,7 +134,7 @@ QSockNotType sn_vec[3]; #endif -#ifdef Q_WS_WIN +#if defined(Q_WS_WIN) && !defined(Q_CYGWIN_WIN) // pending socket notifiers list QPtrList<QSockNot> sn_pending_list; #endif // Q_WS_WIN Index: qt.h =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qt.h,v retrieving revision 1.1.1.7 retrieving revision 1.1.1.8 diff -u -r1.1.1.7 -r1.1.1.8 --- qt.h 22 Sep 2005 12:54:54 -0000 1.1.1.7 +++ qt.h 30 Sep 2005 16:58:31 -0000 1.1.1.8 @@ -319,8 +319,10 @@ #endif // Q_WS_MAC #ifdef Q_WS_WIN +#if 0 #include <qwindowsxpstyle.h> #endif +#endif #ifdef Q_WS_QWS #include <private/qtextengine_p.h> Index: qt_kernel.pri =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qt_kernel.pri,v retrieving revision 1.1.1.11 retrieving revision 1.1.1.12 diff -u -r1.1.1.11 -r1.1.1.12 --- qt_kernel.pri 22 Sep 2005 12:55:18 -0000 1.1.1.11 +++ qt_kernel.pri 30 Sep 2005 16:58:31 -0000 1.1.1.12 @@ -111,16 +111,18 @@ $$KERNEL_CPP/qmime_win.cpp \ $$KERNEL_CPP/qpixmap_win.cpp \ $$KERNEL_CPP/qprinter_win.cpp \ - $$KERNEL_CPP/qprocess_win.cpp \ $$KERNEL_CPP/qpaintdevice_win.cpp \ $$KERNEL_CPP/qpainter_win.cpp \ $$KERNEL_CPP/qregion_win.cpp \ $$KERNEL_CPP/qsound_win.cpp \ - $$KERNEL_CPP/qthread_win.cpp \ $$KERNEL_CPP/qwidget_win.cpp \ $$KERNEL_CPP/qole_win.c \ $$KERNEL_CPP/qfontengine_win.cpp + win32:!unix:SOURCES += $$KERNEL_CPP/qprocess_win.cpp \ + $$KERNEL_CPP/qthread_win.cpp + + unix:x11 { SOURCES += $$KERNEL_CPP/qapplication_x11.cpp \ $$KERNEL_CPP/qclipboard_x11.cpp \ @@ -164,11 +166,12 @@ $$KERNEL_CPP/qfont_mac.cpp \ $$KERNEL_CPP/qfontengine_mac.cpp DEFINES += QMAC_ONE_PIXEL_LOCK - } else:unix { + } else:unix:!win32 { SOURCES += $$KERNEL_CPP/qprinter_unix.cpp \ $$KERNEL_CPP/qpsprinter.cpp \ $$KERNEL_CPP/qeventloop_unix.cpp } + unix:SOURCES += $$KERNEL_CPP/qprocess_unix.cpp \ $$KERNEL_CPP/qthread_unix.cpp Index: qt_x11_p.h =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qt_x11_p.h,v retrieving revision 1.1.1.9 retrieving revision 1.1.1.10 diff -u -r1.1.1.9 -r1.1.1.10 --- qt_x11_p.h 22 Sep 2005 12:55:33 -0000 1.1.1.9 +++ qt_x11_p.h 30 Sep 2005 16:58:31 -0000 1.1.1.10 @@ -69,7 +69,10 @@ #undef XSetIMValues #include <X11/Xutil.h> +// don't include Xos.h to avoid duplicated symbols gettimeofday +#ifndef Q_OS_CYGWIN #include <X11/Xos.h> +#endif #include <X11/Xatom.h> Index: qtextengine.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qtextengine.cpp,v retrieving revision 1.1.1.9 retrieving revision 1.1.1.10 diff -u -r1.1.1.9 -r1.1.1.10 --- qtextengine.cpp 22 Sep 2005 12:55:23 -0000 1.1.1.9 +++ qtextengine.cpp 30 Sep 2005 16:58:31 -0000 1.1.1.10 @@ -949,7 +949,8 @@ QScriptItem &si = items[i]; int from = si.position; int len = length( i ); -#ifdef Q_WS_WIN +/// \todo provide the missing functions uspScriptForItem() and ScriptBreak() +#ifdef _Q_WS_WIN int script = uspScriptForItem(this, i); if(script >= QFont::Devanagari && script <= QFont::Khmer) ScriptBreak( (WCHAR *)string.ucs2()+from, len, &si.analysis, charAttributes + from); Index: qwidget_x11.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/qwidget_x11.cpp,v retrieving revision 1.1.1.16 retrieving revision 1.1.1.17 diff -u -r1.1.1.16 -r1.1.1.17 --- qwidget_x11.cpp 22 Sep 2005 12:55:23 -0000 1.1.1.16 +++ qwidget_x11.cpp 30 Sep 2005 16:58:31 -0000 1.1.1.17 @@ -48,6 +48,7 @@ #include "qcursor.h" #include "qt_x11_p.h" #include <stdlib.h> +#include <unistd.h> // getpid // NOT REVISED |