The usage statistics [kactivities, baloo, ktp, plasma]

Ivan Čukić ivan.cukic at kde.org
Mon Nov 17 19:38:29 UTC 2014


A small update.

In order to make the api avaliable to crappy compilers, I've made some small 
changes to the code in the last mail:

// For crappy compilers
        // Fancy query definition
        auto fancyQuery = AllResources
                              | Type("text")
                              | Type("image")
                              | Agent("okular")
                              | Ordering::HighScore;

        // The usual, 'object-oriented' query definition
        Query normalQuery(AllResources);
        normalQuery.addAgents(QStringList() << "okular");
        normalQuery.addTypes(QStringList() << "text" << "image");
        normalQuery.setOrdering(Ordering::HighScore);

// For real compilers
        // Fanct query definition
        auto fancyQuery = AllResources
                              | Type{"text", "image"}
                              | Agent{"okular"}
                              | Ordering::HighScore;

        // The usual, 'object-oriented' query definition
        Query normalQuery(AllResources);
        normalQuery.addAgents({"okular"});
        normalQuery.addTypes({"text", "image"});
        normalQuery.setOrdering(Ordering::HighScore);

In order to make the Query class cheap to copy and move, the actual work and 
signals will be elsewhere (ResultSet or something similar).

Cheerio,
Ivan



More information about the Plasma-devel mailing list