Yep, I'm using an object only. I tried to show the api I'm using.
This is how I'm doing.
void CResultsTable::getCVEScore()
{
if(rowCount() == nLoadingRow)
{
bVuln_All = true;
emit loadComplete();
return;
}
QString refStr
= this
->item
(nLoadingRow, Reference_Col
)->text
();
// <<-----
if(refStr.isEmpty() || refStr.isNull())
{
qDebug() << "Cell is empty";
return;
}
url.
setUrl(QString("http://www.somewebsite.com/get?id=")+refStr
);
QNetworkReply *reply = cveNAM->get(QNetworkRequest(url));
Q_UNUSED(reply);
}
void CResultsTable::getCVEScore()
{
if(rowCount() == nLoadingRow)
{
bVuln_All = true;
emit loadComplete();
return;
}
QString refStr = this->item(nLoadingRow, Reference_Col)->text(); // <<-----
if(refStr.isEmpty() || refStr.isNull())
{
qDebug() << "Cell is empty";
return;
}
QUrl url;
url.setUrl(QString("http://www.somewebsite.com/get?id=")+refStr);
QNetworkReply *reply = cveNAM->get(QNetworkRequest(url));
Q_UNUSED(reply);
}
To copy to clipboard, switch view to plain text mode
How do I check the return value of item ? I mean what do I compare it with ? NULL ?
Thank you.
Bookmarks