From 3458ccf3a1b744f14b293bb1d2ce4d187930c09c Mon Sep 17 00:00:00 2001 From: ck Date: Tue, 10 Nov 2009 16:43:30 +0100 Subject: Assistant: Replace a "while" with an "if". Reviewed-by: kh1 --- tools/assistant/lib/qhelpcollectionhandler.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/assistant/lib/qhelpcollectionhandler.cpp b/tools/assistant/lib/qhelpcollectionhandler.cpp index 4aa7ab6..9092259 100644 --- a/tools/assistant/lib/qhelpcollectionhandler.cpp +++ b/tools/assistant/lib/qhelpcollectionhandler.cpp @@ -308,10 +308,8 @@ bool QHelpCollectionHandler::addCustomFilter(const QString &filterName, m_query.prepare(QLatin1String("SELECT Id FROM FilterNameTable WHERE Name=?")); m_query.bindValue(0, filterName); m_query.exec(); - while (m_query.next()) { + if (m_query.next()) nameId = m_query.value(0).toInt(); - break; - } m_query.exec(QLatin1String("SELECT Id, Name FROM FilterAttributeTable")); QStringList idsToInsert = attributes; -- cgit v0.12