diff --git a/harbour/ChangeLog b/harbour/ChangeLog
index 3e3290efd3..0b113e5663 100644
--- a/harbour/ChangeLog
+++ b/harbour/ChangeLog
@@ -16,6 +16,33 @@
The license applies to all entries newer than 2009-04-28.
*/
+2011-12-18 12:48 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
+ * contrib/hbqt/qtgui/qth/QPrinter.qth
+ * contrib/hbqt/qtgui/qth/QPrintPreviewDialog.qth
+ * Fixed: constructors.
+ * contrib/hbqt/qtcore/qth/QLibraryInfo.qth
+ * contrib/hbqt/qtgui/qth/QFileSystemModel.qth
+ * contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth
+ * contrib/hbqt/qtgui/qth/QGraphicsLayout.qth
+ * contrib/hbqt/qtgui/qth/QLineEdit.qth
+ * contrib/hbqt/qtgui/qth/QPlainTextEdit.qth
+ * contrib/hbqt/qtgui/qth/QWizard.qth
+ * contrib/hbqt/qtwebkit/qth/QWebFrame.qth
+ * contrib/hbqt/qtwebkit/qth/QWebPage.qth
+ + Added: methods introduced in later versions of Qt than 4.5.3.
+ Please speak-out if some are missing.
+
+ * contrib/hbqt/hbmk2_qt.hbs
+ + Implemented: Qt version dependant class and methods compilations.
+ Current implementation does not generate any error for methods
+ which are called in application but are not present in used
+ Qt version. It can be changed to throw run-time error.
+ Classes are only compiled when version of Qt is what is intended.
+
+ NOTE: this implemenattion opens the door to include any new classes
+ and methods to existing classes no matter which version is
+ current on the users system.
+
2011-12-15 16:38 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/gtwvg/wvgtoolb.prg
* contrib/gtwvg/wvgwing.c
diff --git a/harbour/contrib/hbqt/hbmk2_qt.hbs b/harbour/contrib/hbqt/hbmk2_qt.hbs
index 377462b026..bc9d5f7054 100644
--- a/harbour/contrib/hbqt/hbmk2_qt.hbs
+++ b/harbour/contrib/hbqt/hbmk2_qt.hbs
@@ -1134,6 +1134,13 @@ METHOD HbQtSource:new( cQtModule, cQtVer, cQTHFileName, cCPPFileName, cDOCFileNa
NEXT
ENDIF
+ /* Reassign class level version information */
+ IF ( n := AScan( ::cls_, {|e_| upper( e_[ 1 ] ) == "VERSION" } ) ) > 0
+ IF ! Empty( ::cls_[ n, 2 ] )
+ ::cQtVer := ::cls_[ n, 2 ]
+ ENDIF
+ ENDIF
+
/* Pull out SUBCLASS section */
::subCls_ := hbqtgen_PullOutSection( @cQth, "SUBCLASS" )
@@ -1855,6 +1862,9 @@ METHOD HbQtSource:getMethodBody( oMtd, cMtdName, aMethods )
AAdd( txt_, "HB_FUNC_STATIC( " + Upper( oMtd:cHBFunc ) + " )" )
AAdd( txt_, "{" )
+ IF ! empty( oMtd:cVersion )
+ AAdd( txt_, " #if QT_VERSION >= " + oMtd:cVersion )
+ ENDIF
#ifdef _GEN_TRACE_
AAdd( txt_, ' HB_TRACE( ' + ::cTrMode + ', ( "' + ::cQtObject + ":" + oMtd:cHBFunc + '" ) );' )
//AAdd( txt_, ' HB_TRACE( HB_TR_DEBUG, ( "' + ::cQtObject + ":" + oMtd:cHBFunc + '" ) );' )
@@ -2011,6 +2021,9 @@ METHOD HbQtSource:getMethodBody( oMtd, cMtdName, aMethods )
ENDIF
AAdd( txt_, " }" ) // if( p )
+ IF ! empty( oMtd:cVersion )
+ AAdd( txt_, " #endif" )
+ ENDIF
AAdd( txt_, "}" ) // HB_FUNC()
AAdd( txt_, "" )
@@ -2224,6 +2237,9 @@ METHOD HbQtSource:parseProto( cProto, fBody_ )
CASE "A"
oMtd:nAttach := val( cVal )
EXIT
+ CASE "V"
+ oMtd:cVersion := cVal
+ EXIT
CASE "xxx"
EXIT
ENDSWITCH
@@ -2720,6 +2736,7 @@ CREATE CLASS HbqtMethod
VAR nDetach INIT 0
VAR nAttach INIT 0
+ VAR cVersion INIT ""
VAR cFun INIT ""
VAR cRet INIT ""
diff --git a/harbour/contrib/hbqt/qtcore/qth/QLibraryInfo.qth b/harbour/contrib/hbqt/qtcore/qth/QLibraryInfo.qth
index 8e9ccfdcd9..a9eb0162fb 100644
--- a/harbour/contrib/hbqt/qtcore/qth/QLibraryInfo.qth
+++ b/harbour/contrib/hbqt/qtcore/qth/QLibraryInfo.qth
@@ -45,6 +45,11 @@ enum LibraryLocation { PrefixPath, DocumentationPath, HeadersPath, LibrariesPath
+QDate buildDate (){
+ #if QT_VERSION >= 0x040600
+ hbqt_create_objectGC( hbqt_gcAllocate_QDate( new QDate( QLibraryInfo::buildDate() ), true ) , "HB_QDATE" );
+ #endif
+}
QString buildKey (){
hb_retstr_utf8( QLibraryInfo::buildKey().toUtf8().data() );
}
diff --git a/harbour/contrib/hbqt/qtgui/qth/QFileSystemModel.qth b/harbour/contrib/hbqt/qtgui/qth/QFileSystemModel.qth
index 2d506d19af..5eed18b23d 100644
--- a/harbour/contrib/hbqt/qtgui/qth/QFileSystemModel.qth
+++ b/harbour/contrib/hbqt/qtgui/qth/QFileSystemModel.qth
@@ -82,6 +82,8 @@ QString type ( const QModelIndex & index ) const
void fileRenamed ( const QString & path, const QString & oldName, const QString & newName )
void rootPathChanged ( const QString & newPath )
+
+void directoryLoaded ( const QString & path ) [*V=0x040700*]
diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth
index 11b0b8820b..10f640b71d 100644
--- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth
+++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth
@@ -16,6 +16,7 @@ QObject = no
Inherit = QGraphicsLayout
Type =
New =
+Version =
@@ -85,6 +86,8 @@ void setRowStretchFactor ( int row, int stretch )
void setSpacing ( qreal spacing )
void setVerticalSpacing ( qreal spacing )
qreal verticalSpacing () const
+
+void removeItem ( QGraphicsLayoutItem * item ) [*V=0x040800*]
diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLayout.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLayout.qth
index 889600ba63..4b3eba54df 100644
--- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLayout.qth
+++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLayout.qth
@@ -45,6 +45,9 @@ virtual QGraphicsLayoutItem * itemAt ( int i ) const = 0
virtual void removeAt ( int index ) = 0
void setContentsMargins ( qreal left, qreal top, qreal right, qreal bottom )
virtual void widgetEvent ( QEvent * e )
+
+bool instantInvalidatePropagation () [*V=0x040800*]
+void setInstantInvalidatePropagation ( bool enable ) [*V=0x040800*]
diff --git a/harbour/contrib/hbqt/qtgui/qth/QLineEdit.qth b/harbour/contrib/hbqt/qtgui/qth/QLineEdit.qth
index 9b5416ec46..f862708da8 100644
--- a/harbour/contrib/hbqt/qtgui/qth/QLineEdit.qth
+++ b/harbour/contrib/hbqt/qtgui/qth/QLineEdit.qth
@@ -84,6 +84,8 @@ void setValidator ( const QValidator * v )
virtual QSize sizeHint () const
QString text () const
virtual const QValidator * validator () const
+
+void setPlaceholderText ( const QString & ) [*V=0x040700*]
diff --git a/harbour/contrib/hbqt/qtgui/qth/QPlainTextEdit.qth b/harbour/contrib/hbqt/qtgui/qth/QPlainTextEdit.qth
index 02557dabd5..1f26ce7ba1 100644
--- a/harbour/contrib/hbqt/qtgui/qth/QPlainTextEdit.qth
+++ b/harbour/contrib/hbqt/qtgui/qth/QPlainTextEdit.qth
@@ -103,6 +103,8 @@ QTextCursor textCursor () const
Qt::TextInteractionFlags textInteractionFlags () const
QString toPlainText () const
QTextOption::WrapMode wordWrapMode () const
+
+QString anchorAt ( const QPoint & pos ) const [*V=0x040700*]
diff --git a/harbour/contrib/hbqt/qtgui/qth/QPrintPreviewDialog.qth b/harbour/contrib/hbqt/qtgui/qth/QPrintPreviewDialog.qth
index ac132ba2a1..e8fc9a679a 100644
--- a/harbour/contrib/hbqt/qtgui/qth/QPrintPreviewDialog.qth
+++ b/harbour/contrib/hbqt/qtgui/qth/QPrintPreviewDialog.qth
@@ -27,10 +27,18 @@ New = pParent, nFlags
*/
HB_FUNC( QT_QPRINTPREVIEWDIALOG )
{
- if( hb_pcount() >= 2 && HB_ISOBJECT( 2 ) )
+ if( hb_pcount() >= 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) && hbqt_isObjectType( 1, HBQT_TYPE_QPrinter ) )
+ {
__HB_RETPTRGC__( new QPrintPreviewDialog( hbqt_par_QPrinter( 1 ), hbqt_par_QWidget( 2 ), ( Qt::WindowFlags ) hb_parni( 3 ) ) );
- else
+ }
+ else if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) )
+ {
__HB_RETPTRGC__( new QPrintPreviewDialog( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
+ }
+ else
+ {
+ __HB_RETPTRGC__( new QPrintPreviewDialog() );
+ }
}
diff --git a/harbour/contrib/hbqt/qtgui/qth/QPrinter.qth b/harbour/contrib/hbqt/qtgui/qth/QPrinter.qth
index 0822c85563..0540b06c7d 100644
--- a/harbour/contrib/hbqt/qtgui/qth/QPrinter.qth
+++ b/harbour/contrib/hbqt/qtgui/qth/QPrinter.qth
@@ -33,6 +33,10 @@ HB_FUNC( QT_QPRINTER )
{
__HB_RETPTRGC__( new QPrinter( *hbqt_par_QPrinterInfo( 1 ), ( QPrinter::PrinterMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QPrinter::ScreenResolution ) ) );
}
+ else if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
+ {
+ __HB_RETPTRGC__( new QPrinter( ( QPrinter::PrinterMode ) hb_parni( 2 ) ) );
+ }
else
{
__HB_RETPTRGC__( new QPrinter() );
diff --git a/harbour/contrib/hbqt/qtgui/qth/QWizard.qth b/harbour/contrib/hbqt/qtgui/qth/QWizard.qth
index 2d08d76641..9fdff9b750 100644
--- a/harbour/contrib/hbqt/qtgui/qth/QWizard.qth
+++ b/harbour/contrib/hbqt/qtgui/qth/QWizard.qth
@@ -73,6 +73,9 @@ Qt::TextFormat titleFormat () const
virtual bool validateCurrentPage ()
QList visitedPages () const
WizardStyle wizardStyle () const
+
+void setSideWidget ( QWidget * widget ) [*V=0x040700*]
+QWidget * sideWidget () const [*V=0x040700*]
@@ -85,4 +88,7 @@ void restart ()
void currentIdChanged ( int id )
void customButtonClicked ( int which )
void helpRequested ()
+
+void pageAdded ( int id ) [*V=0x040700*]
+void pageRemoved ( int id ) [*V=0x040700*]
diff --git a/harbour/contrib/hbqt/qtwebkit/qth/QWebFrame.qth b/harbour/contrib/hbqt/qtwebkit/qth/QWebFrame.qth
index c4db45a2e2..19f72b7103 100644
--- a/harbour/contrib/hbqt/qtwebkit/qth/QWebFrame.qth
+++ b/harbour/contrib/hbqt/qtwebkit/qth/QWebFrame.qth
@@ -77,6 +77,8 @@ QString toHtml () const
QString toPlainText () const
QUrl url () const
qreal zoomFactor () const
+
+void scrollToAnchor ( const QString & anchor ) [*V=0x040700*]
diff --git a/harbour/contrib/hbqt/qtwebkit/qth/QWebPage.qth b/harbour/contrib/hbqt/qtwebkit/qth/QWebPage.qth
index a7267dd499..6bfa28df5f 100644
--- a/harbour/contrib/hbqt/qtwebkit/qth/QWebPage.qth
+++ b/harbour/contrib/hbqt/qtwebkit/qth/QWebPage.qth
@@ -106,4 +106,6 @@ void statusBarVisibilityChangeRequested ( bool visible )
void toolBarVisibilityChangeRequested ( bool visible )
void unsupportedContent ( QNetworkReply * reply )
void windowCloseRequested ()
+
+void viewportChangeRequested () [*V=0x040800*]