(trunk qt) clean up #includes

This commit is contained in:
Charles Kerr 2009-04-13 18:21:22 +00:00
parent 768d755cc6
commit 08674322a9
6 changed files with 21 additions and 14 deletions

View File

@ -39,6 +39,8 @@
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <libtransmission/transmission.h>
#include "details.h"
#include "file-tree.h"
#include "hig.h"

View File

@ -25,8 +25,6 @@
#include <QFile>
#include <QTimer>
#include <libtransmission/transmission.h>
#include "file-tree.h"
class FileTreeView;

View File

@ -18,11 +18,13 @@
#include <QString>
#include <QVariant>
#include <libtransmission/transmission.h>
#include <libtransmission/bencode.h>
#include "filters.h"
extern "C"
{
struct tr_benc;
}
class Prefs: public QObject
{
Q_OBJECT;
@ -124,7 +126,7 @@ class Prefs: public QObject
private:
QString myConfigDir;
QVariant myValues[PREFS_COUNT];
void initDefaults( tr_benc* );
void initDefaults( struct tr_benc* );
public:
bool isCore( int key ) const { return FIRST_CORE_PREF<=key && key<=LAST_CORE_PREF; }

View File

@ -24,6 +24,7 @@
#include <libtransmission/transmission.h>
#include <libtransmission/bencode.h>
#include <libtransmission/json.h>
#include <libtransmission/rpcimpl.h>
#include <libtransmission/utils.h> /* tr_free */
#include <libtransmission/version.h> /* LONG_VERSION */

View File

@ -22,10 +22,14 @@
#include <QUrl>
#include <libtransmission/transmission.h>
#include <libtransmission/json.h>
#include "speed.h"
extern "C"
{
struct tr_benc;
}
class Prefs;
class Session: public QObject
@ -56,20 +60,20 @@ class Session: public QObject
bool isServer( ) const;
private:
void updateStats( tr_benc * args );
void updateInfo( tr_benc * args );
void updateStats( struct tr_benc * args );
void updateInfo( struct tr_benc * args );
void parseResponse( const char * json, size_t len );
static void localSessionCallback( tr_session *, const char *, size_t, void * );
public:
void exec( const char * request );
void exec( const tr_benc * request );
void exec( const struct tr_benc * request );
private:
void sessionSet( const char * key, const QVariant& variant );
void pumpRequests( );
void sendTorrentRequest( const char * request, const QSet<int>& torrentIds );
static void updateStats( tr_benc * d, struct tr_session_stats * stats );
static void updateStats( struct tr_benc * d, struct tr_session_stats * stats );
void refreshTorrents( const QSet<int>& torrentIds );
public:
@ -105,8 +109,8 @@ class Session: public QObject
void statsUpdated( );
void sessionUpdated( );
void blocklistUpdated( int );
void torrentsUpdated( tr_benc * torrentList, bool completeList );
void torrentsRemoved( tr_benc * torrentList );
void torrentsUpdated( struct tr_benc * torrentList, bool completeList );
void torrentsRemoved( struct tr_benc * torrentList );
void dataReadProgress( );
void dataSendProgress( );

View File

@ -230,7 +230,7 @@ class Torrent: public QObject
int compareTracker( const Torrent& ) const;
int compareRatio( const Torrent& ) const;
int compareETA( const Torrent& ) const;
tr_bool hasETA( ) const { return getETA( ) >= 0; }
bool hasETA( ) const { return getETA( ) >= 0; }
int getETA( ) const { return getInt( ETA ); }
QDateTime lastActivity( ) const { return getDateTime( DATE_ACTIVITY ); }
QDateTime lastStarted( ) const { return getDateTime( DATE_STARTED ); }