@@ -87,118 +87,6 @@ main( int argc, char* argv[] )
mvd::MainWindowmainWindow;
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."