100
void Nepomuk::Query::QueryServiceClient::Private::_k_entriesRemoved( const QStringList& uris )
103
foreach( const QString& s, uris ) {
104
ul.append( QUrl( s ) );
106
emit q->entriesRemoved( ul );
110
98
void Nepomuk::Query::QueryServiceClient::Private::_k_finishedListing()
112
100
emit q->finishedListing();
121
109
queryInterface = new org::kde::nepomuk::Query( queryServiceInterface->service(),
122
110
r.value().path(),
123
111
dbusConnection );
124
connect( queryInterface, SIGNAL( newEntries( QList<Nepomuk::Query::Result> ) ),
125
q, SIGNAL( newEntries( QList<Nepomuk::Query::Result> ) ) );
126
connect( queryInterface, SIGNAL( entriesRemoved( QStringList ) ),
127
q, SLOT( _k_entriesRemoved( QStringList ) ) );
128
connect( queryInterface, SIGNAL( finishedListing() ),
129
q, SLOT( _k_finishedListing() ) );
112
connect( queryInterface, SIGNAL(newEntries(QList<Nepomuk::Query::Result>)),
113
q, SIGNAL(newEntries(QList<Nepomuk::Query::Result>)) );
114
connect( queryInterface, SIGNAL(entriesRemoved(QList<Nepomuk::Query::Result>)),
115
q, SIGNAL(entriesRemoved(QList<Nepomuk::Query::Result>)) );
116
connect( queryInterface, SIGNAL(finishedListing()),
117
q, SLOT(_k_finishedListing()) );
130
118
// run the listing async in case the event loop below is the only one we have
131
119
// and we need it to handle the signals and list returns results immediately
132
120
QTimer::singleShot( 0, queryInterface, SLOT(list()) );
165
bool Nepomuk::Query::QueryServiceClient::query( const QString& query )
153
bool Nepomuk::Query::QueryServiceClient::query( const QString& query, const QHash<QString, QString> &encodedRps )
169
157
if ( d->queryServiceInterface->isValid() ) {
170
return d->handleQueryReply( d->queryServiceInterface->sparqlQuery( query, QHash<QString, QString>() ) );
158
return d->handleQueryReply( d->queryServiceInterface->sparqlQuery( query, encodedRps ) );
173
161
qDebug() << "Could not contact query service.";
179
bool Nepomuk::Query::QueryServiceClient::blockingQuery( const QString& q )
167
bool Nepomuk::Query::QueryServiceClient::blockingQuery( const QString& q, const QHash<QString, QString> &encodedRps )
169
if( query( q, encodedRps ) ) {