//! Handle termination events from the worker thread. bool QsciAPIs::event(QEvent *e) { switch (e->type()) { case WorkerStarted: emit apiPreparationStarted(); return true; case WorkerAborted: deleteWorker(); emit apiPreparationCancelled(); return true; case WorkerFinished: delete prep; old_context.clear(); prep = worker->prepared; worker->prepared = 0; deleteWorker(); // Allow the raw API information to be modified. apis = prep->raw_apis; emit apiPreparationFinished(); return true; } return QObject::event(e); }
<< "repeat" << "repeat-x" << "repeat-y" << "no-repeat" ; listKeywords.removeDuplicates(); foreach(const QString &word, listKeywords) { api->add(word); } QEventLoop loop; connect(api, SIGNAL(apiPreparationFinished()), &loop, SLOT(quit())); api->prepare(); loop.exec(); setAPIs(api); } const char *QsciLexerQSS::keywords(int set) const { switch(set) { case 1: return " alternate-background-color"