[vlmc-devel] Workspace: Remove leftover "Workspace" variable

Hugo Beauzée-Luyssen git at videolan.org
Mon Jan 2 23:42:18 CET 2017


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Jan  2 23:18:13 2017 +0100| [831961baa543ad2e49aca4c92b4655b3aec0b33d] | committer: Hugo Beauzée-Luyssen

Workspace: Remove leftover "Workspace" variable

Ensure there's only one workspace location setting, that is created by
the Workspace class

> https://code.videolan.org/videolan/vlmc/commit/831961baa543ad2e49aca4c92b4655b3aec0b33d
---

 src/Main/Core.cpp         | 4 ----
 src/Project/Workspace.cpp | 7 +++++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/Main/Core.cpp b/src/Main/Core.cpp
index d53c85c..d5f16a5 100644
--- a/src/Main/Core.cpp
+++ b/src/Main/Core.cpp
@@ -82,10 +82,6 @@ Core::createSettings()
     QString configPath = configDir + QDir::separator() + qApp->organizationName()
             + QDir::separator() + qApp->applicationName() + ".conf";
     m_settings = new Settings( configPath );
-    m_settings->createVar( SettingValue::String, "vlmc/WorkspaceLocation", "",
-                                    QT_TRANSLATE_NOOP( "Settings", "Workspace location" ),
-                                    QT_TRANSLATE_NOOP( "Settings", "VLMC's workspace location" ),
-                                    SettingValue::Nothing );
     m_settings->createVar( SettingValue::Bool, "private/FirstLaunchDone", false, "", "", SettingValue::Private );
 }
 
diff --git a/src/Project/Workspace.cpp b/src/Project/Workspace.cpp
index 879eb48..eefe122 100644
--- a/src/Project/Workspace.cpp
+++ b/src/Project/Workspace.cpp
@@ -39,8 +39,11 @@ const QString   Workspace::workspacePrefix = "workspace://";
 
 Workspace::Workspace(Settings *settings)
 {
-    SettingValue* workspaceDir = settings->createVar( SettingValue::String, "vlmc/Workspace", "",
-                                                      "", "", SettingValue::Private );
+    SettingValue* workspaceDir = settings->createVar(
+                SettingValue::String, "vlmc/WorkspaceLocation", "",
+                QT_TRANSLATE_NOOP( "Settings", "Workspace location" ),
+                QT_TRANSLATE_NOOP( "Settings", "VLMC's workspace location" ),
+                SettingValue::Nothing );
     connect(workspaceDir, SIGNAL( changed( QVariant ) ),
             this, SLOT( workspaceChanged( QVariant ) ) );
 }



More information about the Vlmc-devel mailing list