From 4483c77530d75fe73c3d9f87b1e29db74946a3da Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 16 Nov 2022 12:46:47 +0100 Subject: [PATCH] Gui: MSVC requires a user-defined destructor of RecentFilesAction otherwise the class declaration of Private is needed in the header file --- src/Gui/Action.cpp | 5 +++++ src/Gui/Action.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/Gui/Action.cpp b/src/Gui/Action.cpp index f96245ca73..53434d0a21 100644 --- a/src/Gui/Action.cpp +++ b/src/Gui/Action.cpp @@ -937,6 +937,11 @@ RecentFilesAction::RecentFilesAction ( Command* pcCmd, QObject * parent ) restore(); } +RecentFilesAction::~RecentFilesAction() +{ + _pimpl.reset(nullptr); +} + /** Adds the new item to the recent files. */ void RecentFilesAction::appendFile(const QString& filename) { diff --git a/src/Gui/Action.h b/src/Gui/Action.h index 31bf72b381..1b8bc0a935 100644 --- a/src/Gui/Action.h +++ b/src/Gui/Action.h @@ -240,6 +240,7 @@ class GuiExport RecentFilesAction : public ActionGroup public: explicit RecentFilesAction (Command* pcCmd, QObject * parent = nullptr); + ~RecentFilesAction() override; void appendFile(const QString&); void activateFile(int);