Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. diff --git a/nepomuk/query/literalterm.cpp b/nepomuk/query/literalterm.cpp
  2. index 4e48392..338b77e 100644
  3. --- a/nepomuk/query/literalterm.cpp
  4. +++ b/nepomuk/query/literalterm.cpp
  5. @@ -54,6 +54,9 @@ QString Nepomuk::Query::LiteralTermPrivate::toSparqlGraphPattern( const QString&
  6. {
  7. Q_UNUSED(parentTerm);
  8.  
  9. + if( m_value.toString().isEmpty() )
  10. + return QString();
  11. +
  12. const QString p1 = qbd->uniqueVarName();
  13. const QString p2 = qbd->uniqueVarName();
  14. const QString v1 = qbd->uniqueVarName();
  15. @@ -92,11 +95,16 @@ QString prepareRegexText( const QString& text )
  16. QString Nepomuk::Query::LiteralTermPrivate::createContainsPattern( const QString& varName, const QString& text, Nepomuk::Query::QueryBuilderData* qbd )
  17. {
  18. Q_UNUSED( qbd );
  19. +
  20. + if( text.isEmpty() )
  21. + return QString();
  22. +
  23. // each token with a negation flag
  24. QList<QPair<QString, bool> > containsTokens;
  25. QList<QPair<QString, bool> > regexTokens;
  26.  
  27. // we only support AND or OR, not both at the same time
  28. + // TODO: Fix this. Virtuoso supports a combination of both
  29. bool isUnion = false;
  30.  
  31. // gather all the tokens
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement