Browse Source

CLI ValidationMode now not const

Matt Clarkson 11 years ago
parent
commit
855106504c

+ 9 - 1
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.cpp

@@ -85,7 +85,7 @@ struct ctkCmdLineModuleManagerPrivate
   QHash<QUrl, ctkCmdLineModuleReference> LocationToRef;
   QScopedPointer<ctkCmdLineModuleCache> ModuleCache;
 
-  const ctkCmdLineModuleManager::ValidationMode ValidationMode;
+  ctkCmdLineModuleManager::ValidationMode ValidationMode;
 };
 
 //----------------------------------------------------------------------------
@@ -105,6 +105,14 @@ ctkCmdLineModuleManager::ValidationMode ctkCmdLineModuleManager::validationMode(
   return d->ValidationMode;
 }
 
+
+//----------------------------------------------------------------------------
+void ctkCmdLineModuleManager::setValidationMode(const ValidationMode& mode)
+{
+  d->ValidationMode = mode;
+}
+
+
 //----------------------------------------------------------------------------
 void ctkCmdLineModuleManager::registerBackend(ctkCmdLineModuleBackend *backend)
 {

+ 5 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.h

@@ -106,6 +106,11 @@ public:
   ValidationMode validationMode() const;
 
   /**
+   * @brief Set the validation mode.
+   */
+  void setValidationMode(const ValidationMode& mode);
+
+  /**
    * @brief Registers a new back-end.
    * @param backend The new back-end.
    * @throws ctkInvalidArgumentException if another back-end was already registered handling