[vlmc-devel] Fix usage of flags
Hugo Beauzée-Luyssen
git at videolan.org
Sat Feb 8 00:47:07 CET 2014
vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sat Feb 8 01:38:31 2014 +0200| [9ed26624cf84f32416a1cc39a007fff97fa1e8dc] | committer: Hugo Beauzée-Luyssen
Fix usage of flags
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=9ed26624cf84f32416a1cc39a007fff97fa1e8dc
---
src/Project/ProjectManager.cpp | 10 +++++-----
src/Settings/SettingsManager.cpp | 2 +-
src/Settings/SettingsManager.h | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/Project/ProjectManager.cpp b/src/Project/ProjectManager.cpp
index ed49e6d..646aab6 100644
--- a/src/Project/ProjectManager.cpp
+++ b/src/Project/ProjectManager.cpp
@@ -58,12 +58,12 @@ ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
SettingValue *width = VLMC_CREATE_PROJECT_VAR( SettingValue::Int, "video/VideoProjectWidth", 480,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Video width" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "Width resolution of the output video" ),
- SettingValue::Flags( SettingValue::Clamped | SettingValue::EightMultiple ) );
+ SettingValue::Clamped | SettingValue::EightMultiple );
width->setLimits( 32, 2048 );
SettingValue *height = VLMC_CREATE_PROJECT_VAR( SettingValue::Int, "video/VideoProjectHeight", 320,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Video height" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "Height resolution of the output video" ),
- SettingValue::Flag( SettingValue::Clamped | SettingValue::EightMultiple ) );
+ SettingValue::Clamped | SettingValue::EightMultiple );
height->setLimits( 32, 2048 );
VLMC_CREATE_PROJECT_STRING( "video/AspectRatio", "16/9",
QT_TRANSLATE_NOOP("PreferenceWidget", "Video aspect ratio" ),
@@ -71,17 +71,17 @@ ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
SettingValue *sampleRate = VLMC_CREATE_PROJECT_VAR( SettingValue::Double, "audio/AudioSampleRate", 44100,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Audio samplerate" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "Output project audio samplerate" ),
- SettingValue::Flag( SettingValue::Clamped ) );
+ SettingValue::Clamped );
sampleRate->setLimits( 11025, 48000 );
SettingValue *audioChannel = VLMC_CREATE_PROJECT_VAR( SettingValue::Int, "audio/NbChannels", 2,
QT_TRANSLATE_NOOP("PreferenceWidget", "Audio channels" ),
QT_TRANSLATE_NOOP("PreferenceWidget", "Number of audio channels" ),
- SettingValue::Flag( SettingValue::Clamped ) );
+ SettingValue::Clamped );
audioChannel->setLimits( 2, 2 );
VLMC_CREATE_PROJECT_VAR( SettingValue::String, "general/ProjectName", unNamedProject,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Project name" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "The project name" ),
- SettingValue::Flag( SettingValue::NotEmpty ) );
+ SettingValue::NotEmpty );
VLMC_CREATE_PRIVATE_PROJECT_STRING( "general/Workspace", "" );
diff --git a/src/Settings/SettingsManager.cpp b/src/Settings/SettingsManager.cpp
index 4c5b105..9a61fda 100644
--- a/src/Settings/SettingsManager.cpp
+++ b/src/Settings/SettingsManager.cpp
@@ -251,7 +251,7 @@ SettingValue*
SettingsManager::createVar( SettingValue::Type type, const QString &key,
const QVariant &defaultValue, const char *name,
const char *desc, SettingsManager::Type varType /*= Vlmc*/,
- QFlags<SettingValue::Flag> flags /*= SettingValue::Nothing*/ )
+ SettingValue::Flags flags /*= SettingValue::Nothing*/ )
{
QWriteLocker wlock( &m_rwLock );
diff --git a/src/Settings/SettingsManager.h b/src/Settings/SettingsManager.h
index ecdb38a..302e774 100644
--- a/src/Settings/SettingsManager.h
+++ b/src/Settings/SettingsManager.h
@@ -71,7 +71,7 @@ SettingsManager::getInstance()->createVar( type, key, defaultValue, name, \
SettingsManager::getInstance()->createVar( type, key, defaultValue, name, \
desc, SettingsManager::Vlmc, flags );
-/// Vlmc preferences maccros
+/// Vlmc preferences macros
#define VLMC_CREATE_PREFERENCE_INT( key, defaultValue, name, desc ) \
VLMC_CREATE_PREFERENCE( SettingValue::Int, key, defaultValue, name, desc, SettingValue::Nothing )
#define VLMC_CREATE_PREFERENCE_STRING( key, defaultValue, name, desc ) \
@@ -87,7 +87,7 @@ SettingsManager::getInstance()->createVar( type, key, defaultValue, name, \
#define VLMC_CREATE_PREFERENCE_PATH( key, defaultValue, name, desc ) \
VLMC_CREATE_PREFERENCE( SettingValue::Path, key, defaultValue, name, desc, SettingValue::Nothing )
-//Convenience maccros :
+/// Convenience macros :
#define VLMC_CREATE_PRIVATE_PREFERENCE_STRING( key, defaultValue ) \
VLMC_CREATE_PREFERENCE( SettingValue::String, key, defaultValue, "", "", SettingValue::Private )
#define VLMC_CREATE_PRIVATE_PREFERENCE_INT( key, defaultValue ) \
@@ -131,7 +131,7 @@ class SettingsManager : public QObject, public Singleton<SettingsManager>
const QVariant &defaultValue,
const char *name, const char *desc,
Type varType = Vlmc,
- QFlags<SettingValue::Flag> flags = SettingValue::Nothing );
+ SettingValue::Flags flags = SettingValue::Nothing );
bool watchValue( const QString &key,
QObject* receiver,
const char *method,
More information about the Vlmc-devel
mailing list