2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Title controls reordering done right. Title song play button created.

This commit is contained in:
John Preston
2016-09-21 14:44:20 +03:00
parent 5c20ae0411
commit a8f3582cb1
17 changed files with 320 additions and 407 deletions

View File

@@ -350,6 +350,12 @@ public:
return ptr();
}
// Use that instead "= new T(parent, ...)"
template <typename Parent, typename... Args>
void create(Parent &&parent, Args&&... args) {
delete _widget;
_widget = new T(std_::forward<Parent>(parent), std_::forward<Args>(args)...);
}
void destroy() {
if (_widget) {
delete _widget;