From 67c1745dbd4f9b436122b19d940185c0967f8e10 Mon Sep 17 00:00:00 2001
From: Stephane Albert <stephane.albert@c-s.fr>
Date: Mon, 13 Apr 2015 15:18:12 +0200
Subject: [PATCH] REFAC: Removed commented code.

---
 Code/Application/Mv2/main.cxx | 112 ----------------------------------
 1 file changed, 112 deletions(-)

diff --git a/Code/Application/Mv2/main.cxx b/Code/Application/Mv2/main.cxx
index 896dbd311a..b3c8bd8fe4 100644
--- a/Code/Application/Mv2/main.cxx
+++ b/Code/Application/Mv2/main.cxx
@@ -87,118 +87,6 @@ main( int argc, char* argv[] )
   mvd::MainWindow mainWindow;
   mainWindow.Initialize();
 
-  /*
-  //
-  // 3. Initialize cache directory.
-  try
-    {
-    mainWindow.SetupCacheDir();
-    }
-  catch( std::exception& exc )
-    {
-    QMessageBox::critical(
-      &mainWindow,
-      QCoreApplication::translate(
-	"Monteverdi2",
-	"Monteverdi2 - Critical error!"
-      ),
-      QCoreApplication::translate(
-	"Monteverdi2",
-	"Error while creating cache repository.\n\n"
-	"%1\n\n"
-	"Application will exit!"
-      )
-      .arg( exc.what() )
-    );
-
-    return ERROR_CODE_CACHE_DIR;
-    }
-  */
-
-  /*
-  //
-  // 4. Initialize database.
-  try
-    {
-    mvd::CountType nb = application.OpenDatabase();
-
-    if( nb>0 )
-      {
-      QMessageBox::StandardButton button =
-        QMessageBox::warning(
-          &mainWindow,
-          QCoreApplication::translate(
-            "Monteverdi2",
-            "Monteverdi2 - Warning!"
-          ),
-          QCoreApplication::translate(
-            "Monteverdi2",
-            "There are %1 outdated dataset(s) in cache-directory.\n\n"
-            "Please remove cache-directory '%2' and restart Monteverdi2\n\n"
-            "Do you want to delete cache-directory '%2' before quitting Monteverdi2?"
-          ).arg( nb ).arg( application.GetCacheDir().path() ),
-          QMessageBox::Yes | QMessageBox::No,
-          QMessageBox::Yes
-        );
-
-      if( button==QMessageBox::Yes )
-        {
-        if( application.GetCacheDir()==QDir::home() )
-          {
-          // throw std::runtime_error(
-          //   mvd::ToStdString(
-          //     QCoreApplication::translate(
-          //       "Monteverdi2",
-          //       "Tryed to remove home dir."
-          //     )
-          //   )
-          // );
-
-          QMessageBox::critical(
-            &mainWindow,
-            QCoreApplication::translate(
-              "Monteverdi2",
-              "Monteverdi2 - Critical error!"
-            ),
-            QCoreApplication::translate(
-              "Monteverdi2",
-              "Your Monteverdi2 cache-directory is set to your home directory '%1'. Deletion of cache-directory is aborted to avoid unrecoverable loss of all your account data.\n\nIt is generally a bad idea to set Monteverdi2 cache-directory to your home directory. Please choose another sub-directory.\n\nApplication will now exit."
-            )
-            .arg( application.GetCacheDir().path() ),
-            QMessageBox::Ok
-          );
-          }
-        else
-          {
-          itksys::SystemTools::RemoveADirectory(
-            QFile::encodeName( application.GetCacheDir().path() ).constData()
-          );
-          }
-        }
-
-      return ERROR_CODE_DATABASE;
-      }
-    }
-  catch( std::exception& exc )
-    {
-    QMessageBox::critical(
-      &mainWindow,
-      QCoreApplication::translate(
-        "Monteverdi2",
-        "Monteverdi2 - Critical error!"
-      ),
-      QCoreApplication::translate(
-        "Monteverdi2",
-        "Failed to open Monteverdi2 database.\n\nApplication will now exit!\n\n%2\n\nPlease, remove your Monteverdi2 cache-directory."
-      )
-      .arg( exc.what() ),
-      QMessageBox::Ok
-    );
-
-    return ERROR_CODE_DATABASE;
-    }
-  */
-
   //
   // 5. Show window.
 #if defined( _DEBUG )
-- 
GitLab