Skip to content

Commit 4c52b11

Browse files
committed
Change type to FCloseEvent
1 parent 1877977 commit 4c52b11

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎final/fapplication.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ void FApplication::addClose (FWidget* widget)
356356

357357
need_widget_close = true;
358358

359-
auto ev = std::make_unique<FEvent>(Event::Close);
359+
auto ev = std::make_unique<FCloseEvent>(Event::Close);
360360
FApplication::queueEvent(this, std::move(ev));
361361
}
362362

@@ -483,7 +483,7 @@ auto FApplication::event (FEvent* ev) -> bool
483483

484484
if ( event_type == Event::Close )
485485
{
486-
onClose (ev);
486+
onClose (static_cast<FCloseEvent*>(ev));
487487
return true;
488488
}
489489

@@ -501,7 +501,7 @@ void FApplication::onDraw (FEvent*)
501501
}
502502

503503
//----------------------------------------------------------------------
504-
void FApplication::onClose (FEvent*)
504+
void FApplication::onClose (FCloseEvent*)
505505
{
506506
// This event handler can be reimplemented in a subclass
507507
// to receive close events

‎final/fapplication.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class FApplication : public FWidget
167167
// Event handlers
168168
auto event (FEvent*) -> bool override;
169169
virtual void onDraw (FEvent*);
170-
virtual void onClose (FEvent*);
170+
void onClose (FCloseEvent*) override;
171171

172172
private:
173173
// Using-declaration

0 commit comments

Comments
 (0)