summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--CMakeLists.txt8
-rw-r--r--readme.md35
-rw-r--r--src/CMakeLists.txt13
-rw-r--r--src/aboutdialog.cpp2
-rw-r--r--src/aboutdialog.ui2
-rw-r--r--src/app_icon.rc4
-rw-r--r--src/installationmanager.cpp79
-rw-r--r--src/installationmanager.h2
-rw-r--r--src/nxmaccessmanager.cpp18
-rw-r--r--src/nxmaccessmanager.h2
-rw-r--r--src/selfupdater.cpp40
-rw-r--r--src/selfupdater.h8
13 files changed, 142 insertions, 77 deletions
diff --git a/.gitignore b/.gitignore
index 78e57a55..c5c631d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,9 @@ src/moc_*.cpp
src/ui_*.h
src/*.qrc.depends
src/Modorganizer.*
+CMakeLists.txt.user
+edit
+stderr.log
+stdout.log
+build
+.idea
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cfd8f902..e255f2b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,14 +1,14 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-SET(DEPENDENCIES_DIR CACHE PATH "")
+PROJECT(organizer)
+SET(DEPENDENCIES_DIR CACHE PATH "")
# hint to find qt in dependencies path
-SET(CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}/qt5/lib/cmake)
+LIST(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}/qt5/lib/cmake)
FILE(GLOB_RECURSE BOOST_ROOT ${DEPENDENCIES_DIR}/boost*/project-config.jam)
GET_FILENAME_COMPONENT(BOOST_ROOT ${BOOST_ROOT} DIRECTORY)
-FILE(GLOB_RECURSE ZLIB_ROOT ${DEPENDENCIES_DIR}/zlib*/zlib.h)
-GET_FILENAME_COMPONENT(ZLIB_ROOT ${ZLIB_ROOT} DIRECTORY)
+SET(ZLIB_ROOT ${DEPENDENCIES_DIR}/zlib)
ADD_SUBDIRECTORY(src) \ No newline at end of file
diff --git a/readme.md b/readme.md
index 130b8dfb..5965614e 100644
--- a/readme.md
+++ b/readme.md
@@ -4,4 +4,37 @@ Mod Organizer (MO) is a tool for managing mod collections of arbitrary size. It
## Building
-Please refer to [TanninOne/modorganizer-umbrella](https://github.com/TanninOne/modorganizer-umbrella) for build instructions. \ No newline at end of file
+Please refer to [TanninOne/modorganizer-umbrella](https://github.com/TanninOne/modorganizer-umbrella) for build instructions.
+
+## Other Repositories
+
+MO consists of multiple repositories on github. The Umbrella project will download them automatically as required. They should however also be buildable individually.
+Here is a complete list:
+* https://github.com/TanninOne/modorganizer
+* https://github.com/TanninOne/modorganizer-uibase
+* https://github.com/TanninOne/modorganizer-hookdll
+* https://github.com/TanninOne/modorganizer-bsatk
+* https://github.com/TanninOne/modorganizer-esptk
+* https://github.com/TanninOne/modorganizer-archive
+* https://github.com/TanninOne/modorganizer-nxmhandler
+* https://github.com/TanninOne/modorganizer-lootcli
+* https://github.com/TanninOne/modorganizer-helper
+* https://github.com/TanninOne/modorganizer-tool_nmmimport
+* https://github.com/TanninOne/modorganizer-tool_pyniedit
+* https://github.com/TanninOne/modorganizer-tool_inieditor
+* https://github.com/TanninOne/modorganizer-preview_base
+* https://github.com/TanninOne/modorganizer-diagnose_basic
+* https://github.com/TanninOne/modorganizer-installer_quick
+* https://github.com/TanninOne/modorganizer-installer_manual
+* https://github.com/TanninOne/modorganizer-installer_fomod
+* https://github.com/TanninOne/modorganizer-installer_bundle
+* https://github.com/TanninOne/modorganizer-installer_bain
+* https://github.com/TanninOne/modorganizer-game_skyrim
+* https://github.com/TanninOne/modorganizer-game_oblivion
+* https://github.com/TanninOne/modorganizer-game_fallout3
+* https://github.com/TanninOne/modorganizer-game_falloutnv
+* https://github.com/TanninOne/modorganizer-game_gamebryo
+* https://github.com/TanninOne/modorganizer-game_features
+* https://github.com/TanninOne/modorganizer-check_fnis
+* https://github.com/TanninOne/modorganizer-plugin_python
+* https://github.com/TanninOne/modorganizer-bsa_extractor
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ab981e1b..22b725de 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,4 @@
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
-PROJECT(organizer)
CMAKE_POLICY(SET CMP0020 NEW)
#CMAKE_POLICY(SET CMP0043 NEW)
@@ -167,7 +166,6 @@ SET(organizer_HDRS
aboutdialog.h
json.h
safewritefile.h
- pdll.h
modflagicondelegate.h
genericicondelegate.h
organizerproxy.h
@@ -208,14 +206,12 @@ SET(organizer_UIS
mainwindow.ui
lockeddialog.ui
installdialog.ui
- fomodinstallerdialog.ui
finddialog.ui
editexecutablesdialog.ui
downloadlistwidgetcompact.ui
downloadlistwidget.ui
credentialsdialog.ui
categoriesdialog.ui
- baincomplexinstallerdialog.ui
activatemodsdialog.ui
profileinputdialog.ui
savetextasdialog.ui
@@ -232,7 +228,7 @@ SET(organizer_QRCS
SET(organizer_RCS
app_icon.rc
- #version.rc
+ version.rc
)
@@ -283,8 +279,9 @@ INCLUDE_DIRECTORIES(${project_path}/uibase/src
${project_path}/esptk/src
${project_path}/archive/src
${project_path}/plugin/game_features/src)
-INCLUDE_DIRECTORIES(shared)
-LINK_DIRECTORIES(${lib_path})
+INCLUDE_DIRECTORIES(shared ${ZLIB_INCLUDE_DIRS})
+LINK_DIRECTORIES(${lib_path}
+ ${project_path}/zlib/lib)
ADD_DEFINITIONS(-D_UNICODE -DUNICODE -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS)
@@ -301,7 +298,7 @@ SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES LINK_FLAGS_RELWITHDEBINFO
"/LTCG /INCREMENTAL:NO /LARGEADDRESSAWARE /OPT:REF /OPT:ICF")
-QT5_USE_MODULES(ModOrganizer Widgets Declarative Network WebkitWidgets)
+QT5_USE_MODULES(ModOrganizer Widgets Declarative Network WebEngineWidgets)
###############
diff --git a/src/aboutdialog.cpp b/src/aboutdialog.cpp
index 7b311263..6fce2acb 100644
--- a/src/aboutdialog.cpp
+++ b/src/aboutdialog.cpp
@@ -37,7 +37,7 @@ AboutDialog::AboutDialog(const QString &version, QWidget *parent)
m_LicenseFiles[LICENSE_ZLIB] = "zlib.txt";
m_LicenseFiles[LICENSE_APACHE2] = "apache-license-2.0.txt";
- addLicense("Qt 5.4", LICENSE_LGPL3);
+ addLicense("Qt", LICENSE_LGPL3);
addLicense("Qt Json", LICENSE_GPL3);
addLicense("Boost Library", LICENSE_BOOST);
addLicense("7-zip", LICENSE_LGPL3);
diff --git a/src/aboutdialog.ui b/src/aboutdialog.ui
index 2806921f..ea5d2141 100644
--- a/src/aboutdialog.ui
+++ b/src/aboutdialog.ui
@@ -90,7 +90,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
- <string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&lt;/p&gt;&lt;p&gt;See the GNU General Public License for more details.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&lt;/p&gt;&lt;p&gt;See the GNU General Public License for more details.&lt;/p&gt;&lt;p&gt;Source code can be found at &lt;a href=&quot;https://github.com/TanninOne/modorganizer&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;GitHub&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
diff --git a/src/app_icon.rc b/src/app_icon.rc
index 2550f49d..6e79ef7d 100644
--- a/src/app_icon.rc
+++ b/src/app_icon.rc
@@ -1,3 +1 @@
-#include "version.rc"
-
- IDI_ICON1 ICON DISCARDABLE "mo_icon.ico"
+IDI_ICON1 ICON DISCARDABLE "mo_icon.ico"
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp
index ead9b3dc..f96cd0f3 100644
--- a/src/installationmanager.cpp
+++ b/src/installationmanager.cpp
@@ -34,6 +34,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <installationtester.h>
#include <gameinfo.h>
#include <utility.h>
+#include <scopeguard.h>
#include <QFileInfo>
#include <QLibrary>
#include <QInputDialog>
@@ -71,7 +72,6 @@ static T resolveFunction(QLibrary &lib, const char *name)
InstallationManager::InstallationManager()
: m_ParentWidget(nullptr)
- , m_InstallationProgress(nullptr)
, m_SupportedExtensions({ "zip", "rar", "7z", "fomod", "001" })
{
QLibrary archiveLib("dlls\\archive.dll");
@@ -85,8 +85,6 @@ InstallationManager::InstallationManager()
if (!m_ArchiveHandler->isValid()) {
throw MyException(getErrorString(m_ArchiveHandler->getLastError()));
}
-
- m_InstallationProgress.setWindowFlags(m_InstallationProgress.windowFlags() & (~Qt::WindowContextHelpButtonHint));
}
@@ -97,7 +95,6 @@ InstallationManager::~InstallationManager()
void InstallationManager::setParentWidget(QWidget *widget)
{
- m_InstallationProgress.setParent(widget, Qt::Dialog);
for (IPluginInstaller *installer : m_Installers) {
installer->setParentWidget(widget);
}
@@ -167,19 +164,24 @@ bool InstallationManager::unpackSingleFile(const QString &fileName)
return false;
}
- m_InstallationProgress.setWindowTitle(tr("Extracting files"));
- m_InstallationProgress.setLabelText(QString());
- m_InstallationProgress.setValue(0);
- m_InstallationProgress.setWindowModality(Qt::WindowModal);
- m_InstallationProgress.show();
+ m_InstallationProgress = new QProgressDialog(m_ParentWidget);
+ ON_BLOCK_EXIT([this] () {
+ m_InstallationProgress->hide();
+ m_InstallationProgress->deleteLater();
+ m_InstallationProgress = nullptr;
+ });
+ m_InstallationProgress->setWindowFlags(
+ m_InstallationProgress->windowFlags() & ~Qt::WindowContextHelpButtonHint);
+
+ m_InstallationProgress->setWindowTitle(tr("Extracting files"));
+ m_InstallationProgress->setWindowModality(Qt::WindowModal);
+ m_InstallationProgress->show();
bool res = m_ArchiveHandler->extract(QDir::tempPath(),
new MethodCallback<InstallationManager, void, float>(this, &InstallationManager::updateProgress),
nullptr,
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::report7ZipError));
- m_InstallationProgress.hide();
-
return res;
}
@@ -187,7 +189,7 @@ bool InstallationManager::unpackSingleFile(const QString &fileName)
QString InstallationManager::extractFile(const QString &fileName)
{
if (unpackSingleFile(fileName)) {
- return QDir::tempPath().append("/").append(QFileInfo(fileName).fileName());
+ return QDir::tempPath() + "/" + QFileInfo(fileName).fileName();
} else {
return QString();
}
@@ -211,7 +213,7 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool
{
QStringList files;
- foreach (const QString &file, filesOrig) {
+ for (const QString &file : filesOrig) {
files.append(canonicalize(file));
}
@@ -250,22 +252,26 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool
}
}
- m_InstallationProgress.setWindowTitle(tr("Extracting files"));
- m_InstallationProgress.setLabelText(QString());
- m_InstallationProgress.setValue(0);
- m_InstallationProgress.setWindowModality(Qt::WindowModal);
- m_InstallationProgress.show();
+ m_InstallationProgress = new QProgressDialog(m_ParentWidget);
+ ON_BLOCK_EXIT([this] () {
+ m_InstallationProgress->hide();
+ m_InstallationProgress->deleteLater();
+ m_InstallationProgress = nullptr;
+ });
+ m_InstallationProgress->setWindowFlags(
+ m_InstallationProgress->windowFlags() & (~Qt::WindowContextHelpButtonHint));
+ m_InstallationProgress->setWindowTitle(tr("Extracting files"));
+ m_InstallationProgress->setWindowModality(Qt::WindowModal);
+ m_InstallationProgress->show();
// unpack only the files we need for the installer
if (!m_ArchiveHandler->extract(QDir::tempPath(),
new MethodCallback<InstallationManager, void, float>(this, &InstallationManager::updateProgress),
nullptr,
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::report7ZipError))) {
- m_InstallationProgress.hide();
throw MyException(QString("extracting failed (%1)").arg(m_ArchiveHandler->getLastError()));
}
- m_InstallationProgress.hide();
return result;
}
@@ -388,17 +394,21 @@ DirectoryTree::Node *InstallationManager::getSimpleArchiveBase(DirectoryTree *da
void InstallationManager::updateProgress(float percentage)
{
- m_InstallationProgress.setValue(static_cast<int>(percentage * 100.0));
- if (m_InstallationProgress.wasCanceled()) {
- m_ArchiveHandler->cancel();
- m_InstallationProgress.reset();
+ if (m_InstallationProgress != nullptr) {
+ m_InstallationProgress->setValue(static_cast<int>(percentage * 100.0));
+ if (m_InstallationProgress->wasCanceled()) {
+ m_ArchiveHandler->cancel();
+ m_InstallationProgress->reset();
+ }
}
}
void InstallationManager::updateProgressFile(QString const &fileName)
{
- m_InstallationProgress.setLabelText(fileName);
+ if (m_InstallationProgress != nullptr) {
+ m_InstallationProgress->setLabelText(fileName);
+ }
}
@@ -530,16 +540,21 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, int modID,
qDebug("installing to \"%s\"", targetDirectoryNative.toUtf8().constData());
- m_InstallationProgress.setWindowTitle(tr("Extracting files"));
- m_InstallationProgress.setLabelText(QString());
- m_InstallationProgress.setValue(0);
- m_InstallationProgress.setWindowModality(Qt::WindowModal);
- m_InstallationProgress.show();
+ m_InstallationProgress = new QProgressDialog(m_ParentWidget);
+ ON_BLOCK_EXIT([this] () {
+ m_InstallationProgress->hide();
+ m_InstallationProgress->deleteLater();
+ m_InstallationProgress = nullptr;
+ });
+
+ m_InstallationProgress->setWindowFlags(
+ m_InstallationProgress->windowFlags() & (~Qt::WindowContextHelpButtonHint));
+ m_InstallationProgress->setWindowModality(Qt::WindowModal);
+ m_InstallationProgress->show();
if (!m_ArchiveHandler->extract(targetDirectory,
new MethodCallback<InstallationManager, void, float>(this, &InstallationManager::updateProgress),
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::updateProgressFile),
new MethodCallback<InstallationManager, void, QString const &>(this, &InstallationManager::report7ZipError))) {
- m_InstallationProgress.hide();
if (m_ArchiveHandler->getLastError() == Archive::ERROR_EXTRACT_CANCELLED) {
return false;
} else {
@@ -547,8 +562,6 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, int modID,
}
}
- m_InstallationProgress.hide();
-
QSettings settingsFile(targetDirectory + "/meta.ini", QSettings::IniFormat);
// overwrite settings only if they are actually are available or haven't been set before
diff --git a/src/installationmanager.h b/src/installationmanager.h
index d73f4653..5a8ec9d2 100644
--- a/src/installationmanager.h
+++ b/src/installationmanager.h
@@ -206,7 +206,7 @@ private:
Archive *m_ArchiveHandler;
QString m_CurrentFile;
- QProgressDialog m_InstallationProgress;
+ QProgressDialog *m_InstallationProgress { nullptr };
std::set<QString> m_TempFilesToDelete;
diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp
index 07a75910..0763bb71 100644
--- a/src/nxmaccessmanager.cpp
+++ b/src/nxmaccessmanager.cpp
@@ -52,7 +52,6 @@ const std::set<int> NXMAccessManager::s_PremiumAccountStates { 4, 6, 13, 27, 31,
NXMAccessManager::NXMAccessManager(QObject *parent, const QString &moVersion)
: QNetworkAccessManager(parent)
, m_LoginReply(nullptr)
- , m_ProgressDialog()
, m_MOVersion(moVersion)
{
m_LoginTimeout.setSingleShot(true);
@@ -239,10 +238,11 @@ void NXMAccessManager::pageLogin()
request.setRawHeader("User-Agent", userAgent().toUtf8());
- m_ProgressDialog.setLabelText(tr("Logging into Nexus"));
- QList<QPushButton*> buttons = m_ProgressDialog.findChildren<QPushButton*>();
+ m_ProgressDialog = new QProgressDialog(nullptr);
+ m_ProgressDialog->setLabelText(tr("Logging into Nexus"));
+ QList<QPushButton*> buttons = m_ProgressDialog->findChildren<QPushButton*>();
buttons.at(0)->setEnabled(false);
- m_ProgressDialog.show();
+ m_ProgressDialog->show();
QCoreApplication::processEvents(); // for some reason the whole app hangs during the login. This way the user has at least a little feedback
m_LoginReply = post(request, postDataQuery);
@@ -269,7 +269,10 @@ void NXMAccessManager::loginTimeout()
void NXMAccessManager::loginError(QNetworkReply::NetworkError)
{
qDebug("login error");
- m_ProgressDialog.hide();
+ if (m_ProgressDialog != nullptr) {
+ m_ProgressDialog->deleteLater();
+ m_ProgressDialog = nullptr;
+ }
m_Username.clear();
m_Password.clear();
m_LoginState = LOGIN_NOT_VALID;
@@ -300,7 +303,10 @@ bool NXMAccessManager::hasLoginCookies() const
void NXMAccessManager::loginFinished()
{
- m_ProgressDialog.hide();
+ if (m_ProgressDialog != nullptr) {
+ m_ProgressDialog->deleteLater();
+ m_ProgressDialog = nullptr;
+ }
m_LoginReply->deleteLater();
m_LoginReply = nullptr;
diff --git a/src/nxmaccessmanager.h b/src/nxmaccessmanager.h
index 2b615cdc..a03dbe36 100644
--- a/src/nxmaccessmanager.h
+++ b/src/nxmaccessmanager.h
@@ -109,7 +109,7 @@ private:
QTimer m_LoginTimeout;
QNetworkReply *m_LoginReply;
- QProgressDialog m_ProgressDialog;
+ QProgressDialog *m_ProgressDialog { nullptr };
QString m_MOVersion;
QString m_NMMVersion;
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp
index 724b89db..5cd6cf36 100644
--- a/src/selfupdater.cpp
+++ b/src/selfupdater.cpp
@@ -61,11 +61,8 @@ SelfUpdater::SelfUpdater(NexusInterface *nexusInterface)
, m_Interface(nexusInterface)
, m_UpdateRequestID(-1)
, m_Reply(nullptr)
- , m_Progress(nullptr)
, m_Attempts(3)
{
- m_Progress.setMaximum(100);
-
QLibrary archiveLib("dlls\\archive.dll");
if (!archiveLib.load()) {
throw MyException(tr("archive.dll not loaded: \"%1\"").arg(archiveLib.errorString()));
@@ -78,7 +75,7 @@ SelfUpdater::SelfUpdater(NexusInterface *nexusInterface)
throw MyException(InstallationManager::getErrorString(m_ArchiveHandler->getLastError()));
}
- connect(&m_Progress, SIGNAL(canceled()), this, SLOT(downloadCancel()));
+ connect(m_Progress, SIGNAL(canceled()), this, SLOT(downloadCancel()));
VS_FIXEDFILEINFO version = GetFileVersion(ToWString(QApplication::applicationFilePath()));
@@ -136,12 +133,23 @@ void SelfUpdater::startUpdate()
void SelfUpdater::showProgress()
{
- m_Progress.setModal(true);
- m_Progress.setParent(m_Parent, Qt::Dialog);
- m_Progress.show();
- m_Progress.setValue(0);
- m_Progress.setWindowTitle(tr("Update"));
- m_Progress.setLabelText(tr("Download in progress"));
+ if (m_Progress == nullptr) {
+ m_Progress = new QProgressDialog(m_Parent, Qt::Dialog);
+ }
+ m_Progress->setModal(true);
+ m_Progress->show();
+ m_Progress->setValue(0);
+ m_Progress->setWindowTitle(tr("Update"));
+ m_Progress->setLabelText(tr("Download in progress"));
+}
+
+void SelfUpdater::closeProgress()
+{
+ if (m_Progress != nullptr) {
+ m_Progress->hide();
+ m_Progress->deleteLater();
+ m_Progress = nullptr;
+ }
}
void SelfUpdater::download(const QString &downloadLink, const QString &fileName)
@@ -168,7 +176,9 @@ void SelfUpdater::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
m_Reply->abort();
} else {
if (bytesTotal != 0) {
- m_Progress.setValue((bytesReceived * 100) / bytesTotal);
+ if (m_Progress != nullptr) {
+ m_Progress->setValue((bytesReceived * 100) / bytesTotal);
+ }
}
}
}
@@ -196,7 +206,8 @@ void SelfUpdater::downloadFinished()
m_Canceled = true;
}
- m_Progress.hide();
+ closeProgress();
+
m_Reply->close();
m_Reply->deleteLater();
m_Reply = nullptr;
@@ -423,7 +434,7 @@ void SelfUpdater::nxmFilesAvailable(int, QVariant userData, QVariant resultData,
} else {
qCritical("no file for update found");
MessageDialog::showMessage(tr("no file for update found. Please update manually."), m_Parent);
- m_Progress.hide();
+ closeProgress();
}
}
@@ -458,8 +469,7 @@ void SelfUpdater::nxmDownloadURLsAvailable(int, int, QVariant userData, QVariant
download(dlServer["URI"].toString(), userData.toString());
} else {
MessageDialog::showMessage(tr("No download server available. Please try again later."), m_Parent);
- m_Progress.hide();
+ closeProgress();
}
}
}
-
diff --git a/src/selfupdater.h b/src/selfupdater.h
index ac9bddb3..f804f63c 100644
--- a/src/selfupdater.h
+++ b/src/selfupdater.h
@@ -32,6 +32,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
class NexusInterface;
+
/**
* @brief manages updates for Mod Organizer itself
* This class is used to update the Mod Organizer
@@ -39,7 +40,7 @@ class NexusInterface;
* 1. call testForUpdate() to determine is available
* 2. if the updateAvailable() signal is received, allow the user to start the update
* 3. if the user start the update, call startUpdate()
- * 4. startUpdate() will first query a list of files, try to determine if there is an
+ * 4. startUpdate() will first query a list of files, try to determine if there is an
* incremental update. If not, the user will have to confirm the download of a full download.
* Once the correct file is selected, it is downloaded.
* 5. before the downloaded file is extracted, existing files that are going to be replaced are
@@ -48,7 +49,7 @@ class NexusInterface;
* 7. finally, a restart is requested via signal.
* 8. at restart, Mod Organizer will remove the update_backup directory since none of the files
* should now be open
- *
+ *
* @todo use NexusBridge
**/
class SelfUpdater : public QObject
@@ -118,6 +119,7 @@ private:
void report7ZipError(const QString &errorMessage);
QString retrieveNews(const QString &description);
void showProgress();
+ void closeProgress();
private slots:
@@ -135,7 +137,7 @@ private:
QString m_NewestVersion;
QFile m_UpdateFile;
QNetworkReply *m_Reply;
- QProgressDialog m_Progress;
+ QProgressDialog *m_Progress { nullptr };
bool m_Canceled;
int m_Attempts;