[Kde-bindings] KDE/kdebindings/php/phpqt/src

Thomas Moenicke tm at php-qt.org
Wed Jul 23 09:12:13 UTC 2008


SVN commit 836894 by moenicke:

* adding destructor to QString, it forwards to the generic destructor

CCMAIL:: kde-bindings at kde.org



 M  +13 -6     qstring.cpp  
 M  +2 -1      qstring.h  


--- trunk/KDE/kdebindings/php/phpqt/src/qstring.cpp #836893:836894
@@ -54,6 +54,7 @@
 	ZEND_ME(QString,toLongLong,NULL,ZEND_ACC_PUBLIC)
 	ZEND_ME(QString,toUpper,NULL,ZEND_ACC_PUBLIC)
 	ZEND_ME(QString, __construct,NULL,ZEND_ACC_PUBLIC)
+	ZEND_ME(QString, __destruct,NULL,ZEND_ACC_PUBLIC)
 	ZEND_ME(QString,normalized,NULL,ZEND_ACC_PUBLIC)
 	ZEND_ME(QString,fromUtf16,NULL,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 	ZEND_ME(QString,isRightToLeft,NULL,ZEND_ACC_PUBLIC)
@@ -578,6 +579,12 @@
 	}
 }
 
+ZEND_METHOD(QString, __destruct)
+{
+    qDebug() << "__destruct";
+    zim_php_qt_generic_class___destruct(ht, return_value, return_value_ptr, this_ptr, return_value_used);
+}
+
 /*********************************
  *    class     QString */
 /*
@@ -1425,11 +1432,11 @@
 	 * - takes one argument and returns a QString on the stack
 	 * - The argument can be of any primitive type or QString
 	 * - NULL will be considered as an empty string
-	 * - BOOL will be appended as the strings "TRUE" and "FALSE", which is usefull for debugging but 
+	 * - BOOL will be appended as the strings "TRUE" and "FALSE", which is usefull for debugging but
 	 *   should probably not be used in production.
 	 * - non-QString objects are tried to be converted using the __toString() magic method
 	 */
-	
+
 	if (ZEND_NUM_ARGS() == 1){
 		zval *z_arg_0; // the argument
 		if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,"z", &z_arg_0) == SUCCESS) {
@@ -2017,7 +2024,7 @@
 }
 
 /*!
- *    class     QString 
+ *    class     QString
  *
  *    function  fromUtf8
  *    flags:    s
@@ -2028,7 +2035,7 @@
     {
 	zval *z_0; // define ZVAL
 	zval *z_1; // define ZVAL
-	if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,"zz", &z_0, &z_1) == SUCCESS) 
+	if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,"zz", &z_0, &z_1) == SUCCESS)
 	{
 	    if(Z_TYPE_P(z_0) == IS_STRING && Z_TYPE_P(z_1) == IS_LONG)
 	    {
@@ -2044,7 +2051,7 @@
     if (ZEND_NUM_ARGS() == 1)
     {
 	zval *z_0; // define ZVAL
-	if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,"z", &z_0) == SUCCESS) 
+	if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,"z", &z_0) == SUCCESS)
 	{
 	    if(Z_TYPE_P(z_0) == IS_STRING)
 	    {
@@ -2489,5 +2496,5 @@
 }
 
 //PHP_QT_DESTRUCT(QString);
- 
+
 } // extern "C"
--- trunk/KDE/kdebindings/php/phpqt/src/qstring.h #836893:836894
@@ -40,6 +40,7 @@
 ZEND_METHOD(QString, toLongLong);
 ZEND_METHOD(QString, toUpper);
 ZEND_METHOD(QString, __construct);
+ZEND_METHOD(QString, __destruct);
 ZEND_METHOD(QString, normalized);
 ZEND_METHOD(QString, fromUtf16);
 ZEND_METHOD(QString, isRightToLeft);
@@ -103,5 +104,5 @@
 ZEND_METHOD(QString, toLocal8Bit);
 ZEND_METHOD(QString, toInt);
 ZEND_METHOD(QString, isNull);
-    
+
 } // extern "C"



More information about the Kde-bindings mailing list