From e7c59b26e1c04251c38df038e93990a29ae09808 Mon Sep 17 00:00:00 2001 From: Krzysztof Starecki Date: Mon, 31 Dec 2018 20:45:12 +0100 Subject: Fix nullptr bug with download meta info --- src/downloadlistwidget.cpp | 3 +- src/downloadlistwidget.h | 2 +- src/organizer_en.ts | 164 ++++++++++++++++++++++----------------------- 3 files changed, 85 insertions(+), 84 deletions(-) (limited to 'src') diff --git a/src/downloadlistwidget.cpp b/src/downloadlistwidget.cpp index 6c7447c8..393a8a98 100644 --- a/src/downloadlistwidget.cpp +++ b/src/downloadlistwidget.cpp @@ -91,7 +91,8 @@ void DownloadListWidget::setSourceModel(DownloadList *sourceModel) void DownloadListWidget::setMetaDisplay(bool metaDisplay) { - m_SourceModel->setMetaDisplay(metaDisplay); + if (m_SourceModel != nullptr) + m_SourceModel->setMetaDisplay(metaDisplay); } void DownloadListWidget::onDoubleClick(const QModelIndex &index) diff --git a/src/downloadlistwidget.h b/src/downloadlistwidget.h index c8d4fe6e..bfe504aa 100644 --- a/src/downloadlistwidget.h +++ b/src/downloadlistwidget.h @@ -98,7 +98,7 @@ private slots: private: DownloadManager *m_Manager; - DownloadList *m_SourceModel; + DownloadList *m_SourceModel = 0; int m_ContextRow; }; diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 48936ca9..8576b392 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -390,145 +390,145 @@ p, li { white-space: pre-wrap; } DownloadListWidget - + Install - + Query Info - + Visit on Nexus - + Open File - - - + + + Show in Folder - + Delete - + Un-Hide - + Hide - + Cancel - + Pause - + Resume - + Delete Installed... - + Delete Uninstalled... - + Delete All... - + Hide Installed... - + Hide Uninstalled... - + Hide All... - + Un-Hide All... - - - - + + + + Delete Files? - + This will permanently delete the selected download. - + This will remove all finished downloads from this list and from disk. - + This will remove all installed downloads from this list and from disk. - + This will remove all uninstalled downloads from this list and from disk. - - - + + + Are you sure? - + This will remove all finished downloads from this list (but NOT from disk). - + This will remove all installed downloads from this list (but NOT from disk). - + This will remove all uninstalled downloads from this list (but NOT from disk). @@ -2276,7 +2276,7 @@ Please enter a name: - + Are you sure? @@ -2603,13 +2603,13 @@ You can also use online editors and converters instead. - + Enable selected - + Disable selected @@ -2670,13 +2670,13 @@ You can also use online editors and converters instead. - + Exception: - + Unknown exception @@ -2814,7 +2814,7 @@ Click OK to restart MO now. - + Set Priority @@ -2879,196 +2879,196 @@ Click OK to restart MO now. - + Thank you! - + Thank you for your endorsement! - + Request to Nexus failed: %1 - - + + failed to read %1: %2 - - + + Error - + failed to extract %1 (errorcode %2) - + Extract BSA - + This archive contains invalid hashes. Some files may be broken. - + Extract... - + This will restart MO, continue? - + Edit Categories... - + Deselect filter - + Remove - + Enable all - + Disable all - + Unlock load order - + Lock load order - + Open Origin in Explorer - + Open Origin Info... - + depends on missing "%1" - + incompatible with "%1" - + Please wait while LOOT is running - + loot failed. Exit code was: %1 - + failed to start loot - + failed to run loot: %1 - + Errors occured - + Backup of load order created - + Choose backup to restore - + No Backups - + There are no backups to restore - - + + Restore failed - - + + Failed to restore the backup. Errorcode: %1 - + Backup of modlist created - + A file with the same name has already been downloaded. What would you like to do? - + Overwrite - + Rename new file - + Ignore file - + Set the priority of the selected mods -- cgit v1.3.1