UI: MyFort: About: Set "Check update" button's tooltip as Last Success date

This commit is contained in:
Nodir Temirkhodjaev 2024-01-28 19:02:22 +03:00
parent 1cf6727663
commit 3c43d73686
3 changed files with 6 additions and 2 deletions

View File

@ -9,6 +9,7 @@
#include <form/home/homecontroller.h>
#include <task/taskinfoupdatechecker.h>
#include <task/taskmanager.h>
#include <util/dateutil.h>
#include <util/iconcache.h>
AboutPage::AboutPage(HomeController *ctrl, QWidget *parent) : HomeBasePage(ctrl, parent)
@ -103,6 +104,8 @@ void AboutPage::setupNewVersionUpdate()
m_btDownload->setWindowFilePath(updateChecker->downloadUrl());
m_btDownload->setToolTip(updateChecker->downloadUrl());
m_btCheckUpdate->setToolTip(DateUtil::localeDateTime(updateChecker->lastSuccess()));
retranslateNewVersionBox();
};

View File

@ -198,7 +198,7 @@ QVariant dataDisplayScheduled(const AppRow &appRow, int role)
if (role != Qt::ToolTipRole || appRow.endTime.isNull())
return QString();
return DateUtil::localeDateTime(appRow.endTime, QLocale::ShortFormat);
return DateUtil::localeDateTime(appRow.endTime);
}
QVariant dataDisplayFilePath(const AppRow &appRow, int /*role*/)

View File

@ -41,7 +41,8 @@ public:
Q_INVOKABLE static quint8 parseTimeHour(const QString &period);
Q_INVOKABLE static quint8 parseTimeMinute(const QString &period);
static QString localeDateTime(const QDateTime &dateTime, QLocale::FormatType format);
static QString localeDateTime(
const QDateTime &dateTime, QLocale::FormatType format = QLocale::ShortFormat);
};
#endif // DATEUTIL_H