Ticket #216: UNCOMMITTED-warnings-fixes.patch

File UNCOMMITTED-warnings-fixes.patch, 57.4 KB (added by valerio, 4 years 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 fragment. 
    1034       slpMessage  = QString::fromUtf8( message.getData(), message.getDataSize() ); 
     1034      slpMessage  = QString::fromUtf8( message.getData(), (int)message.getDataSize() ); 
    10351035      int callPos = callRE.indexIn( slpMessage ); 
    10361036 
    10371037      if( callPos == -1 ) 
  • src/network/applications/application.cpp

     
    687687 * 
    688688 * @param bytesTransferred  The number of bytes transferred. 
    689689 */ 
    690 void Application::showTransferProgress(const uint bytesTransferred) 
     690void Application::showTransferProgress( const ulong bytesTransferred ) 
    691691{ 
    692692#ifdef KMESSDEBUG_APPLICATION 
    693693  kDebug() << "Transferred " << bytesTransferred << " bytes."; 
  • src/network/applications/applicationlist.h

     
    117117    // Add a new application to the list. 
    118118    void                   addApplication(P2PApplication *application); 
    119119    // Attempt to establish a direct connection at the given ipaddress/port. 
    120     bool                   addConnection(const QString &ipAddress, const int port); 
     120    bool                   addConnection(const QString &ipAddress, const quint16 port); 
    121121    // Attempt to establish a direct connection by listening at an random port. 
    122122    int                    addServerConnection(); 
    123123    // Abort all applications, the contact is leaving a chat. 
  • src/network/applications/filetransferp2p.cpp

     
    452452  uint    shortNameLength = shortName.length(); 
    453453 
    454454  // Get the file data (preview 
    455   int filesize    = fileData->size(); 
     455  ulong filesize  = fileData->size(); 
    456456  int flags       = (hasPreview ? 0 : 1); 
    457457 
    458458  // Determine the context length 
     
    667667 * Show the progress made during a transfer. 
    668668 * This function is also called from the P2PApplication base class. 
    669669 */ 
    670 void FileTransferP2P::showTransferProgress(const uint bytesTransferred) 
     670void FileTransferP2P::showTransferProgress(const ulong bytesTransferred) 
    671671{ 
    672672  // Display the progress update in the transfer window 
    673673  TransferWindow::getInstance()->updateProgress( transferID_, bytesTransferred ); 
     
    790790 
    791791 
    792792  // Read the filename parameters 
    793   fileSize_ = file_->size(); 
     793  fileSize_ = (uint)file_->size(); 
    794794 
    795795  // Create a thumbnail, continue when it completes 
    796796  // Windows Live Messenger scales the received image down depending on the users settings. 
     
    809809 
    810810  // Create the session id and context field 
    811811  QString context   = createContextField( fileName_, file_, hasPreview ); 
    812   uint    sessionID = KMessShared::generateID(); 
     812  uint    sessionID = (uint)KMessShared::generateID(); 
    813813 
    814814  // Send the invitation 
    815815  sendSlpSessionInvitation(sessionID, getAppId(), 2, context); 
  • src/network/applications/application.h

     
    167167    // Show a message to inform about a transfer event (shown in the transfer dialog, e.g. connecting to host) 
    168168    virtual void           showTransferMessage(const QString &message); 
    169169    // Show the progress made during a transfer. 
    170     virtual void           showTransferProgress(const uint bytesTransferred); 
     170    virtual void           showTransferProgress( const ulong bytesTransferred ); 
    171171    // Set the cookie from an INVITE command 
    172172    void                   startByInvite(const QString &invitationCookie); 
    173173    // The user rejected the invitation 
  • src/network/applications/filetransferp2p.h

     
    8383    // Show a message to inform about a transfer event (shown in the transfer dialog, e.g. connecting to host) 
    8484    void                   showTransferMessage(const QString &message); 
    8585    // Show the progress made during a transfer. 
    86     void                   showTransferProgress(const uint bytesTransferred); 
     86    void                   showTransferProgress(const ulong bytesTransferred); 
    8787    // Convert a string to some more readable form 
    8888    QString                toReadableBytes(uint bytes); 
    8989    // The user cancelled the session 
  • src/network/applications/p2papplicationbase.cpp

     
    944944    else 
    945945    { 
    946946      // Read the data directly from the message 
    947       slpData = QString::fromUtf8( p2pMessage.getData(), p2pMessage.getDataSize() ); 
     947      slpData = QString::fromUtf8( p2pMessage.getData(), (int)p2pMessage.getDataSize() ); 
    948948    } 
    949949 
    950950    // Remove the first preamble line, because it's not in MIME format. 
     
    13281328  { 
    13291329    // Read the data from the file. 
    13301330    char buffer[1202]; // 1202 is the max P2P data size. 
    1331     int bytesRead = dataSource_->read( buffer, 1202 ); 
     1331    qint64 bytesRead = dataSource_->read( buffer, 1202 ); 
    13321332    if( bytesRead < 0 ) 
    13331333    { 
    13341334      kWarning() << "Couldn't send more data, " 
     
    13461346    } 
    13471347 
    13481348    // Wrap in buffer, without copying. 
    1349     QByteArray data = QByteArray::fromRawData( buffer, bytesRead ); 
     1349    QByteArray data = QByteArray::fromRawData( buffer, (int)bytesRead ); 
    13501350 
    13511351#ifdef KMESSDEBUG_P2PAPPLICATION_GENERAL 
    13521352    kDebug() << "Sending data:" 
     
    17441744 
    17451745  // Determine the message size: 
    17461746  uint messageSize = messageData.size(); 
    1747   uint totalSize; 
    1748   uint offsetField; 
     1747  ulong totalSize; 
     1748  ulong offsetField; 
    17491749 
    17501750  if( fragmentTotalSize_ == 0 ) 
    17511751  { 
     
    22172217 
    22182218  // See if the offset should be changed, 
    22192219  // and if so, update it. 
    2220   if( offset != file->pos() && ! file->seek( offset ) ) 
     2220  if( offset != (ulong)file->pos() && ! file->seek( offset ) ) 
    22212221  { 
    22222222#ifdef KMESSDEBUG_APPLICATION 
    22232223    kDebug() << "data is received out of order, updating file offset."; 
     
    22742274    } 
    22752275 
    22762276    // Make sure the file position is correct now. 
    2277     if( offset != file->pos() ) 
     2277    if( offset != (ulong)file->pos() ) 
    22782278    { 
    22792279      sendCancelMessage( CANCEL_FAILED ); 
    22802280      return false; 
  • src/network/applications/filetransfer.cpp

     
    251251 
    252252  QString ip; 
    253253  QString ipInternal; 
    254   int    port; 
     254  quint16 port; 
    255255  int     portXInternal; 
    256256  int     portX; 
    257257  QString authCookie; 
     
    260260  ip            = message.getValue( "IP-Address"          ); 
    261261  ipInternal    = message.getValue( "IP-Address-Internal" );          // As of MSN5 
    262262  portXInternal = message.getValue( "PortX-Internal"      ).toInt();  // As of MSN5 
    263   port          = message.getValue( "Port"                ).toInt(); 
     263  port          = (quint16)message.getValue( "Port"       ).toUInt(); 
    264264  portX         = message.getValue( "PortX"               ).toInt();  // As of MSN5 
    265265  authCookie    = message.getValue( "AuthCookie"          ); 
    266266 
     
    497497 
    498498 
    499499// Convert a string to some more readable form 
    500 QString FileTransfer::toReadableBytes(uint bytes) 
     500QString FileTransfer::toReadableBytes( ulong bytes ) 
    501501{ 
    502502  QString format; 
    503503  if(bytes > 1048576) 
  • src/network/applications/p2papplication.cpp

     
    22712271    // Get the IP addresses. 
    22722272    QStringList externalIpAddresses; 
    22732273    QStringList internalIpAddresses; 
    2274     uint        externalPort = 0; 
    2275     uint        internalPort = 0; 
     2274    quint16     externalPort = 0; 
     2275    quint16     internalPort = 0; 
    22762276 
    22772277    if( listenInternal ) 
    22782278    { 
    22792279      internalIpAddresses = slpMimeBody.getValue("IPv4Internal-Addrs").split(" "); 
    2280       internalPort        = slpMimeBody.getValue("IPv4Internal-Port").toUInt(); 
     2280      internalPort        = (quint16)slpMimeBody.getValue("IPv4Internal-Port").toUInt(); 
    22812281    } 
    22822282 
    22832283    if( listenExternal ) 
    22842284    { 
    22852285      externalIpAddresses = slpMimeBody.getValue("IPv4External-Addrs").split(" "); 
    2286       externalPort        = slpMimeBody.getValue("IPv4External-Port").toUInt(); 
     2286      externalPort        = (quint16)slpMimeBody.getValue("IPv4External-Port").toUInt(); 
    22872287    } 
    22882288 
    22892289    // See if the clients are likely at the same lan. 
     
    27482748 * @param  messageContentType  Contact type of the message which is in error (can be empty) 
    27492749 * @param  messageType         The message type. This is used later when an ACK is received. 
    27502750 */ 
    2751 void P2PApplication::sendSlpError(const QString &statusLine, 
    2752                                   const uint sessionID, const QString &messageContentType, P2PMessageType messageType) 
     2751void P2PApplication::sendSlpError( const QString &statusLine, 
     2752                                   const ulong sessionID, const QString &messageContentType, P2PMessageType messageType ) 
    27532753{ 
    27542754#ifdef KMESSDEBUG_P2PAPPLICATION_GENERAL 
    27552755  kDebug() << "Sending SLP error response: " << statusLine; 
     
    30183018 * @param  appId      The numeric app-Id value, which also identifies the application type. 
    30193019 * @param  context    The context field. 
    30203020 */ 
    3021 void P2PApplication::sendSlpSessionInvitation(uint sessionID, const QString &eufGuid, const int appId, const QString &context) 
     3021void P2PApplication::sendSlpSessionInvitation( ulong sessionID, const QString &eufGuid, const int appId, const QString &context ) 
    30223022{ 
    30233023  // Create the message 
    30243024  MimeMessage invitation; 
  • src/network/applications/filetransfer.h

     
    6666    // Create and initilize the progress dialog. 
    6767    void                   initializeProgressDialog(bool incoming = false); 
    6868    // Convert a string to some more readable form 
    69     QString                toReadableBytes(uint bytes); 
     69    QString                toReadableBytes( ulong bytes); 
    7070    // Step one of a user-started chat: the user invites the contact 
    7171    void                   userStarted1_UserInvitesContact(); 
    7272    // Step two of a user-started chat: the contact accepts 
  • src/network/applications/p2papplication.h

     
    149149    // Send the data preparation ACK. 
    150150    void                   sendDataPreparationAck(); 
    151151    // Send the invitation for a normal session 
    152     void                   sendSlpSessionInvitation(uint sessionID, const QString &eufGuid, const int appId, const QString &context); 
     152    void                   sendSlpSessionInvitation( ulong sessionID, const QString &eufGuid, const int appId, const QString &context ); 
    153153    // Send the invitation for a direct connection. 
    154154    void                   sendSlpTransferInvitation(); 
    155155    // Send an SLP 200/OK message 
     
    215215    // Send an SLP invitation message 
    216216    void                   sendSlpInvitation(const MimeMessage &message, const QString &contentType, P2PMessageType messageType); 
    217217    // Send an SLP error message (to decline an invitation for example) 
    218     void                   sendSlpError(const QString &statusLine, const uint sessionID = 0, 
    219                                         const QString &messageContentType = 0, 
    220                                         P2PMessageType messageType = P2P_MSG_SLP_ERROR); 
     218    void                   sendSlpError( const QString &statusLine, const ulong sessionID = 0, 
     219                                         const QString &messageContentType = 0, 
     220                                         P2PMessageType messageType = P2P_MSG_SLP_ERROR ); 
    221221    // Show a timeout message because an expected message was not received. 
    222222    void                   showTimeoutMessage( P2PWaitingState waitingState ); 
    223223 
  • src/network/p2pmessage.cpp

     
    323323                         }; 
    324324  for(int i = 0; i < 16; i++) 
    325325  { 
    326     buffer[offset + i] = fixedNonce.mid(noncePos[i] * 2, 2).toUInt(0, 16); 
     326    buffer[offset + i] = (char)( fixedNonce.mid(noncePos[i] * 2, 2).toUInt(0, 16) ); 
    327327  } 
    328328} 
    329329 
  • src/network/msnsockethttp.cpp

     
    759759 * @param  data  Contents of the message which will be sent 
    760760 * @return -1 on error, or else always the exact size of the sent data. 
    761761 */ 
    762 int MsnSocketHttp::writeBinaryData( const QByteArray &data ) 
     762qint64 MsnSocketHttp::writeBinaryData( const QByteArray &data ) 
    763763{ 
    764764  if( ! connected_ ) 
    765765  { 
     
    830830 * @param  data  The message which will be sent 
    831831 * @return -1 on error, or else always the exact size of the sent data. 
    832832 */ 
    833 int MsnSocketHttp::writeData( const QString &data ) 
     833qint64 MsnSocketHttp::writeData( const QString &data ) 
    834834{ 
    835835  return writeBinaryData( data.toUtf8() ); 
    836836} 
  • src/network/msnsocketbase.h

     
    9292    // Set whether we're sending pings or not 
    9393    virtual void       setSendPings( bool sendPings ) = 0; 
    9494    // Write data to the socket without conversions 
    95     virtual int        writeBinaryData( const QByteArray& data ) = 0; 
     95    virtual qint64     writeBinaryData( const QByteArray& data ) = 0; 
    9696    // Write data to the socket 
    97     virtual int        writeData( const QString& data ) = 0; 
     97    virtual qint64     writeData( const QString& data ) = 0; 
    9898 
    9999 
    100100  protected:  // Protected properties 
  • src/network/msnswitchboardconnection.cpp

     
    15581558      QString messagePart; 
    15591559      QString body = message.getBody(); 
    15601560 
    1561       int parts = (int) ceil( ( (float) bodyLength / maxSendableSingleMessageLength ) ); 
     1561      int parts = (int) ceil( ( (float) bodyLength / (float) maxSendableSingleMessageLength ) ); 
    15621562 
    15631563      for( int i = 0; i < parts - 1; i++ ) 
    15641564      { 
  • src/network/msnsockethttp.h

     
    9292    // Set whether to send pings or not 
    9393    void                 setSendPings( bool sendPings ); 
    9494    // Write data to the socket without conversions 
    95     int                  writeBinaryData( const QByteArray& data ); 
     95    qint64               writeBinaryData( const QByteArray& data ); 
    9696    // Write data to the socket 
    97     int                  writeData( const QString& data ); 
     97    qint64               writeData( const QString& data ); 
    9898 
    9999 
    100100  private: // Private methods 
  • src/network/msnsockettcp.cpp

     
    118118 */ 
    119119void MsnSocketTcp::connectToServer( const QString& server, const quint16 port ) 
    120120{ 
    121   int desiredPort; 
     121  quint16 desiredPort; 
    122122  QString desiredServer; 
    123123 
    124124  if( server.isEmpty() && port == 0 ) 
     
    133133  } 
    134134 
    135135#ifdef KMESSTEST 
    136   KMESS_ASSERT( ( desiredPort >= 0 ) && ( desiredPort < 32768 ) ); 
     136  KMESS_ASSERT( desiredPort < 32768 ); 
    137137#endif 
    138138 
    139139#ifdef KMESSDEBUG_CONNECTION_SOCKET_TCP 
     
    527527 
    528528 
    529529// Write data to the socket without conversions 
    530 int MsnSocketTcp::writeBinaryData( const QByteArray &data ) 
     530qint64 MsnSocketTcp::writeBinaryData( const QByteArray &data ) 
    531531{ 
    532   int noBytesWritten; 
     532  qint64 noBytesWritten; 
    533533 
    534534  if( ! isConnected() ) 
    535535  { 
     
    550550 
    551551 
    552552// Write data to the socket 
    553 int MsnSocketTcp::writeData( const QString &data ) 
     553qint64 MsnSocketTcp::writeData( const QString &data ) 
    554554{ 
    555   int noBytesWritten; 
     555  qint64 noBytesWritten; 
    556556 
    557557  if( ! isConnected() ) 
    558558  { 
  • src/network/msnconnection.cpp

     
    764764#endif 
    765765 
    766766  QByteArray binData = data.toUtf8(); 
    767   int noBytesWritten = socket_->writeData( binData ); 
     767  qint64 noBytesWritten = socket_->writeData( binData ); 
    768768 
    769769  if( noBytesWritten != binData.length() ) // Note that the previous code used data.length instead of unicode.length(), but I 
    770770  {                                         // changed this since that is the string we send to the socket... (could be wrong here) 
  • src/network/soap/passportloginservice.cpp

     
    113113  QByteArray nonce; 
    114114  for( int i = 0; i < 24; i++ ) 
    115115  { 
    116    nonce += ( rand() % 74 ) + 48; 
     116   nonce += (char)( ( rand() % 74 ) + 48 ); 
    117117  } 
    118118  token += "&nonce=" + QUrl::toPercentEncoding( nonce.toBase64() ); 
    119119 
  • src/network/msnsockettcp.h

     
    6868    // Set whether we're sending pings or not (also resets ping timer) 
    6969    void                 setSendPings( bool sendPings ); 
    7070    // Write data to the socket without conversions 
    71     int                  writeBinaryData(const QByteArray& data); 
     71    qint64               writeBinaryData(const QByteArray& data); 
    7272    // Write data to the socket 
    73     int                  writeData(const QString& data); 
     73    qint64               writeData(const QString& data); 
    7474 
    7575 
    7676  private slots: // Private slots 
  • src/network/msnnotificationconnection.cpp

     
    14691469  QString server     = serverAndPort.section(':', 0, 0); 
    14701470  QString portString = serverAndPort.section(':', 1, 1); 
    14711471  bool goodPort; 
    1472   int port = portString.toInt( &goodPort ); 
     1472  quint16 port = (quint16) portString.toUInt( &goodPort ); 
    14731473  if ( !goodPort ) 
    14741474  { 
    14751475    kWarning() << "Couldn't get port from string " << portString; 
     
    17471747 
    17481748  // Convert the port to an integer 
    17491749  bool goodPort; 
    1750   int port = portString.toInt( &goodPort ); 
     1750  quint16 port = (quint16) portString.toUInt( &goodPort ); 
    17511751#ifdef KMESSDEBUG_NOTIFICATION_GENERAL 
    17521752  kDebug() << "Got " << serverType << " transfer to " << server << ":" << port << "."; 
    17531753#endif 
  • src/network/chatinformation.cpp

     
    3838 
    3939// The constructor for a contact-started chat 
    4040ChatInformation::ChatInformation( MsnNotificationConnection *parent, const QString& handle, 
    41                                   const QString &ip, int port, const QString &authorization, const QString &chatId, 
     41                                  const QString &ip, quint16 port, const QString &authorization, const QString &chatId, 
    4242                                  ConnectionType type ) 
    4343 : authorization_(authorization) 
    4444 , chatId_(chatId) 
     
    103103 
    104104 
    105105// Return the switchboard server port 
    106 int ChatInformation::getPort() const 
     106quint16 ChatInformation::getPort() const 
    107107{ 
    108108  return port_; 
    109109} 
     
    143143 
    144144 
    145145// Set server information 
    146 void ChatInformation::setServerInformation( const QString& ip, const int& port, const QString& authorization ) 
     146void ChatInformation::setServerInformation( const QString& ip, const quint16& port, const QString& authorization ) 
    147147{ 
    148148  ip_ = ip; 
    149149  port_ = port; 
  • src/network/multipacketmessage.cpp

     
    5151 
    5252  // Set the MimeMessage and the number of chunks ( round up ) 
    5353  result_ = message; 
    54   float a = (float) messageText_.toUtf8().length() / maxSendableMessageLength; 
     54  float a = (float) messageText_.toUtf8().length() / (float) maxSendableMessageLength; 
    5555  chunks_ = (int) ceil( a ); 
    5656 
    5757  // Set message guid 
  • src/network/chatinformation.h

     
    5656                                                 int transactionId, ConnectionType type ); 
    5757    // The constructor for a contact-started chat 
    5858                                ChatInformation( MsnNotificationConnection *parent, const QString& handle, 
    59                                                  const QString &ip, int port, const QString &authorization, 
     59                                                 const QString &ip, quint16 port, const QString &authorization, 
    6060                                                 const QString &chatId, ConnectionType type ); 
    6161    // The destructor 
    6262                               ~ChatInformation(); 
     
    7171    // Return the notification connection that spawned this object 
    7272    MsnNotificationConnection  *getNotificationConnection() const; 
    7373    // Return the switchboard server port 
    74     int                         getPort() const; 
     74    quint16                     getPort() const; 
    7575    // Return the time of when the SB transfer request has been sent 
    7676    int                         getTime() const; 
    7777    // Return the transaction ID used in the "XFR" command. 
     
    8181    // Return whether the user started the chat 
    8282    bool                        getUserStartedChat() const; 
    8383    // Set server information 
    84     void                        setServerInformation( const QString& ip, const int& port, const QString& authorization ); 
     84    void                        setServerInformation( const QString& ip, const quint16& port, const QString& authorization ); 
    8585 
    8686 
    8787  private: // Private attributes 
     
    9898    // The notification connection that spawned this object 
    9999    MsnNotificationConnection  *notificationConnection_; 
    100100    // The switchboard server's port 
    101     int                         port_; 
     101    quint16                     port_; 
    102102    // The time when the SB transfer request was issued to the notification server 
    103103    uint                        requestTime_; 
    104104    // The transaction ID used in the "XFR" command. 
  • src/systemtraywidget.cpp

     
    159159 
    160160    // Show the dialog 
    161161    KMessageBox::information(kapp->activeWindow(), 
    162         "<qt><p>" + message + "</p><p><center><img src=\"" + tempFile.fileName() + "\" width=\"" + pictureArea.width() + "\" height=\"" + pictureArea.height() + "\"></center></p></qt>", 
     162        "<qt><p>" + message + "</p><p><center><img src=\"" + tempFile.fileName() + "\" " 
     163        "width=\""  + QString::number( pictureArea.width()  ) + "\" " 
     164        "height=\"" + QString::number( pictureArea.height() ) + "\"" 
     165        "></center></p></qt>", 
    163166        i18n("Docking in System Tray"), "hideOnCloseInfo"); 
    164167 
    165168    // Close the temporary file, it will be deleted when the function returns 
  • src/dialogs/transferentry.cpp

     
    3636 
    3737 
    3838// Constructor 
    39 TransferEntry::TransferEntry( QWidget *parent, const QString filename, uint filesize, 
     39TransferEntry::TransferEntry( QWidget *parent, const QString filename, const ulong filesize, 
    4040                              bool incoming, const QImage preview) 
    4141: QWidget( parent ), 
    4242 Ui::TransferEntry(), 
     
    259259 
    260260 
    261261// Convert a string to some more readable form 
    262 QString TransferEntry::toReadableBytes(uint bytes) 
     262QString TransferEntry::toReadableBytes( ulong bytes ) 
    263263{ 
    264264  QString format; 
    265265  if(bytes > 1048576) 
     
    305305 
    306306 
    307307// Update the progress bar 
    308 void TransferEntry::updateProgress( uint bytesTransferred ) 
     308void TransferEntry::updateProgress( ulong bytesTransferred ) 
    309309{ 
    310310#ifdef KMESSTEST 
    311311  KMESS_ASSERT( ! isDone_ ); 
     
    356356void TransferEntry::updateTransferRate() 
    357357{ 
    358358  // To avoid to works with different transferred bytes 
    359   uint tempTransferred = bytesTransferred_; 
     359  ulong tempTransferred = bytesTransferred_; 
    360360 
    361361  // Calculate the bytes transferred from the last calling 
    362   uint bytesTransferredFromLast =  tempTransferred - previousTransferred_; 
     362  ulong bytesTransferredFromLast =  tempTransferred - previousTransferred_; 
    363363 
    364364  QString speed, eta; 
    365365 
  • src/dialogs/transferentry.h

     
    3535 
    3636public: 
    3737    // Constructor 
    38     TransferEntry( QWidget *parent, const QString filename, const uint filesize, bool incoming = false, 
     38    TransferEntry( QWidget *parent, const QString filename, const ulong filesize, bool incoming = false, 
    3939                   const QImage preview = QImage() ); 
    4040    // Destructor 
    4141    virtual ~TransferEntry(); 
     
    4848    void setTransferID( int transferID ); 
    4949 
    5050    // Format nicely the byte quantities 
    51     static QString toReadableBytes( uint bytes ); 
     51    static QString toReadableBytes( ulong bytes ); 
    5252 
    5353public slots: 
    5454    // Mark the transfer as failed 
     
    5858    // Set a status message 
    5959    void setStatusMessage( const QString &message ); 
    6060    // Update the progress bar 
    61     void updateProgress( uint bytesTransferred ); 
     61    void updateProgress( ulong bytesTransferred ); 
    6262 
    6363private slots: 
    6464    // The cancel link was pressed 
     
    8080    // The file name 
    8181    QString filename_; 
    8282    // The file size 
    83     uint    filesize_; 
     83    ulong   filesize_; 
    8484    // The image preview 
    8585    QPixmap preview_; 
    8686    // The previous percentage 
    8787    int     previousPercentage_; 
    8888    // The current trasferred bytes 
    89     uint    bytesTransferred_; 
     89    ulong   bytesTransferred_; 
    9090    // The timer for estimated the trasfer rate 
    9191    QTimer  *timer_; 
    9292     // The previous trasferred bytes 
    93     uint    previousTransferred_; 
     93    ulong   previousTransferred_; 
    9494    // The ID of this transfer, used by the Transfer Window 
    9595    int     transferID_; 
    9696}; 
  • src/dialogs/transferwindow.cpp

     
    8989 
    9090 
    9191// Add an entry to the transfer manager 
    92 int TransferWindow::addEntry( const QString filename, uint filesize, bool incoming, const QImage preview ) 
     92int TransferWindow::addEntry( const QString filename, ulong filesize, bool incoming, const QImage preview ) 
    9393{ 
    9494#ifdef KMESSDEBUG_TRANSFERWINDOW 
    9595  kDebug() << "adding entry for '" << filename << "'."; 
     
    163163 
    164164 
    165165// Update the progress bar of a transfer 
    166 void TransferWindow::updateProgress( int transferID, uint bytesTransferred ) 
     166void TransferWindow::updateProgress( int transferID, ulong bytesTransferred ) 
    167167{ 
    168168  if( ! entryList_.contains( transferID ) ) 
    169169  { 
  • src/dialogs/transferwindow.h

     
    5050 
    5151  public: 
    5252    // Add a new entry 
    53     int                        addEntry( const QString filename, uint filesize, bool incoming = false, 
     53    int                        addEntry( const QString filename, ulong filesize, bool incoming = false, 
    5454                                         const QImage preview = QImage() ); 
    5555    // Destroy the current instance 
    5656    static void                destroy(); 
     
    6565    // Set the status message of a transfer 
    6666    void                       setStatusMessage( int transferID, const QString &message ); 
    6767    // Update the progress bar of a transfer 
    68     void                       updateProgress( int transferID, uint bytesTransferred ); 
     68    void                       updateProgress( int transferID, ulong bytesTransferred ); 
    6969 
    7070  private slots: 
    7171    // The "Clean up" button was pressed. 
  • src/utils/xautolock.cpp

     
    6262  : active_( false ), 
    6363    idle_( false ), 
    6464    idleTime_( 0 ), 
    65     lastCheck_( time( 0 ) ), 
     65    lastCheck_( (uint)time( 0 ) ), 
    6666    mitAvailable_( false ), 
    6767    mitInfo_( 0 ), 
    6868    triggerTime_( 0 ) 
     
    9797// The main function which checks for idle status 
    9898void XAutoLock::checkIdle() 
    9999{ 
    100   unsigned int now, timeIdle; 
     100  unsigned int now; 
     101  unsigned long timeIdle; 
    101102 
    102   now = time( 0 ); 
     103  now = (uint)time( 0 ); 
    103104 
    104105  if( abs( lastCheck_ - now ) > 120 ) 
    105106  { 
     
    139140 
    140141 
    141142// Get idle time by asking the MIT-SCREEN-SAVER extension (if available) 
    142 unsigned int XAutoLock::getMitIdle() 
     143unsigned long XAutoLock::getMitIdle() 
    143144{ 
    144145  #ifdef HAVE_XSCREENSAVER 
    145146    if ( !mitInfo_ ) mitInfo_ = XScreenSaverAllocInfo(); 
     
    226227void XAutoLock::resetTimer() 
    227228{ 
    228229  idle_ = false; 
    229   idleTime_ = time( 0 ); 
     230  idleTime_ = (uint)time( 0 ); 
    230231 
    231232  emit activity(); 
    232233} 
  • src/utils/kmessshared.cpp

     
    6363  // Compute the XOR operations 
    6464  for(int i=0; i < key.size() - 1; i++ ) 
    6565  { 
    66     ipad[i] =  ipad[i] ^ key[i]; 
    67     opad[i] =  opad[i] ^ key[i]; 
     66    ipad[i] = (char) ( ipad[i] ^ key[i] ); 
     67    opad[i] = (char) ( opad[i] ^ key[i] ); 
    6868  } 
    6969 
    7070  // Append the data to ipad 
  • src/utils/xautolock.h

     
    7575    // Get idle time by detecting time since last mouse movement 
    7676    unsigned int getMouseIdle(); 
    7777    // Get idle time by asking the MIT-SCREEN-SAVER extension (if available) 
    78     unsigned int getMitIdle(); 
     78    unsigned long getMitIdle(); 
    7979    // Reset the timer (after we've just become active again, for example) 
    8080    void resetTimer(); 
    8181