From 3cf26eb273b5bd6dae6bdefe96dba58375ae76d0 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Thu, 29 Aug 2013 00:37:37 +0000 Subject: [PATCH] revert quint64/quint32/qint64/qint32 use to inttypes to match libtransmission's API --- qt/app.cc | 2 +- qt/details.cc | 22 +++++++++++----------- qt/file-tree.cc | 14 +++++++------- qt/file-tree.h | 14 +++++++------- qt/formatter.cc | 4 ++-- qt/formatter.h | 4 ++-- qt/freespace-label.cc | 10 +++++----- qt/freespace-label.h | 4 ++-- qt/options.cc | 22 +++++++++++----------- qt/options.h | 12 ++++++------ qt/prefs.cc | 2 +- qt/session.cc | 18 +++++++++--------- qt/session.h | 12 ++++++------ qt/torrent-delegate.cc | 2 +- qt/torrent-model.cc | 4 ++-- qt/torrent.cc | 16 ++++++++-------- qt/torrent.h | 26 +++++++++++++------------- 17 files changed, 94 insertions(+), 94 deletions(-) diff --git a/qt/app.cc b/qt/app.cc index 49ce09752..139a64777 100644 --- a/qt/app.cc +++ b/qt/app.cc @@ -477,7 +477,7 @@ MyApp :: notify (const QString& title, const QString& body) const args.append (body); // body args.append (QStringList ()); // actions - unused for plain passive popups args.append (QVariantMap ()); // hints - unused atm - args.append (qint32 (-1)); // use the default timeout period + args.append (int32_t (-1)); // use the default timeout period m.setArguments (args); QDBusMessage replyMsg = QDBusConnection::sessionBus ().call (m); //std::cerr << qPrintable (replyMsg.errorName ()) << std::endl; diff --git a/qt/details.cc b/qt/details.cc index 7d2170420..ef40f0a9c 100644 --- a/qt/details.cc +++ b/qt/details.cc @@ -412,10 +412,10 @@ Details :: refresh () double sizeWhenDone = 0; double leftUntilDone = 0; double available = 0; - qint64 haveTotal = 0; - qint64 haveVerified = 0; - qint64 haveUnverified = 0; - qint64 verifiedPieces = 0; + int64_t haveTotal = 0; + int64_t haveVerified = 0; + int64_t haveUnverified = 0; + int64_t verifiedPieces = 0; if (torrents.empty ()) { string = none; @@ -428,7 +428,7 @@ Details :: refresh () { haveTotal += t->haveTotal (); haveUnverified += t->haveUnverified (); - const quint64 v = t->haveVerified (); + const uint64_t v = t->haveVerified (); haveVerified += v; if (t->pieceSize ()) verifiedPieces += v / t->pieceSize (); @@ -480,8 +480,8 @@ Details :: refresh () } else { - quint64 d = 0; - quint64 f = 0; + uint64_t d = 0; + uint64_t f = 0; foreach (const Torrent * t, torrents) { d += t->downloadedEver (); @@ -503,8 +503,8 @@ Details :: refresh () } else { - quint64 u = 0; - quint64 d = 0; + uint64_t u = 0; + uint64_t d = 0; foreach (const Torrent * t, torrents) { u += t->uploadedEver (); @@ -633,8 +633,8 @@ Details :: refresh () else { int pieces = 0; - quint64 size = 0; - quint32 pieceSize = torrents[0]->pieceSize (); + uint64_t size = 0; + uint32_t pieceSize = torrents[0]->pieceSize (); foreach (const Torrent * t, torrents) { pieces += t->pieceCount (); diff --git a/qt/file-tree.cc b/qt/file-tree.cc index 4832b006d..8075aa259 100644 --- a/qt/file-tree.cc +++ b/qt/file-tree.cc @@ -163,7 +163,7 @@ FileTreeItem :: data (int column, int role) const } void -FileTreeItem :: getSubtreeWantedSize (quint64& have, quint64& total) const +FileTreeItem :: getSubtreeWantedSize (uint64_t& have, uint64_t& total) const { if (myIsWanted) { @@ -179,7 +179,7 @@ double FileTreeItem :: progress () const { double d(0); - quint64 have(0), total(0); + uint64_t have(0), total(0); getSubtreeWantedSize (have, total); if (total) @@ -199,8 +199,8 @@ FileTreeItem :: sizeString () const } else { - quint64 have = 0; - quint64 total = 0; + uint64_t have = 0; + uint64_t total = 0; getSubtreeWantedSize (have, total); str = Formatter::sizeToString (total); } @@ -212,7 +212,7 @@ std::pair FileTreeItem :: update (const QString& name, bool wanted, int priority, - quint64 haveSize, + uint64_t haveSize, bool updateFields) { int changed_count = 0; @@ -605,8 +605,8 @@ FileTreeModel :: addFile (int fileIndex, const QString & filename, bool wanted, int priority, - quint64 totalSize, - quint64 have, + uint64_t totalSize, + uint64_t have, QList & rowsAdded, bool updateFields) { diff --git a/qt/file-tree.h b/qt/file-tree.h index 6a61cb32c..c65000953 100644 --- a/qt/file-tree.h +++ b/qt/file-tree.h @@ -43,7 +43,7 @@ class FileTreeItem: public QObject virtual ~FileTreeItem(); - FileTreeItem (const QString& name="", int fileIndex=-1, quint64 size=0): + FileTreeItem (const QString& name="", int fileIndex=-1, uint64_t size=0): myFileIndex (fileIndex), myParent (0), myName (name), @@ -63,18 +63,18 @@ class FileTreeItem: public QObject int row () const; const QString& name () const { return myName; } QVariant data (int column, int role) const; - std::pair update (const QString& name, bool want, int priority, quint64 have, bool updateFields); + std::pair update (const QString& name, bool want, int priority, uint64_t have, bool updateFields); void twiddleWanted (QSet& fileIds, bool&); void twiddlePriority (QSet& fileIds, int&); int fileIndex () const { return myFileIndex; } - quint64 totalSize () const { return myTotalSize; } + uint64_t totalSize () const { return myTotalSize; } private: void setSubtreePriority (int priority, QSet& fileIds); void setSubtreeWanted (bool, QSet& fileIds); QString priorityString () const; QString sizeString () const; - void getSubtreeWantedSize (quint64& have, quint64& total) const; + void getSubtreeWantedSize (uint64_t& have, uint64_t& total) const; double progress () const; int priority () const; int isSubtreeWanted () const; @@ -87,8 +87,8 @@ class FileTreeItem: public QObject QString myName; int myPriority; bool myIsWanted; - quint64 myHaveSize; - const quint64 myTotalSize; + uint64_t myHaveSize; + const uint64_t myTotalSize; size_t myFirstUnhashedRow; }; @@ -120,7 +120,7 @@ class FileTreeModel: public QAbstractItemModel void clear (); void addFile (int index, const QString& filename, bool wanted, int priority, - quint64 size, quint64 have, + uint64_t size, uint64_t have, QList& rowsAdded, bool torrentChanged); diff --git a/qt/formatter.cc b/qt/formatter.cc index ff25c4e24..a6e527275 100644 --- a/qt/formatter.cc +++ b/qt/formatter.cc @@ -92,7 +92,7 @@ Speed :: fromKBps (double KBps) ***/ QString -Formatter :: memToString (qint64 bytes) +Formatter :: memToString (int64_t bytes) { if (bytes < 0) return tr ("Unknown"); @@ -106,7 +106,7 @@ Formatter :: memToString (qint64 bytes) } QString -Formatter :: sizeToString (qint64 bytes) +Formatter :: sizeToString (int64_t bytes) { if (bytes < 0) return tr ("Unknown"); diff --git a/qt/formatter.h b/qt/formatter.h index 129a97ef7..7ae4739ae 100644 --- a/qt/formatter.h +++ b/qt/formatter.h @@ -30,8 +30,8 @@ class Formatter: public QObject public: - static QString memToString (qint64 bytes); - static QString sizeToString (qint64 bytes); + static QString memToString (int64_t bytes); + static QString sizeToString (int64_t bytes); static QString speedToString (const Speed& speed); static QString percentToString (double x); static QString ratioToString (double ratio); diff --git a/qt/freespace-label.cc b/qt/freespace-label.cc index d38500338..3a612d3c2 100644 --- a/qt/freespace-label.cc +++ b/qt/freespace-label.cc @@ -36,8 +36,8 @@ FreespaceLabel :: FreespaceLabel (Session & session, connect (&myTimer, SIGNAL(timeout()), this, SLOT(onTimer())); - connect (&mySession, SIGNAL(executed(qint64, const QString&, struct tr_variant*)), - this, SLOT(onSessionExecuted(qint64, const QString&, struct tr_variant*))); + connect (&mySession, SIGNAL(executed(int64_t, const QString&, struct tr_variant*)), + this, SLOT(onSessionExecuted(int64_t, const QString&, struct tr_variant*))); setPath (path); } @@ -56,7 +56,7 @@ FreespaceLabel :: setPath (const QString& path) void FreespaceLabel :: onTimer () { - const qint64 tag = mySession.getUniqueTag (); + const int64_t tag = mySession.getUniqueTag (); const QByteArray myPathUtf8 = myPath.toUtf8 (); myTag = tag; @@ -71,7 +71,7 @@ FreespaceLabel :: onTimer () } void -FreespaceLabel :: onSessionExecuted (qint64 tag, const QString& result, struct tr_variant * arguments) +FreespaceLabel :: onSessionExecuted (int64_t tag, const QString& result, struct tr_variant * arguments) { Q_UNUSED (result); @@ -81,7 +81,7 @@ FreespaceLabel :: onSessionExecuted (qint64 tag, const QString& result, struct t QString str; // update the label - qint64 bytes = -1; + int64_t bytes = -1; tr_variantDictFindInt (arguments, TR_KEY_size_bytes, &bytes); if (bytes >= 0) setText (tr("%1 free").arg(Formatter::sizeToString (bytes))); diff --git a/qt/freespace-label.h b/qt/freespace-label.h index d24ff661a..e79cc9c46 100644 --- a/qt/freespace-label.h +++ b/qt/freespace-label.h @@ -31,12 +31,12 @@ class FreespaceLabel: public QLabel private: Session& mySession; - qint64 myTag; + int64_t myTag; QString myPath; QTimer myTimer; private slots: - void onSessionExecuted (qint64 tag, const QString& result, struct tr_variant * arguments); + void onSessionExecuted (int64_t tag, const QString& result, struct tr_variant * arguments); void onTimer (); }; diff --git a/qt/options.cc b/qt/options.cc index 630a8093a..2f5ad80af 100644 --- a/qt/options.cc +++ b/qt/options.cc @@ -47,7 +47,7 @@ ***/ void -FileAdded :: executed (qint64 tag, const QString& result, struct tr_variant * arguments) +FileAdded :: executed (int64_t tag, const QString& result, struct tr_variant * arguments) { Q_UNUSED (arguments); @@ -375,7 +375,7 @@ Options :: onAccepted () { // rpc spec section 3.4 "adding a torrent" - const qint64 tag = mySession.getUniqueTag (); + const int64_t tag = mySession.getUniqueTag (); tr_variant top; tr_variantInitDict (&top, 3); tr_variantDictAddStr (&top, TR_KEY_method, "torrent-add"); @@ -455,8 +455,8 @@ Options :: onAccepted () FileAdded * fileAdded = new FileAdded (tag, myAdd.readableName ()); if (myTrashCheck->isChecked () && (myAdd.type==AddData::FILENAME)) fileAdded->setFileToDelete (myAdd.filename); - connect (&mySession, SIGNAL (executed (qint64,const QString&, struct tr_variant*)), - fileAdded, SLOT (executed (qint64,const QString&, struct tr_variant*))); + connect (&mySession, SIGNAL (executed (int64_t,const QString&, struct tr_variant*)), + fileAdded, SLOT (executed (int64_t,const QString&, struct tr_variant*))); mySession.exec (&top); @@ -568,7 +568,7 @@ Options :: onVerify () namespace { - quint64 getPieceSize (const tr_info * info, tr_piece_index_t pieceIndex) + uint64_t getPieceSize (const tr_info * info, tr_piece_index_t pieceIndex) { if (pieceIndex != info->pieceCount - 1) return info->pieceSize; @@ -594,14 +594,14 @@ Options :: onTimeout () myVerifyFile.open (QIODevice::ReadOnly); } - qint64 leftInPiece = getPieceSize (&myInfo, myVerifyPieceIndex) - myVerifyPiecePos; - qint64 leftInFile = file->length - myVerifyFilePos; - qint64 bytesThisPass = std::min (leftInFile, leftInPiece); - bytesThisPass = std::min (bytesThisPass, (qint64)sizeof (myVerifyBuf)); + int64_t leftInPiece = getPieceSize (&myInfo, myVerifyPieceIndex) - myVerifyPiecePos; + int64_t leftInFile = file->length - myVerifyFilePos; + int64_t bytesThisPass = std::min (leftInFile, leftInPiece); + bytesThisPass = std::min (bytesThisPass, (int64_t)sizeof (myVerifyBuf)); if (myVerifyFile.isOpen () && myVerifyFile.seek (myVerifyFilePos)) { - qint64 numRead = myVerifyFile.read (myVerifyBuf, bytesThisPass); + int64_t numRead = myVerifyFile.read (myVerifyBuf, bytesThisPass); if (numRead == bytesThisPass) myVerifyHash.addData (myVerifyBuf, numRead); } @@ -649,7 +649,7 @@ Options :: onTimeout () bool done = myVerifyPieceIndex >= myInfo.pieceCount; if (done) { - quint64 have = 0; + uint64_t have = 0; foreach (const TrFile& f, myFiles) have += f.have; diff --git a/qt/options.h b/qt/options.h index 84316ed6d..658a7b297 100644 --- a/qt/options.h +++ b/qt/options.h @@ -55,10 +55,10 @@ class FileAdded: public QObject void setFileToDelete (const QString& file) { myDelFile = file; } public slots: - void executed (qint64 tag, const QString& result, struct tr_variant * arguments); + void executed (int64_t tag, const QString& result, struct tr_variant * arguments); private: - const qint64 myTag; + const int64_t myTag; QString myName; QString myDelFile; }; @@ -117,14 +117,14 @@ class Options: public QDialog QTimer myVerifyTimer; char myVerifyBuf[2048*4]; QFile myVerifyFile; - quint64 myVerifyFilePos; + uint64_t myVerifyFilePos; int myVerifyFileIndex; - quint32 myVerifyPieceIndex; - quint32 myVerifyPiecePos; + uint32_t myVerifyPieceIndex; + uint32_t myVerifyPiecePos; void clearVerify (); QVector myVerifyFlags; QCryptographicHash myVerifyHash; - typedef QMap mybins_t; + typedef QMap mybins_t; mybins_t myVerifyBins; QTimer myEditTimer; }; diff --git a/qt/prefs.cc b/qt/prefs.cc index 68414d93c..0a7c0791a 100644 --- a/qt/prefs.cc +++ b/qt/prefs.cc @@ -151,7 +151,7 @@ Prefs :: Prefs (const char * configDir): { double d; bool boolVal; - qint64 intVal; + int64_t intVal; const char * str; size_t strLen; tr_variant * b (tr_variantDictFind (&top, myItems[i].key)); diff --git a/qt/session.cc b/qt/session.cc index ef5cbe011..5122678ac 100644 --- a/qt/session.cc +++ b/qt/session.cc @@ -699,8 +699,8 @@ Session :: exec (const char * json) const QByteArray requestData (json); QNetworkReply * reply = networkAccessManager ()->post (request, requestData); reply->setProperty (REQUEST_DATA_PROPERTY_KEY, requestData); - connect (reply, SIGNAL (downloadProgress (qint64,qint64)), this, SIGNAL (dataReadProgress ())); - connect (reply, SIGNAL (uploadProgress (qint64,qint64)), this, SIGNAL (dataSendProgress ())); + connect (reply, SIGNAL (downloadProgress (int64_t,int64_t)), this, SIGNAL (dataReadProgress ())); + connect (reply, SIGNAL (uploadProgress (int64_t,int64_t)), this, SIGNAL (dataSendProgress ())); #ifdef DEBUG_HTTP std::cerr << "sending " << "POST " << qPrintable (myUrl.path ()) << std::endl; @@ -764,7 +764,7 @@ Session :: parseResponse (const char * json, size_t jsonLength) const int err (tr_variantFromJson (&top, json, jsonLength)); if (!err) { - qint64 tag = -1; + int64_t tag = -1; const char * result = NULL; tr_variant * args = NULL; @@ -802,7 +802,7 @@ Session :: parseResponse (const char * json, size_t jsonLength) break; case TAG_BLOCKLIST_UPDATE: { - qint64 intVal = 0; + int64_t intVal = 0; if (tr_variantDictFindDict (&top, TR_KEY_arguments, &args)) if (tr_variantDictFindInt (args, TR_KEY_blocklist_size, &intVal)) setBlocklistSize (intVal); @@ -811,7 +811,7 @@ Session :: parseResponse (const char * json, size_t jsonLength) case TAG_RENAME_PATH: { - qint64 id = 0; + int64_t id = 0; const char * result = 0; if (tr_variantDictFindStr (&top, TR_KEY_result, &result, 0) && strcmp (result, "success")) { @@ -885,7 +885,7 @@ Session :: parseResponse (const char * json, size_t jsonLength) void Session :: updateStats (tr_variant * d, struct tr_session_stats * stats) { - qint64 i; + int64_t i; if (tr_variantDictFindInt (d, TR_KEY_uploadedBytes, &i)) stats->uploadedBytes = i; @@ -918,7 +918,7 @@ Session :: updateStats (tr_variant * d) void Session :: updateInfo (tr_variant * d) { - qint64 i; + int64_t i; const char * str; disconnect (&myPrefs, SIGNAL (changed (int)), this, SLOT (updatePref (int))); @@ -949,7 +949,7 @@ Session :: updateInfo (tr_variant * d) { case QVariant :: Int: { - qint64 val; + int64_t val; if (tr_variantGetInt (b, &val)) myPrefs.set (i, (int)val); break; @@ -1014,7 +1014,7 @@ Session :: updateInfo (tr_variant * d) } void -Session :: setBlocklistSize (qint64 i) +Session :: setBlocklistSize (int64_t i) { myBlocklistSize = i; diff --git a/qt/session.h b/qt/session.h index 54c94a89c..3fd30ef99 100644 --- a/qt/session.h +++ b/qt/session.h @@ -59,8 +59,8 @@ class Session: public QObject const QString& sessionVersion () const { return mySessionVersion; } public: - qint64 blocklistSize () const { return myBlocklistSize; } - void setBlocklistSize (qint64 i); + int64_t blocklistSize () const { return myBlocklistSize; } + void setBlocklistSize (int64_t i); void updateBlocklist (); void portTest (); void copyMagnetLinkToClipboard (int torrentId); @@ -84,7 +84,7 @@ class Session: public QObject void exec (const struct tr_variant * request); public: - qint64 getUniqueTag () { return nextUniqueTag++; } + int64_t getUniqueTag () { return nextUniqueTag++; } private: void sessionSet (const tr_quark key, const QVariant& variant); @@ -134,7 +134,7 @@ class Session: public QObject signals: void responseReceived (const QByteArray& json); - void executed (qint64 tag, const QString& result, struct tr_variant * arguments); + void executed (int64_t tag, const QString& result, struct tr_variant * arguments); void sourceChanged (); void portTested (bool isOpen); void statsUpdated (); @@ -147,8 +147,8 @@ class Session: public QObject void httpAuthenticationRequired (); private: - qint64 nextUniqueTag; - qint64 myBlocklistSize; + int64_t nextUniqueTag; + int64_t myBlocklistSize; Prefs& myPrefs; tr_session * mySession; QString myConfigDir; diff --git a/qt/torrent-delegate.cc b/qt/torrent-delegate.cc index 897c8df58..91f1a5ae3 100644 --- a/qt/torrent-delegate.cc +++ b/qt/torrent-delegate.cc @@ -80,7 +80,7 @@ TorrentDelegate :: progressString( const Torrent& tor ) const const bool isMagnet( !tor.hasMetadata( ) ); const bool isDone( tor.isDone( ) ); const bool isSeed( tor.isSeed( ) ); - const quint64 haveTotal( tor.haveTotal( ) ); + const uint64_t haveTotal( tor.haveTotal( ) ); QString str; double seedRatio; const bool hasSeedRatio( tor.getSeedRatio( seedRatio ) ); diff --git a/qt/torrent-model.cc b/qt/torrent-model.cc index 988dacc7c..fe347ce8e 100644 --- a/qt/torrent-model.cc +++ b/qt/torrent-model.cc @@ -131,7 +131,7 @@ TorrentModel :: removeTorrents( tr_variant * torrents ) int i = 0; tr_variant * child; while(( child = tr_variantListChild( torrents, i++ ))) { - qint64 intVal; + int64_t intVal; if( tr_variantGetInt( child, &intVal ) ) removeTorrent( intVal ); } @@ -155,7 +155,7 @@ TorrentModel :: updateTorrents( tr_variant * torrents, bool isCompleteList ) tr_variant * child; while(( child = tr_variantListChild( torrents, i++ ))) { - qint64 id; + int64_t id; if( tr_variantDictFindInt( child, TR_KEY_id, &id ) ) { newIds.insert( id ); diff --git a/qt/torrent.cc b/qt/torrent.cc index 9a5250aec..10456262d 100644 --- a/qt/torrent.cc +++ b/qt/torrent.cc @@ -466,7 +466,7 @@ Torrent :: update (tr_variant * d) static int key_to_property_index[TR_N_KEYS]; bool changed = false; const bool was_seed = isSeed (); - const quint64 old_verified_size = haveVerified (); + const uint64_t old_verified_size = haveVerified (); if (!lookup_initialized) { @@ -492,7 +492,7 @@ Torrent :: update (tr_variant * d) { case QVariant :: Int: { - qint64 val; + int64_t val; if (tr_variantGetInt (child, &val)) changed |= setInt (property_index, val); break; @@ -513,7 +513,7 @@ Torrent :: update (tr_variant * d) } case QVariant :: ULongLong: { - qint64 val; + int64_t val; if (tr_variantGetInt (child, &val)) changed |= setSize (property_index, val); break; @@ -527,7 +527,7 @@ Torrent :: update (tr_variant * d) } case QVariant :: DateTime: { - qint64 val; + int64_t val; if (tr_variantGetInt (child, &val) && val) changed |= setDateTime (property_index, QDateTime :: fromTime_t(val)); break; @@ -549,7 +549,7 @@ Torrent :: update (tr_variant * d) if (tr_variantDictFindList (d, TR_KEY_files, &files)) { const char * str; - qint64 intVal; + int64_t intVal; int i = 0; tr_variant * child; @@ -580,7 +580,7 @@ Torrent :: update (tr_variant * d) for (int i=0; i FileList; @@ -253,14 +253,14 @@ class Torrent: public QObject bool isSeed( ) const { return haveVerified() >= totalSize(); } bool isPrivate( ) const { return getBool( IS_PRIVATE ); } bool getSeedRatio( double& setme ) const; - quint64 haveVerified( ) const { return getSize( HAVE_VERIFIED ); } - quint64 haveUnverified( ) const { return getSize( HAVE_UNCHECKED ); } - quint64 desiredAvailable( ) const { return getSize( DESIRED_AVAILABLE ); } - quint64 haveTotal( ) const { return haveVerified( ) + haveUnverified(); } - quint64 totalSize( ) const { return getSize( TOTAL_SIZE ); } - quint64 sizeWhenDone( ) const { return getSize( SIZE_WHEN_DONE ); } - quint64 leftUntilDone( ) const { return getSize( LEFT_UNTIL_DONE ); } - quint64 pieceSize( ) const { return getSize( PIECE_SIZE ); } + uint64_t haveVerified( ) const { return getSize( HAVE_VERIFIED ); } + uint64_t haveUnverified( ) const { return getSize( HAVE_UNCHECKED ); } + uint64_t desiredAvailable( ) const { return getSize( DESIRED_AVAILABLE ); } + uint64_t haveTotal( ) const { return haveVerified( ) + haveUnverified(); } + uint64_t totalSize( ) const { return getSize( TOTAL_SIZE ); } + uint64_t sizeWhenDone( ) const { return getSize( SIZE_WHEN_DONE ); } + uint64_t leftUntilDone( ) const { return getSize( LEFT_UNTIL_DONE ); } + uint64_t pieceSize( ) const { return getSize( PIECE_SIZE ); } bool hasMetadata( ) const { return getDouble( METADATA_PERCENT_DONE ) >= 1.0; } bool isMagnet( ) const { return magnetTorrent; } int pieceCount( ) const { return getInt( PIECE_COUNT ); } @@ -268,9 +268,9 @@ class Torrent: public QObject double percentComplete( ) const { return haveTotal() / (double)totalSize(); } double percentDone( ) const { return getDouble( PERCENT_DONE ); } double metadataPercentDone( ) const { return getDouble( METADATA_PERCENT_DONE ); } - quint64 downloadedEver( ) const { return getSize( DOWNLOADED_EVER ); } - quint64 uploadedEver( ) const { return getSize( UPLOADED_EVER ); } - quint64 failedEver( ) const { return getSize( FAILED_EVER ); } + uint64_t downloadedEver( ) const { return getSize( DOWNLOADED_EVER ); } + uint64_t uploadedEver( ) const { return getSize( UPLOADED_EVER ); } + uint64_t failedEver( ) const { return getSize( FAILED_EVER ); } int compareTracker( const Torrent& ) const; int compareSeedRatio( const Torrent& ) const; int compareRatio( const Torrent& ) const; -- 2.40.0