1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
This commit is contained in:
tianduanrui 2018-04-20 09:40:22 +08:00
parent cf2b1a5b0e
commit 36fdf6e3ec
3 changed files with 8 additions and 5 deletions

View File

@ -43,7 +43,7 @@ SUBDIRS += examples/qqtaudioexample
#SUBDIRS += examples/tabwidgetexamples #SUBDIRS += examples/tabwidgetexamples
#need QZXing, default closed. #need QZXing, default closed.
#SUBDIRS += examples/qrcodeexample #SUBDIRS += examples/qrcodeexample
# #必开
SUBDIRS += examples/qqtnetworkexample SUBDIRS += examples/qqtnetworkexample
SUBDIRS += demo/QQtNetworkCreator SUBDIRS += demo/QQtNetworkCreator
#greaterThan(QT_VERSION, 4.6.0):SUBDIRS += test/voicetest #greaterThan(QT_VERSION, 4.6.0):SUBDIRS += test/voicetest
@ -61,8 +61,7 @@ SUBDIRS += demo/QQtNetworkCreator
#need GumoQuery #need GumoQuery
#----------------------------------------------------------------- #-----------------------------------------------------------------
#greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += examples/QtSdkManager #greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += examples/QtSdkManager
# #greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/VegeTablesPrice
greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/VegeTablesPrice
#SUBDIRS += examples/GuiBuildTool #SUBDIRS += examples/GuiBuildTool
#SUBDIRS += test/LearnCookieTest #SUBDIRS += test/LearnCookieTest
#----------------------------------------------------------------- #-----------------------------------------------------------------
@ -73,7 +72,7 @@ greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/VegeTablesPrice
#SUBDIRS += test/framelesshelperwidget #SUBDIRS += test/framelesshelperwidget
#SUBDIRS += test/treeviewtest #SUBDIRS += test/treeviewtest
#SUBDIRS += test/qqtdicttest #SUBDIRS += test/qqtdicttest
# #必开
SUBDIRS += test/qqtdicttest2 SUBDIRS += test/qqtdicttest2
#SUBDIRS += test/bytearraytest #SUBDIRS += test/bytearraytest
#!contains(QKIT_PRIVATE, iOS|iOSSimulator){ #!contains(QKIT_PRIVATE, iOS|iOSSimulator){

View File

@ -67,7 +67,9 @@ void QQtDictNode::appendChild ( const QQtDictNode& dict )
m_type = DictList; m_type = DictList;
//list类 //list类
//append函数会引用外部变量push_back是不是在list内部生成了新的实例 //append函数会引用外部变量push_back是不是在list内部生成了新的实例
//如果要使用外部实例可以getList然后append value。
//m_list.append ( dict ); //m_list.append ( dict );
//生成内部新空间
m_list.push_back ( dict ); m_list.push_back ( dict );
} }

View File

@ -22,6 +22,7 @@ int main ( int argc, char* argv[] )
QQtObjectParcel::registerObject ( obj ); QQtObjectParcel::registerObject ( obj );
*/ */
//对QQtDictNode的使用进行测试。
QQtDictNode d0; QQtDictNode d0;
d0["cc"] = "dd"; d0["cc"] = "dd";
pline() << d0["cc"].getValue(); pline() << d0["cc"].getValue();
@ -113,7 +114,7 @@ int main ( int argc, char* argv[] )
//Widget w; //Widget w;
//w.show(); //w.show();
//QQtDictNode appendChild函数存在一个问题 //QQtDictNode appendChild函数存在一个问题在这里测试是否解决。
//内部实现使用list的append函数会引用外部的类实例这导致在free空间的时候存在很多莫名其妙的二次free尤其外部实例和QObject关联的时候。 //内部实现使用list的append函数会引用外部的类实例这导致在free空间的时候存在很多莫名其妙的二次free尤其外部实例和QObject关联的时候。
//现在内部实现使用push_back这里检测QQtDictNode还有没有二次free这个bug。 //现在内部实现使用push_back这里检测QQtDictNode还有没有二次free这个bug。
QQtDictNode* n0 = new QQtDictNode ( QVariant ( "This is a value" ) ); QQtDictNode* n0 = new QQtDictNode ( QVariant ( "This is a value" ) );
@ -146,6 +147,7 @@ int main ( int argc, char* argv[] )
//windows //windows
//经过测试QQtDictNode内部空间成功和外部空间分离bug清除。 //经过测试QQtDictNode内部空间成功和外部空间分离bug清除。
//测试QQtDictNode的打印能力
QQtDictNode v00; QQtDictNode v00;
pline() << v00; pline() << v00;