From: <su...@us...> - 2008-02-11 08:42:18
|
Revision: 2570 http://tora.svn.sourceforge.net/tora/?rev=2570&view=rev Author: subik Date: 2008-02-11 00:42:21 -0800 (Mon, 11 Feb 2008) Log Message: ----------- removed the cause of "comparison with string literal results in unspecified behaviour" Modified Paths: -------------- trunk/tora/src/tonewconnection.cpp Modified: trunk/tora/src/tonewconnection.cpp =================================================================== --- trunk/tora/src/tonewconnection.cpp 2008-02-11 07:11:54 UTC (rev 2569) +++ trunk/tora/src/tonewconnection.cpp 2008-02-11 08:42:21 UTC (rev 2570) @@ -251,7 +251,9 @@ Host->lineEdit()->setText(current); for(std::list<QWidget *>::iterator k = OptionWidgets.begin();k != OptionWidgets.end();k++) { - if((*k)->metaObject()->className() == "QCheckBox") { + // char* are QString-ized here due the correct warning: + // "comparison with string literal results in unspecified behaviour" + if(QString((*k)->metaObject()->className()) == QString("QCheckBox")) { QCheckBox *box = (QCheckBox *)(*k); Options[box->text()] = box->isChecked(); } @@ -336,7 +338,9 @@ values[val] = false; } for(std::list<QWidget *>::iterator k = OptionWidgets.begin();k != OptionWidgets.end();k++) { - if((*k)->metaObject()->className() == "QCheckBox") { + // char* are QString-ized here due the correct warning: + // "comparison with string literal results in unspecified behaviour" + if(QString((*k)->metaObject()->className()) == QString("QCheckBox")) { QCheckBox *box = (QCheckBox *)(*k); if(values.find(box->text()) != values.end()) box->setChecked(values[box->text()]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |