Ai
81 Star 380 Fork 168

LibQQt应用程序开发组织/LibQQt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
qqtdicthelper.cpp 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
T.D.R. 提交于 2021-04-23 11:30 +08:00 . fix qqtorderedmap.h for msvc building.
#include <qqtdicthelper.h>
QQtDictionary& QQtGetDictNode ( QQtDictionary& rootDict, QList<QString>& keyList1, bool numberAsString )
{
QListIterator<QString> itor ( keyList1 );
QQtDictionary* pdict = &rootDict;
while ( itor.hasNext() )
{
const QString& key = itor.next();
QQtDictionary& dict = *pdict;
if ( numberAsString )
{
pdict = & ( dict[key] );
continue;
}
bool ok;
uint nkey = key.toUInt ( &ok );
if ( ok )
pdict = & ( dict[nkey] );
else
pdict = & ( dict[key] );
}
QQtDictionary& dict = *pdict;
return dict;
}
QQtOrderedDictionary& QQtGetDictNode ( QQtOrderedDictionary& rootDict, QList<QString>& keyList1, bool numberAsString )
{
QListIterator<QString> itor ( keyList1 );
QQtOrderedDictionary* pdict = &rootDict;
while ( itor.hasNext() )
{
const QString& key = itor.next();
QQtOrderedDictionary& dict = *pdict;
if ( numberAsString )
{
pdict = & ( dict[key] );
continue;
}
bool ok;
uint nkey = key.toUInt ( &ok );
if ( ok )
pdict = & ( dict[nkey] );
else
pdict = & ( dict[key] );
}
QQtOrderedDictionary& dict = *pdict;
return dict;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/drabel/LibQQt.git
git@gitee.com:drabel/LibQQt.git
drabel
LibQQt
LibQQt
master

搜索帮助