From e30041996ef2a2e43ffd692af73dcd06f178d09d Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sun, 10 Oct 2010 21:34:18 +0000 Subject: [PATCH] 2010-10-10 14:23 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbxbp/xbpfiledialog.prg ! Fixed: a regression bug surfaced after recent changes. QDialog() was not setting the focus to original widger at "close". * contrib/hbqt/qtcore/hbqt_hbqslots.cpp Fixed: "windowStateChanged(Qt::WindowStates,Qt::WindowStates)" signal parameters. * contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp * contrib/hbqt/qtgui/hbqt_hbqtableview.cpp * contrib/hbqt/qtgui/hbqt_hbqtableview.h ! Minor. * contrib/hbqt/utils/qtgui.qtp + Added: new class QSortFilterProxyModel.qth --- harbour/ChangeLog | 16 ++++++++++++++++ harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp | 2 +- .../contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp | 2 +- harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.cpp | 4 +--- harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.h | 5 ++--- harbour/contrib/hbqt/utils/qtgui.qtp | 1 + harbour/contrib/hbxbp/xbpfiledialog.prg | 9 +++++++-- 7 files changed, 29 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7627aa217b..c59cb3c4cc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,22 @@ The license applies to all entries newer than 2009-04-28. */ +2010-10-10 14:23 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbxbp/xbpfiledialog.prg + ! Fixed: a regression bug surfaced after recent changes. + QDialog() was not setting the focus to original widger at "close". + + * contrib/hbqt/qtcore/hbqt_hbqslots.cpp + Fixed: "windowStateChanged(Qt::WindowStates,Qt::WindowStates)" signal parameters. + + * contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp + * contrib/hbqt/qtgui/hbqt_hbqtableview.cpp + * contrib/hbqt/qtgui/hbqt_hbqtableview.h + ! Minor. + + * contrib/hbqt/utils/qtgui.qtp + + Added: new class QSortFilterProxyModel.qth + 2010-10-10 13:55 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qscintilla/qth/*.qth * contrib/hbqt/qtcore/qth/*.qth diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp index 62484e02ca..a24ac69857 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp @@ -240,7 +240,7 @@ static bool connect_signal( QString signal, QObject * object, HBQSlots * t_slots if( signal == ( QString ) "subWindowActivated(QMdiSubWindow)" ) return object->connect( object, SIGNAL( subWindowActivated( QMdiSubWindow * ) ), t_slots, SLOT( subWindowActivated( QMdiSubWindow * ) ), Qt::AutoConnection ); /* QMdiSubWindow */ if( signal == ( QString ) "aboutToActivate()" ) return object->connect( object, SIGNAL( aboutToActivate() ), t_slots, SLOT( aboutToActivate() ), Qt::AutoConnection ); - if( signal == ( QString ) "windowStateChanged(Qt::WindowStates,Qt::WindowStates)" ) return object->connect( object, SIGNAL( windowStateChanged( Qt::WindowStates, Qt::WindowStates ) ), t_slots, SLOT( windowStateChanged( int, int ) ), Qt::AutoConnection ); + if( signal == ( QString ) "windowStateChanged(Qt::WindowStates,Qt::WindowStates)" ) return object->connect( object, SIGNAL( windowStateChanged( Qt::WindowStates, Qt::WindowStates ) ), t_slots, SLOT( windowStateChanged( Qt::WindowStates, Qt::WindowStates ) ), Qt::AutoConnection ); /* QAbstractItemDelegate */ if( signal == ( QString ) "closeEditor(QWidget,int)" ) return object->connect( object, SIGNAL( closeEditor( QWidget *, QAbstractItemDelegate::EndEditHint ) ), t_slots, SLOT( closeEditor( QWidget *, QAbstractItemDelegate::EndEditHint ) ), Qt::AutoConnection ); if( signal == ( QString ) "commitData(QWidget)" ) return object->connect( object, SIGNAL( commitData( QWidget * ) ), t_slots, SLOT( commitData( QWidget * ) ), Qt::AutoConnection ); diff --git a/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp b/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp index 3ea16a56e3..f80c279bfb 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp +++ b/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp @@ -6,7 +6,7 @@ * Harbour Project source code: * QT wrapper main header * - * Copyright 2009-2010 Pritpal Bedi + * Copyright 2010 Pritpal Bedi * www - http://harbour-project.org * * This program is free software; you can redistribute it and/or modify diff --git a/harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.cpp b/harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.cpp index a82e78eec2..3b26a3322d 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.cpp +++ b/harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.cpp @@ -6,9 +6,7 @@ * Harbour Project source code: * QT wrapper main header * - * Copyright 2009 Marcos Antonio Gambeta - * - * Copyright 2009 Pritpal Bedi + * Copyright 2009-2010 Pritpal Bedi * www - http://harbour-project.org * * This program is free software; you can redistribute it and/or modify diff --git a/harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.h b/harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.h index c45e2bb228..2dee8a8c2f 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.h +++ b/harbour/contrib/hbqt/qtgui/hbqt_hbqtableview.h @@ -6,9 +6,7 @@ * Harbour Project source code: * QT wrapper main header * - * Copyright 2009 Marcos Antonio Gambeta - * - * Copyright 2009 Pritpal Bedi + * Copyright 2009-2010 Pritpal Bedi * www - http://harbour-project.org * * This program is free software; you can redistribute it and/or modify @@ -68,6 +66,7 @@ public: HBQTableView( QWidget * parent = 0 ); virtual ~HBQTableView(); +public slots: void keyPressEvent( QKeyEvent * event ); void mouseDoubleClickEvent( QMouseEvent * event ); void mouseMoveEvent( QMouseEvent * event ); diff --git a/harbour/contrib/hbqt/utils/qtgui.qtp b/harbour/contrib/hbqt/utils/qtgui.qtp index 330a62bca4..483ff50b38 100644 --- a/harbour/contrib/hbqt/utils/qtgui.qtp +++ b/harbour/contrib/hbqt/utils/qtgui.qtp @@ -178,6 +178,7 @@ QShowEvent.qth QSizeGrip.qth QSizePolicy.qth QSlider.qth +QSortFilterProxyModel.qth QSound.qth QSpacerItem.qth QSpinBox.qth diff --git a/harbour/contrib/hbxbp/xbpfiledialog.prg b/harbour/contrib/hbxbp/xbpfiledialog.prg index 6de7076e66..3159600cbe 100644 --- a/harbour/contrib/hbxbp/xbpfiledialog.prg +++ b/harbour/contrib/hbxbp/xbpfiledialog.prg @@ -167,7 +167,7 @@ STATIC FUNCTION Xbp_ArrayToFileFilter( aFilter ) METHOD XbpFileDialog:open( cDefaultFile, lCenter, lAllowMultiple, lCreateNewFiles ) LOCAL cFiles := NIL - LOCAL i, oList, nResult, cPath, cFile, cExt + LOCAL i, oList, nResult, cPath, cFile, cExt, qFocus HB_SYMBOL_UNUSED( lCreateNewFiles ) @@ -219,14 +219,16 @@ METHOD XbpFileDialog:open( cDefaultFile, lCenter, lAllowMultiple, lCreateNewFile ::setPos() ENDIF + qFocus := QApplication():focusWidget() nResult := ::oWidget:exec() + qFocus:setFocus( 0 ) RETURN IF( nResult == QDialog_Accepted, ::extractFileNames( lAllowMultiple ), NIL ) /*----------------------------------------------------------------------*/ METHOD XbpFileDialog:saveAs( cDefaultFile, lFileList, lCenter ) - LOCAL nResult, i, oList + LOCAL nResult, i, oList, qFocus DEFAULT lFileList TO .T. @@ -265,7 +267,10 @@ METHOD XbpFileDialog:saveAs( cDefaultFile, lFileList, lCenter ) IF !( lCenter ) ::setPos() ENDIF + + qFocus := QApplication():focusWidget() nResult := ::oWidget:exec() + qFocus:setFocus( 0 ) RETURN IF( nResult == QDialog_Accepted, ::extractFileNames(), NIL )