add libretroshare version message

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1465 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-07-31 18:32:16 +00:00
parent 6af323e6ae
commit 5540897c49

View File

@ -69,23 +69,17 @@ HelpDialog::HelpDialog(QWidget *parent)
QTextStream in(&versionFile); QTextStream in(&versionFile);
QString version = in.readAll(); QString version = in.readAll();
#ifdef ADD_LIBRETROSHARE_VERSION_INFO
/* get libretroshare version */ /* get libretroshare version */
std::map<std::string, std::string>::iterator vit; std::map<std::string, std::string>::iterator vit;
std::map<std::string, std::string> versions; std::map<std::string, std::string> versions;
const RsConfig &conf = rsiface->getConfig(); const RsConfig &conf = rsiface->getConfig();
bool retv = rsDisc->getDiscVersions(versions); bool retv = rsDisc->getDiscVersions(versions);
std::cerr << "Version display own id " << conf.ownId << std::endl;
std::cerr << "Versions map size : " << versions.size() << std::endl;
for(vit = versions.begin(); vit != versions.end(); vit++)
{
std::cerr << "vit first " << vit->first << " vit second " << vit->second << std::endl;
}
if (retv && versions.end() != (vit = versions.find(conf.ownId))) if (retv && versions.end() != (vit = versions.find(conf.ownId)))
{ {
std::cerr << "Version displaying " << std::endl; version += QString::fromStdString("Retroshare library version : \n") + QString::fromStdString(vit->second);
version += QString(" ") + QString::fromStdString(vit->second);
} }
#endif
ui.version->setText(version); ui.version->setText(version);
} }