From d3a3d577730480217a5ff3cfe04cc8c18f1d39d9 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 17 Jul 2021 13:04:20 -0500 Subject: [PATCH] [nostalgia/studio] Cleanup --- src/nostalgia/studio/lib/editor.hpp | 23 +++++++++++++++-------- src/nostalgia/studio/mainwindow.cpp | 3 --- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/nostalgia/studio/lib/editor.hpp b/src/nostalgia/studio/lib/editor.hpp index 3c306503..8a5cb67a 100644 --- a/src/nostalgia/studio/lib/editor.hpp +++ b/src/nostalgia/studio/lib/editor.hpp @@ -27,13 +27,14 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget { bool m_pasteEnabled = false; public: - Editor(QWidget *parent); + explicit Editor(QWidget *parent); - virtual ~Editor() = default; + ~Editor() override = default; /** * Returns the name of item being edited. */ + [[nodiscard]] virtual QString itemName() const = 0; virtual void cut(); @@ -55,28 +56,34 @@ class NOSTALGIASTUDIO_EXPORT Editor: public QWidget { */ void setUnsavedChanges(bool); - [[nodiscard]] bool unsavedChanges() const noexcept; + [[nodiscard]] + bool unsavedChanges() const noexcept; /** * Returns the undo stack holding changes to the item being edited. */ - [[nodiscard]] QUndoStack *undoStack(); + [[nodiscard]] + QUndoStack *undoStack(); void setExportable(bool); - [[nodiscard]] bool exportable() const; + [[nodiscard]] + bool exportable() const; void setCutEnabled(bool); - [[nodiscard]] bool cutEnabled() const; + [[nodiscard]] + bool cutEnabled() const; void setCopyEnabled(bool); - [[nodiscard]] bool copyEnabled() const; + [[nodiscard]] + bool copyEnabled() const; void setPasteEnabled(bool); - [[nodiscard]] bool pasteEnabled() const; + [[nodiscard]] + bool pasteEnabled() const; protected: /** diff --git a/src/nostalgia/studio/mainwindow.cpp b/src/nostalgia/studio/mainwindow.cpp index 87312812..ffd68c86 100644 --- a/src/nostalgia/studio/mainwindow.cpp +++ b/src/nostalgia/studio/mainwindow.cpp @@ -10,10 +10,7 @@ #include #include #include -#include #include -#include -#include #include #include #include