From kde-commits Thu Jan 20 16:29:52 2011 From: Sebastian Trueg Date: Thu, 20 Jan 2011 16:29:52 +0000 To: kde-commits Subject: branches/KDE/4.6/kdebase/runtime/nepomuk/services/queryservice Message-Id: <20110120162952.09E4FAC8B8 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129554104715752 SVN commit 1215979 by trueg: Backport: There is no point in counting results when a limit is set. Virtuoso will ignore it anyway and the query might take very long. M +3 -1 folder.cpp --- branches/KDE/4.6/kdebase/runtime/nepomuk/services/queryservice/folder.cpp #1215978:1215979 @@ -93,8 +93,10 @@ QueryService::searchThreadPool()->start( m_currentSearchRunnable, 1 ); // we only need the count for initialListingDone + // count with a limit is pointless since Virtuoso will ignore the limit if ( !m_initialListingDone && - !m_isSparqlQueryFolder ) { + !m_isSparqlQueryFolder && + m_query.limit() == 0 ) { m_currentCountQueryRunnable = new CountQueryRunnable( this ); QueryService::searchThreadPool()->start( m_currentCountQueryRunnable, 0 ); }