mirror of
https://github.com/tnodir/fort
synced 2024-11-15 11:35:07 +00:00
UI: MyFort: About: Set "Check update" button's tooltip as Last Success date
This commit is contained in:
parent
1cf6727663
commit
3c43d73686
@ -9,6 +9,7 @@
|
|||||||
#include <form/home/homecontroller.h>
|
#include <form/home/homecontroller.h>
|
||||||
#include <task/taskinfoupdatechecker.h>
|
#include <task/taskinfoupdatechecker.h>
|
||||||
#include <task/taskmanager.h>
|
#include <task/taskmanager.h>
|
||||||
|
#include <util/dateutil.h>
|
||||||
#include <util/iconcache.h>
|
#include <util/iconcache.h>
|
||||||
|
|
||||||
AboutPage::AboutPage(HomeController *ctrl, QWidget *parent) : HomeBasePage(ctrl, parent)
|
AboutPage::AboutPage(HomeController *ctrl, QWidget *parent) : HomeBasePage(ctrl, parent)
|
||||||
@ -103,6 +104,8 @@ void AboutPage::setupNewVersionUpdate()
|
|||||||
m_btDownload->setWindowFilePath(updateChecker->downloadUrl());
|
m_btDownload->setWindowFilePath(updateChecker->downloadUrl());
|
||||||
m_btDownload->setToolTip(updateChecker->downloadUrl());
|
m_btDownload->setToolTip(updateChecker->downloadUrl());
|
||||||
|
|
||||||
|
m_btCheckUpdate->setToolTip(DateUtil::localeDateTime(updateChecker->lastSuccess()));
|
||||||
|
|
||||||
retranslateNewVersionBox();
|
retranslateNewVersionBox();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ QVariant dataDisplayScheduled(const AppRow &appRow, int role)
|
|||||||
if (role != Qt::ToolTipRole || appRow.endTime.isNull())
|
if (role != Qt::ToolTipRole || appRow.endTime.isNull())
|
||||||
return QString();
|
return QString();
|
||||||
|
|
||||||
return DateUtil::localeDateTime(appRow.endTime, QLocale::ShortFormat);
|
return DateUtil::localeDateTime(appRow.endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant dataDisplayFilePath(const AppRow &appRow, int /*role*/)
|
QVariant dataDisplayFilePath(const AppRow &appRow, int /*role*/)
|
||||||
|
@ -41,7 +41,8 @@ public:
|
|||||||
Q_INVOKABLE static quint8 parseTimeHour(const QString &period);
|
Q_INVOKABLE static quint8 parseTimeHour(const QString &period);
|
||||||
Q_INVOKABLE static quint8 parseTimeMinute(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
|
#endif // DATEUTIL_H
|
||||||
|
Loading…
Reference in New Issue
Block a user