Skip to content
Snippets Groups Projects
Commit 67c1745d authored by Stéphane Albert's avatar Stéphane Albert
Browse files

REFAC: Removed commented code.

parent d43cc4e6
No related branches found
No related tags found
No related merge requests found
......@@ -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 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment