summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
authorSilarn <jrim@rimpo.org>2019-02-11 20:30:45 -0600
committerSilarn <jrim@rimpo.org>2019-02-18 21:31:21 -0600
commitf7d1ce1fae80e42141198547d6c54689e085327f (patch)
treef9b111e3fe7f09ad9e5139401dec19c6cc1bea76 /src/modlist.cpp
parent2b9d2f32fbbc576c9367a24c0347e5870ff20117 (diff)
Small updates, cleanup, update code, cache settings, tooltips
Diffstat (limited to 'src/modlist.cpp')
-rw-r--r--src/modlist.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index 55241492..bb490113 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -466,15 +466,11 @@ QVariant ModList::data(const QModelIndex &modelIndex, int role) const
if (modInfo->getNexusID() > 0) {
if (!modInfo->canBeUpdated()) {
qint64 remains = QDateTime::currentDateTimeUtc().secsTo(modInfo->getExpires());
- qint64 hours = remains / 3600;
- qint64 minutes = (remains % 3600) / 60;
- QString remainsStr(tr("%1 hours and %2 minutes").arg(hours).arg(minutes));
- text += "<br>" + tr("This mod was last checked on %1. It will be available to check in %2.")
- .arg(modInfo->getLastNexusUpdate().toLocalTime().toString(Qt::DefaultLocaleShortDate))
+ qint64 minutes = remains / 60;
+ qint64 seconds = (remains % 60) / 60;
+ QString remainsStr(tr("%1 minute(s) and %2 second(s)").arg(minutes).arg(seconds));
+ text += "<br>" + tr("This mod will be available to check in %2.")
.arg(remainsStr);
- } else {
- text += "<br>" + tr("This mod is eligible for an update check.");
- text += "<br>" + tr("It was last checked on %1").arg(modInfo->getLastNexusUpdate().toLocalTime().toString(Qt::DefaultLocaleShortDate));
}
}
return text;