void KateProjectWorker::loadProject (QString fileName, QVariantMap projectMap) { /** * setup project file name * name should be FIX after initial setting */ Q_ASSERT (m_fileName.isEmpty() || (m_fileName == fileName)); m_fileName = fileName; /** * Create dummy top level parent item and empty map inside shared pointers * then load the project recursively */ KateProjectSharedQStandardItem topLevel (new QStandardItem ()); KateProjectSharedQMapStringItem file2Item (new QMap<QString, QStandardItem *> ()); loadProject (topLevel.data(), projectMap, file2Item.data()); /** * create some local backup of some data we need for further processing! */ QStringList files = file2Item->keys (); /** * feed back our results */ QMetaObject::invokeMethod (m_project, "loadProjectDone", Qt::QueuedConnection, Q_ARG(KateProjectSharedQStandardItem, topLevel), Q_ARG(KateProjectSharedQMapStringItem, file2Item)); /** * load index */ loadIndex (files); }
void KateProjectWorker::run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) { /** * Create dummy top level parent item and empty map inside shared pointers * then load the project recursively */ KateProjectSharedQStandardItem topLevel(new QStandardItem()); KateProjectSharedQMapStringItem file2Item(new QMap<QString, KateProjectItem *> ()); loadProject(topLevel.data(), m_projectMap, file2Item.data()); /** * create some local backup of some data we need for further processing! */ QStringList files = file2Item->keys(); emit loadDone(topLevel, file2Item); /** * load index */ loadIndex(files); }