Skip to content
Browse files

Fix a couple more places where we weren't checking the return value o…

…f QSqlQuery::next(), this should be the last of them.
  • Loading branch information...
1 parent 29ca559 commit 271a9bffc9d7d6d5bf31d350cdb2164d28a01b5d @stuartm stuartm committed
Showing with 3 additions and 5 deletions.
  1. +3 −5 mythtv/libs/libmythtv/profilegroup.cpp
View
8 mythtv/libs/libmythtv/profilegroup.cpp
@@ -111,9 +111,8 @@ QString ProfileGroup::getName(int group)
.arg(group);
result.prepare(querystr);
- if (result.exec() && result.isActive() && result.size() > 0)
+ if (result.exec() && result.next())
{
- result.next();
return result.value(0).toString();
}
@@ -128,7 +127,7 @@ bool ProfileGroup::allowedGroupName(void)
.arg(getName()).arg(host->getValue());
result.prepare(querystr);
- if (result.exec() && result.isActive() && result.size() > 0)
+ if (result.exec() && result.next())
return false;
return true;
}
@@ -285,9 +284,8 @@ void ProfileGroupEditor::callDelete(void)
"id = %1 AND is_default = 0;").arg(id);
result.prepare(querystr);
- if (result.exec() && result.isActive() && result.size() > 0)
+ if (result.exec() && result.next())
{
- result.next();
QString message = QObject::tr("Delete profile group:") +
QString("\n'%1'?").arg(ProfileGroup::getName(id));

0 comments on commit 271a9bf

Please sign in to comment.
Something went wrong with that request. Please try again.