mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Display more information regarding the torrent in its properties pannel
- Made properties pannel scrollable, it behaves better with the splitter
This commit is contained in:
parent
0e93e8dc9d
commit
a6f31c7950
6 changed files with 449 additions and 433 deletions
10
src/misc.h
10
src/misc.h
|
@ -41,6 +41,10 @@
|
|||
#include <QList>
|
||||
#include <QPair>
|
||||
#include <QThread>
|
||||
#include <ctime>
|
||||
#include <QDateTime>
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
#include <boost/date_time/posix_time/conversion.hpp>
|
||||
|
||||
#ifndef Q_WS_WIN
|
||||
#ifdef Q_WS_MAC
|
||||
|
@ -308,6 +312,12 @@ public:
|
|||
return hash;
|
||||
}
|
||||
|
||||
static QString boostTimeToQString(boost::optional<boost::posix_time::ptime> boostDate) {
|
||||
if(!boostDate) return tr("Unknown");
|
||||
struct std::tm tm = boost::posix_time::to_tm(*boostDate);
|
||||
return QDateTime::fromTime_t(mktime(&tm)).toString(Qt::DefaultLocaleLongDate);
|
||||
}
|
||||
|
||||
// Take a number of seconds and return an user-friendly
|
||||
// time duration like "1d 2h 10m".
|
||||
static QString userFriendlyDuration(qlonglong seconds) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue