diff --git a/QQt.pro b/QQt.pro index 6126eb21..e69ce371 100644 --- a/QQt.pro +++ b/QQt.pro @@ -43,7 +43,7 @@ SUBDIRS += examples/qqtaudioexample #SUBDIRS += examples/tabwidgetexamples #need QZXing, default closed. #SUBDIRS += examples/qrcodeexample -# +#必开 SUBDIRS += examples/qqtnetworkexample SUBDIRS += demo/QQtNetworkCreator #greaterThan(QT_VERSION, 4.6.0):SUBDIRS += test/voicetest @@ -61,8 +61,7 @@ SUBDIRS += demo/QQtNetworkCreator #need GumoQuery #----------------------------------------------------------------- #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 += test/LearnCookieTest #----------------------------------------------------------------- @@ -73,7 +72,7 @@ greaterThan(QT_MAJOR_VERSION , 4):SUBDIRS += demo/VegeTablesPrice #SUBDIRS += test/framelesshelperwidget #SUBDIRS += test/treeviewtest #SUBDIRS += test/qqtdicttest -# +#必开 SUBDIRS += test/qqtdicttest2 #SUBDIRS += test/bytearraytest #!contains(QKIT_PRIVATE, iOS|iOSSimulator){ diff --git a/src/core/qqtdictionary.cpp b/src/core/qqtdictionary.cpp index 2c9eb2c5..1ee43dfa 100644 --- a/src/core/qqtdictionary.cpp +++ b/src/core/qqtdictionary.cpp @@ -67,7 +67,9 @@ void QQtDictNode::appendChild ( const QQtDictNode& dict ) m_type = DictList; //list类 //append函数,会引用外部变量,push_back是不是在list内部生成了新的实例? + //如果要使用外部实例,可以getList,然后append value。 //m_list.append ( dict ); + //生成内部新空间 m_list.push_back ( dict ); } diff --git a/test/qqtdicttest2/main.cpp b/test/qqtdicttest2/main.cpp index accfb569..62889afc 100644 --- a/test/qqtdicttest2/main.cpp +++ b/test/qqtdicttest2/main.cpp @@ -22,6 +22,7 @@ int main ( int argc, char* argv[] ) QQtObjectParcel::registerObject ( obj ); */ + //对QQtDictNode的使用进行测试。 QQtDictNode d0; d0["cc"] = "dd"; pline() << d0["cc"].getValue(); @@ -113,7 +114,7 @@ int main ( int argc, char* argv[] ) //Widget w; //w.show(); - //QQtDictNode appendChild函数存在一个问题, + //QQtDictNode appendChild函数存在一个问题,在这里测试是否解决。 //内部实现使用list的append函数,会引用外部的类实例,这导致在free空间的时候,存在很多莫名其妙的二次free,尤其外部实例和QObject关联的时候。 //现在内部实现使用push_back,这里检测QQtDictNode还有没有二次free这个bug。 QQtDictNode* n0 = new QQtDictNode ( QVariant ( "This is a value" ) ); @@ -146,6 +147,7 @@ int main ( int argc, char* argv[] ) //windows //经过测试,QQtDictNode内部空间成功和外部空间分离,bug清除。 + //测试QQtDictNode的打印能力 QQtDictNode v00; pline() << v00;