mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 07:23:53 +00:00
Merge remote branch 'pvdk/newlauncher' into newlauncher
This commit is contained in:
commit
b3ad3d0778
2 changed files with 14 additions and 8 deletions
|
@ -165,13 +165,25 @@ void GraphicsPage::setupConfig()
|
|||
void GraphicsPage::setupOgre()
|
||||
{
|
||||
QString pluginCfg = "./plugins.cfg";
|
||||
|
||||
QFile file(pluginCfg);
|
||||
|
||||
if (!file.exists()) {
|
||||
pluginCfg = QString::fromStdString(Files::getPath(Files::Path_ConfigUser,
|
||||
"openmw", "plugins.cfg"));
|
||||
}
|
||||
|
||||
// Reopen the file from user directory
|
||||
file.setFileName(pluginCfg);
|
||||
|
||||
if (!file.exists()) {
|
||||
// There's no plugins.cfg in the user directory, use global directory
|
||||
pluginCfg = QString::fromStdString(Files::getPath(Files::Path_ConfigGlobal,
|
||||
"openmw", "plugins.cfg"));
|
||||
}
|
||||
|
||||
// Create a log manager so we can surpress debug text to stdout/stderr
|
||||
Ogre::LogManager* logMgr = OGRE_NEW Ogre::LogManager;
|
||||
logMgr->createLog("launcherOgre.log", true, false, false);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -190,8 +202,7 @@ void GraphicsPage::setupOgre()
|
|||
msgBox.setDetailedText(ogreError);
|
||||
msgBox.exec();
|
||||
|
||||
QString error = QString("Error creating Ogre::Root, the error reported was: %0").arg(ogreError);
|
||||
qCritical(error.toAscii());
|
||||
qCritical("Error creating Ogre::Root, the error reported was:\n %s", qPrintable(ogreError));
|
||||
|
||||
std::exit(1);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QDebug>
|
||||
|
||||
#include "maindialog.hpp"
|
||||
|
||||
|
@ -24,10 +23,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
// Load the stylesheet
|
||||
QFile file("./launcher.qss");
|
||||
|
||||
QFileInfo fi(file);
|
||||
|
||||
qDebug() << "Stylesheet path is: " << fi.absoluteFilePath();
|
||||
|
||||
file.open(QFile::ReadOnly);
|
||||
QString styleSheet = QLatin1String(file.readAll());
|
||||
|
|
Loading…
Reference in a new issue