Adding ActivationQueryBase into the scope template to respond to button clicks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qtcreator-plugin-ubuntu (Ubuntu) |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Currently, in our scope template, there is no code touching the ActivationQuery
I would commend adding it into the template to make it more complete though some of the scopes may not need them. A reference design is like:
action.h
#ifndef SCOPE_ACTION_H_
#define SCOPE_ACTION_H_
#include <unity/
#include <unity/
#include <unity/
#include <unity/
class Action : public unity::
{
public:
Action(
~Action() = default;
virtual unity::
private:
std::string const action_id_;
};
#endif // SCOPE_ACTION_H_
action.cpp
`#include <scope/action.h>
#include <unity/
#include <unity/
#include <QString>
#include <QDebug>
#include <iostream>
namespace sc = unity::scopes;
using namespace std;
QString qstr_(std::string str)
{
return QString:
}
Action:
: sc::ActivationQ
action_
{
qDebug() << "action id: " << qstr_(action_id_);
}
sc::ActivationR
{
qDebug() << "action id in activate: " << qstr_(action_id());
QString review = QString(
double rating = action_
qDebug() << "review: " << review;
qDebug() << "rating: " << rating;
sc:
cerr << "activate called" << endl;
return done;
}
Changed in qtcreator-plugin-ubuntu (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Triaged |