• Help/Guide
  • About Trac
  • Settings
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Navigation

  • ← Previous Change
  • Next Change →

Changeset calitko,135 for calitko

Show
Ignore:
Timestamp:
07/27/07 00:15:15 (1 year ago)
Author:
Peter Dimov <peter.dimov@calitko.org>
branch-nick:
calitko
Message:

Fixed numerous extra-warnings.prf warnings.

Files:
  • calitko/Gnutella/Bootstrapping/ConnectionKeeper.h (modified) (1 diff)
  • calitko/Gnutella/Bootstrapping/NodeCache.h (modified) (2 diffs)
  • calitko/Gnutella/Bootstrapping/UdpHostCache.h (modified) (1 diff)
  • calitko/Gnutella/Handshaking/Handshaker.h (modified) (1 diff)
  • calitko/Gnutella/Handshaking/SlotAllocator.h (modified) (1 diff)
  • calitko/Gnutella/LocalPeer.h (modified) (1 diff)
  • calitko/Gnutella/PacketProcessing/DynamicSearching/DynamicSearcher.h (modified) (1 diff)
  • calitko/Gnutella/PacketProcessing/PacketProcessor.h (modified) (1 diff)
  • calitko/Gnutella/PacketProcessing/PacketSession.h (modified) (1 diff)
  • calitko/Gnutella/PacketProcessing/PongCache.h (modified) (1 diff)
  • calitko/Gnutella/PacketProcessing/QueryRouting/QrtExchanger.h (modified) (1 diff)
  • calitko/Gnutella/PacketProcessing/QueryRouting/QrtReader.h (modified) (1 diff)
  • calitko/Gnutella/PacketProcessing/QueryRouting/QrtWriter.h (modified) (1 diff)
  • calitko/Gnutella/Packets/Extensions/Extension.h (modified) (2 diffs)
  • calitko/Gnutella/Packets/QueryHits.h (modified) (1 diff)
  • calitko/Gnutella/Searching/Searcher.h (modified) (1 diff)
  • calitko/Protocols/BitTorrent/Bencoding/BDecoder.h (modified) (2 diffs)
  • calitko/Protocols/BitTorrent/Bencoding/BDictionary.h (modified) (1 diff)
  • calitko/Protocols/Generics/FifoQueue.cpp (modified) (1 diff)
  • calitko/Protocols/Generics/FifoQueue.h (modified) (1 diff)
  • calitko/Protocols/Generics/GenericSession.h (modified) (1 diff)
  • calitko/Protocols/Generics/PacketBase.h (modified) (1 diff)
  • calitko/Protocols/Generics/PacketSerializer.h (modified) (1 diff)
  • calitko/Protocols/Gnutella/Packets/QueryHits.h (modified) (2 diffs)
  • calitko/Protocols/Transports/TcpConnection.h (modified) (1 diff)
  • calitko/Protocols/Transports/UdpSwitch.h (modified) (1 diff)
  • calitko/Qt.h (modified) (1 diff)
  • calitko/UIs/Searching/SearchModel.cpp (modified) (3 diffs)
  • calitko/UIs/Searching/SearchModel.h (modified) (5 diffs)
  • calitko/Utils/CalitkoMocks/BoundFunction.h (modified) (1 diff)
  • calitko/Utils/CalitkoMocks/ExpectedFunction.h (modified) (1 diff)

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • calitko/Gnutella/Bootstrapping/ConnectionKeeper.h

    r115 r135  
    3939{ 
    4040    Q_OBJECT 
     41    REFERENCE_OBJECT (ConnectionKeeper) 
    4142 
    4243public: 
  • calitko/Gnutella/Bootstrapping/NodeCache.h

    r115 r135  
    3737{ 
    3838    Q_OBJECT 
     39    REFERENCE_OBJECT (NodeCache) 
    3940 
    4041public: 
    …… 
    105106    PredicateImp predicateImp (pred); 
    106107 
    107     return getNodes (count, availability, freshNodes, (const Predicate &) predicateImp); 
     108    return getNodes (count, availability, freshNodes, predicateImp); 
    108109} 
    109110 
  • calitko/Gnutella/Bootstrapping/UdpHostCache.h

    r115 r135  
    4242{ 
    4343    Q_OBJECT 
     44    REFERENCE_OBJECT (UdpHostCache) 
    4445 
    4546public: 
  • calitko/Gnutella/Handshaking/Handshaker.h

    r115 r135  
    3737{ 
    3838    Q_OBJECT 
     39    REFERENCE_OBJECT (Handshaker) 
    3940 
    4041public: 
  • calitko/Gnutella/Handshaking/SlotAllocator.h

    r123 r135  
    4141{ 
    4242    Q_OBJECT 
     43    REFERENCE_OBJECT (SlotAllocator) 
    4344 
    4445public: 
  • calitko/Gnutella/LocalPeer.h

    r115 r135  
    6262{ 
    6363    Q_OBJECT 
     64    REFERENCE_OBJECT (LocalPeer) 
    6465 
    6566public: 
  • calitko/Gnutella/PacketProcessing/DynamicSearching/DynamicSearcher.h

    r~117 r135  
    3535{ 
    3636    Q_OBJECT 
     37    REFERENCE_OBJECT (DynamicSearcher) 
    3738 
    3839public: 
  • calitko/Gnutella/PacketProcessing/PacketProcessor.h

    r115 r135  
    6161{ 
    6262    Q_OBJECT 
     63    REFERENCE_OBJECT (PacketProcessor) 
    6364 
    6465public: 
  • calitko/Gnutella/PacketProcessing/PacketSession.h

    r115 r135  
    4646{ 
    4747    Q_OBJECT 
     48    REFERENCE_OBJECT (PacketSession) 
    4849 
    4950public: 
  • calitko/Gnutella/PacketProcessing/PongCache.h

    r115 r135  
    5959{ 
    6060    Q_OBJECT 
     61    REFERENCE_OBJECT (PongCache) 
    6162 
    6263public: 
  • calitko/Gnutella/PacketProcessing/QueryRouting/QrtExchanger.h

    r115 r135  
    4141{ 
    4242    Q_OBJECT 
     43    REFERENCE_OBJECT (QrtExchanger) 
    4344 
    4445public: 
  • calitko/Gnutella/PacketProcessing/QueryRouting/QrtReader.h

    r115 r135  
    3636{ 
    3737    Q_OBJECT 
     38    REFERENCE_OBJECT (QrtReader) 
    3839 
    3940public: 
  • calitko/Gnutella/PacketProcessing/QueryRouting/QrtWriter.h

    r115 r135  
    3535class QrtWriter 
    3636{ 
     37    REFERENCE_OBJECT (QrtWriter) 
     38 
    3739public: 
    3840            QrtWriter (PacketSession *, quint8 patchEntryBits); 
  • calitko/Gnutella/Packets/Extensions/Extension.h

    r~117 r135  
    3838{ 
    3939public: 
    40     virtual                     ~Extension()            {} 
     40    virtual                     ~Extension()               {} 
    4141    virtual Extension *         copy() const = 0; 
    4242 
    …… 
    4949 
    5050protected: 
    51                                 Extension()                    { isValid_ = true; } 
     51                                Extension() : isValid_ (true) {} 
    5252    void                        setIsValid (bool isValid)   { isValid_ = isValid; } 
    5353 
  • calitko/Gnutella/Packets/QueryHits.h

    r115 r135  
    131131    struct Result 
    132132    { 
     133        Result() : fileIndex (0), fileSize (0), fullFileName(), resultData(), 
     134                   fileNameSize (0) {} 
     135 
    133136        quint32         fileIndex;      //!< The file index result field. 
    134137        quint32         fileSize;       //!< The file size result field. 
  • calitko/Gnutella/Searching/Searcher.h

    r115 r135  
    4242{ 
    4343    Q_OBJECT 
     44    REFERENCE_OBJECT (Searcher) 
    4445 
    4546private: 
  • calitko/Protocols/BitTorrent/Bencoding/BDecoder.h

    r134 r135  
    5252class BDecoder 
    5353{ 
     54    REFERENCE_OBJECT (BDecoder) 
     55 
    5456public: 
    5557                            BDecoder (const QByteArray &rawData); 
    …… 
    6264 
    6365private: 
    64     BDecoder (const BDecoder &); // Forbid copying. 
    65     BDecoder & operator= (const BDecoder &); // Forbid assignment. 
    66  
    6766    auto_ptr <BinaryReader> binaryReader; 
    6867}; 
  • calitko/Protocols/BitTorrent/Bencoding/BDictionary.h

    r~118 r135  
    5858/*! 
    5959    If there is a value to the given \a key it is returned. Otherwise 
    60     an error item is returned. 
     60    an error item is returned. 
    6161*/ 
    6262inline const BItem * BDictionary::item (const QByteArray &key) const 
  • calitko/Protocols/Generics/FifoQueue.cpp

    r~120 r135  
    2525#include "Imports.cpp" 
    2626 
     27FifoQueue::FifoQueue() 
     28 :  queue() 
     29{ 
     30} 
     31 
    2732bool FifoQueue::isEmpty() const 
    2833{ 
  • calitko/Protocols/Generics/FifoQueue.h

    r~120 r135  
    3535class FifoQueue : public DataQueue 
    3636{ 
     37    REFERENCE_OBJECT (FifoQueue) 
     38 
    3739public: 
     40            FifoQueue(); 
     41 
    3842    bool    isEmpty() const; 
    3943    void    enqueue (const Data &); 
  • calitko/Protocols/Generics/GenericSession.h

    r134 r135  
    102102{ 
    103103    CALITKO_TESTABLE (GenericSession) 
     104    REFERENCE_OBJECT (GenericSession) 
    104105 
    105106public: 
  • calitko/Protocols/Generics/PacketBase.h

    r~120 r135  
    110110    { 
    111111    public: 
     112        Data() : rawHeader(), rawPayload(), rewriteHeader(), rewritePayload() {} 
     113 
    112114        mutable QByteArray  rawHeader; 
    113115        mutable QByteArray  rawPayload; 
  • calitko/Protocols/Generics/PacketSerializer.h

    r~120 r135  
    4343{ 
    4444    CALITKO_TESTABLE (PacketSerializer) 
     45    REFERENCE_OBJECT (PacketSerializer) 
    4546 
    4647public: 
  • calitko/Protocols/Gnutella/Packets/QueryHits.h

    r~120 r135  
    6262 
    6363protected: 
     64    // Unhide all overloads from the base class to avoid a compiler warning: 
     65    using PacketBase::readPayload; 
     66    using PacketBase::writePayload; 
     67 
    6468    void        readPayload (BinaryReader &); 
    6569    void        writePayload (BinaryWriter &) const; 
    …… 
    7478 
    7579    public: 
     80        Data () : port(0), ipAddress(), speed (0), resultSet(), queryHitsData() 
     81        {} 
     82 
    7683        quint16     port; 
    7784        QHostAddress        ipAddress; 
  • calitko/Protocols/Transports/TcpConnection.h

    r~117 r135  
    3232{ 
    3333    Q_OBJECT 
     34    REFERENCE_OBJECT (TcpConnection) 
    3435 
    3536public: 
  • calitko/Protocols/Transports/UdpSwitch.h

    r~117 r135  
    4545{ 
    4646    Q_OBJECT 
     47    REFERENCE_OBJECT (UdpSwitch) 
    4748 
    4849public: 
  • calitko/Qt.h

    r126 r135  
    6060 
    6161// Using long because on 64bit Linuxes long is 64bit and we normally cast a pointer to 
    62 // to a ConnectionId. This is just a temporary solution because under Win64 long is  
     62// to a ConnectionId. This is just a temporary solution because under Win64 long is 
    6363// still 32 bit! 
    6464typedef long ConnectionId; // \todo Remove if not used anymore! 
    6565 
    6666// These macros expand to forward declarations of types contained in namesapces: 
    67 #define FORWARD_DECLARE(ns,dec) \ 
     67#define FORWARD_DECLARE(ns,dec)                                            \ 
    6868    namespace ns { dec; } 
    69 #define FORWARD_DECLARE2(ns1,ns2,dec)   \ 
     69#define FORWARD_DECLARE2(ns1,ns2,dec)                                      \ 
    7070    namespace ns1 { namespace ns2 { dec; }} 
    71 #define FORWARD_DECLARE3(ns1,ns2,ns3,dec)   \ 
     71#define FORWARD_DECLARE3(ns1,ns2,ns3,dec)                                  \ 
    7272    namespace ns1 { namespace ns2 { namespace ns3 { dec; }}} 
    73 #define FORWARD_DECLARE4(ns1,ns2,ns3,ns4,dec)   \ 
    74     namespace ns1 { namespace ns2 { namespace ns3 { \ 
     73#define FORWARD_DECLARE4(ns1,ns2,ns3,ns4,dec)                              \ 
     74    namespace ns1 { namespace ns2 { namespace ns3 {                        \ 
    7575    namespace ns4 { dec; }}}} 
    76 #define FORWARD_DECLARE5(ns1,ns2,ns3,ns4,ns5,dec)   \ 
    77     namespace ns1 { namespace ns2 { namespace ns3 { \ 
     76#define FORWARD_DECLARE5(ns1,ns2,ns3,ns4,ns5,dec)                          \ 
     77    namespace ns1 { namespace ns2 { namespace ns3 {                        \ 
    7878    namespace ns4 { namespace ns5 { dec; }}}}} 
    79 #define FORWARD_DECLARE6(ns1,ns2,ns3,ns4,ns5,ns6,dec)   \ 
    80     namespace ns1 { namespace ns2 { namespace ns3 { \ 
    81     namespace ns4 { namespace ns5 { namespace ns6 { dec; }}}}}}; 
    82 #define FORWARD_DECLARE7(ns1,ns2,ns3,ns4,ns5,ns6,ns7,dec)   \ 
    83     namespace ns1 { namespace ns2 { namespace ns3 { \ 
    84     namespace ns4 { namespace ns5 { namespace ns6 { \ 
    85     namespace ns7 { dec; }}}}}}}; 
    86 #define FORWARD_DECLARE8(ns1,ns2,ns3,ns4,ns5,ns6,ns7,ns8,dec)   \ 
    87     namespace ns1 { namespace ns2 { namespace ns3 { \ 
    88     namespace ns4 { namespace ns5 { namespace ns6 { \ 
    89     namespace ns7 { namespace ns8 { dec; }}}}}}}}; 
    90 #define FORWARD_DECLARE9(ns1,ns2,ns3,ns4,ns5,ns6,ns7,ns8,ns9,dec)   \ 
    91     namespace ns1 { namespace ns2 { namespace ns3 { \ 
    92     namespace ns4 { namespace ns5 { namespace ns6 { \ 
    93     namespace ns7 { namespace ns8 { namespace ns9 { \ 
    94     dec; }}}}}}}}}; 
     79#define FORWARD_DECLARE6(ns1,ns2,ns3,ns4,ns5,ns6,dec)                      \ 
     80    namespace ns1 { namespace ns2 { namespace ns3 {                        \ 
     81    namespace ns4 { namespace ns5 { namespace ns6 { dec; }}}}}} 
     82#define FORWARD_DECLARE7(ns1,ns2,ns3,ns4,ns5,ns6,ns7,dec)                  \ 
     83    namespace ns1 { namespace ns2 { namespace ns3 {                        \ 
     84    namespace ns4 { namespace ns5 { namespace ns6 {                        \ 
     85    namespace ns7 { dec; }}}}}}} 
     86#define FORWARD_DECLARE8(ns1,ns2,ns3,ns4,ns5,ns6,ns7,ns8,dec)              \ 
     87    namespace ns1 { namespace ns2 { namespace ns3 {                        \ 
     88    namespace ns4 { namespace ns5 { namespace ns6 {                        \ 
     89    namespace ns7 { namespace ns8 { dec; }}}}}}}} 
     90#define FORWARD_DECLARE9(ns1,ns2,ns3,ns4,ns5,ns6,ns7,ns8,ns9,dec)          \ 
     91    namespace ns1 { namespace ns2 { namespace ns3 {                        \ 
     92    namespace ns4 { namespace ns5 { namespace ns6 {                        \ 
     93    namespace ns7 { namespace ns8 { namespace ns9 {                        \ 
     94    dec; }}}}}}}}} 
    9595 
     96#define REFERENCE_OBJECT(Class)     Class (const Class &);                  \ 
     97                                    Class & operator= (const Class &); 
     98 
     99#define VALUE_OBJECT(Class)         Class (const Class &);                  \ 
     100                                    Class & operator= (const Class &);      \ 
     101                                    bool operator== (const Class &);        \ 
     102                                    bool operator!= (const Class &); 
     103 
     104#define STATIC_HELPER(Class)        Class(); 
    96105 
    97106#endif // QT_H 
  • calitko/UIs/Searching/SearchModel.cpp

    r116 r135  
    120120 
    121121    resultList.insert (index, *result); 
    122     for (int i=0; i<resultList.at(index).hosts.count(); i++) { 
    123 //      resultList.last().hosts.at(i).showEmphasized = !tabActive; 
     122/*  for (int i=0; i<resultList.at(index).hosts.count(); i++) { 
    124123        resultList.at(index).hosts.at(i).parent = (SearchResult*) &resultList.at(index); 
    125     } 
     124    }*/ 
    126125 
    127126    endInsertRows(); 
    …… 
    218217        return createIndex (row, column, result); 
    219218    } else { 
    220         result = static_cast <SearchResult*> (parent.internalPointer()); 
     219        Q_ASSERT (false); 
     220/*      result = static_cast <SearchResult*> (parent.internalPointer()); 
    221221        Q_ASSERT(result); 
    222222        if (row < result->hosts.count()) { 
    223223            host = (SearchResult*) &result->hosts.at (row); 
    224224            return createIndex (row, column, (void*) host); 
    225         } 
     225        }*/ 
    226226    } 
    227227 
    228228    return QModelIndex(); 
    229229} 
    230  
     230/* 
    231231QModelIndex SearchModel::parent ( const QModelIndex & index ) const 
    232232{ 
    …… 
    242242 
    243243    return QModelIndex(); 
    244 } 
     244}*/ 
    245245 
    246246QVariant SearchModel::headerData (int section, Qt::Orientation orientation, int role) const 
  • calitko/UIs/Searching/SearchModel.h

    r113 r135  
    3333 
    3434struct SearchResult { 
    35      SearchResult(const QString &fn, const QString &ext, const quint32 &sz, quint32 sp, QString ht, QString clt) 
    36          : fileName(fn), extension(ext), speed(QString()), 
     35    //! \todo Why these funny default values? 
     36    SearchResult(const QString &fn, const QString &ext, const quint32 &sz, quint32 sp, QString ht, QString clt) 
     37         : fileName(fn), extension(ext), speed(QString()), size (0), 
    3738         rating("Good"), status("Available"), host(ht), 
    3839         client(clt), duration("0:53:24"), 
    39          bitrate("8 bps"), parent(NULL), showEmphasized (false) 
     40         bitrate("8 bps"), /*parent(NULL), */hosts(), showEmphasized (false) 
    4041    { 
    4142        float fz = sz;      // B 
    …… 
    6566            speed = QString().sprintf ("%d kbps", sp); 
    6667        } 
     68    }; 
    6769 
    68         }; 
    6970    QString         fileName; 
    7071    QString         extension; 
    …… 
    7778    QString         duration; 
    7879    QString         bitrate; 
    79     mutable SearchResult *parent; 
     80    //mutable SearchResult *parent; // Can we get rid of that? 
    8081    QList<SearchResult>  hosts; 
    8182    bool            showEmphasized; 
    …… 
    8586{ 
    8687    Q_OBJECT 
     88    REFERENCE_OBJECT (SearchModel) 
    8789 
    8890public: 
    …… 
    9698    bool hasChildren (const QModelIndex &index) const; 
    9799    QModelIndex index(int row, int column, const QModelIndex &parent) const; 
    98     QModelIndex parent ( const QModelIndex & index ) const; 
     100    //QModelIndex parent ( const QModelIndex & index ) const; 
    99101    void tabActivated(); 
    100102    void tabDisactivated(); 
  • calitko/Utils/CalitkoMocks/BoundFunction.h

    r134 r135  
    106106        : public BoundFunctionBase                                          \ 
    107107    {                                                                       \ 
     108        REFERENCE_OBJECT (BoundFunction)                                    \ 
    108109    public:                                                                 \ 
    109110        typedef BoundFunctionBase   Base;                                   \ 
  • calitko/Utils/CalitkoMocks/ExpectedFunction.h

    r~120 r135  
    163163        : public ExpectedFunctionBase                                       \ 
    164164    {                                                                       \ 
     165        REFERENCE_OBJECT (ExpectedFunction)                                 \ 
    165166    public:                                                                 \ 
    166167        typedef ExpectedFunctionBase    Base;                               \ 

Download in other formats:

  • Unified Diff
  • Zip Archive

Copyright © 2007 Peter Dimov.
Powered by Trac.