Skip to content

Commit

Permalink
- Display more information regarding the torrent in its properties pa…
Browse files Browse the repository at this point in the history
…nnel

- Made properties pannel scrollable, it behaves better with the splitter
  • Loading branch information
Christophe Dumez committed Nov 12, 2009
1 parent 0e93e8d commit a6f31c7
Show file tree
Hide file tree
Showing 6 changed files with 398 additions and 382 deletions.
1 change: 1 addition & 0 deletions Changelog
Expand Up @@ -14,6 +14,7 @@
- FEATURE: Option to skip file checking and start seeding immediately in torrent addition dialog (Stephanos Antaris)
- FEATURE: Dropped dependency on libcurl
- FEATURE: Dropped Qt 4.3 support (Qt >= 4.4 is required)
- FEATURE: Display more information regarding the torrent in its properties
- FEATURE: Various optimizations to save CPU and memory
- COSMETIC: Merged download / upload lists
- COSMETIC: Torrents can be filtered based on their status
Expand Down
10 changes: 10 additions & 0 deletions src/misc.h
Expand Up @@ -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
Expand Down Expand Up @@ -308,6 +312,12 @@ class misc : public QObject{
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) {
Expand Down

0 comments on commit a6f31c7

Please sign in to comment.