Ticket #216: UNCOMMITTED-warnings-fixes.patch

File UNCOMMITTED-warnings-fixes.patch, 57.4 kB (added by valerio, 5 months ago)
  • src/notification/newemailnotification.cpp

     
    4343 
    4444 
    4545// Notify the user about this event (a new email has arrived) 
    46 void NewEmailNotification::notify( QString sender, QString subject, bool inInbox, QString command, QString folder, QString url ) 
     46void NewEmailNotification::notify( QString sender, QString subject, bool inInbox, QString folder ) 
    4747{ 
    4848  currentAccount_ = CurrentAccount::instance(); 
    4949 
  • src/notification/newemailnotification.h

     
    4949 
    5050  public slots: 
    5151    // Notify the user about this event (a new email has arrived) 
    52     void                  notify( QString sender, QString subject, bool inInbox, QString command, QString folder, QString url ); 
     52    void                  notify( QString sender, QString subject, bool inInbox, QString folder ); 
    5353 
    5454  private slots: 
    5555    // Trigger this event's action (Open the mailbox where the new mail is) 
  • src/network/upnp/igdcontrolpoint.cpp

     
    3737 
    3838 
    3939// The constructor 
    40 IgdControlPoint::IgdControlPoint(const QString &hostname, int port, const QString &rootUrl) 
     40IgdControlPoint::IgdControlPoint(const QString &hostname, quint16 port, const QString &rootUrl) 
    4141  : QObject() 
    4242  , forwardingService_(0) 
    4343  , gatewayAvailable_(false) 
  • src/network/upnp/ssdpconnection.h

     
    5252    virtual             ~SsdpConnection(); 
    5353 
    5454    // Send a broadcast to detect all devices 
    55     void                 queryDevices(int bindPort = 1500); 
     55    void                 queryDevices( quint16 bindPort = 1500 ); 
    5656 
    5757  private slots: 
    5858    // Data was received by the socket 
  • src/network/upnp/manager.h

     
    6464    // The broadcast failed 
    6565    void                 slotBroadcastTimeout(); 
    6666    // A device was discovered by the SSDP broadcast 
    67     void                 slotDeviceFound(const QString &hostname, int port, const QString &rootUrl); 
     67    void                 slotDeviceFound(const QString &hostname, quint16 port, const QString &rootUrl); 
    6868 
    6969 
    7070  private:  // private methods 
  • src/network/upnp/service.cpp

     
    4242 
    4343 
    4444// The constructor for information services 
    45 Service::Service(const QString &hostname, int port, const QString &informationUrl) 
     45Service::Service(const QString &hostname, quint16 port, const QString &informationUrl) 
    4646  : informationUrl_(informationUrl) 
    4747  , pendingRequests_(0) 
    4848{ 
  • src/network/upnp/igdcontrolpoint.h

     
    4747  public:  // public methods 
    4848 
    4949    // The constructor 
    50                          IgdControlPoint(const QString &hostname, int port, const QString &rootUrl); 
     50                         IgdControlPoint(const QString &hostname, quint16 port, const QString &rootUrl); 
    5151    // The destructor 
    5252    virtual             ~IgdControlPoint(); 
    5353 
     
    7474    // The host of the gateway 
    7575    QString              igdHostname_; 
    7676    // The port of the gateway 
    77     int                  igdPort_; 
     77    quint16              igdPort_; 
    7878    // The root service 
    7979    RootService         *rootService_; 
    8080    // The wan connection service 
  • src/network/upnp/rootservice.cpp

     
    126126 
    127127 
    128128// The contructor 
    129 RootService::RootService(const QString &hostname, int port, 
     129RootService::RootService(const QString &hostname, quint16 port, 
    130130                         const QString &rootUrl) 
    131131  : Service(hostname, port, rootUrl) 
    132132  , hostname_(hostname) 
  • src/network/upnp/service.h

     
    3636struct ServiceParameters 
    3737{ 
    3838  QString hostname; 
    39   int    port; 
     39  quint16 port; 
    4040  QString scdpUrl; 
    4141  QString controlUrl; 
    4242  QString serviceId; 
     
    6060 
    6161  public:  // public methods 
    6262    // The constructor for the root service 
    63                          Service(const QString &hostname, int port, 
     63                         Service(const QString &hostname, quint16 port, 
    6464                                 const QString &informationUrl); 
    6565    // The constructor for action services 
    6666                         Service(const ServiceParameters &params); 
  • src/network/upnp/rootservice.h

     
    3838  public:  // public methods 
    3939 
    4040    // The constructor 
    41                          RootService(const QString &hostname, int port, const QString &rootUrl); 
     41                         RootService(const QString &hostname, quint16 port, const QString &rootUrl); 
    4242    // The destructor 
    4343    virtual             ~RootService(); 
    4444 
     
    7676    // The hostname of the device 
    7777    QString                     hostname_; 
    7878    // The port of the device 
    79     int                         port_; 
     79    quint16                     port_; 
    8080    // The udn of the root device 
    8181    QString                     rootUdn_; 
    8282}; 
  • src/network/upnp/ssdpconnection.cpp

     
    8282  while( socket_->hasPendingDatagrams() ) 
    8383  { 
    8484    datagram.clear(); 
    85     datagram.resize( socket_->pendingDatagramSize() ); 
     85    datagram.resize( (int)socket_->pendingDatagramSize() ); 
    8686 
    8787    // Get the HTTP-like content 
    8888    socket_->readDatagram( datagram.data(), datagram.size() ); 
     
    106106 
    107107 
    108108// Send a broadcast to detect all devices 
    109 void SsdpConnection::queryDevices(int bindPort) 
     109void SsdpConnection::queryDevices( quint16 bindPort ) 
    110110{ 
    111111#ifdef KMESSDEBUG_UPNP_GENERAL 
    112112  kDebug() << "Sending broadcast packet."; 
     
    134134  } 
    135135 
    136136  // Send the data 
    137   int bytesWritten = socket_->writeDatagram( data.toAscii(), address, 1900 ); 
     137  qint64 bytesWritten = socket_->writeDatagram( data.toAscii(), address, 1900 ); 
    138138 
    139139  if(bytesWritten == -1) 
    140140  { 
  • src/network/upnp/manager.cpp

     
    137137 
    138138 
    139139// A device was discovered by the SSDP broadcast 
    140 void Manager::slotDeviceFound(const QString &hostname, int port, const QString &rootUrl) 
     140void Manager::slotDeviceFound(const QString &hostname, quint16 port, const QString &rootUrl) 
    141141{ 
    142142#ifdef KMESSDEBUG_UPNP_GENERAL 
    143143  kDebug() << "Device found, initializing IgdControlPoint to query it."; 
  • src/network/extra/directconnectionpool.cpp

     
    6666 * Add a connection to the list, tells the object to connect to the given ipaddress/port. 
    6767 * Returns true when the connection could be added to the pending list (e.g. it's openConnection() method didn't fail). 
    6868 */ 
    69 bool DirectConnectionPool::addConnection(DirectConnectionBase *connection, const QString &ipAddress, const int port) 
     69bool DirectConnectionPool::addConnection(DirectConnectionBase *connection, const QString &ipAddress, const quint16 port) 
    7070{ 
    7171  // Refuse if there is already an active connection 
    7272  if( activeConnection_ != 0 ) 
  • src/network/extra/directconnectionbase.cpp

     
    3232#endif 
    3333 
    3434 
    35 int DirectConnectionBase::nextServerPort_(-1); 
     35quint16 DirectConnectionBase::nextServerPort_( 0 ); 
    3636 
    3737 
    3838 
     
    5353 
    5454  // Read the interval of ports which we'll use to try establishing a connection 
    5555  KConfigGroup group = KMessConfig::instance()->getGlobalConfig( "General" ); 
    56   lowestServerPortLimit_  = group.readEntry( "lowestTransferPort", 6891 ); 
    57   highestServerPortLimit_ = group.readEntry( "highestServerPort", 6900 ); 
     56  lowestServerPortLimit_  = (quint16)group.readEntry( "lowestTransferPort", 6891 ); 
     57  highestServerPortLimit_ = (quint16)group.readEntry( "highestServerPort", 6900 ); 
    5858#ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL 
    5959  kDebug() << "Using port interval" << lowestServerPortLimit_ << "-" << highestServerPortLimit_; 
    6060#endif 
     
    220220 
    221221 
    222222// Return the number of bytes which are already received in the local buffer 
    223 int DirectConnectionBase::getAvailableBytes() const 
     223qint64 DirectConnectionBase::getAvailableBytes() const 
    224224{ 
    225225  if(KMESS_NULL(socket_)) return -2;  // same as KExtendedSocket API, means "invalid state" 
    226226  return socket_->bytesAvailable(); 
     
    229229 
    230230 
    231231// Get the server port that will be used 
    232 int DirectConnectionBase::getLocalServerPort() 
     232quint16 DirectConnectionBase::getLocalServerPort() 
    233233{ 
    234234  // Port not chosen yet 
    235   if( serverPort_ < 0 ) 
     235  if( serverPort_ == 0 ) 
    236236  { 
    237237    // It's possible to use a random port nowadays, 
    238238    // old clients with the "only port 6891" are no longer in use. 
     
    242242    // 
    243243    // TODO: verify whether we can use the port by calling openServerPort() earlier. 
    244244 
    245     if( nextServerPort_ < 0 || nextServerPort_ > highestServerPortLimit_ ) 
     245    if( nextServerPort_ == 0 || nextServerPort_ > highestServerPortLimit_ ) 
    246246    { 
    247247      nextServerPort_ = lowestServerPortLimit_; 
    248248    } 
     
    275275 
    276276 
    277277// Get the remote port the socket is connected with. 
    278 int DirectConnectionBase::getRemotePort() const 
     278quint16 DirectConnectionBase::getRemotePort() const 
    279279{ 
    280280  if(socket_ == 0) 
    281281  { 
     
    283283  } 
    284284  else 
    285285  { 
    286 #warning localPort() returns quint16 in native byte order. 
    287286    return socket_->localPort(); 
    288287  } 
    289288} 
     
    376375 
    377376 
    378377// Connect to a host 
    379 bool DirectConnectionBase::openConnection(const QString &ipAddress, const int port) 
     378bool DirectConnectionBase::openConnection( const QString &ipAddress, const quint16 port ) 
    380379{ 
    381380#ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL 
    382381  kDebug() << "Connecting to " << ipAddress << " port " << port << "."; 
     
    428427  KMESS_ASSERT( server_ == 0 ); 
    429428#endif 
    430429 
    431   int port; 
     430  quint16 port; 
    432431 
    433432  // Get the port 
    434433  port = getLocalServerPort(); 
     
    467466 
    468467 
    469468// Verify how many bytes the read buffer has. Note this actually reads the data to test it. 
    470 int DirectConnectionBase::peekBlock( const int size ) 
     469qint64 DirectConnectionBase::peekBlock( const qint64 size ) 
    471470{ 
    472471  // Avoid crashes 
    473472  if(KMESS_NULL(socket_)) return -1; 
     
    475474  // Read the data and see how much got read. 
    476475  // This is the only reliable method, but expensive in terms of performance. 
    477476  QByteArray buffer; 
    478   buffer.resize( size ); 
     477  buffer.resize( (int)size ); 
    479478#ifdef KMESSTEST 
    480479  KMESS_ASSERT( size > 0 ); 
    481480  KMESS_ASSERT( buffer.size() == size ); 
     
    486485 
    487486 
    488487// Read data from the socket 
    489 int DirectConnectionBase::readBlock( char *buffer, int size ) 
     488qint64 DirectConnectionBase::readBlock( char *buffer, qint64 size ) 
    490489{ 
    491490  // Avoid crashes 
    492491  if(KMESS_NULL(socket_)) return -1; 
     
    518517 
    519518 
    520519// Read data from the socket (uses the QByteArray size() as block size) 
    521 int DirectConnectionBase::readBlock( QByteArray &buffer, const int maxSize, const int bufferOffset ) 
     520qint64 DirectConnectionBase::readBlock( QByteArray &buffer, const qint64 maxSize, const qint64 bufferOffset ) 
    522521{ 
    523522  // Avoid crashes 
    524523  if(KMESS_NULL(socket_)) return -1; 
     
    531530  } 
    532531 
    533532  // Determine the maximum number of bytes we can write to the buffer 
    534   int bufferSpace = buffer.size() - bufferOffset; 
     533  qint64 bufferSpace = buffer.size() - bufferOffset; 
    535534 
    536535  // API usage check. 
    537536  // Warn if certain sizes get a unusual value 
     
    554553  // Fill the buffer from the give offset, 
    555554  // size argument is limited to what the buffer can/may sustain. 
    556555  char *bufferStart = buffer.data() + bufferOffset; 
    557   int size = qMin( bufferSpace, maxSize ); 
     556  qint64 size = qMin( bufferSpace, maxSize ); 
    558557  return readBlock( bufferStart, size ); 
    559558} 
    560559 
     
    891890 * @param  size   Size of the block to read. 
    892891 * @returns  Whether the has been a write error. 
    893892 */ 
    894 bool DirectConnectionBase::writeBlock( const char *block, const int size ) 
     893bool DirectConnectionBase::writeBlock( const char *block, const qint64 size ) 
    895894{ 
    896895  lastWriteFailed_ = true; 
    897896  if(KMESS_NULL(socket_)) return false; 
     
    927926#endif 
    928927    } 
    929928 
    930     additionalWriteBuffer_.append( QByteArray::fromRawData( block, size ) ); 
     929    additionalWriteBuffer_.append( QByteArray::fromRawData( block, (int)size ) ); 
    931930 
    932931    // Protect against consuming all system memory 
    933932    // 50 kB is more then enough if you're writing messages of 1300 bytes! 
     
    952951  // Log in network window. 
    953952  // Use actual size of written block. 
    954953#ifdef KMESS_NETWORK_WINDOW 
    955   QByteArray wrapper = QByteArray::fromRawData( block, noBytesWritten ); 
     954  QByteArray wrapper = QByteArray::fromRawData( block, (int)noBytesWritten ); 
    956955  KMESS_NET_SENT(this, wrapper); 
    957956#endif 
    958957 
     
    963962    kWarning() << "only " << noBytesWritten 
    964963               << " of " << size << " bytes could be written!"; 
    965964 
    966     additionalWriteBuffer_.append( QByteArray::fromRawData( block + noBytesWritten, size - noBytesWritten ) ); 
     965    additionalWriteBuffer_.append( QByteArray::fromRawData( block + noBytesWritten, (int)(size - noBytesWritten) ) ); 
    967966  } 
    968967  else 
    969968  { 
  • src/network/extra/msnftpconnection.cpp

     
    250250  unsigned char code; 
    251251  unsigned char byte1; 
    252252  unsigned char byte2; 
    253   int           blockSize; 
    254   int           noBytesRead; 
     253  qint64        blockSize; 
     254  qint64        noBytesRead; 
    255255 
    256256 
    257257  // Make sure we read all available bytes from the socket before returning 
     
    318318      noBytesRead = readBlock( rawBlock, blockSize ); 
    319319 
    320320#ifdef KMESS_NETWORK_WINDOW 
    321       QByteArray wrapper = QByteArray::fromRawData( rawBlock, noBytesRead ); 
     321      QByteArray wrapper = QByteArray::fromRawData( rawBlock, (int)noBytesRead ); 
    322322      KMESS_NET_RECEIVED( this, wrapper ); 
    323323#endif 
    324324 
     
    419419 
    420420 
    421421// Retrieve a file 
    422 bool MsnFtpConnection::retrieveFile(QFile *outputFile, const QString &ipAddress, const int port) 
     422bool MsnFtpConnection::retrieveFile(QFile *outputFile, const QString &ipAddress, const quint16 port) 
    423423{ 
    424424#ifdef KMESSTEST 
    425425  KMESS_ASSERT( authHandle_.length() > 0 ); 
     
    491491  // to parseCommand() or parseReceivedFileData() 
    492492 
    493493  char          rawBlock[255]; 
    494   int           blockSize; 
    495   int           noBytesRead; 
     494  qint64        blockSize; 
     495  qint64        noBytesRead; 
    496496  QString       commandLine; 
    497497  QStringList   command; 
    498498 
     
    524524    } 
    525525 
    526526    // Convert data block to UTF8 string 
    527     commandLine = QString::fromUtf8( rawBlock, noBytesRead ); 
     527    commandLine = QString::fromUtf8( rawBlock, (int)noBytesRead ); 
    528528 
    529529#ifdef KMESS_NETWORK_WINDOW 
    530530    KMESS_NET_RECEIVED( this, commandLine.toUtf8() ); 
     
    695695  KMESS_ASSERT( inputStream_ != 0 ); 
    696696#endif 
    697697 
    698   int noBytesRead; 
    699   char rawBlock[2048]; 
     698  qint64 noBytesRead; 
     699  char   rawBlock[2048]; 
    700700 
    701701  // Read a block from the file. 
    702702  noBytesRead = inputStream_->read( rawBlock + 3, sizeof(rawBlock) - 3 ); 
     
    723723 
    724724  // Set the header 
    725725  rawBlock[0] = 0; 
    726   rawBlock[1] = (noBytesRead & 0x00ff); 
    727   rawBlock[2] = (noBytesRead & 0xff00) >> 8; 
     726  rawBlock[1] = (char)  ( noBytesRead & 0x00ff ); 
     727  rawBlock[2] = (char)( ( noBytesRead & 0xff00 ) >> 8 ); 
    728728 
    729729  // Update the progress 
    730730  fileBytesRemaining_ -= noBytesRead; 
  • src/network/extra/msndirectconnection.cpp

     
    145145    // start with a new data block 
    146146    if( remainingBlockBytes_ <= 0 ) 
    147147    { 
    148       int noBytesPeeked = peekBlock(4); 
     148      qint64 noBytesPeeked = peekBlock(4); 
    149149      if( preambleOffset_ == 0 ) 
    150150      { 
    151151        // First see if there are enough bytes. 
     
    163163      } 
    164164 
    165165      // First 4 bytes indicate the message/block length. 
    166       int noBytesRead = readBlock( preambleBuffer_, 4 - preambleOffset_, preambleOffset_ ); 
     166      qint64 noBytesRead = readBlock( preambleBuffer_, 4 - preambleOffset_, preambleOffset_ ); 
    167167      if( noBytesRead == 0 ) 
    168168      { 
    169169#ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL 
     
    239239      } 
    240240 
    241241      // Allocate the buffer. 
    242       buffer_.resize(remainingBlockBytes_); 
     242      buffer_.resize( (int)remainingBlockBytes_ ); 
    243243      buffer_.fill('\0'); 
    244244      bufferOffset_ = 0; 
    245245 
     
    258258 
    259259    // Fill the next part of the buffer with the bytes received. 
    260260    // Read as many bytes as possible, test for errors. 
    261     int noBytesRead = readBlock( buffer_, remainingBlockBytes_, bufferOffset_ ); 
     261    qint64 noBytesRead = readBlock( buffer_, remainingBlockBytes_, bufferOffset_ ); 
    262262    if( noBytesRead < 0 ) 
    263263    { 
    264264      kWarning() << "read error " 
  • src/network/extra/directconnectionpool.h

     
    4848    virtual               ~DirectConnectionPool(); 
    4949 
    5050    // Add a connection to the list, tells the object to connect to the given ipaddress/port. 
    51     bool                   addConnection(DirectConnectionBase *connection, const QString &ipAddress, const int port); 
     51    bool                   addConnection(DirectConnectionBase *connection, const QString &ipAddress, const quint16 port); 
    5252    // Add a connection to the list, starts listening for incoming connections (returns zero if couldn't start listening). 
    5353    int                    addServerConnection(DirectConnectionBase *connection); 
    5454    // Remove all connections from the pending list 
  • src/network/extra/directconnectionbase.h

     
    6868    // Return true when a write handler is connnected. 
    6969    bool                   isWriteHandlerConnected() const; 
    7070    // Get the server port that will be used 
    71     int                    getLocalServerPort(); 
     71    quint16                getLocalServerPort(); 
    7272    // Get the remote ip the socket is connected with. 
    7373    QString                getRemoteIp() const; 
    7474    // Get the remote port the socket is connected with. 
    75     int                    getRemotePort() const; 
     75    quint16                getRemotePort() const; 
    7676    // Return the error description 
    7777    QString                getSocketError() const; 
    7878    // Connect to a host 
    79     bool                   openConnection(const QString &ipAddress, const int port); 
     79    bool                   openConnection( const QString &ipAddress, const quint16 port ); 
    8080    // Wait for an incoming connection 
    8181    bool                   openServerPort(); 
    8282 
     
    106106    // Close and delete the server socket 
    107107    bool                   closeServerSocket(); 
    108108    // Return the number of bytes which are already received in the local buffer 
    109     int                    getAvailableBytes() const; 
     109    qint64                 getAvailableBytes() const; 
    110110    // Return the name of the locally opened port. 
    111111    QString                getListeningServiceName() const; 
    112112    // Verify how many bytes the read buffer has. Note this actually reads the data to test it. 
    113     int                    peekBlock( const int size ); 
     113    qint64                 peekBlock( const qint64 size ); 
    114114    // Read data from the socket 
    115     int                    readBlock( char *buffer, const int size ); 
     115    qint64                 readBlock( char *buffer, const qint64 size ); 
    116116    // Read data from the socket (uses the QByteArray size() as block size) 
    117     int                    readBlock( QByteArray &buffer, const int maxSize = 0, const int offset = 0 ); 
     117    qint64                 readBlock( QByteArray &buffer, const qint64 maxSize = 0, const qint64 offset = 0 ); 
    118118    // Mark the remote host as authorized (usually after the handshake was successful) 
    119119    void                   setAuthorized(bool authorized); 
    120120    // Write data to the socket 
    121     bool                   writeBlock( const char *block, const int size ); 
     121    bool                   writeBlock( const char *block, const qint64 size ); 
    122122    // Write data to the socket 
    123123    bool                   writeBlock( const QByteArray &block ); 
    124124 
     
    140140    // The timeout handling for openConnection() 
    141141    QTimer                 connectionTimer_; 
    142142    // The higher limit to the interval of server ports this class will use 
    143     int                    highestServerPortLimit_; 
     143    quint16                highestServerPortLimit_; 
    144144    // Whether the class acts as server or client 
    145145    bool                   isServer_; 
    146146    // Whether the last write action failed. 
    147147    bool                   lastWriteFailed_; 
    148148    // The lower limit to the interval of server ports this class will use 
    149     int                    lowestServerPortLimit_; 
     149    quint16                lowestServerPortLimit_; 
    150150    // The server socket which listens for incoming connections. 
    151151    QTcpServer            *server_; 
    152152    // The server port this class will use 
    153     int                    serverPort_; 
     153    quint16                serverPort_; 
    154154    // The next server port used with a openServerPort() call. 
    155     static int             nextServerPort_; 
     155    static quint16         nextServerPort_; 
    156156    // The socket over which data is sent or received. 
    157157    QTcpSocket            *socket_; 
    158158    // Whether an timeout occured 
  • src/network/extra/msnftpconnection.h

     
    5959    // Send a file 
    6060    bool                   sendFile(QFile *inputFile); 
    6161    // Retrieve a file 
    62     bool                   retrieveFile(QFile *outputFile, const QString &ipAddress, const int port); 
     62    bool                   retrieveFile(QFile *outputFile, const QString &ipAddress, const quint16 port); 
    6363 
    6464  private slots: 
    6565    // This is called when a connection is established. 
     
    134134    // The stream to write received data to 
    135135    QIODevice             *outputStream_; 
    136136    // True when only partial file data was received 
    137     int                    remainingBlockBytes_; 
     137    qint64                 remainingBlockBytes_; 
    138138    // True if the user cancelled the session 
    139139    bool                   userCancelled_; 
    140140 
  • src/network/extra/msndirectconnection.h

     
    6161    // The buffer for the incoming p2p messages. 
    6262    QByteArray             buffer_; 
    6363    // The offset of the currently received block 
    64     uint                   bufferOffset_; 
     64    quint64                bufferOffset_; 
    6565    // The other contact we're connected with 
    6666    QString                contactHandle_; 
    6767    // Whether the first message is received 
     
    6969    // The buffer for the next preamble message. 
    7070    QByteArray             preambleBuffer_; 
    7171    // The offset in the preamble buffer 
    72     int                    preambleOffset_; 
     72    qint64                 preambleOffset_; 
    7373    // Set when only partial data was received 
    74     uint                   remainingBlockBytes_; 
     74    quint64                remainingBlockBytes_; 
    7575 
    7676  signals: 
    7777    // Signal that a full message block was received. 
  • src/network/applications/applicationlist.cpp

     
    315315 * @return Whether the socket could be created or not. 
    316316 *         Returns false if the socket could not be created. 
    317317 */ 
    318 bool ApplicationList::addConnection(const QString &ipAddress, const int port) 
     318bool ApplicationList::addConnection(const QString &ipAddress, const quint16 port) 
    319319{ 
    320320  // Avoid overwriting the current directConnection_ variable. 
    321321  if( directConnection_ != 0 ) 
     
    539539  P2PApplication *app = 0; 
    540540 
    541541  // Extract the SLP data message 
    542   QString slpMessage = QString::fromUtf8( message.getData(), message.getDataSize() ); 
     542  QString slpMessage = QString::fromUtf8( message.getData(), (int) message.getDataSize() ); 
    543543 
    544544  if(! slpMessage.startsWith("INVITE")) 
    545545  { 
     
    10311031 
    10321032      // Find the call ID 
    10331033      // Note this assumes that a Call-ID will be found in the first