Minor fixes, installation should stop after one error message now

loadfix
pvdk 11 years ago
parent 9e5e19f9cb
commit 2e1248537e

@ -13,11 +13,11 @@ Wizard::ConclusionPage::ConclusionPage(MainWizard *wizard) :
void Wizard::ConclusionPage::initializePage() void Wizard::ConclusionPage::initializePage()
{ {
// // Write the path to openmw.cfg // Write the path to openmw.cfg
// if (field(QLatin1String("installation.new")).toBool() == true) { if (field(QLatin1String("installation.new")).toBool() == true) {
// QString path(field(QLatin1String("installation.path")).toString()); QString path(field(QLatin1String("installation.path")).toString());
// mWizard->addInstallation(path); mWizard->addInstallation(path);
// } }
if (!mWizard->mError) if (!mWizard->mError)
{ {

@ -251,16 +251,15 @@ bool Wizard::UnshieldWorker::copyDirectory(const QString &source, const QString
{ {
QDir sourceDir(source); QDir sourceDir(source);
QDir destDir(destination); QDir destDir(destination);
bool result = false; bool result = true;
if (!destDir.exists()) { if (!destDir.exists()) {
if (!sourceDir.mkpath(destination)) { if (!sourceDir.mkpath(destination))
return false; return false;
}
destDir.refresh();
} }
destDir.refresh();
if (!destDir.exists()) if (!destDir.exists())
return false; return false;
@ -387,7 +386,7 @@ void Wizard::UnshieldWorker::extract()
writeSettings(); writeSettings();
// Remove the temporary directory // Remove the temporary directory
removeDirectory(getPath() + QDir::separator() + QLatin1String("extract-temp")); //removeDirectory(getPath() + QDir::separator() + QLatin1String("extract-temp"));
// Fill the progress bar // Fill the progress bar
int total = 0; int total = 0;
@ -572,6 +571,7 @@ bool Wizard::UnshieldWorker::installComponent(Component component, const QString
if (!installDirectories(dir, info.absolutePath(), false, true)) { if (!installDirectories(dir, info.absolutePath(), false, true)) {
emit error(tr("Could not install directory!"), emit error(tr("Could not install directory!"),
tr("Installing %1 to %2 failed.").arg(dir, info.absolutePath())); tr("Installing %1 to %2 failed.").arg(dir, info.absolutePath()));
return false;
} }
} }
@ -626,6 +626,7 @@ bool Wizard::UnshieldWorker::installComponent(Component component, const QString
if (!copyDirectory(sounds.absoluteFilePath(), dest)) { if (!copyDirectory(sounds.absoluteFilePath(), dest)) {
emit error(tr("Could not install directory!"), emit error(tr("Could not install directory!"),
tr("Installing %1 to %2 failed.").arg(sounds.absoluteFilePath(), dest)); tr("Installing %1 to %2 failed.").arg(sounds.absoluteFilePath(), dest));
return false;
} }
} }
@ -699,7 +700,7 @@ bool Wizard::UnshieldWorker::installComponent(Component component, const QString
bool Wizard::UnshieldWorker::extractFile(Unshield *unshield, const QString &destination, const QString &prefix, int index, int counter) bool Wizard::UnshieldWorker::extractFile(Unshield *unshield, const QString &destination, const QString &prefix, int index, int counter)
{ {
bool success; bool success = false;
QString path(destination); QString path(destination);
path.append(QDir::separator()); path.append(QDir::separator());
@ -845,7 +846,7 @@ bool Wizard::UnshieldWorker::findInCab(const QString &cabFile, const QString &fi
bool Wizard::UnshieldWorker::extractCab(const QString &cabFile, const QString &destination) bool Wizard::UnshieldWorker::extractCab(const QString &cabFile, const QString &destination)
{ {
bool success; bool success = false;
QByteArray array(cabFile.toUtf8()); QByteArray array(cabFile.toUtf8());

Loading…
Cancel
Save