QTfrontend/main.cpp
changeset 2901 6d2636144e1f
parent 2898 c53636f556f8
child 2913 865ae941d59e
equal deleted inserted replaced
2900:bfe1f4340fd3 2901:6d2636144e1f
   331 					"Please check your installation").
   331 					"Please check your installation").
   332 					arg(datadir->absolutePath()+"/hedgewars/Data"));
   332 					arg(datadir->absolutePath()+"/hedgewars/Data"));
   333 		return 1;
   333 		return 1;
   334 	}
   334 	}
   335 
   335 
   336 	/*Themes = new QStringList();
   336 	Themes = new QStringList();
   337 	QFile themesfile(datadir->absolutePath() + "/Themes/themes.cfg");
   337 	QFile themesfile(datadir->absolutePath() + "/Themes/themes.cfg");
   338 	if (themesfile.open(QIODevice::ReadOnly)) {
   338 	if (themesfile.open(QIODevice::ReadOnly)) {
   339 		QTextStream stream(&themesfile);
   339 		QTextStream stream(&themesfile);
   340 		QString str;
   340 		QString str;
   341 		while (!stream.atEnd())
   341 		while (!stream.atEnd())
   343 			Themes->append(stream.readLine());
   343 			Themes->append(stream.readLine());
   344 		}
   344 		}
   345 		themesfile.close();
   345 		themesfile.close();
   346 	} else {
   346 	} else {
   347 		QMessageBox::critical(0, "Error", "Cannot access themes.cfg", "OK");
   347 		QMessageBox::critical(0, "Error", "Cannot access themes.cfg", "OK");
   348 	}*/
   348 	}
   349 
   349 
   350 	QDir tmpdir;
   350 	QDir tmpdir;
   351 	tmpdir.cd(datadir->absolutePath());
       
   352 	tmpdir.cd("Themes");
       
   353 	tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
       
   354 	Themes = new QStringList(tmpdir.entryList(QStringList("*")));
       
   355 
       
   356 	tmpdir.cd(datadir->absolutePath());
   351 	tmpdir.cd(datadir->absolutePath());
   357 	tmpdir.cd("Maps");
   352 	tmpdir.cd("Maps");
   358 	tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
   353 	tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
   359 	mapList = new QStringList(tmpdir.entryList(QStringList("*")));
   354 	mapList = new QStringList(tmpdir.entryList(QStringList("*")));
   360 
   355