Rename Paint/Idle events to Present

This commit is contained in:
Zach Pomerantz 2016-05-10 16:09:04 -07:00
parent dd6a4dd091
commit 2d4fd783bd
4 changed files with 6 additions and 6 deletions

View file

@ -1786,9 +1786,9 @@ bool Application::event(QEvent* event) {
return false;
}
if ((int)event->type() == (int)Idle) {
if ((int)event->type() == (int)Present) {
idle();
removePostedEvents(this, Idle); // clear pending idles so we don't clog the pipes
removePostedEvents(this, Present); // clear pending presents so we don't clog the pipes
return true;
} else if ((int)event->type() == (int)Paint) {
paintGL();

View file

@ -95,8 +95,8 @@ class Application : public QApplication, public AbstractViewStateInterface, publ
public:
enum Event {
Idle = DisplayPlugin::Paint,
Paint = Idle + 1,
Present = DisplayPlugin::Present,
Paint = Present + 1,
Lambda = Paint + 1
};

View file

@ -41,5 +41,5 @@ void DisplayPlugin::incrementPresentCount() {
++_presentedFrameIndex;
// Alert the app that it needs to paint a new presentation frame
qApp->postEvent(qApp, new QEvent(static_cast<QEvent::Type>(Paint)), Qt::HighEventPriority);
qApp->postEvent(qApp, new QEvent(static_cast<QEvent::Type>(Present)), Qt::HighEventPriority);
}

View file

@ -61,7 +61,7 @@ class DisplayPlugin : public Plugin {
using Parent = Plugin;
public:
enum Event {
Paint = QEvent::User + 1
Present = QEvent::User + 1
};
bool activate() override;