[vlmc-devel] commit: Print warning before a possible assertion failure. It was seen that this part of code is reached when a possible assertion is failed . So, better print warning before quiting on an assertion failure. ( Rohit Yadav )

git at videolan.org git at videolan.org
Tue Aug 17 14:23:01 CEST 2010


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Wed Aug 11 23:41:08 2010 +0530| [0fe5e93e3b27c20b3d06ad3e3abebd9c7df4b94d] | committer: Hugo Beauzée-Luyssen 

Print warning before a possible assertion failure. It was seen that this part of code is reached when a possible assertion is failed. So, better print warning before quiting on an assertion failure.

Signed-off-by: Hugo Beauzée-Luyssen <beauze.h at gmail.com>

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=0fe5e93e3b27c20b3d06ad3e3abebd9c7df4b94d
---

 src/Settings/SettingsManager.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Settings/SettingsManager.cpp b/src/Settings/SettingsManager.cpp
index 4b00f9f..0ace1d0 100644
--- a/src/Settings/SettingsManager.cpp
+++ b/src/Settings/SettingsManager.cpp
@@ -73,8 +73,8 @@ SettingsManager::setValue( const QString &key,
             return ;
         }
     }
-    Q_ASSERT_X( false, __FILE__, "set value without a created variable" );
     qWarning() << "Setting" << key << "does not exist.";
+    Q_ASSERT_X( false, __FILE__, "set value without a created variable" );
 }
 
 SettingValue*
@@ -95,8 +95,8 @@ SettingsManager::value( const QString &key,
         if ( it != m_classicSettings.end() )
             return (*it).value;
     }
-    Q_ASSERT_X( false, __FILE__, "get value without a created variable" );
     qWarning() << "Setting" << key << "does not exist.";
+    Q_ASSERT_X( false, __FILE__, "get value without a created variable" );
     return NULL;
 }
 



More information about the Vlmc-devel mailing list