Skip to content

Commit

Permalink
Fix WLibrarySidebar: Remove newSyntheticEvent/finishSyntheticEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
cr7pt0gr4ph7 committed Oct 15, 2024
1 parent c16eb40 commit 873bc06
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/widget/wlibrarysidebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,6 @@ namespace {
constexpr int expand_time = 250;
constexpr int collapse_time = 750;

std::shared_ptr<QDropEvent> newSyntheticEvent(QPoint position, const QDropEvent* event) {
auto syntheticEvent = std::make_shared<QDropEvent>(
position,
event->possibleActions(),
event->mimeData(),
event->buttons(),
event->modifiers(),
event->type());

// Copy mutable state from original event
syntheticEvent->setAccepted(event->isAccepted());
syntheticEvent->setDropAction(event->dropAction());

return syntheticEvent;

return syntheticEvent;
}

void finishSyntheticEvent(std::shared_ptr<QDropEvent> syntheticEvent, QDropEvent* event) {
// Mirror modifications back to the original event
event->setAccepted(syntheticEvent->isAccepted());
event->setDropAction(syntheticEvent->dropAction());
}

} // namespace

WLibrarySidebar::WLibrarySidebar(QWidget* parent)
Expand Down

0 comments on commit 873bc06

Please sign in to comment.