From 854e22b38bb901d339d45a4d2a58786acd821c7c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Feb 2014 02:34:18 +0100 Subject: COMMON: Make GPL headers consistent in themselves. --- common/debug.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'common/debug.cpp') diff --git a/common/debug.cpp b/common/debug.cpp index ba5479c34d..58cc0287a8 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -17,6 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * */ #include "common/debug.h" -- cgit v1.2.3 From 1e6fe10e3d5febb178cc7f009295a386da579066 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 5 Jun 2014 02:17:08 +0100 Subject: COMMON: Add "all" option to debugflag controls in GUI Debugger. --- common/debug.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'common/debug.cpp') diff --git a/common/debug.cpp b/common/debug.cpp index 58cc0287a8..b8c345e4f0 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -85,7 +85,6 @@ bool DebugManager::disableDebugChannel(const String &name) { } } - DebugManager::DebugChannelList DebugManager::listDebugChannels() { DebugChannelList tmp; for (DebugChannelMap::iterator i = gDebugChannels.begin(); i != gDebugChannels.end(); ++i) @@ -95,6 +94,16 @@ DebugManager::DebugChannelList DebugManager::listDebugChannels() { return tmp; } +void DebugManager::enableAllDebugChannels() { + for (DebugChannelMap::iterator i = gDebugChannels.begin(); i != gDebugChannels.end(); ++i) + enableDebugChannel(i->_value.name); +} + +void DebugManager::disableAllDebugChannels() { + for (DebugChannelMap::iterator i = gDebugChannels.begin(); i != gDebugChannels.end(); ++i) + disableDebugChannel(i->_value.name); +} + bool DebugManager::isDebugChannelEnabled(uint32 channel) { // Debug level 11 turns on all special debug level messages if (gDebugLevel == 11) -- cgit v1.2.3 From 559c10e91af05b846355156a439ce873d8e241e3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 5 Jun 2014 16:31:04 +0200 Subject: COMMON: Don't allow debug channel 'all' to be used. --- common/debug.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/debug.cpp') diff --git a/common/debug.cpp b/common/debug.cpp index b8c345e4f0..182b28afdf 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -46,6 +46,11 @@ struct DebugLevelComperator { } // end of anonymous namespace bool DebugManager::addDebugChannel(uint32 channel, const String &name, const String &description) { + if (name.equalsIgnoreCase("all")) { + warning("Debug channel 'all' is reserved for internal use"); + return false; + } + if (gDebugChannels.contains(name)) warning("Duplicate declaration of engine debug channel '%s'", name.c_str()); -- cgit v1.2.3