[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: The usage statistics [kactivities, baloo, ktp, plasma]
From:       Ivan =?utf-8?B?xIx1a2nEhw==?= <ivan.cukic () kde ! org>
Date:       2014-11-17 19:38:29
Message-ID: 7657495.W1M5QiMV7S () drako
[Download RAW message or body]

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

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic