I can't add kmessagebox + i18n in 4.11 :( But inform user via some debug output.

Will add kmessagebox in 4.12.
Now we can know why we don't have some result
wilder-work
Montel Laurent 13 years ago
parent 0f3256d3db
commit f277c3e631
  1. 15
      searchdialog/searchwindow.cpp

@ -402,6 +402,10 @@ void SearchWindow::slotSearch()
KUrl::List urls;
if ( !mUi.mChkbxAllFolders->isChecked() ) {
const Akonadi::Collection col = mUi.mCbxFolders->collection();
if (!col.isValid()) {
qDebug()<<"You did not selected a valid folder.";
return;
}
urls << col.url( Akonadi::Collection::UrlShort );
if ( mUi.mChkSubFolders->isChecked() ) {
childCollectionsFromSelectedCollection( col, urls );
@ -417,14 +421,21 @@ void SearchWindow::slotSearch()
const QString query = searchPattern.asXesamQuery();
const QString queryLanguage = "XESAM";
#else
const QString query = searchPattern.asSparqlQuery(urls);
bool allIsEmpty = false;
const QString query = searchPattern.asSparqlQuery(allIsEmpty, urls);
const QString queryLanguage = "SPARQL";
#endif
qDebug() << queryLanguage;
qDebug() << query;
if ( query.isEmpty() )
if ( query.isEmpty() ) {
if (allIsEmpty) {
qDebug()<<"All folders selected are empty or were not indexed.";
} else {
qDebug()<<"Search query is empty. Please report bug about it.";
}
return;
}
mUi.mSearchFolderOpenBtn->setEnabled( true );
if ( !mFolder.isValid() ) {

Loading…
Cancel
Save