[gnote] Add consistency check
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnote] Add consistency check
- Date: Sun, 27 Dec 2015 13:03:42 +0000 (UTC)
commit 541d2659e9a17fdcc4b1f02ca29e1959a21ff40b
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Dec 27 14:55:02 2015 +0200
    Add consistency check
 src/actionmanager.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 316a110..bd26d2a 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -228,6 +228,11 @@ namespace gnote {
     if(m_main_window_actions2.find(action) == m_main_window_actions2.end()) {
       m_main_window_actions2[action] = state_type;
     }
+    else {
+      if(m_main_window_actions2[action] != state_type) {
+        ERR_OUT("Action %s already registerred with different state type", action.c_str());
+      }
+    }
   }
 
   std::map<Glib::ustring, const Glib::VariantType*> ActionManager::get_main_window_actions() const
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]