forked from mirror/openmw-tes3mp
Make the launcher code conform to the coding standards and cleanup
This commit is contained in:
parent
c4ebdc230c
commit
9cd8dd39de
7 changed files with 30 additions and 32 deletions
|
@ -1,3 +1,5 @@
|
|||
#include "datafilespage.hpp"
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#include <components/esm/esmreader.hpp>
|
||||
|
@ -17,8 +19,6 @@
|
|||
#include "utils/profilescombobox.hpp"
|
||||
#include "utils/textinputdialog.hpp"
|
||||
|
||||
#include "datafilespage.hpp"
|
||||
|
||||
using namespace ESM;
|
||||
using namespace std;
|
||||
|
||||
|
@ -216,9 +216,8 @@ void DataFilesPage::setupDataFiles()
|
|||
}
|
||||
|
||||
QString dataLocal = mGameSettings.getDataLocal();
|
||||
if (!dataLocal.isEmpty()) {
|
||||
if (!dataLocal.isEmpty())
|
||||
mDataFilesModel->addFiles(dataLocal);
|
||||
}
|
||||
|
||||
// Sort by date accessed for now
|
||||
mDataFilesModel->sort(3);
|
||||
|
@ -236,7 +235,6 @@ void DataFilesPage::setupDataFiles()
|
|||
if (mProfilesComboBox->findText(QString("Default")) == -1)
|
||||
mProfilesComboBox->addItem(QString("Default"));
|
||||
|
||||
|
||||
if (profile.isEmpty() || profile == QLatin1String("Default")) {
|
||||
mProfilesComboBox->setCurrentIndex(mProfilesComboBox->findText(QString("Default")));
|
||||
} else {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include "graphicspage.hpp"
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#include <cstdlib>
|
||||
|
@ -10,7 +12,6 @@
|
|||
#include <components/fileorderlist/utils/naturalsort.hpp>
|
||||
|
||||
#include "settings/graphicssettings.hpp"
|
||||
#include "graphicspage.hpp"
|
||||
|
||||
QString getAspect(int x, int y)
|
||||
{
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#include "maindialog.hpp"
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#include "utils/checkablemessagebox.hpp"
|
||||
#include "utils/profilescombobox.hpp"
|
||||
|
||||
#include "maindialog.hpp"
|
||||
#include "playpage.hpp"
|
||||
#include "graphicspage.hpp"
|
||||
#include "datafilespage.hpp"
|
||||
|
@ -74,9 +75,8 @@ MainDialog::MainDialog()
|
|||
QString config = QString::fromStdString(mCfgMgr.getGlobalDataPath().string()) + QString("resources/launcher.qss");
|
||||
file.setFileName(config);
|
||||
|
||||
if (!file.exists()) {
|
||||
if (!file.exists())
|
||||
file.setFileName(QString::fromStdString(mCfgMgr.getLocalPath().string()) + QString("launcher.qss"));
|
||||
}
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QMessageBox msgBox;
|
||||
|
@ -101,9 +101,8 @@ MainDialog::MainDialog()
|
|||
|
||||
void MainDialog::createIcons()
|
||||
{
|
||||
if (!QIcon::hasThemeIcon("document-new")) {
|
||||
if (!QIcon::hasThemeIcon("document-new"))
|
||||
QIcon::setThemeName("tango");
|
||||
}
|
||||
|
||||
// We create a fallback icon because the default fallback doesn't work
|
||||
QIcon graphicsIcon = QIcon(":/icons/tango/video-display.png");
|
||||
|
@ -733,4 +732,3 @@ bool MainDialog::startProgram(const QString &name, const QStringList &arguments,
|
|||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <QtGui>
|
||||
|
||||
#include "playpage.hpp"
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
QWidget *playWidget = new QWidget(this);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include "gamesettings.hpp"
|
||||
|
||||
#include <QTextStream>
|
||||
#include <QDir>
|
||||
#include <QString>
|
||||
|
@ -25,7 +27,6 @@ namespace boost
|
|||
} /* namespace boost */
|
||||
#endif /* (BOOST_VERSION <= 104600) */
|
||||
|
||||
#include "gamesettings.hpp"
|
||||
|
||||
GameSettings::GameSettings(Files::ConfigurationManager &cfg)
|
||||
: mCfgMgr(cfg)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "graphicssettings.hpp"
|
||||
|
||||
#include <QTextStream>
|
||||
#include <QString>
|
||||
#include <QRegExp>
|
||||
#include <QMap>
|
||||
|
||||
#include "graphicssettings.hpp"
|
||||
|
||||
GraphicsSettings::GraphicsSettings()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "launchersettings.hpp"
|
||||
|
||||
#include <QTextStream>
|
||||
#include <QString>
|
||||
#include <QRegExp>
|
||||
#include <QMap>
|
||||
|
||||
#include "launchersettings.hpp"
|
||||
|
||||
LauncherSettings::LauncherSettings()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue