QTfrontend/main.cpp.in
changeset 274 94bd2577ebbb
parent 261 21b03fe1cc28
equal deleted inserted replaced
273:3cc5b4dd6770 274:94bd2577ebbb
    70 		checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos");
    70 		checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos");
    71 	}
    71 	}
    72 	cfgdir->cd(".hedgewars");
    72 	cfgdir->cd(".hedgewars");
    73 
    73 
    74 	datadir = new QDir("${HEDGEWARS_DATADIR}");
    74 	datadir = new QDir("${HEDGEWARS_DATADIR}");
    75 	datadir->cd("hedgewars/Data");
    75 	if(!datadir->cd("hedgewars/Data")) {
       
    76 		QMessageBox::critical(0, QMessageBox::tr("Error"), 
       
    77 			QMessageBox::tr("Failed to open data directory:\n%1\n"
       
    78 					"Please check your installation").
       
    79 					arg(datadir->absolutePath()+"/hedgewars/Data"));
       
    80 		return 1;
       
    81 	}
    76 
    82 
    77 	HWForm *Form = new HWForm();
    83 	HWForm *Form = new HWForm();
    78 	Form->show();
    84 	Form->show();
    79 	return app.exec();
    85 	return app.exec();
    80 }
    86 }