kde-cygwin--cvs Mailing List for KDE on Cygwin (Page 2)
Status: Inactive
Brought to you by:
habacker
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(88) |
Jul
(27) |
Aug
(3) |
Sep
(1) |
Oct
(3) |
Nov
(20) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(23) |
Feb
(25) |
Mar
(9) |
Apr
(88) |
May
(137) |
Jun
(244) |
Jul
(52) |
Aug
(17) |
Sep
(1) |
Oct
(12) |
Nov
(124) |
Dec
(42) |
2003 |
Jan
(112) |
Feb
(53) |
Mar
(24) |
Apr
(6) |
May
|
Jun
(63) |
Jul
(64) |
Aug
(151) |
Sep
(5) |
Oct
(87) |
Nov
(58) |
Dec
(13) |
2004 |
Jan
(76) |
Feb
(22) |
Mar
(30) |
Apr
(41) |
May
(4) |
Jun
(60) |
Jul
(39) |
Aug
(217) |
Sep
(165) |
Oct
(90) |
Nov
(72) |
Dec
(60) |
2005 |
Jan
(153) |
Feb
(110) |
Mar
(76) |
Apr
(237) |
May
(60) |
Jun
(20) |
Jul
(39) |
Aug
(8) |
Sep
(136) |
Oct
(39) |
Nov
|
Dec
|
2006 |
Jan
(16) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Christian E. <che...@us...> - 2005-10-24 18:09:25
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1343/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qfont_win.cpp qfontdatabase_win.cpp Log Message: font loading should work now much better... Index: qfont_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qfont_win.cpp,v retrieving revision 1.1.2.16.2.11 retrieving revision 1.1.2.16.2.12 diff -u -r1.1.2.16.2.11 -r1.1.2.16.2.12 --- qfont_win.cpp 1 Aug 2005 17:44:46 -0000 1.1.2.16.2.11 +++ qfont_win.cpp 24 Oct 2005 18:09:16 -0000 1.1.2.16.2.12 @@ -106,48 +106,26 @@ return qf; } -//333 -double qt_pixelSize( double pointSize, QPaintDevice *paintdevice, int scr ) -{ - if ( pointSize < 0 ) - return -1.; - - double result = pointSize; - if ( paintdevice && QPaintDeviceMetrics( paintdevice ).logicalDpiY() != 75 ) // ==75 -- never under Windows? - result *= QPaintDeviceMetrics( paintdevice ).logicalDpiY() / 72.; - - return result; -} - -//333 -double qt_pointSize( double pixelSize, QPaintDevice *paintdevice, int scr ) -{ - if ( pixelSize < 0 ) - return -1.; - - double result = pixelSize; - if ( paintdevice && QPaintDeviceMetrics( paintdevice ).logicalDpiY() != 75 ) - result *= 72. / QPaintDeviceMetrics( paintdevice ).logicalDpiY(); - - return result; -} - -//333 -static inline double pixelSize( const QFontDef &request, QPaintDevice *paintdevice, - int scr ) +static inline double pixelSize( const QFontDef &request, QPaintDevice *paintdevice ) { - return ( ( request.pointSize != -1 ) ? - qt_pixelSize( request.pointSize / 10., paintdevice, scr ) : - ( double ) request.pixelSize ); + double pSize; + int dpi = GetDeviceCaps(qt_display_dc(),LOGPIXELSY); + if (request.pointSize != -1) + pSize = request.pointSize * dpi/ 72.; + else + pSize = request.pixelSize; + return pSize / 10; } -//333 -static inline double pointSize( const QFontDef &request, QPaintDevice *paintdevice, - int scr ) +static inline double pointSize( const QFontDef &fd, QPaintDevice *paintdevice ) { - return ( ( request.pixelSize != -1 ) ? - qt_pointSize( request.pixelSize, paintdevice, scr ) * 10. : - ( double ) request.pointSize ); + double pSize; + int dpi = GetDeviceCaps(qt_display_dc(),LOGPIXELSY); + if (fd.pointSize < 0) + pSize = fd.pixelSize * 72. / ((float)dpi); + else + pSize = fd.pointSize; + return pSize / 10; } @@ -239,7 +217,9 @@ #endif // QT_CHECK_STATE QFontDef req = request; - req.pixelSize = qRound( pixelSize( req, paintdevice, screen ) ); + req.pixelSize = qRound( pixelSize( req, paintdevice ) ); + + // set the point size to 0 to get better caching req.pointSize = 0; if ( ! engineData ) { @@ -257,6 +237,9 @@ } } + // set it to the actual pointsize, so QFontInfo will do the right thing + req.pointSize = qRound( pointSize( request, paintdevice ) ); + // the cached engineData could have already loaded the engine we want if ( engineData->engines[ script ] ) return ; @@ -306,7 +289,7 @@ QStringList::ConstIterator it = family_list.begin(), end = family_list.end(); for ( ; ! engine && it != end; ++it ) { req.family = *it; - //qDebug("calling findFont with %s for %d",req.family.latin1(),script); + qDebug("calling findFont with %s for %d",req.family.latin1(),script); engine = QFontDatabase::findFont( script, this, req ); if ( engine ) { if ( engine->type() != QFontEngine::Box ) Index: qfontdatabase_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qfontdatabase_win.cpp,v retrieving revision 1.1.2.6.2.21 retrieving revision 1.1.2.6.2.22 diff -u -r1.1.2.6.2.21 -r1.1.2.6.2.22 --- qfontdatabase_win.cpp 9 Oct 2005 17:39:16 -0000 1.1.2.6.2.21 +++ qfontdatabase_win.cpp 24 Oct 2005 18:09:16 -0000 1.1.2.6.2.22 @@ -37,823 +37,30 @@ //#define QFONTDATABASE_ENABLE_QT4CODE -#ifndef QFONTDATABASE_ENABLE_QT4CODE - -#include <qplatformdefs.h> - -#include <qdatetime.h> -#include <qpaintdevicemetrics.h> - -#include "qt_windows.h" [...1835 lines suppressed...] - QtFontStyle *style) +static inline void load( const QString &family = QString::null, int script = -1 ) { - return Qt4::loadEngine(script, fp, - request, - family, foundry, - &Qt4::QtFontStyle(*style)); -} + return ; -void QFontDatabase::createDatabase() -{ - if ( db ) - return ; - initializeDb(); } -#endif \ No newline at end of file +#endif // QFONTDATABASE_ENABLE_QT4CODE |
From: Christian E. <che...@us...> - 2005-10-24 17:33:39
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26072/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qapplication_win.cpp Log Message: removed some unused variables / commandline args Index: qapplication_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qapplication_win.cpp,v retrieving revision 1.1.2.30.2.94 retrieving revision 1.1.2.30.2.95 diff -u -r1.1.2.30.2.94 -r1.1.2.30.2.95 --- qapplication_win.cpp 14 Oct 2005 04:53:43 -0000 1.1.2.30.2.94 +++ qapplication_win.cpp 24 Oct 2005 17:33:29 -0000 1.1.2.30.2.95 @@ -89,8 +89,6 @@ #define TRACE {} #endif -#define GetPointSize( hdc, h ) ((int)QABS(h*72/GetDeviceCaps(hdc, LOGPIXELSY))) - /* from qclipboard_win.cpp */ extern HWND hwndNextViewer; extern bool clipboardHasChanged; @@ -148,20 +146,16 @@ QWidget *qt_button_down = 0; // widget got last button-down -static void unregWinClasses(); +static void unregWinClasses(); -static HWND autoCaptureWnd = 0; -static void setAutoCapture(HWND); // automatic capture -static void releaseAutoCapture(); - -static char *appFont = 0; // application font -static char *appStyle = 0; // application style -static char *appBGCol = 0; // application bg color -static char *appFGCol = 0; // application fg color -static char *appBTNCol = 0; // application btn color -static char *mwGeometry = 0; // main widget geometry -static char *mwTitle = 0; // main widget title -static bool mwIconic = false; // main widget iconified +static HWND autoCaptureWnd = 0; +static void setAutoCapture(HWND); // automatic capture +static void releaseAutoCapture(); + +static char *appStyle = 0; // application style +static char *mwGeometry = 0; // main widget geometry +static char *mwTitle = 0; // main widget title +static bool mwIconic = false; // main widget iconified typedef int (*QwinEventFilter) (MSG*); QwinEventFilter qt_set_win_event_filter (QwinEventFilter filter); @@ -188,8 +182,6 @@ char* getMsgName( UINT msgID ); #endif -static QTextCodec * input_mapper = 0; - // mouse event handling static UINT WM95_MOUSEWHEEL = 0; @@ -207,10 +199,6 @@ #define WM_MOUSELEAVE 0x02A3 #endif -int qt_ncols_option = 216; // used in qcolor_x11.cpp -int qt_visual_option = -1; -bool qt_cmap_option = false; - extern bool qt_is_gui_used; // qapplication.cpp extern void qt_dispatchEnterLeave( QWidget*, QWidget* ); // qapplication.cpp @@ -634,19 +622,7 @@ continue; } QString arg = QString( argv[ i ] ).lower(); - if ( arg == "-fn" || arg == "-font" ) { - if ( ++i < argc ) - appFont = argv[ i ]; - } else if ( arg == "-bg" || arg == "-background" ) { - if ( ++i < argc ) - appBGCol = argv[ i ]; - } else if ( arg == "-btn" || arg == "-button" ) { - if ( ++i < argc ) - appBTNCol = argv[ i ]; - } else if ( arg == "-fg" || arg == "-foreground" ) { - if ( ++i < argc ) - appFGCol = argv[ i ]; - } else if ( arg == "-name" ) { + if ( arg == "-name" ) { if ( ++i < argc ) appName = argv[ i ]; } else if ( arg == "-style" ) { @@ -660,20 +636,6 @@ mwGeometry = argv[ i ]; } else if ( arg == "-iconic" ) { mwIconic = !mwIconic; - } else if ( arg == "-ncols" ) { // xv and netscape use this name - if ( ++i < argc ) - qt_ncols_option = QMAX( 0, atoi( argv[ i ] ) ); - } else if ( arg == "-visual" ) { // xv and netscape use this name - if ( ++i < argc ) { - QCString s = QCString( argv[ i ] ).lower(); - /* if ( s == "truecolor" ) { - qt_visual_option = TrueColor; - } else { - // ### Should we honor any others? - }*/ - } - } else if ( arg == "-cmap" ) { // xv uses this name - qt_cmap_option = TRUE; } #if defined(DEBUG) else if ( arg == "-nograb" ) |
From: Christian E. <che...@us...> - 2005-10-24 16:17:46
|
Update of /cvsroot/kde-cygwin/qt-3/src/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6575/src/dialogs Modified Files: Tag: QT_WIN32_3_3_BRANCH qfiledialog_win.cpp Log Message: remove some compiler warnings Index: qfiledialog_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/dialogs/Attic/qfiledialog_win.cpp,v retrieving revision 1.1.2.1.4.17 retrieving revision 1.1.2.1.4.18 diff -u -r1.1.2.1.4.17 -r1.1.2.1.4.18 --- qfiledialog_win.cpp 10 Jul 2005 10:42:42 -0000 1.1.2.1.4.17 +++ qfiledialog_win.cpp 24 Oct 2005 16:17:37 -0000 1.1.2.1.4.18 @@ -90,8 +90,8 @@ extern const char qt_file_dialog_filter_reg_exp[]; // defined in qfiledialog.cpp -const int maxNameLen = 1023; -const int maxMultiLen = 65535; +const unsigned int maxNameLen = 1023; +const unsigned int maxMultiLen = 65535; // Returns the wildcard part of a filter. static QString extractFilter(const QString& rawFilter) @@ -177,7 +177,7 @@ aInitSel = QCString(""); else aInitSel = QDir::convertSeparators(initialSelection).local8Bit(); - int maxLen = mode == QFileDialog::ExistingFiles ? maxMultiLen : maxNameLen; + unsigned int maxLen = mode == QFileDialog::ExistingFiles ? maxMultiLen : maxNameLen; aInitSel.resize(maxLen + 1); // make room for return value aFilter = filters.local8Bit(); @@ -241,7 +241,7 @@ tTitle = title; QString initSel = QDir::convertSeparators(initialSelection); - int maxLen = mode == QFileDialog::ExistingFiles ? maxMultiLen : maxNameLen; + unsigned int maxLen = mode == QFileDialog::ExistingFiles ? maxMultiLen : maxNameLen; TCHAR *tInitSel = new TCHAR[maxLen+1]; if (initSel.length() > 0 && initSel.length() <= maxLen) memcpy(tInitSel, initSel.ucs2(), (initSel.length()+1)*sizeof(QChar)); |
From: Christian E. <che...@us...> - 2005-10-24 16:07:50
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2253/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qclipboard_win.cpp qfontengine_win.cpp qpainter_win.cpp qpixmap_win.cpp qregion_win.cpp Log Message: remove some compiler warnings Index: qclipboard_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qclipboard_win.cpp,v retrieving revision 1.1.2.7.2.14 retrieving revision 1.1.2.7.2.15 diff -u -r1.1.2.7.2.14 -r1.1.2.7.2.15 --- qclipboard_win.cpp 12 Feb 2005 12:51:13 -0000 1.1.2.7.2.14 +++ qclipboard_win.cpp 24 Oct 2005 16:07:40 -0000 1.1.2.7.2.15 @@ -154,7 +154,7 @@ if ( n >= 0 ) { QPtrList<QWindowsMime> ptrlst = QWindowsMime::all(); - if ( n < ptrlst.count() ) { + if ( ( unsigned int ) n < ptrlst.count() ) { return ptrlst.at( n ) ->mimeFor( ptrlst.at( n ) ->cf( 0 ) ); } } Index: qfontengine_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qfontengine_win.cpp,v retrieving revision 1.1.2.33 retrieving revision 1.1.2.34 diff -u -r1.1.2.33 -r1.1.2.34 --- qfontengine_win.cpp 7 Jul 2005 07:47:36 -0000 1.1.2.33 +++ qfontengine_win.cpp 24 Oct 2005 16:07:40 -0000 1.1.2.34 @@ -596,8 +596,8 @@ { glyph_metrics_t overall; - int ymax = 0; - int xmax = 0; + unsigned int ymax = 0; + unsigned int xmax = 0; GLYPHMETRICS gmw = {0}; MAT2 mat; Index: qpainter_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qpainter_win.cpp,v retrieving revision 1.1.2.15.2.55 retrieving revision 1.1.2.15.2.56 diff -u -r1.1.2.15.2.55 -r1.1.2.15.2.56 --- qpainter_win.cpp 12 Jul 2005 18:26:55 -0000 1.1.2.15.2.55 +++ qpainter_win.cpp 24 Oct 2005 16:07:40 -0000 1.1.2.15.2.56 @@ -1104,46 +1104,6 @@ return FALSE; } killPStack(); - if ( testf( FontMet ) ) // remove references to this - ; //todo QFontMetrics::reset( this ); - if ( testf( FontInf ) ) // remove references to this - ; //todo QFontMetrics::reset( this ); - - // if ( pdev->devType() == QInternal::Widget ) - // ReleaseDC( ( ( QWidget * ) pdev ) ->winId(), hdc ); - //#### This should not be necessary: - /* if ( pdev->devType() == QInternal::Widget && - ((QWidget*)pdev)->testWFlags(WPaintUnclipped) ) { - if ( gc ) - XSetSubwindowMode( dpy, gc, ClipByChildren ); - if ( gc_brush ) - XSetSubwindowMode( dpy, gc_brush, ClipByChildren ); - } - */ - // Holgi TODO release pen and bruch references on windows too, - // when we are building custom ones... do i have to release - // stock ones too? - /* if ( gc_brush ) { // restore brush gc - if ( brushRef ) { - release_gc( brushRef ); - brushRef = 0; - } else { - free_gc( dpy, gc_brush, testf(UsePrivateCx) ); - } - gc_brush = 0; - - } - */ - /* if ( gc ) { // restore pen gc - if ( penRef ) { - release_gc( penRef ); - penRef = 0; - } else { - free_gc( dpy, gc, testf(UsePrivateCx) ); - } - gc = 0; - } - */ if ( testf( ExtDev ) ) pdev->cmd( QPaintDevice::PdcEnd, this, 0 ); Index: qpixmap_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qpixmap_win.cpp,v retrieving revision 1.1.2.13.2.37 retrieving revision 1.1.2.13.2.38 diff -u -r1.1.2.13.2.37 -r1.1.2.13.2.38 --- qpixmap_win.cpp 18 Jun 2005 11:10:10 -0000 1.1.2.13.2.37 +++ qpixmap_win.cpp 24 Oct 2005 16:07:40 -0000 1.1.2.13.2.38 @@ -166,7 +166,6 @@ } else { BITMAPINFO bmpInfo; void *lpBits; - int nSize; bmpInfo.bmiHeader.biSize = sizeof( BITMAPINFOHEADER ); bmpInfo.bmiHeader.biWidth = data->w; @@ -519,7 +518,6 @@ image.setColor( 1, Qt::white.rgb() ); } - QRgb q; uchar *bits; // No need for Unicode here long sbpr; @@ -855,7 +853,7 @@ uchar *srow; QImage::Endian sord = image.bitOrder(); const uchar* f = qt_get_bitflip_array(); - int x, y, alpha; + int x, y; if ( sdepth == 8 || sdepth == 16 || sdepth == 32 ) data->realAlphaBits = new uchar[ w * h ]; Index: qregion_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qregion_win.cpp,v retrieving revision 1.1.2.7.2.13 retrieving revision 1.1.2.7.2.14 diff -u -r1.1.2.7.2.13 -r1.1.2.7.2.14 --- qregion_win.cpp 12 Jul 2005 18:27:01 -0000 1.1.2.7.2.13 +++ qregion_win.cpp 24 Oct 2005 16:07:40 -0000 1.1.2.7.2.14 @@ -424,7 +424,7 @@ a = QMemArray<QRect>(rd->rdh.nCount); RECT *r = reinterpret_cast<RECT*>(rd->Buffer); - for (int i = 0; i < a.size(); ++i) { + for (unsigned int i = 0; i < a.size(); ++i) { a[i].setCoords(r->left, r->top, r->right - 1, r->bottom - 1); ++r; } |
From: Christian E. <che...@us...> - 2005-10-15 11:07:09
|
Update of /cvsroot/kde-cygwin/qt-3/misc/configure In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2116/misc/configure Modified Files: Tag: QT_WIN32_3_3_BRANCH main.cpp Log Message: small fix Index: main.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/misc/configure/Attic/main.cpp,v retrieving revision 1.1.2.6.2.36 retrieving revision 1.1.2.6.2.37 diff -u -r1.1.2.6.2.36 -r1.1.2.6.2.37 --- main.cpp 24 Apr 2005 15:34:55 -0000 1.1.2.6.2.36 +++ main.cpp 15 Oct 2005 11:06:58 -0000 1.1.2.6.2.37 @@ -532,6 +532,8 @@ options.verbose = true; } else if ( arg == "fast" ) { options.fast = true; + } else if ( arg == "make-files" ) { + options.makeFiles = true; } else if ( arg == "rebuild" ) { options.rebuild = true; } else if ( arg == "dryrun" || arg == "n" ) { |
From: Christian E. <che...@us...> - 2005-10-14 20:02:12
|
Update of /cvsroot/kde-cygwin/qt-3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5578 Modified Files: Tag: QT_WIN32_3_3_BRANCH Makefile.win32-borland Makefile.win32-g++ Makefile.win32-msvc Log Message: forgot Makefile.main in some cases Index: Makefile.win32-borland =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/Attic/Makefile.win32-borland,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.2.1 diff -u -r1.1.2.2 -r1.1.2.2.2.1 --- Makefile.win32-borland 23 Aug 2004 05:56:56 -0000 1.1.2.2 +++ Makefile.win32-borland 14 Oct 2005 20:01:59 -0000 1.1.2.2.2.1 @@ -32,8 +32,10 @@ #Qt src-uninstall: .qmake.cache (cd src & $(MAKE) uninstall & cd ..) + (cd src & $(MAKE) -f Makefile.main uninstall & cd ..) src-install: sub-src (cd src & $(MAKE) install & cd ..) + (cd src & $(MAKE) -f Makefile.main install & cd ..) sub-src: src-moc .qmake.cache FORCE (cd src & $(MAKE) & cd ..) (cd src & $(MAKE) -f Makefile.main & cd ..) @@ -85,6 +87,7 @@ (cd tools & $(MAKE) $@ & cd ..) (cd src\moc & $(MAKE) $@ & cd ..\..) (cd src & $(MAKE) $@ & cd ..) + (cd src && $(MAKE) -f Makefile.main $@ & cd ..) (cd tutorial & $(MAKE) $@ & cd ..) (cd plugins\src & $(MAKE) $@ & cd ..\..) (cd examples & $(MAKE) $@ & cd ..) Index: Makefile.win32-g++ =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/Attic/Makefile.win32-g++,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -u -r1.1.2.1 -r1.1.2.1.2.1 --- Makefile.win32-g++ 6 Aug 2004 05:44:35 -0000 1.1.2.1 +++ Makefile.win32-g++ 14 Oct 2005 20:01:59 -0000 1.1.2.1.2.1 @@ -85,6 +85,7 @@ cd tools && $(MAKE) $@ cd src\moc && $(MAKE) $@ cd src && $(MAKE) $@ + cd src && $(MAKE) -f Makefile.main $@ cd tutorial && $(MAKE) $@ cd plugins\src && $(MAKE) $@ cd examples && $(MAKE) $@ Index: Makefile.win32-msvc =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/Attic/Makefile.win32-msvc,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -u -r1.1.2.1 -r1.1.2.1.2.1 --- Makefile.win32-msvc 6 Aug 2004 05:44:35 -0000 1.1.2.1 +++ Makefile.win32-msvc 14 Oct 2005 20:01:59 -0000 1.1.2.1.2.1 @@ -32,8 +32,10 @@ #Qt src-uninstall: .qmake.cache cd src && $(MAKE) uninstall + cd src && $(MAKE) -f Makefile.main uninstall src-install: sub-src cd src && $(MAKE) install + cd src && $(MAKE) -f Makefile.main install sub-src: src-moc .qmake.cache FORCE cd src && $(MAKE) cd src && $(MAKE) -f Makefile.main @@ -82,11 +84,10 @@ cd tools && $(MAKE) $@ cd src\moc && $(MAKE) $@ cd src && $(MAKE) $@ + cd src && $(MAKE) -f Makefile.main $@ cd tutorial && $(MAKE) $@ cd plugins\src && $(MAKE) $@ cd examples && $(MAKE) $@ - cd config.tests/unix/stl && $(MAKE) $@ - if exist config.tests/x11/notype/Makefile cd config.tests/x11/notype && $(MAKE) $@ cd qmake && $(MAKE) $@ #confclean is actually the same as distclean, except qmake and moc |
From: Ralf H. <hab...@us...> - 2005-10-14 14:30:41
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17181 Modified Files: SConstruct Log Message: added cygwin note Index: SConstruct =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/SConstruct,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SConstruct 14 Oct 2005 14:21:32 -0000 1.4 +++ SConstruct 14 Oct 2005 14:30:28 -0000 1.5 @@ -9,10 +9,12 @@ env = Environment() if sys.platform == 'cygwin': + # scons isn't complete for cygwin lib = Environment(SHLIBPREFIX='cyg',SHLIBSUFFIX='-'+version[:1]+env['SHLIBSUFFIX'],LINKFLAGS='-Wl,--out-implib=libprofiler.dll.a') else: lib = Environment() + lib.SharedLibrary('profiler','profiler.cpp',CXXFLAGS='-DHAVE_UNISTD_H') env.Program('test','test.cpp',LIBS='profiler',LIBPATH='.') |
From: Ralf H. <hab...@us...> - 2005-10-14 14:21:47
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14705 Modified Files: SConstruct Log Message: library uses own platform depending environment Index: SConstruct =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/SConstruct,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SConstruct 14 Oct 2005 14:06:37 -0000 1.3 +++ SConstruct 14 Oct 2005 14:21:32 -0000 1.4 @@ -9,7 +9,10 @@ env = Environment() if sys.platform == 'cygwin': - env = Environment(SHLIBPREFIX='cyg',SHLIBSUFFIX='-'+version[:1]+env['SHLIBSUFFIX']) + lib = Environment(SHLIBPREFIX='cyg',SHLIBSUFFIX='-'+version[:1]+env['SHLIBSUFFIX'],LINKFLAGS='-Wl,--out-implib=libprofiler.dll.a') +else: + lib = Environment() -env.SharedLibrary('profiler','profiler.cpp',CXXFLAGS='-DHAVE_UNISTD_H',LINKFLAGS='-Wl,--out-implib=libprofiler.dll.a') -env.Program('test','test.cpp',LIBS = 'profiler',LIBPATH='.') +lib.SharedLibrary('profiler','profiler.cpp',CXXFLAGS='-DHAVE_UNISTD_H') + +env.Program('test','test.cpp',LIBS='profiler',LIBPATH='.') |
From: Ralf H. <hab...@us...> - 2005-10-14 14:06:49
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10359 Modified Files: SConstruct Log Message: bug fix for cygwin Index: SConstruct =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/SConstruct,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SConstruct 14 Oct 2005 13:55:45 -0000 1.2 +++ SConstruct 14 Oct 2005 14:06:37 -0000 1.3 @@ -6,12 +6,10 @@ import sys version = '1.3.5' +env = Environment() if sys.platform == 'cygwin': - env = Environment(SHLIBPREFIX='cyg',SHLIBSUFFIX='-'+version[:1]+'.dll') -else: - env = Environment() + env = Environment(SHLIBPREFIX='cyg',SHLIBSUFFIX='-'+version[:1]+env['SHLIBSUFFIX']) - -env.SharedLibrary('profiler','profiler.cpp',CXXFLAGS='-DHAVE_UNISTD_H') +env.SharedLibrary('profiler','profiler.cpp',CXXFLAGS='-DHAVE_UNISTD_H',LINKFLAGS='-Wl,--out-implib=libprofiler.dll.a') env.Program('test','test.cpp',LIBS = 'profiler',LIBPATH='.') |
From: Ralf H. <hab...@us...> - 2005-10-14 13:55:54
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7210 Modified Files: SConstruct Log Message: dos2unix Index: SConstruct =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/SConstruct,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SConstruct 14 Oct 2005 13:52:29 -0000 1.1 +++ SConstruct 14 Oct 2005 13:55:45 -0000 1.2 @@ -1,17 +1,17 @@ -# -# Scons build script -# -# - -import sys - -version = '1.3.5' - -if sys.platform == 'cygwin': - env = Environment(SHLIBPREFIX='cyg',SHLIBSUFFIX='-'+version[:1]+'.dll') -else: - env = Environment() - - -env.SharedLibrary('profiler','profiler.cpp',CXXFLAGS='-DHAVE_UNISTD_H') -env.Program('test','test.cpp',LIBS = 'profiler') +# +# Scons build script +# +# + +import sys + +version = '1.3.5' + +if sys.platform == 'cygwin': + env = Environment(SHLIBPREFIX='cyg',SHLIBSUFFIX='-'+version[:1]+'.dll') +else: + env = Environment() + + +env.SharedLibrary('profiler','profiler.cpp',CXXFLAGS='-DHAVE_UNISTD_H') +env.Program('test','test.cpp',LIBS = 'profiler',LIBPATH='.') |
From: Ralf H. <hab...@us...> - 2005-10-14 13:52:42
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6698 Added Files: SConstruct Log Message: new file --- NEW FILE: SConstruct --- # # Scons build script # # import sys version = '1.3.5' if sys.platform == 'cygwin': env = Environment(SHLIBPREFIX='cyg',SHLIBSUFFIX='-'+version[:1]+'.dll') else: env = Environment() env.SharedLibrary('profiler','profiler.cpp',CXXFLAGS='-DHAVE_UNISTD_H') env.Program('test','test.cpp',LIBS = 'profiler') |
From: Ralf H. <hab...@us...> - 2005-10-14 13:44:06
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5155 Modified Files: Makefile.am Log Message: removed AUTOMAKE_OPTIONS, they does not work in this release under linux Index: Makefile.am =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.am 27 May 2002 22:40:56 -0000 1.5 +++ Makefile.am 14 Oct 2005 13:43:58 -0000 1.6 @@ -1,4 +1,5 @@ -AUTOMAKE_OPTIONS=dist-bzip2 check-news +# does not work +#AUTOMAKE_OPTIONS=dist-bzip2 check-news check_PROGRAMS = testcpp |
From: Ralf H. <hab...@us...> - 2005-10-14 13:16:18
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30357 Modified Files: test.cpp configure.in Log Message: more dos to unix Index: test.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/test.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- test.cpp 11 Apr 2002 19:02:18 -0000 1.9 +++ test.cpp 14 Oct 2005 13:15:58 -0000 1.10 @@ -1,69 +1,69 @@ -#include <stdlib.h> -#include <stdio.h> -#include <sys/unistd.h> -#include "profiler.h" - -void MacroTest(void) { - Profile - usleep(100000); -} - -void EmptyTest(void) -{ - Profiler x(__FUNCTION__); -} - -void SimpleTest(void) -{ - Profiler x(__FUNCTION__); - usleep(100000); -} - - -void MultipleTest(void) -{ - Profiler x(__FUNCTION__); - printf("%s\n",x.getKey()); - KProfiler y(__FUNCTION__); - printf("%s\n",y.getKey()); - QProfiler z(__FUNCTION__); - printf("%s\n",z.getKey()); - usleep(100000); -} - -void CounterTest(void) -{ - { - Profiler x("Counter=1"); - usleep(10000); - } -#ifndef NO_COUNT - { - Profiler x("Counter=100",100); - for(int i = 0; i < 100; i++) - usleep(10000); - } -#endif -} - -int main(int argc, char **argv) -{ - for (int i = 0; i < 100; i++) - EmptyTest(); - - SimpleTest(); - - MultipleTest(); - - for (int i = 0; i < 10; i++) - MacroTest(); - - for (int i = 0; i < 5; i++) - SimpleTest(); - - CounterTest(); - -// theProfiler.Print(); -} - - +#include <stdlib.h> +#include <stdio.h> +#include <sys/unistd.h> +#include "profiler.h" + +void MacroTest(void) { + Profile + usleep(100000); +} + +void EmptyTest(void) +{ + Profiler x(__FUNCTION__); +} + +void SimpleTest(void) +{ + Profiler x(__FUNCTION__); + usleep(100000); +} + + +void MultipleTest(void) +{ + Profiler x(__FUNCTION__); + printf("%s\n",x.getKey()); + KProfiler y(__FUNCTION__); + printf("%s\n",y.getKey()); + QProfiler z(__FUNCTION__); + printf("%s\n",z.getKey()); + usleep(100000); +} + +void CounterTest(void) +{ + { + Profiler x("Counter=1"); + usleep(10000); + } +#ifndef NO_COUNT + { + Profiler x("Counter=100",100); + for(int i = 0; i < 100; i++) + usleep(10000); + } +#endif +} + +int main(int argc, char **argv) +{ + for (int i = 0; i < 100; i++) + EmptyTest(); + + SimpleTest(); + + MultipleTest(); + + for (int i = 0; i < 10; i++) + MacroTest(); + + for (int i = 0; i < 5; i++) + SimpleTest(); + + CounterTest(); + +// theProfiler.Print(); +} + + Index: configure.in =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/configure.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- configure.in 28 May 2002 06:28:31 -0000 1.8 +++ configure.in 14 Oct 2005 13:15:58 -0000 1.9 @@ -1,31 +1,31 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(profiler.cpp) - -AC_PREREQ(2.50) - -AC_CONFIG_AUX_DIR(admin) - -AC_PROG_CXX - -dnl Automake doc recommends to do this only here. (Janos) -AM_INIT_AUTOMAKE(profiler, 1.3.5) - -#AM_CONFIG_HEADER(config.h) - -AC_ENABLE_SHARED -AC_DISABLE_STATIC -AC_PROG_LIBTOOL - -dnl Checks for libraries. - -dnl Checks for header files. -#AC_HEADER_STDC - -AC_OUTPUT([Makefile]) - -echo "" -echo "Please run the following targets for building distributions." -echo "" -echo "make bindist - for creating a binary distribution in this location" -echo "make srcdist - for creating a src distribution in this location" -echo "" +dnl Process this file with autoconf to produce a configure script. +AC_INIT(profiler.cpp) + +AC_PREREQ(2.50) + +AC_CONFIG_AUX_DIR(admin) + +AC_PROG_CXX + +dnl Automake doc recommends to do this only here. (Janos) +AM_INIT_AUTOMAKE(profiler, 1.3.5) + +#AM_CONFIG_HEADER(config.h) + +AC_ENABLE_SHARED +AC_DISABLE_STATIC +AC_PROG_LIBTOOL + +dnl Checks for libraries. + +dnl Checks for header files. +#AC_HEADER_STDC + +AC_OUTPUT([Makefile]) + +echo "" +echo "Please run the following targets for building distributions." +echo "" +echo "make bindist - for creating a binary distribution in this location" +echo "make srcdist - for creating a src distribution in this location" +echo "" |
From: Ralf H. <hab...@us...> - 2005-10-14 13:06:26
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28364 Modified Files: profiler.cpp Log Message: added required unistd.h Index: profiler.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/profiler.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- profiler.cpp 14 Oct 2005 12:59:30 -0000 1.27 +++ profiler.cpp 14 Oct 2005 13:05:57 -0000 1.28 @@ -37,7 +37,14 @@ #include <string.h> #include <stdlib.h> #include <limits.h> + +#ifdef HAVE_PROCESS_H #include <process.h> +#endif + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif #include "profiler.h" |
From: Ralf H. <hab...@us...> - 2005-10-14 12:59:39
|
Update of /cvsroot/kde-cygwin/tools/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26942 Modified Files: profiler.cpp Log Message: dos to unix Index: profiler.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/tools/profiler/profiler.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- profiler.cpp 28 May 2002 06:49:32 -0000 1.26 +++ profiler.cpp 14 Oct 2005 12:59:30 -0000 1.27 @@ -1,327 +1,327 @@ -/* profiler implementation - - Copyright 2002 - Ralf Habacker <Ral...@fr...> - Chris January <ch...@at...> - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -$Id$ - -*/ - -#if defined(__CYGWIN__) || defined (__MINGW32__) || defined (__WIN32__) -#define USE_WIN32_TIMER -#endif - -#ifdef USE_WIN32_TIMER -#include <windows.h> -#else -#include <sys/time.h> -#endif - - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <limits.h> -#include <process.h> - -#include "profiler.h" - -// enable this for nanosec printing -//#define PRINT_NSEC - -#ifdef HIGH_RESOLUTION_TIMER - -#ifdef PRINT_NSEC -#define pfactor 1000000000 -#define ptype "llu" -#define punit "[ns]" -#else -#define pfactor 1000000 -#define ptype "llu" -#define punit "[us]" -#endif - -#define MAX_VAL ULONG_LONG_MAX -#else -#define ptype "llu" -#define punit "[ms]" -#define MAX_VAL ULONG_MAX; -#endif - - -namespace Prof { - -// -// basic class for providing a timer -// - -class myTimer { - public: - // constructor - myTimer(void); - - // get the current time of timer in an internal format - inline TimeType getValue(void); - - // result a printable version of timer value <value> - inline TimeType getPrintableValue(TimeType value); - - protected: - TimeType frequency; - TimeType currentValue; -}; - -myTimer::myTimer(void) -{ -#ifdef HIGH_RESOLUTION_TIMER -#ifdef USE_WIN32_TIMER - LARGE_INTEGER liFrequency; - QueryPerformanceFrequency((LARGE_INTEGER *)&liFrequency); - frequency = liFrequency.QuadPart; -#else -#endif -#endif -} - -TimeType myTimer::getValue(void) { -#ifdef HIGH_RESOLUTION_TIMER -#ifdef USE_WIN32_TIMER - QueryPerformanceCounter((LARGE_INTEGER *)¤tValue); -#else - struct timeval val; - gettimeofday(&val, (struct timezone*)0); - currentValue = (TimeType )val.tv_sec * 1000000 + val.tv_usec; -#endif -#else - currentValue = GetTickCount(); -#endif - return currentValue; -} - -TimeType myTimer::getPrintableValue(TimeType value) -{ -#ifdef HIGH_RESOLUTION_TIMER -#ifdef USE_WIN32_TIMER - return value * pfactor / frequency; -#else - return value; -#endif -#else - return value; -#endif -} - -static myTimer timer; - - -ProfilerList::ProfilerList() -{ - // init array - ProfilerItem *p = &ItemList[0]; - for (int i = 0; i < ProfilerItem_Count; i++) { - p->scope = 0; - p++; - } - - // handle environment - env = ::getenv("PROFILER"); - - // set default pointer is no value - if (!env) - env = ""; - - // save initial time stamp if enabled - if (strstr(env,"startup") != 0) - StartupTime = new Profiler("AppStartup"); - -// char *s; - - // set output stream to file if set - if (char *s = strstr(env,"out=")) { - out = fopen(s+4,"at+"); -// fprintf(out,"'%s' started\n",env); - } - if (!out) - out = stderr; -} - -void ProfilerList::SetProfilerReady(void) -{ - static bool lock = false; - if (!StartupTime || lock) - return; - if (!lock) { - StartupTime->Stop(); - lock = true; - } -} - -bool ProfilerList::Add(const char *scope, TimeType difftime, int _count) -{ - ProfilerItem *p = &ItemList[0]; - for (int i = 0; i < ProfilerItem_Count; i++) { - // new entry - if (!p->scope) { - p->scope = scope; - p->mintime = MAX_VAL; - p->maxtime = 0; - p->count = 0; - p->sumtime = 0; - UpdateTime(p, difftime, _count); - return true; - } - // entry found - else if (p->scope == scope) { - UpdateTime(p, difftime, _count); - return true; - } - p++; - } - return false; -} - -void ProfilerList::UpdateTime(ProfilerItem *p, TimeType difftime, int count) -{ - if (p->mintime > difftime) - p->mintime = difftime; - if (p->maxtime < difftime) - p->maxtime = difftime; - p->count+= count; - p->sumtime += difftime; -} - -void ProfilerList::Print(void) -{ - ProfilerItem *p = &ItemList[0]; - - for (int i = 0; i < ProfilerItem_Count; i++) { - if (p->scope) { -#ifdef HIGH_RESOLUTION_TIMER - fprintf(out,"[%4d] %-30s n:%6d (min) %10llu (max) %10llu (avg) %10llu (sum) %10llu %s\n", -#else - fprintf(out,"[%4d] %-30s n:%6d (min) %10d (max) %10d (avg) %10d (sum) %10d %s\n", -#endif - ::getpid(), - p->scope, p->count, - timer.getPrintableValue(p->mintime), - timer.getPrintableValue(p->maxtime), - timer.getPrintableValue(p->sumtime)/p->count, - timer.getPrintableValue(p->sumtime), - punit); - } - p++; - } -} - -void ProfilerList::Reset(void) -{ - ProfilerItem *p = &ItemList[0]; - for (int i = 0; i < ProfilerItem_Count; i++) { - p->scope = NULL; - p->mintime = MAX_VAL; - p->maxtime = 0; - p->count = 0; - p->sumtime = 0; - p++; - } -} - -ProfilerList::~ProfilerList() -{ - if (env || (out && out != stderr)) - Print(); - - // close output - fclose(out); -} - -// global object -ProfilerList theProfiler; - -#ifdef NO_COUNT -Profiler::Profiler(const char *s,const char *akey) -{ - Init(s,1,akey); -} -#else -Profiler::Profiler(const char *s, const int _count, const char *akey) -{ - Init(s,_count,akey); -} -#endif - -inline void Profiler::Init(const char *s, const int _count, const char *akey) -{ - // notify ProfilerList, that we has been called - theProfiler.SetProfilerReady(); - - key = akey; - - if (strstr(theProfiler.getenv(),"all") != 0) - printSingleLine = true; - else - printSingleLine = false; - starttime = 0; - if (_count) - Start(s,_count); -} - -void Profiler::Restart(const char *s, const int _count) -{ - if (starttime) - Stop(); - Start(s,_count); -} - -void Profiler::Start(const char *s, const int _count) -{ - if (starttime) - Stop(); - count = _count; - if (s) - scope = s; - if (scope) - starttime = timer.getValue(); -} - -void Profiler::Stop(void) -{ - TimeType endtime = timer.getValue(); - TimeType difftime = endtime-starttime; - - if (starttime) { - if (printSingleLine) { -#ifdef HIGH_RESOLUTION_TIMER - fprintf(theProfiler.getout(),"[%4d] %-30s time: %10llu %s\n", -#else - fprintf(theProfiler.getout(),"[%4d] %-30s time: %10d %s\n", -#endif - ::getpid(),scope,timer.getPrintableValue(difftime/count),punit); - - } - theProfiler.Add(scope,difftime/count,count); - starttime = 0; - } -} - -Profiler::~Profiler() -{ - Stop(); -} - -} +/* profiler implementation + + Copyright 2002 + Ralf Habacker <Ral...@fr...> + Chris January <ch...@at...> + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +$Id$ + +*/ + +#if defined(__CYGWIN__) || defined (__MINGW32__) || defined (__WIN32__) +#define USE_WIN32_TIMER +#endif + +#ifdef USE_WIN32_TIMER +#include <windows.h> +#else +#include <sys/time.h> +#endif + + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <limits.h> +#include <process.h> + +#include "profiler.h" + +// enable this for nanosec printing +//#define PRINT_NSEC + +#ifdef HIGH_RESOLUTION_TIMER + +#ifdef PRINT_NSEC +#define pfactor 1000000000 +#define ptype "llu" +#define punit "[ns]" +#else +#define pfactor 1000000 +#define ptype "llu" +#define punit "[us]" +#endif + +#define MAX_VAL ULONG_LONG_MAX +#else +#define ptype "llu" +#define punit "[ms]" +#define MAX_VAL ULONG_MAX; +#endif + + +namespace Prof { + +// +// basic class for providing a timer +// + +class myTimer { + public: + // constructor + myTimer(void); + + // get the current time of timer in an internal format + inline TimeType getValue(void); + + // result a printable version of timer value <value> + inline TimeType getPrintableValue(TimeType value); + + protected: + TimeType frequency; + TimeType currentValue; +}; + +myTimer::myTimer(void) +{ +#ifdef HIGH_RESOLUTION_TIMER +#ifdef USE_WIN32_TIMER + LARGE_INTEGER liFrequency; + QueryPerformanceFrequency((LARGE_INTEGER *)&liFrequency); + frequency = liFrequency.QuadPart; +#else +#endif +#endif +} + +TimeType myTimer::getValue(void) { +#ifdef HIGH_RESOLUTION_TIMER +#ifdef USE_WIN32_TIMER + QueryPerformanceCounter((LARGE_INTEGER *)¤tValue); +#else + struct timeval val; + gettimeofday(&val, (struct timezone*)0); + currentValue = (TimeType )val.tv_sec * 1000000 + val.tv_usec; +#endif +#else + currentValue = GetTickCount(); +#endif + return currentValue; +} + +TimeType myTimer::getPrintableValue(TimeType value) +{ +#ifdef HIGH_RESOLUTION_TIMER +#ifdef USE_WIN32_TIMER + return value * pfactor / frequency; +#else + return value; +#endif +#else + return value; +#endif +} + +static myTimer timer; + + +ProfilerList::ProfilerList() +{ + // init array + ProfilerItem *p = &ItemList[0]; + for (int i = 0; i < ProfilerItem_Count; i++) { + p->scope = 0; + p++; + } + + // handle environment + env = ::getenv("PROFILER"); + + // set default pointer is no value + if (!env) + env = ""; + + // save initial time stamp if enabled + if (strstr(env,"startup") != 0) + StartupTime = new Profiler("AppStartup"); + +// char *s; + + // set output stream to file if set + if (char *s = strstr(env,"out=")) { + out = fopen(s+4,"at+"); +// fprintf(out,"'%s' started\n",env); + } + if (!out) + out = stderr; +} + +void ProfilerList::SetProfilerReady(void) +{ + static bool lock = false; + if (!StartupTime || lock) + return; + if (!lock) { + StartupTime->Stop(); + lock = true; + } +} + +bool ProfilerList::Add(const char *scope, TimeType difftime, int _count) +{ + ProfilerItem *p = &ItemList[0]; + for (int i = 0; i < ProfilerItem_Count; i++) { + // new entry + if (!p->scope) { + p->scope = scope; + p->mintime = MAX_VAL; + p->maxtime = 0; + p->count = 0; + p->sumtime = 0; + UpdateTime(p, difftime, _count); + return true; + } + // entry found + else if (p->scope == scope) { + UpdateTime(p, difftime, _count); + return true; + } + p++; + } + return false; +} + +void ProfilerList::UpdateTime(ProfilerItem *p, TimeType difftime, int count) +{ + if (p->mintime > difftime) + p->mintime = difftime; + if (p->maxtime < difftime) + p->maxtime = difftime; + p->count+= count; + p->sumtime += difftime; +} + +void ProfilerList::Print(void) +{ + ProfilerItem *p = &ItemList[0]; + + for (int i = 0; i < ProfilerItem_Count; i++) { + if (p->scope) { +#ifdef HIGH_RESOLUTION_TIMER + fprintf(out,"[%4d] %-30s n:%6d (min) %10llu (max) %10llu (avg) %10llu (sum) %10llu %s\n", +#else + fprintf(out,"[%4d] %-30s n:%6d (min) %10d (max) %10d (avg) %10d (sum) %10d %s\n", +#endif + ::getpid(), + p->scope, p->count, + timer.getPrintableValue(p->mintime), + timer.getPrintableValue(p->maxtime), + timer.getPrintableValue(p->sumtime)/p->count, + timer.getPrintableValue(p->sumtime), + punit); + } + p++; + } +} + +void ProfilerList::Reset(void) +{ + ProfilerItem *p = &ItemList[0]; + for (int i = 0; i < ProfilerItem_Count; i++) { + p->scope = NULL; + p->mintime = MAX_VAL; + p->maxtime = 0; + p->count = 0; + p->sumtime = 0; + p++; + } +} + +ProfilerList::~ProfilerList() +{ + if (env || (out && out != stderr)) + Print(); + + // close output + fclose(out); +} + +// global object +ProfilerList theProfiler; + +#ifdef NO_COUNT +Profiler::Profiler(const char *s,const char *akey) +{ + Init(s,1,akey); +} +#else +Profiler::Profiler(const char *s, const int _count, const char *akey) +{ + Init(s,_count,akey); +} +#endif + +inline void Profiler::Init(const char *s, const int _count, const char *akey) +{ + // notify ProfilerList, that we has been called + theProfiler.SetProfilerReady(); + + key = akey; + + if (strstr(theProfiler.getenv(),"all") != 0) + printSingleLine = true; + else + printSingleLine = false; + starttime = 0; + if (_count) + Start(s,_count); +} + +void Profiler::Restart(const char *s, const int _count) +{ + if (starttime) + Stop(); + Start(s,_count); +} + +void Profiler::Start(const char *s, const int _count) +{ + if (starttime) + Stop(); + count = _count; + if (s) + scope = s; + if (scope) + starttime = timer.getValue(); +} + +void Profiler::Stop(void) +{ + TimeType endtime = timer.getValue(); + TimeType difftime = endtime-starttime; + + if (starttime) { + if (printSingleLine) { +#ifdef HIGH_RESOLUTION_TIMER + fprintf(theProfiler.getout(),"[%4d] %-30s time: %10llu %s\n", +#else + fprintf(theProfiler.getout(),"[%4d] %-30s time: %10d %s\n", +#endif + ::getpid(),scope,timer.getPrintableValue(difftime/count),punit); + + } + theProfiler.Add(scope,difftime/count,count); + starttime = 0; + } +} + +Profiler::~Profiler() +{ + Stop(); +} + +} |
From: Christian E. <che...@us...> - 2005-10-14 04:53:53
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29884/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qapplication_win.cpp qeventloop_win.cpp Log Message: fix compile error & crash Index: qapplication_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qapplication_win.cpp,v retrieving revision 1.1.2.30.2.93 retrieving revision 1.1.2.30.2.94 diff -u -r1.1.2.30.2.93 -r1.1.2.30.2.94 --- qapplication_win.cpp 9 Oct 2005 17:07:23 -0000 1.1.2.30.2.93 +++ qapplication_win.cpp 14 Oct 2005 04:53:43 -0000 1.1.2.30.2.94 @@ -266,8 +266,8 @@ { return QApplication::sendSpontaneousEvent( receiver, event ); } - void showChildren( bool spontaneous ) { showChildren( spontaneous ); } - void hideChildren( bool spontaneous ) { hideChildren( spontaneous ); } + void showChildren( bool spontaneous ) { QWidget::showChildren( spontaneous ); } + void hideChildren( bool spontaneous ) { QWidget::hideChildren( spontaneous ); } }; Index: qeventloop_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qeventloop_win.cpp,v retrieving revision 1.1.2.10.2.23 retrieving revision 1.1.2.10.2.24 diff -u -r1.1.2.10.2.23 -r1.1.2.10.2.24 --- qeventloop_win.cpp 11 Oct 2005 21:01:12 -0000 1.1.2.10.2.23 +++ qeventloop_win.cpp 14 Oct 2005 04:53:43 -0000 1.1.2.10.2.24 @@ -55,9 +55,7 @@ QSNDict sn_write; QSNDict sn_except; -struct QWinConfigRequest; extern bool qt_is_gui_used; -extern QList<QWinConfigRequest*> *configRequests; void qWinProcessConfigRequests(); // from qeventloop_win_utils.cpp @@ -248,8 +246,7 @@ // handle gui and posted events if ( qt_is_gui_used ) { - if ( configRequests ) // any pending configs? - qWinProcessConfigRequests(); + qWinProcessConfigRequests(); QApplication::sendPostedEvents(); MSG msg; |
From: Christian E. <che...@us...> - 2005-10-11 21:01:20
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14948/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qeventloop_win.cpp Log Message: Index: qeventloop_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qeventloop_win.cpp,v retrieving revision 1.1.2.10.2.22 retrieving revision 1.1.2.10.2.23 diff -u -r1.1.2.10.2.22 -r1.1.2.10.2.23 --- qeventloop_win.cpp 9 Oct 2005 17:07:23 -0000 1.1.2.10.2.22 +++ qeventloop_win.cpp 11 Oct 2005 21:01:12 -0000 1.1.2.10.2.23 @@ -57,7 +57,7 @@ struct QWinConfigRequest; extern bool qt_is_gui_used; -extern QList<QWinConfigRequest*> *configRequests = 0; +extern QList<QWinConfigRequest*> *configRequests; void qWinProcessConfigRequests(); // from qeventloop_win_utils.cpp |
From: Joe C. <3cl...@be...> - 2005-10-09 17:50:03
|
From: Christian E. <che...@us...> - 2005-10-09 17:39:25
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5438/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qfontdatabase_win.cpp Log Message: quick hack to avoid crash in loadEngine() when QtFontFamily *family == NULL Index: qfontdatabase_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qfontdatabase_win.cpp,v retrieving revision 1.1.2.6.2.20 retrieving revision 1.1.2.6.2.21 diff -u -r1.1.2.6.2.20 -r1.1.2.6.2.21 --- qfontdatabase_win.cpp 7 Aug 2005 14:11:05 -0000 1.1.2.6.2.20 +++ qfontdatabase_win.cpp 9 Oct 2005 17:39:16 -0000 1.1.2.6.2.21 @@ -334,7 +334,7 @@ deffnt = SYSTEM_FONT; else deffnt = DEFAULT_GUI_FONT; - QString fam = family->rawName.lower(); + QString fam = ( family ) ? family->rawName.lower() : QString( "default" ); if ( fam == "default" ) f = deffnt; else if ( fam == "system" ) |
From: Christian E. <che...@us...> - 2005-10-09 17:08:07
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30654/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qapplication_win.cpp qeventloop_win.cpp qwidget_win.cpp Log Message: QWidget::setWindowState() from Qt4 add WM_SYSCOMMAND to send correct QEvent::WindowStateChange add qWinRequestConfig() for internalSetGeometry() & WState_ConfigPending Index: qapplication_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qapplication_win.cpp,v retrieving revision 1.1.2.30.2.92 retrieving revision 1.1.2.30.2.93 diff -u -r1.1.2.30.2.92 -r1.1.2.30.2.93 --- qapplication_win.cpp 4 Oct 2005 19:37:16 -0000 1.1.2.30.2.92 +++ qapplication_win.cpp 9 Oct 2005 17:07:23 -0000 1.1.2.30.2.93 @@ -266,6 +266,8 @@ { return QApplication::sendSpontaneousEvent( receiver, event ); } + void showChildren( bool spontaneous ) { showChildren( spontaneous ); } + void hideChildren( bool spontaneous ) { hideChildren( spontaneous ); } }; @@ -770,6 +772,63 @@ /***************************************************************************** + Safe configuration (move,resize,setGeometry) mechanism to avoid + recursion when processing messages. + *****************************************************************************/ + +struct QWinConfigRequest { + WId id; // widget to be configured + int req; // 0=move, 1=resize, 2=setGeo + int x, y, w, h; // request parameters +}; + +QList<QWinConfigRequest> *configRequests = 0; + +void qWinRequestConfig(WId id, int req, int x, int y, int w, int h) +{ + if ( !configRequests ) // create queue + configRequests = new QList<QWinConfigRequest>; + QWinConfigRequest *r = new QWinConfigRequest; + r->id = id; // create new request + r->req = req; + r->x = x; + r->y = y; + r->w = w; + r->h = h; + configRequests->append( r ); // store request in queue +} + +void qWinProcessConfigRequests() // perform requests in queue +{ + if ( !configRequests ) + return; + QWinConfigRequest *r; + for ( ;; ) { + if ( configRequests->isEmpty() ) + break; + r = configRequests->last(); + configRequests->removeLast(); + QWidget *w = QWidget::find( r->id ); + QRect rect( r->x, r->y, r->w, r->h ); + int req = r->req; + delete r; + + if ( w ) { // widget exists + if ( w->testWState( Qt::WState_ConfigPending ) ) + return; // biting our tail + if ( req == 0 ) + w->move( rect.topLeft() ); + else if ( req == 1 ) + w->resize( rect.size() ); + else + w->setGeometry( rect ); + } + } + delete configRequests; + configRequests = 0; +} + +/***************************************************************************** Platform specific global and internal functions *****************************************************************************/ @@ -2381,63 +2440,7 @@ return k0 || k1; } -/* - int code = -1; - int count = 0; - char ascii = 0; - bool autor = false; - QString text; - if ( !isEnabled() ) - return TRUE; - - // Bit 29 and 31 are only set on WM_KEYUP ! - QEvent::Type type = ( ( msg.lParam & 0x90000000 ) == 0 ) ? QEvent::KeyPress : QEvent::KeyRelease; - - if ( !translateKeyEventInternal( msg, count, text, state, ascii, code ) ) - return TRUE; - -// if ( code == Qt::Key_Shift ) // why 321nc sends them! -// return FALSE; - if ( ( code == Qt::Key_Control ) || ( code == Qt::Key_Alt ) || - ( code == Qt::Key_Shift ) ) { - // check for KEY_DOWN and previous state - // Bit 30 - previous state - no define for this - // Bit 29 and 31 are only set on WM_KEYUP ! - if ( ( ( msg.lParam & 0x40000000 ) == 0x40000000 ) && - ( ( msg.lParam & 0x90000000 ) == 0 ) ) - return FALSE; - } - bool isAccel = false; - if ( !grab && ( HIWORD( msg.lParam ) & KF_ALTDOWN ) ) { // test for accel if the keyboard is not grabbed - QKeyEvent a( QEvent::AccelAvailable, code, ascii, state, text, false, - QMAX( count, int( text.length() ) ) ); - a.ignore(); - QApplication::sendEvent( topLevelWidget(), &a ); - isAccel = a.isAccepted(); - } - - // process acceleraters before popups - QKeyEvent e( type, code, ascii, state, text, autor, - QMAX( count, int( text.length() ) ) ); - if ( type == QEvent::KeyPress && !grab ) { - // send accel events if the keyboard is not grabbed - QKeyEvent aa( QEvent::AccelOverride, code, ascii, state, text, autor, - QMAX( count, int( text.length() ) ) ); - aa.ignore(); - QApplication::sendEvent( this, &aa ); - if ( !aa.isAccepted() ) { - QKeyEvent a( QEvent::Accel, code, ascii, state, text, autor, - QMAX( count, int( text.length() ) ) ); - a.ignore(); - QApplication::sendEvent( topLevelWidget(), &a ); - if ( a.isAccepted() ) - return FALSE; - } - } - QApplication::sendSpontaneousEvent( this, &e ); - return FALSE; -} */ bool QETWidget::translateEraseEvent( const MSG &msg ) { #ifdef DEBUG_QAPPLICATION @@ -2453,7 +2456,7 @@ hdc = hdcOld; /* An application should return nonzero in response to WM_ERASEBKGND if it processes the message and erases the background */ - return TRUE; + return true; } bool QETWidget::translatePaintEvent( const MSG &msg ) @@ -2464,7 +2467,14 @@ PAINTSTRUCT ps; QRegion paintRegion( 0, 0, 1, 1 ); // otherwise we would pollute empty_region - GetUpdateRgn ( winid, paintRegion.handle (), FALSE ); + int res = GetUpdateRgn ( winid, paintRegion.handle (), FALSE ); +/* + if ( !GetUpdateRect( winId(), 0, false ) // The update bounding rect is invalid + || ( res == ERROR ) + || ( res == NULLREGION ) ) { + return false; + } +*/ HDC hdcOld = hdc; hdc = BeginPaint( winid, &ps ); #ifdef DEBUG_QAPPLICATION @@ -2476,7 +2486,7 @@ EndPaint( winid, &ps ); hdc = hdcOld; - return FALSE; + return true; } //Defined in qwidget_win.cpp @@ -2487,11 +2497,11 @@ bool QETWidget::translateConfigEvent( const MSG &msg ) { if ( !testWState( Qt::WState_Created ) ) // in QWidget::create() - return false; + return true; if ( testWState( Qt::WState_ConfigPending ) ) - return false; + return true; if ( !isTopLevel() ) - return false; + return true; setWState( Qt::WState_ConfigPending ); // set config flag QRect cr = geometry(); if ( msg.message == WM_SIZE ) { // resize event @@ -2560,7 +2570,7 @@ } } clearWState( Qt::WState_ConfigPending ); // clear config flag - return false; + return true; } @@ -2740,9 +2750,14 @@ if ( !qt_try_modal( widget, &msg, ret ) ) return 1; + if ( !widget ) + widget = (QETWidget*)QWidget::find( hWnd ); + if ( !widget ) // don't know this widget + goto do_default; + // WM95_MOUSEWHEEL is not const if ( uMsg == WM_MOUSEWHEEL || uMsg == WM95_MOUSEWHEEL ) - return ( widget->translateWheelEvent(msg) ); // mouse event + return ( widget->translateWheelEvent( msg) ); // mouse event switch ( uMsg ) { case WM_LBUTTONDOWN: @@ -2829,7 +2844,7 @@ break; } case WM_SYSCHAR: - return TRUE; // consume event + return 0; // consume event break; case WM_INPUTLANGCHANGE: { @@ -2842,6 +2857,56 @@ break; } + case WM_SYSCOMMAND: { +#ifndef Q_OS_TEMP + bool window_state_change = false; + unsigned int oldstate = widget->windowState(); + switch(wParam) { + case SC_CONTEXTHELP: +#ifndef QT_NO_WHATSTHIS + QWhatsThis::enterWhatsThisMode(); +#endif + QT_WA({ + DefWindowProcW( hWnd, WM_NCPAINT, 1, 0 ); + } , { + DefWindowProcA( hWnd, WM_NCPAINT, 1, 0 ); + }); + break; + case SC_MINIMIZE: + window_state_change = true; + widget->setWindowState( oldstate | Qt::WindowMinimized ); + if ( widget->isVisible() ) { + QHideEvent e; + widget->sendSpontaneousEvent( widget, &e ); + widget->hideChildren(true); + } + break; + case SC_MAXIMIZE: + case SC_RESTORE: + window_state_change = true; + if ( widget->isMinimized() ) { + oldstate &= ~Qt::WindowMinimized; + widget->showChildren(true); + widget->setWindowState( oldstate ); + QShowEvent e; + widget->sendSpontaneousEvent( widget, &e ); + } + if (wParam == SC_MAXIMIZE) + widget->setWindowState( oldstate | Qt::WindowMaximized ); + else + widget->setWindowState( oldstate & ~Qt::WindowMaximized ); + break; + default: + break; + } + + if ( window_state_change ) { + QEvent e( QEvent::WindowStateChange ); + widget->sendSpontaneousEvent( widget, &e ); + } +#endif + break; + } case WM_SETTINGCHANGE: if ( !msg.wParam ) { QString area = QT_WA_INLINE(QString::fromUcs2( ( unsigned short * ) msg.lParam ), @@ -2872,17 +2937,16 @@ break; #endif case WM_PAINT: - if ( widget ) - return ( widget->translatePaintEvent( msg ) ); + if ( widget->translatePaintEvent( msg ) ) + return 0; break; case WM_ERASEBKGND: - if ( widget ) - return ( widget->translateEraseEvent( msg ) ); + return ( widget->translateEraseEvent( msg ) ); break; case WM_MOVE: // move window case WM_SIZE: // resize window - if ( widget ) - return ( widget->translateConfigEvent( msg ) ); + if ( widget->translateConfigEvent( msg ) ) + return 0; break; case WM_ACTIVATE: if ( widget ) { @@ -2908,17 +2972,17 @@ clear_key_rec(); // Ensure nothing gets consider an auto-repeat press later } return FALSE; + break; #ifndef Q_OS_TEMP - case WM_MOUSEACTIVATE: - if ( widget ) { - const QWidget * tlw = widget->topLevelWidget(); - // Do not change activation if the clicked widget is inside a floating dock window - if ( tlw->inherits( "QDockWidget" ) && qApp->activeWindow() - && !qApp->activeWindow() ->inherits( "QDockWidget" ) ) - return MA_NOACTIVATE; - } - return FALSE; + case WM_MOUSEACTIVATE: { + const QWidget * tlw = widget->topLevelWidget(); + // Do not change activation if the clicked widget is inside a floating dock window + if ( tlw->inherits( "QDockWidget" ) && qApp->activeWindow() + && !qApp->activeWindow() ->inherits( "QDockWidget" ) ) + return MA_NOACTIVATE; + break; + } #endif case WM_RBUTTONDOWN: @@ -2938,7 +3002,9 @@ widget = ( QETWidget* ) w; } - return ( !widget->translateMouseEvent( msg ) ); // mouse event + if ( widget->translateMouseEvent( msg ) ) + return 0; + break; case WM_MOUSELEAVE: // We receive a mouse leave for curWin, meaning // the mouse was moved outside our widgets @@ -2975,7 +3041,7 @@ } return FALSE; case WM_DESTROY: - if ( widget && widget->testWState( Qt::WState_Reparented ) ) { + if ( widget->testWState( Qt::WState_Reparented ) ) { return false; } if ( widget == qApp->mainWidget() ) { @@ -3092,6 +3158,7 @@ qDebug( "qapplication_win.cpp: processNextEvent: DefWindowProc: %s", getMsgName( uMsg ) ); #endif +do_default: return QT_WA_INLINE ( DefWindowProcW( hWnd, uMsg, wParam, lParam ), DefWindowProcA( hWnd, uMsg, wParam, lParam ) ); } Index: qeventloop_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qeventloop_win.cpp,v retrieving revision 1.1.2.10.2.21 retrieving revision 1.1.2.10.2.22 diff -u -r1.1.2.10.2.21 -r1.1.2.10.2.22 --- qeventloop_win.cpp 17 Jul 2005 14:08:44 -0000 1.1.2.10.2.21 +++ qeventloop_win.cpp 9 Oct 2005 17:07:23 -0000 1.1.2.10.2.22 @@ -55,7 +55,10 @@ QSNDict sn_write; QSNDict sn_except; +struct QWinConfigRequest; extern bool qt_is_gui_used; +extern QList<QWinConfigRequest*> *configRequests = 0; +void qWinProcessConfigRequests(); // from qeventloop_win_utils.cpp FILETIME *qt_wait_timer(); @@ -245,6 +248,8 @@ // handle gui and posted events if ( qt_is_gui_used ) { + if ( configRequests ) // any pending configs? + qWinProcessConfigRequests(); QApplication::sendPostedEvents(); MSG msg; Index: qwidget_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qwidget_win.cpp,v retrieving revision 1.1.2.15.2.59 retrieving revision 1.1.2.15.2.60 diff -u -r1.1.2.15.2.59 -r1.1.2.15.2.60 --- qwidget_win.cpp 4 Oct 2005 19:37:16 -0000 1.1.2.15.2.59 +++ qwidget_win.cpp 9 Oct 2005 17:07:23 -0000 1.1.2.15.2.60 @@ -1384,6 +1384,7 @@ } /* coordinates are excluding the window frame ! */ +void qWinRequestConfig(WId, int, int, int, int, int); void QWidget::internalSetGeometry( int x, int y, int w, int h, bool isMove ) { #ifdef DEBUG_QWIDGET @@ -1436,59 +1437,61 @@ bool isResize = size() != oldSize; - // CCJ - set WState_ConfigPending further up than the X11 code since it needs - // to be set before the WM_WINDOWPOSCHANGED message is sent by SetWindowPos. - if (isResize) + if ( testWState( Qt::WState_ConfigPending ) ) { // processing config event + qWinRequestConfig( winId(), isMove ? 2 : 1, x, y, w, h ); + } else { setWState( WState_ConfigPending ); - - if ( isTopLevel() ) { - - RECT myrect; //to create a client area of the right size instead of a win - - int capWidth, xBdrWidth, yBdrWidth; - getWndBorderInfo( winId(), capWidth, xBdrWidth, yBdrWidth ); - QRect frameRect = frameGeometry(); - myrect.left = crect.left() - xBdrWidth; - myrect.top = crect.top() - capWidth; - myrect.right = crect.right() + xBdrWidth + 1; - myrect.bottom = crect.bottom() + yBdrWidth + 1; - -#ifdef DEBUG_QWIDGET - - qDebug( "qwidget_win.cpp: fstrut: %d isMove %d", fstrut_dirty, isMove ); - qDebug( "qwidget_win.cpp: Window Border Info: caption Width: %d, X border Width: %d, Y Border Width: %d", capWidth, xBdrWidth, yBdrWidth ); - qDebug( "qwidget_win.cpp: myrect: l: %ld, t: %ld, r: %ld, b: %ld", myrect.left, myrect.top, myrect.right, myrect.bottom ); -#endif - - if ( isMove ) - SetWindowPos( winid, 0, - myrect.left, // x, - myrect.top, // y, - myrect.right - myrect.left, // w, - myrect.bottom - myrect.top, // h, - SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSENDCHANGING ); - else - SetWindowPos( winid, 0, - 0, 0, - myrect.right - myrect.left, // w, - myrect.bottom - myrect.top, // h, - SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSENDCHANGING ); - -#ifdef DEBUG_QWIDGET - - GetWindowRect( winId(), &myrect ); - qDebug( "qwidget_win.cpp: myrect after Update: l: %ld, t: %ld, r: %ld, b: %ld", myrect.left, myrect.top, myrect.right, myrect.bottom ); -#endif - } else { // not toplevel window -#ifdef DEBUG_QWIDGET - qDebug( "qwidget_win.cpp: internalSetGeometry Non-Top-Level Window" ); -#endif - - if ( isMove ) { - SetWindowPos( winid, 0, x, y, w, h, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSENDCHANGING ); - } else if ( isResize ) { - SetWindowPos( winid, 0, 0, 0, w, h, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSENDCHANGING ); + if ( isTopLevel() ) { + + RECT myrect; //to create a client area of the right size instead of a win + + int capWidth, xBdrWidth, yBdrWidth; + getWndBorderInfo( winId(), capWidth, xBdrWidth, yBdrWidth ); + QRect frameRect = frameGeometry(); + myrect.left = crect.left() - xBdrWidth; + myrect.top = crect.top() - capWidth; + myrect.right = crect.right() + xBdrWidth + 1; + myrect.bottom = crect.bottom() + yBdrWidth + 1; + + #ifdef DEBUG_QWIDGET + + qDebug( "qwidget_win.cpp: fstrut: %d isMove %d", fstrut_dirty, isMove ); + qDebug( "qwidget_win.cpp: Window Border Info: caption Width: %d, X border Width: %d, Y Border Width: %d", capWidth, xBdrWidth, yBdrWidth ); + qDebug( "qwidget_win.cpp: myrect: l: %ld, t: %ld, r: %ld, b: %ld", myrect.left, myrect.top, myrect.right, myrect.bottom ); + #endif + + if ( isMove ) + SetWindowPos( winid, 0, + myrect.left, // x, + myrect.top, // y, + myrect.right - myrect.left, // w, + myrect.bottom - myrect.top, // h, + SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSENDCHANGING ); + else + SetWindowPos( winid, 0, + 0, 0, + myrect.right - myrect.left, // w, + myrect.bottom - myrect.top, // h, + SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSENDCHANGING ); + +#ifdef DEBUG_QWIDGET + + GetWindowRect( winId(), &myrect ); + qDebug( "qwidget_win.cpp: myrect after Update: l: %ld, t: %ld, r: %ld, b: %ld", myrect.left, myrect.top, myrect.right, myrect.bottom ); +#endif + } else { // not toplevel window +#ifdef DEBUG_QWIDGET + qDebug( "qwidget_win.cpp: internalSetGeometry Non-Top-Level Window" ); +#endif + + if ( isMove ) { + InvalidateRect( winid, 0, false ); + SetWindowPos( winid, 0, x, y, w, h, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSENDCHANGING ); + } else if ( isResize ) { + SetWindowPos( winid, 0, 0, 0, w, h, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSENDCHANGING ); + } } + clearWState( WState_ConfigPending ); } if ( isVisible() ) { @@ -1513,7 +1516,6 @@ QApplication::postEvent( this, new QResizeEvent( size(), oldSize ) ); } - clearWState( WState_ConfigPending ); } /*! @@ -2102,104 +2104,94 @@ */ void QWidget::setWindowState( unsigned int newstate ) { - bool needShow = FALSE; - + QWidget *d = this; unsigned int oldstate = windowState(); - if ( isTopLevel() ) { - QTLWExtra * top = topData(); + if (oldstate == newstate) + return; - if ( ( oldstate & WindowMaximized ) != ( newstate & WindowMaximized ) ) { - if ( ! ( newstate & WindowFullScreen ) ) { - if ( newstate & WindowMaximized ) { - // save original geometry - const QRect normalGeometry = geometry(); - - if ( isVisible() ) { - updateFrameStrut(); - const QRect maxRect = QApplication::desktop() ->availableGeometry( this ); - const QRect r = top->normalGeometry; - setGeometry( maxRect.x() + top->fleft, - maxRect.y() + top->ftop, - maxRect.width() - top->fleft - top->fright, - maxRect.height() - top->ftop - top->fbottom ); - top->normalGeometry = r; + int max = SW_MAXIMIZE; + int min = SW_MINIMIZE; + int normal = SW_SHOWNOACTIVATE; + if (newstate & Qt::WindowActive) { + max = SW_SHOWMAXIMIZED; + min = SW_SHOWMINIMIZED; + normal = SW_SHOWNORMAL; + } + + if (isTopLevel()) { + + // Ensure the initial size is valid, since we store it as normalGeometry below. + if (!isVisible()) + adjustSize(); + + if ((oldstate & Qt::WindowMaximized) != (newstate & Qt::WindowMaximized)) { + if (newstate & Qt::WindowMaximized && !(oldstate & Qt::WindowFullScreen)) + d->topData()->normalGeometry = geometry(); + if (isVisible() && !(newstate & Qt::WindowMinimized)) { + ShowWindow(winId(), (newstate & Qt::WindowMaximized) ? max : normal); + if (!(newstate & Qt::WindowFullScreen)) { + QRect r = d->topData()->normalGeometry; + if (!(newstate & Qt::WindowMaximized) && r.width() >= 0) { + if (pos() != r.topLeft() || size() !=r.size()) { + d->topData()->normalGeometry = QRect(0,0,-1,-1); + setGeometry(r); + } } - - if ( top->normalGeometry.width() < 0 ) - top->normalGeometry = normalGeometry; } else { - // restore original geometry - setGeometry( top->normalGeometry ); + d->updateFrameStrut(); } } } - if ( ( oldstate & WindowFullScreen ) != ( newstate & WindowFullScreen ) ) { - needShow = isVisible(); - - if ( newstate & WindowFullScreen ) { - const QRect normalGeometry = QRect( pos(), size() ); + if ((oldstate & Qt::WindowFullScreen) != (newstate & Qt::WindowFullScreen)) { + if (newstate & Qt::WindowFullScreen) { + if (d->topData()->normalGeometry.width() < 0 && !(oldstate & Qt::WindowMaximized)) + d->topData()->normalGeometry = geometry(); + d->topData()->savedFlags = GetWindowLongA(winId(), GWL_STYLE); + UINT style = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_POPUP; + if (isVisible()) + style |= WS_VISIBLE; + SetWindowLongA(winId(), GWL_STYLE, style); + QRect r = qApp->desktop()->screenGeometry(this); + UINT swpf = SWP_FRAMECHANGED; + if (newstate & Qt::WindowActive) + swpf |= SWP_NOACTIVATE; - top->savedFlags = getWFlags(); - reparent( 0, WType_TopLevel | WStyle_Customize | WStyle_NoBorder | - // preserve some widget flags - ( getWFlags() & 0xffff0000 ), - mapToGlobal( QPoint( 0, 0 ) ) ); - const QRect r = top->normalGeometry; - setGeometry( qApp->desktop() ->screenGeometry( this ) ); - top->normalGeometry = r; - - if ( top->normalGeometry.width() < 0 ) - top->normalGeometry = normalGeometry; + SetWindowPos(winId(), HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf); + d->updateFrameStrut(); } else { - reparent( 0, top->savedFlags, mapToGlobal( QPoint( 0, 0 ) ) ); - - if ( newstate & WindowMaximized ) { - // from fullscreen to maximized - updateFrameStrut(); - const QRect maxRect = QApplication::desktop() ->availableGeometry( this ); - const QRect r = top->normalGeometry; - setGeometry( maxRect.x() + top->fleft, - maxRect.y() + top->ftop, - maxRect.width() - top->fleft - top->fright, - maxRect.height() - top->ftop - top->fbottom ); - top->normalGeometry = r; - } else { - // restore original geometry - setGeometry( top->normalGeometry ); + UINT style = d->topData()->savedFlags; + if (isVisible()) + style |= WS_VISIBLE; + SetWindowLongA(winId(), GWL_STYLE, style); + + UINT swpf = SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE; + if (newstate & Qt::WindowActive) + swpf |= SWP_NOACTIVATE; + SetWindowPos(winId(), 0, 0, 0, 0, 0, swpf); + d->updateFrameStrut(); + + // preserve maximized state + if (isVisible()) + ShowWindow(winId(), (newstate & Qt::WindowMaximized) ? max : normal); + + if (!(newstate & Qt::WindowMaximized)) { + QRect r = d->topData()->normalGeometry; + d->topData()->normalGeometry = QRect(0,0,-1,-1); + if (r.isValid()) + setGeometry(r); } } } - if ( ( oldstate & WindowMinimized ) != ( newstate & WindowMinimized ) ) { - if ( isVisible() ) { - int nCmdShow; - /* Window should get minimized */ - if ( newstate & WindowMinimized ) { - /* Don't forget WindowActive ! */ - if ( newstate & WindowActive ) - nCmdShow = SW_SHOWMINIMIZED; - else - nCmdShow = SW_MINIMIZE ; - /* Window was minimized and should get maximized */ - } else if ( newstate & WindowMaximized ) { - if ( newstate & WindowActive ) - nCmdShow = SW_SHOWMAXIMIZED ; - else - nCmdShow = SW_MAXIMIZE; - /* Window was minimzed and should now be shown */ - } else { - if ( newstate & WindowActive ) - nCmdShow = SW_SHOWNORMAL ; - else - nCmdShow = SW_SHOWNOACTIVATE ; - } - ShowWindow( winId(), nCmdShow ); - } - needShow = false; + if ((oldstate & Qt::WindowMinimized) != (newstate & Qt::WindowMinimized)) { + if (isVisible()) + ShowWindow(winId(), (newstate & Qt::WindowMinimized) ? min : + (newstate & Qt::WindowMaximized) ? max : normal); } } + widget_state &= ~( WState_Minimized | WState_Maximized | WState_FullScreen ); if ( newstate & WindowMinimized ) widget_state |= WState_Minimized; @@ -2208,12 +2200,6 @@ if ( newstate & WindowFullScreen ) widget_state |= WState_FullScreen; - if ( needShow ) - show(); - - if ( newstate & WindowActive ) - setActiveWindow(); - QEvent e( QEvent::WindowStateChange ); QApplication::sendEvent( this, &e ); } |
From: Christian E. <che...@us...> - 2005-10-05 18:47:43
|
Update of /cvsroot/kde-cygwin/qt-3/tools/qtconfig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11025/tools/qtconfig Modified Files: Tag: QT_WIN32_3_3_BRANCH qtconfig.pro Log Message: Index: qtconfig.pro =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/tools/qtconfig/qtconfig.pro,v retrieving revision 1.1.1.10 retrieving revision 1.1.1.11 diff -u -r1.1.1.10 -r1.1.1.11 --- qtconfig.pro 30 Sep 2005 16:58:32 -0000 1.1.1.10 +++ qtconfig.pro 5 Oct 2005 18:47:33 -0000 1.1.1.11 @@ -15,5 +15,5 @@ INSTALLS += target INCLUDEPATH += . DBFILE = qtconfig.db -REQUIRES=full-config nocrosscompiler !win32* +REQUIRES=full-config nocrosscompiler win32:RC_FILE = qtconfig.rc |
From: Christian E. <che...@us...> - 2005-10-04 19:37:27
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12473/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qapplication_win.cpp qwidget_win.cpp Log Message: add message-handling for WM_NCLBUTTONDBLCLK Index: qapplication_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qapplication_win.cpp,v retrieving revision 1.1.2.30.2.91 retrieving revision 1.1.2.30.2.92 diff -u -r1.1.2.30.2.91 -r1.1.2.30.2.92 --- qapplication_win.cpp 7 Aug 2005 16:11:39 -0000 1.1.2.30.2.91 +++ qapplication_win.cpp 4 Oct 2005 19:37:16 -0000 1.1.2.30.2.92 @@ -262,6 +262,10 @@ bool sendKeyEvent(MSG& msg, QEvent::Type type, int code, int ascii, int state, bool grab, const QString& text, bool autor=false); + bool sendSpontaneousEvent( QObject *receiver, QEvent *event ) + { + return QApplication::sendSpontaneousEvent( receiver, event ); + } }; @@ -1858,14 +1862,13 @@ != popup ) popup->close(); QWheelEvent e( w->mapFromGlobal( globalPos ), globalPos, delta, state, orient ); - if ( QApplication::sendSpontaneousEvent( w, &e ) - ) + if ( QApplication::sendSpontaneousEvent( w, &e ) ) return true; } // send the event to the widget that has the focus or its ancestors, if different - if ( w != qApp->focusWidget() - && ( w = qApp->focusWidget() ) ) { + if ( ( w != qApp->focusWidget() ) && + ( w = qApp->focusWidget() ) ) { QWidget * popup = qApp->activePopupWidget(); if ( popup && w->topLevelWidget() != popup ) popup->close(); @@ -2848,6 +2851,26 @@ } break; +#ifndef Q_OS_TEMP + case WM_NCLBUTTONDBLCLK: + if ( wParam == HTCAPTION ) { + bool window_state_changed = false; + unsigned int oldstate = widget->windowState(); + if ( widget->isMaximized() ) { + window_state_changed = true; + widget->setWindowState( widget->windowState() & ~Qt::WindowMaximized ); + } else if ( widget->isMaximized() ){ + window_state_changed = true; + widget->setWindowState( widget->windowState() | Qt::WindowMaximized ); + } + + if ( window_state_changed ) { + QEvent e( QEvent::WindowStateChange ); + widget->sendSpontaneousEvent( widget, &e ); + } + } + break; +#endif case WM_PAINT: if ( widget ) return ( widget->translatePaintEvent( msg ) ); Index: qwidget_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qwidget_win.cpp,v retrieving revision 1.1.2.15.2.58 retrieving revision 1.1.2.15.2.59 diff -u -r1.1.2.15.2.58 -r1.1.2.15.2.59 --- qwidget_win.cpp 7 Aug 2005 16:11:42 -0000 1.1.2.15.2.58 +++ qwidget_win.cpp 4 Oct 2005 19:37:16 -0000 1.1.2.15.2.59 @@ -1248,7 +1248,7 @@ void QWidget::showWindow() { #ifdef DEBUG_QWIDGET - qDebug( "qwidget_win.cpp: showWindow, class %s", className() ); + qDebug( "QWidget::showWindow() for class %s", className() ); #endif if ( isDesktop() ) //desktop is always visible @@ -2103,7 +2103,8 @@ void QWidget::setWindowState( unsigned int newstate ) { bool needShow = FALSE; - uint oldstate = windowState(); + + unsigned int oldstate = windowState(); if ( isTopLevel() ) { QTLWExtra * top = topData(); |
From: Christian E. <che...@us...> - 2005-10-02 17:11:53
|
Update of /cvsroot/kde-cygwin/qt-3/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6831/tools Modified Files: Tag: QT_WIN32_3_3_BRANCH tools.pro Log Message: reapply patches which were lost during my not so good update to 3.3.5 Index: tools.pro =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/tools/tools.pro,v retrieving revision 1.1.1.9 retrieving revision 1.1.1.10 diff -u -r1.1.1.9 -r1.1.1.10 --- tools.pro 22 Sep 2005 12:57:34 -0000 1.1.1.9 +++ tools.pro 30 Sep 2005 16:58:51 -0000 1.1.1.10 @@ -7,6 +7,7 @@ assistant \ linguist unix:SUBDIRS += qtconfig + win32:SUBDIRS += qtconfig } CONFIG+=ordered |
From: Christian E. <che...@us...> - 2005-10-01 06:19:38
|
Update of /cvsroot/kde-cygwin/qt-3/src/styles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6831/src/styles Modified Files: Tag: QT_WIN32_3_3_BRANCH qwindowsstyle.cpp Log Message: reapply patches which were lost during my not so good update to 3.3.5 Index: qwindowsstyle.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/styles/qwindowsstyle.cpp,v retrieving revision 1.1.1.16 retrieving revision 1.1.1.17 diff -u -r1.1.1.16 -r1.1.1.17 --- qwindowsstyle.cpp 22 Sep 2005 12:55:46 -0000 1.1.1.16 +++ qwindowsstyle.cpp 30 Sep 2005 16:58:32 -0000 1.1.1.17 @@ -274,6 +274,12 @@ const QStyleOption& opt ) const { QRect rr( r ); + +#ifdef QWINDOWSSTYLE_DEBUG + qDebug ("QWindowsStyle::drawPrimitive"); + qDebug ("pe = %d PE_Indicator = %d", pe, PE_Indicator); +#endif + switch (pe) { case PE_ButtonCommand: { |
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 |