Skip to content

Commit

Permalink
Change inheritance in test
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
  • Loading branch information
mjcarroll committed Aug 28, 2023
1 parent 6b604ea commit fc7cebb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/Application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ Application::~Application()
}
this->dataPtr->dialogs.clear();

if (this->dataPtr->engine)
delete this->dataPtr->engine;
delete this->dataPtr->engine;

std::queue<std::shared_ptr<Plugin>> empty;
std::swap(this->dataPtr->pluginsToAdd, empty);
Expand Down
4 changes: 2 additions & 2 deletions test/plugins/TestBadInheritancePlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using namespace gui;

/////////////////////////////////////////////////
TestBadInheritancePlugin::TestBadInheritancePlugin()
: MainWindow()
: Dialog ()
{
}

Expand All @@ -36,4 +36,4 @@ TestBadInheritancePlugin::~TestBadInheritancePlugin()

// Register this plugin
GZ_ADD_PLUGIN(TestBadInheritancePlugin,
gui::MainWindow)
gui::Dialog)
4 changes: 2 additions & 2 deletions test/plugins/TestBadInheritancePlugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@

#ifndef Q_MOC_RUN
#include <gz/gui/qt.h>
#include <gz/gui/MainWindow.hh>
#include <gz/gui/Dialog.hh>
#endif

namespace gz
{
namespace gui
{
class TestBadInheritancePlugin : public MainWindow
class TestBadInheritancePlugin : public Dialog
{
Q_OBJECT

Expand Down

0 comments on commit fc7cebb

Please sign in to comment.