From ea1f959ad592c1f10c5c60908e01c220aed206a5 Mon Sep 17 00:00:00 2001 From: Tannin Date: Thu, 1 May 2014 10:03:40 +0200 Subject: - download tooltip now also includes the file description - will now display an error message when the ini file can't be updated (in addition to what windows says) --- src/downloadlist.cpp | 2 +- src/mainwindow.cpp | 5 ++++- src/shared/directoryentry.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/downloadlist.cpp b/src/downloadlist.cpp index e42f7fd4..e19e2e7b 100644 --- a/src/downloadlist.cpp +++ b/src/downloadlist.cpp @@ -82,7 +82,7 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const text += tr("Information missing, please select \"Query Info\" from the context menu to re-retrieve."); } else { const MOBase::ModRepositoryFileInfo *info = m_Manager->getFileInfo(index.row()); - return QString("%1 (ID %2) %3").arg(info->modName).arg(m_Manager->getModID(index.row())).arg(info->version.canonicalString()); + return QString("%1 (ID %2) %3
%4").arg(info->modName).arg(m_Manager->getModID(index.row())).arg(info->version.canonicalString()).arg(info->description); } return text; } else { diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 81696a4c..65b3c795 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2211,7 +2211,10 @@ void MainWindow::storeSettings() result = settings.status(); } if (result == QSettings::NoError) { - shellRename(iniFile + ".new", iniFile, true, this); + if (!shellRename(iniFile + ".new", iniFile, true, this)) { + QMessageBox::critical(this, tr("Failed to write settings"), + tr("An error occured trying to write back MO settings: %1").arg(windowsErrorString(::GetLastError()))); + } } else { QString reason = result == QSettings::AccessError ? tr("File is write protected") : result == QSettings::FormatError ? tr("Invalid file format (probably a bug)") diff --git a/src/shared/directoryentry.h b/src/shared/directoryentry.h index be4bfa60..b298cdd9 100644 --- a/src/shared/directoryentry.h +++ b/src/shared/directoryentry.h @@ -281,7 +281,7 @@ private: file = m_FileRegister->getFile(iter->second); } else { file = m_FileRegister->createFile(fileName, this); -#pragma message("this has been observed to cause a crash, no clue why") + // TODO this has been observed to cause a crash, no clue why m_Files[fileName] = file->getIndex(); } file->addOrigin(origin.getID(), fileTime, archive); -- cgit v1.3.1