add: KGlobal::dirs()->addResourceType("cache", "/share/apps/empath/cache");
context: empathMain(int argc, char ** argv, bool server){    if (server && fork() != 0) return;    // Create a KApplication.    KApplication * app = new KApplication(argc, argv, "empath");    CHECK_PTR(app);        KGlobal::dirs()->addResourceType("indices", "/share/apps/empath/indices");        // Don't do dollar expansion by default.    KGlobal::config()->setDollarExpansion(false);        // Create the kernel.    Empath::start();        EmpathUI * ui(0);        if (!server) {        // Create the user interface.        ui = new EmpathUI;        CHECK_PTR(ui);                    // Attempt to get the UI up and running quickly.        app->processEvents();    }    // Initialise the kernel.    empath->init();        cerr << endl << "Empath initialised. Entering event loop." << endl;    // Enter the event loop.    app->exec();        cerr << endl << "Empath exited event loop. Shutting down." << endl;        if (!server) {        delete ui;        ui = 0;    }        empath->shutdown();        cerr << endl << "Empath shutdown complete." << endl;}