Remove the "browse to existing installation" button, now replaced by the wizard

Clean up some debug spam
loadfix
scrawl 10 years ago
parent e11bec1a37
commit 1e06f69d9e

@ -388,27 +388,14 @@ bool Launcher::MainDialog::setupGameSettings()
msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Cancel);
msgBox.setText(tr("<br><b>Could not find the Data Files location</b><br><br> \
The directory containing the data files was not found.<br><br> \
Press \"Browse...\" to specify the location manually.<br>"));
QAbstractButton *browseButton =
msgBox.addButton(tr("Browse..."), QMessageBox::ActionRole);
The directory containing the data files was not found."));
QAbstractButton *wizardButton =
msgBox.addButton(tr("Run &Installation Wizard..."), QMessageBox::ActionRole);
msgBox.exec();
QString selectedFile;
if (msgBox.clickedButton() == browseButton)
{
selectedFile = QFileDialog::getOpenFileName(
this,
tr("Select master file"),
QDir::currentPath(),
tr("Morrowind master file (*.esm)"));
}
else if (msgBox.clickedButton() == wizardButton)
if (msgBox.clickedButton() == wizardButton)
{
if (!mWizardInvoker->startProcess(QLatin1String("openmw-wizard"), false)) {
return false;
@ -416,15 +403,6 @@ bool Launcher::MainDialog::setupGameSettings()
return true;
}
}
if (selectedFile.isEmpty())
return false; // Cancel was clicked
QFileInfo info(selectedFile);
// Add the new dir to the settings file and to the data dir container
mGameSettings.setMultiValue(QString("data"), info.absolutePath());
mGameSettings.addDataDir(info.absolutePath());
}
return true;
@ -610,14 +588,12 @@ bool Launcher::MainDialog::writeSettings()
void Launcher::MainDialog::closeEvent(QCloseEvent *event)
{
qDebug() << "close event!";
writeSettings();
event->accept();
}
void Launcher::MainDialog::wizardStarted()
{
qDebug() << "wizard started!";
hide();
}

@ -174,13 +174,11 @@ void Launcher::SettingsPage::wizardStarted()
{
mMain->hide(); // Hide the launcher
qDebug() << "wizard started!";
wizardButton->setEnabled(false);
}
void Launcher::SettingsPage::wizardFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
qDebug() << "wizard finished!";
if (exitCode != 0 || exitStatus == QProcess::CrashExit)
return qApp->quit();
@ -192,13 +190,11 @@ void Launcher::SettingsPage::wizardFinished(int exitCode, QProcess::ExitStatus e
void Launcher::SettingsPage::importerStarted()
{
qDebug() << "importer started!";
importerButton->setEnabled(false);
}
void Launcher::SettingsPage::importerFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
qDebug() << "importer finished!";
if (exitCode != 0 || exitStatus == QProcess::CrashExit)
return;

@ -33,7 +33,6 @@ QStringList Wizard::IniSettings::findKeys(const QString &text)
bool Wizard::IniSettings::readFile(QTextStream &stream)
{
qDebug() << "readFile called!";
// Look for a square bracket, "'\\["
// that has one or more "not nothing" in it, "([^]]+)"
// and is closed with a square bracket, "\\]"
@ -66,7 +65,6 @@ bool Wizard::IniSettings::readFile(QTextStream &stream)
if (!currentSection.isEmpty())
key = currentSection + QLatin1Char('/') + key;
//qDebug() << "adding: " << key << value;
mSettings[key] = QVariant(value);
}
}
@ -204,7 +202,6 @@ bool Wizard::IniSettings::parseInx(const QString &path)
const QString key(array.mid(section.length() + 3, lenght));
QString value(array.mid(section.length() + key.length() + 6));
//qDebug() << section << key << value;
// Add the value
setValue(section + QLatin1Char('/') + key, QVariant(value));

@ -58,8 +58,6 @@ Wizard::InstallationPage::InstallationPage(QWidget *parent) :
Wizard::InstallationPage::~InstallationPage()
{
qDebug() << "stop!";
if (mThread->isRunning()) {
mUnshield->stopWorker();
mThread->wait();

@ -331,12 +331,10 @@ void Wizard::MainWizard::setupPages()
void Wizard::MainWizard::importerStarted()
{
qDebug() << "importer started!";
}
void Wizard::MainWizard::importerFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
qDebug() << "importer finished!";
if (exitCode != 0 || exitStatus == QProcess::CrashExit)
return;

Loading…
Cancel
Save