2010-07-05 13:41 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/doc/en/class_qmimedata.txt
  * contrib/hbqt/qtcore/QMimeData.cpp
  * contrib/hbqt/qtcore/TQMimeData.prg
  * contrib/hbqt/qth/QMimeData.qth
    + Added method QStrinList * hbUrlList() which returns list 
      of Urls as strings. It is a workarount until proper 
      QList<QUrl> implementation is not in place.
This commit is contained in:
Pritpal Bedi
2010-07-05 20:47:20 +00:00
parent 33278e8726
commit 3f9645239b
5 changed files with 49 additions and 1 deletions

View File

@@ -16,6 +16,15 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-07-05 13:41 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/doc/en/class_qmimedata.txt
* contrib/hbqt/qtcore/QMimeData.cpp
* contrib/hbqt/qtcore/TQMimeData.prg
* contrib/hbqt/qth/QMimeData.qth
+ Added method QStrinList * hbUrlList() which returns list
of Urls as strings. It is a workarount until proper
QList<QUrl> implementation is not in place.
2010-07-05 22:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/makefile.hbs
* utils/hbmk2/hbmk2.prg

View File

@@ -48,6 +48,7 @@
:setText( cText ) -> NIL
:text() -> cQString
:urls() -> pQList<QUrl>
:hbUrlList() -> pQStringList
$DESCRIPTION$

View File

@@ -66,12 +66,13 @@
/*----------------------------------------------------------------------*/
/*
* Constructed[ 20/21 [ 95.24% ] ]
* Constructed[ 21/23 [ 91.30% ] ]
*
* *** Unconvered Prototypes ***
* -----------------------------
*
* void setUrls ( const QList<QUrl> & urls )
* }
*/
#include <QtCore/QPointer>
@@ -436,6 +437,23 @@ HB_FUNC( QT_QMIMEDATA_URLS )
}
}
/*
* QStringList * hbUrlList() const
*/
HB_FUNC( QT_QMIMEDATA_HBURLLIST )
{
QMimeData * p = hbqt_par_QMimeData( 1 );
if( p )
{
QStringList strList;
foreach ( QUrl url, ( p )->urls() )
{
strList << ( QString ) url.toString().toAscii().data();
}
hb_retptrGC( hbqt_gcAllocate_QStringList( new QStringList( strList ), true ) );
}
}
/*----------------------------------------------------------------------*/
#endif /* #if QT_VERSION >= 0x040500 */

View File

@@ -87,6 +87,7 @@ CREATE CLASS QMimeData INHERIT HbQtObjectHandler, QObject
METHOD setText( cText )
METHOD text()
METHOD urls()
METHOD hbUrlList()
ENDCLASS
@@ -179,3 +180,7 @@ METHOD QMimeData:text()
METHOD QMimeData:urls()
RETURN Qt_QMimeData_urls( ::pPtr )
METHOD QMimeData:hbUrlList()
RETURN Qt_QMimeData_hbUrlList( ::pPtr )

View File

@@ -101,6 +101,21 @@ void setText ( const QString & text )
void setUrls ( const QList<QUrl> & urls )
QString text () const
QList<QUrl> urls () const
# Harbour Callable Function Till QList<QUrl> is not resolved
#
QStringList * hbUrlList() const{
QMimeData * p = hbqt_par_QMimeData( 1 );
if( p )
{
QStringList strList;
foreach ( QUrl url, ( p )->urls() )
{
strList << ( QString ) url.toString().toAscii().data();
}
hb_retptrGC( hbqt_gcAllocate_QStringList( new QStringList( strList ), true ) );
}
}
</PROTOS>
<SLOTS>