From 44d664c7bb48f6356d2fe04ca3b40b56ab1a0d0d Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sat, 30 Mar 2019 15:20:40 -0400 Subject: [PATCH] Remove ErrorDialog.h from .h files (one function moves out of line) --- src/Project.cpp | 2 -- src/commands/CommandTargets.cpp | 7 +++++++ src/commands/CommandTargets.h | 6 +----- src/menus/HelpMenus.cpp | 3 +++ src/menus/TrackMenus.cpp | 1 + src/prefs/DevicePrefs.cpp | 1 + src/prefs/QualityPrefs.cpp | 1 + 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Project.cpp b/src/Project.cpp index 6052b9880..4ac811d18 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -169,8 +169,6 @@ scroll information. It also has some status flags. #include "tracks/ui/PlayIndicatorOverlay.h" #include "tracks/ui/Scrubbing.h" -#include "widgets/ErrorDialog.h" - #include "commands/ScriptCommandRelay.h" #include "commands/CommandTargets.h" #include "commands/Command.h" diff --git a/src/commands/CommandTargets.cpp b/src/commands/CommandTargets.cpp index 07fe8016b..d38158a9d 100644 --- a/src/commands/CommandTargets.cpp +++ b/src/commands/CommandTargets.cpp @@ -27,6 +27,7 @@ capture the more lengthy output from some commands. #include #include "../ShuttleGui.h" #include "../Project.h" +#include "../widgets/ErrorDialog.h" void CommandMessageTarget::StartArray() { @@ -237,6 +238,12 @@ void BriefCommandMessageTarget::EndField(){ } +void MessageBoxTarget::Update(const wxString &message) +{ + AudacityMessageBox(message); +} + + LispifiedCommandOutputTargets::LispifiedCommandOutputTargets( CommandOutputTargets & target ) : CommandOutputTargets() , pToRestore( &target ) diff --git a/src/commands/CommandTargets.h b/src/commands/CommandTargets.h index d15c1b86b..a21a15f7c 100644 --- a/src/commands/CommandTargets.h +++ b/src/commands/CommandTargets.h @@ -60,7 +60,6 @@ and sends it to that message target. //#include "../src/Project.h" #include "../widgets/ProgressDialog.h" #include "../commands/ResponseQueue.h" -#include "../widgets/ErrorDialog.h" class wxStatusBar; @@ -204,10 +203,7 @@ class MessageBoxTarget final : public CommandMessageTarget { public: virtual ~MessageBoxTarget() {} - void Update(const wxString &message) override - { - AudacityMessageBox(message); - } + void Update(const wxString &message) override; }; /// Displays messages from a command in a wxStatusBar diff --git a/src/menus/HelpMenus.cpp b/src/menus/HelpMenus.cpp index d203f7a37..edd8e5fa4 100644 --- a/src/menus/HelpMenus.cpp +++ b/src/menus/HelpMenus.cpp @@ -1,6 +1,8 @@ #include "../Audacity.h" #include "../Experimental.h" +#include + #include "../AboutDialog.h" #include "../AudacityApp.h" #include "../AudacityLogger.h" @@ -12,6 +14,7 @@ #include "../SplashDialog.h" #include "../commands/CommandContext.h" #include "../commands/CommandManager.h" +#include "../widgets/ErrorDialog.h" #include "../widgets/HelpSystem.h" #include "../widgets/LinkingHtmlWindow.h" diff --git a/src/menus/TrackMenus.cpp b/src/menus/TrackMenus.cpp index c7d55b0de..75f1cc468 100644 --- a/src/menus/TrackMenus.cpp +++ b/src/menus/TrackMenus.cpp @@ -19,6 +19,7 @@ #include "../commands/CommandManager.h" #include "../effects/EffectManager.h" #include "../widgets/ASlider.h" +#include "../widgets/ErrorDialog.h" #include diff --git a/src/prefs/DevicePrefs.cpp b/src/prefs/DevicePrefs.cpp index 90f5bfd27..c4c3a9f88 100644 --- a/src/prefs/DevicePrefs.cpp +++ b/src/prefs/DevicePrefs.cpp @@ -30,6 +30,7 @@ other settings. #include #include #include +#include #include "portaudio.h" diff --git a/src/prefs/QualityPrefs.cpp b/src/prefs/QualityPrefs.cpp index 0e1685278..7160e6776 100644 --- a/src/prefs/QualityPrefs.cpp +++ b/src/prefs/QualityPrefs.cpp @@ -20,6 +20,7 @@ #include #include +#include #include "../AudioIO.h" #include "../Dither.h"