Index: src/notification/newemailnotification.cpp
===================================================================
--- src/notification/newemailnotification.cpp	(revisione 3361)
+++ src/notification/newemailnotification.cpp	(copia locale)
@@ -43,7 +43,7 @@
 
 
 // Notify the user about this event (a new email has arrived)
-void NewEmailNotification::notify( QString sender, QString subject, bool inInbox, QString command, QString folder, QString url )
+void NewEmailNotification::notify( QString sender, QString subject, bool inInbox, QString folder )
 {
   currentAccount_ = CurrentAccount::instance();
 
Index: src/notification/newemailnotification.h
===================================================================
--- src/notification/newemailnotification.h	(revisione 3361)
+++ src/notification/newemailnotification.h	(copia locale)
@@ -49,7 +49,7 @@
 
   public slots:
     // Notify the user about this event (a new email has arrived)
-    void                  notify( QString sender, QString subject, bool inInbox, QString command, QString folder, QString url );
+    void                  notify( QString sender, QString subject, bool inInbox, QString folder );
 
   private slots:
     // Trigger this event's action (Open the mailbox where the new mail is)
Index: src/network/upnp/igdcontrolpoint.cpp
===================================================================
--- src/network/upnp/igdcontrolpoint.cpp	(revisione 3361)
+++ src/network/upnp/igdcontrolpoint.cpp	(copia locale)
@@ -37,7 +37,7 @@
 
 
 // The constructor
-IgdControlPoint::IgdControlPoint(const QString &hostname, int port, const QString &rootUrl)
+IgdControlPoint::IgdControlPoint(const QString &hostname, quint16 port, const QString &rootUrl)
   : QObject()
   , forwardingService_(0)
   , gatewayAvailable_(false)
Index: src/network/upnp/ssdpconnection.h
===================================================================
--- src/network/upnp/ssdpconnection.h	(revisione 3361)
+++ src/network/upnp/ssdpconnection.h	(copia locale)
@@ -52,7 +52,7 @@
     virtual             ~SsdpConnection();
 
     // Send a broadcast to detect all devices
-    void                 queryDevices(int bindPort = 1500);
+    void                 queryDevices( quint16 bindPort = 1500 );
 
   private slots:
     // Data was received by the socket
Index: src/network/upnp/manager.h
===================================================================
--- src/network/upnp/manager.h	(revisione 3361)
+++ src/network/upnp/manager.h	(copia locale)
@@ -64,7 +64,7 @@
     // The broadcast failed
     void                 slotBroadcastTimeout();
     // A device was discovered by the SSDP broadcast
-    void                 slotDeviceFound(const QString &hostname, int port, const QString &rootUrl);
+    void                 slotDeviceFound(const QString &hostname, quint16 port, const QString &rootUrl);
 
 
   private:  // private methods
Index: src/network/upnp/service.cpp
===================================================================
--- src/network/upnp/service.cpp	(revisione 3361)
+++ src/network/upnp/service.cpp	(copia locale)
@@ -42,7 +42,7 @@
 
 
 // The constructor for information services
-Service::Service(const QString &hostname, int port, const QString &informationUrl)
+Service::Service(const QString &hostname, quint16 port, const QString &informationUrl)
   : informationUrl_(informationUrl)
   , pendingRequests_(0)
 {
Index: src/network/upnp/igdcontrolpoint.h
===================================================================
--- src/network/upnp/igdcontrolpoint.h	(revisione 3361)
+++ src/network/upnp/igdcontrolpoint.h	(copia locale)
@@ -47,7 +47,7 @@
   public:  // public methods
 
     // The constructor
-                         IgdControlPoint(const QString &hostname, int port, const QString &rootUrl);
+                         IgdControlPoint(const QString &hostname, quint16 port, const QString &rootUrl);
     // The destructor
     virtual             ~IgdControlPoint();
 
@@ -74,7 +74,7 @@
     // The host of the gateway
     QString              igdHostname_;
     // The port of the gateway
-    int                  igdPort_;
+    quint16              igdPort_;
     // The root service
     RootService         *rootService_;
     // The wan connection service
Index: src/network/upnp/rootservice.cpp
===================================================================
--- src/network/upnp/rootservice.cpp	(revisione 3361)
+++ src/network/upnp/rootservice.cpp	(copia locale)
@@ -126,7 +126,7 @@
 
 
 // The contructor
-RootService::RootService(const QString &hostname, int port,
+RootService::RootService(const QString &hostname, quint16 port,
                          const QString &rootUrl)
   : Service(hostname, port, rootUrl)
   , hostname_(hostname)
Index: src/network/upnp/service.h
===================================================================
--- src/network/upnp/service.h	(revisione 3361)
+++ src/network/upnp/service.h	(copia locale)
@@ -36,7 +36,7 @@
 struct ServiceParameters
 {
   QString hostname;
-  int     port;
+  quint16 port;
   QString scdpUrl;
   QString controlUrl;
   QString serviceId;
@@ -60,7 +60,7 @@
 
   public:  // public methods
     // The constructor for the root service
-                         Service(const QString &hostname, int port,
+                         Service(const QString &hostname, quint16 port,
                                  const QString &informationUrl);
     // The constructor for action services
                          Service(const ServiceParameters &params);
Index: src/network/upnp/rootservice.h
===================================================================
--- src/network/upnp/rootservice.h	(revisione 3361)
+++ src/network/upnp/rootservice.h	(copia locale)
@@ -38,7 +38,7 @@
   public:  // public methods
 
     // The constructor
-                         RootService(const QString &hostname, int port, const QString &rootUrl);
+                         RootService(const QString &hostname, quint16 port, const QString &rootUrl);
     // The destructor
     virtual             ~RootService();
 
@@ -76,7 +76,7 @@
     // The hostname of the device
     QString                     hostname_;
     // The port of the device
-    int                         port_;
+    quint16                     port_;
     // The udn of the root device
     QString                     rootUdn_;
 };
Index: src/network/upnp/ssdpconnection.cpp
===================================================================
--- src/network/upnp/ssdpconnection.cpp	(revisione 3361)
+++ src/network/upnp/ssdpconnection.cpp	(copia locale)
@@ -82,7 +82,7 @@
   while( socket_->hasPendingDatagrams() )
   {
     datagram.clear();
-    datagram.resize( socket_->pendingDatagramSize() );
+    datagram.resize( (int)socket_->pendingDatagramSize() );
 
     // Get the HTTP-like content
     socket_->readDatagram( datagram.data(), datagram.size() );
@@ -106,7 +106,7 @@
 
 
 // Send a broadcast to detect all devices
-void SsdpConnection::queryDevices(int bindPort)
+void SsdpConnection::queryDevices( quint16 bindPort )
 {
 #ifdef KMESSDEBUG_UPNP_GENERAL
   kDebug() << "Sending broadcast packet.";
@@ -134,7 +134,7 @@
   }
 
   // Send the data
-  int bytesWritten = socket_->writeDatagram( data.toAscii(), address, 1900 );
+  qint64 bytesWritten = socket_->writeDatagram( data.toAscii(), address, 1900 );
 
   if(bytesWritten == -1)
   {
Index: src/network/upnp/manager.cpp
===================================================================
--- src/network/upnp/manager.cpp	(revisione 3361)
+++ src/network/upnp/manager.cpp	(copia locale)
@@ -137,7 +137,7 @@
 
 
 // A device was discovered by the SSDP broadcast
-void Manager::slotDeviceFound(const QString &hostname, int port, const QString &rootUrl)
+void Manager::slotDeviceFound(const QString &hostname, quint16 port, const QString &rootUrl)
 {
 #ifdef KMESSDEBUG_UPNP_GENERAL
   kDebug() << "Device found, initializing IgdControlPoint to query it.";
Index: src/network/extra/directconnectionpool.cpp
===================================================================
--- src/network/extra/directconnectionpool.cpp	(revisione 3361)
+++ src/network/extra/directconnectionpool.cpp	(copia locale)
@@ -66,7 +66,7 @@
  * Add a connection to the list, tells the object to connect to the given ipaddress/port.
  * Returns true when the connection could be added to the pending list (e.g. it's openConnection() method didn't fail).
  */
-bool DirectConnectionPool::addConnection(DirectConnectionBase *connection, const QString &ipAddress, const int port)
+bool DirectConnectionPool::addConnection(DirectConnectionBase *connection, const QString &ipAddress, const quint16 port)
 {
   // Refuse if there is already an active connection
   if( activeConnection_ != 0 )
Index: src/network/extra/directconnectionbase.cpp
===================================================================
--- src/network/extra/directconnectionbase.cpp	(revisione 3361)
+++ src/network/extra/directconnectionbase.cpp	(copia locale)
@@ -32,7 +32,7 @@
 #endif
 
 
-int DirectConnectionBase::nextServerPort_(-1);
+quint16 DirectConnectionBase::nextServerPort_( 0 );
 
 
 
@@ -53,8 +53,8 @@
 
   // Read the interval of ports which we'll use to try establishing a connection
   KConfigGroup group = KMessConfig::instance()->getGlobalConfig( "General" );
-  lowestServerPortLimit_  = group.readEntry( "lowestTransferPort", 6891 );
-  highestServerPortLimit_ = group.readEntry( "highestServerPort", 6900 );
+  lowestServerPortLimit_  = (quint16)group.readEntry( "lowestTransferPort", 6891 );
+  highestServerPortLimit_ = (quint16)group.readEntry( "highestServerPort",  6900 );
 #ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL
   kDebug() << "Using port interval" << lowestServerPortLimit_ << "-" << highestServerPortLimit_;
 #endif
@@ -220,7 +220,7 @@
 
 
 // Return the number of bytes which are already received in the local buffer
-int DirectConnectionBase::getAvailableBytes() const
+qint64 DirectConnectionBase::getAvailableBytes() const
 {
   if(KMESS_NULL(socket_)) return -2;  // same as KExtendedSocket API, means "invalid state"
   return socket_->bytesAvailable();
@@ -229,10 +229,10 @@
 
 
 // Get the server port that will be used
-int DirectConnectionBase::getLocalServerPort()
+quint16 DirectConnectionBase::getLocalServerPort()
 {
   // Port not chosen yet
-  if( serverPort_ < 0 )
+  if( serverPort_ == 0 )
   {
     // It's possible to use a random port nowadays,
     // old clients with the "only port 6891" are no longer in use.
@@ -242,7 +242,7 @@
     //
     // TODO: verify whether we can use the port by calling openServerPort() earlier.
 
-    if( nextServerPort_ < 0 || nextServerPort_ > highestServerPortLimit_ )
+    if( nextServerPort_ == 0 || nextServerPort_ > highestServerPortLimit_ )
     {
       nextServerPort_ = lowestServerPortLimit_;
     }
@@ -275,7 +275,7 @@
 
 
 // Get the remote port the socket is connected with.
-int DirectConnectionBase::getRemotePort() const
+quint16 DirectConnectionBase::getRemotePort() const
 {
   if(socket_ == 0)
   {
@@ -283,7 +283,6 @@
   }
   else
   {
-#warning localPort() returns quint16 in native byte order.
     return socket_->localPort();
   }
 }
@@ -376,7 +375,7 @@
 
 
 // Connect to a host
-bool DirectConnectionBase::openConnection(const QString &ipAddress, const int port)
+bool DirectConnectionBase::openConnection( const QString &ipAddress, const quint16 port )
 {
 #ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL
   kDebug() << "Connecting to " << ipAddress << " port " << port << ".";
@@ -428,7 +427,7 @@
   KMESS_ASSERT( server_ == 0 );
 #endif
 
-  int  port;
+  quint16 port;
 
   // Get the port
   port = getLocalServerPort();
@@ -467,7 +466,7 @@
 
 
 // Verify how many bytes the read buffer has. Note this actually reads the data to test it.
-int DirectConnectionBase::peekBlock( const int size )
+qint64 DirectConnectionBase::peekBlock( const qint64 size )
 {
   // Avoid crashes
   if(KMESS_NULL(socket_)) return -1;
@@ -475,7 +474,7 @@
   // Read the data and see how much got read.
   // This is the only reliable method, but expensive in terms of performance.
   QByteArray buffer;
-  buffer.resize( size );
+  buffer.resize( (int)size );
 #ifdef KMESSTEST
   KMESS_ASSERT( size > 0 );
   KMESS_ASSERT( buffer.size() == size );
@@ -486,7 +485,7 @@
 
 
 // Read data from the socket
-int DirectConnectionBase::readBlock( char *buffer, int size )
+qint64 DirectConnectionBase::readBlock( char *buffer, qint64 size )
 {
   // Avoid crashes
   if(KMESS_NULL(socket_)) return -1;
@@ -518,7 +517,7 @@
 
 
 // Read data from the socket (uses the QByteArray size() as block size)
-int DirectConnectionBase::readBlock( QByteArray &buffer, const int maxSize, const int bufferOffset )
+qint64 DirectConnectionBase::readBlock( QByteArray &buffer, const qint64 maxSize, const qint64 bufferOffset )
 {
   // Avoid crashes
   if(KMESS_NULL(socket_)) return -1;
@@ -531,7 +530,7 @@
   }
 
   // Determine the maximum number of bytes we can write to the buffer
-  int bufferSpace = buffer.size() - bufferOffset;
+  qint64 bufferSpace = buffer.size() - bufferOffset;
 
   // API usage check.
   // Warn if certain sizes get a unusual value
@@ -554,7 +553,7 @@
   // Fill the buffer from the give offset,
   // size argument is limited to what the buffer can/may sustain.
   char *bufferStart = buffer.data() + bufferOffset;
-  int size = qMin( bufferSpace, maxSize );
+  qint64 size = qMin( bufferSpace, maxSize );
   return readBlock( bufferStart, size );
 }
 
@@ -891,7 +890,7 @@
  * @param  size   Size of the block to read.
  * @returns  Whether the has been a write error.
  */
-bool DirectConnectionBase::writeBlock( const char *block, const int size )
+bool DirectConnectionBase::writeBlock( const char *block, const qint64 size )
 {
   lastWriteFailed_ = true;
   if(KMESS_NULL(socket_)) return false;
@@ -927,7 +926,7 @@
 #endif
     }
 
-    additionalWriteBuffer_.append( QByteArray::fromRawData( block, size ) );
+    additionalWriteBuffer_.append( QByteArray::fromRawData( block, (int)size ) );
 
     // Protect against consuming all system memory
     // 50 kB is more then enough if you're writing messages of 1300 bytes!
@@ -952,7 +951,7 @@
   // Log in network window.
   // Use actual size of written block.
 #ifdef KMESS_NETWORK_WINDOW
-  QByteArray wrapper = QByteArray::fromRawData( block, noBytesWritten );
+  QByteArray wrapper = QByteArray::fromRawData( block, (int)noBytesWritten );
   KMESS_NET_SENT(this, wrapper);
 #endif
 
@@ -963,7 +962,7 @@
     kWarning() << "only " << noBytesWritten
                << " of " << size << " bytes could be written!";
 
-    additionalWriteBuffer_.append( QByteArray::fromRawData( block + noBytesWritten, size - noBytesWritten ) );
+    additionalWriteBuffer_.append( QByteArray::fromRawData( block + noBytesWritten, (int)(size - noBytesWritten) ) );
   }
   else
   {
Index: src/network/extra/msnftpconnection.cpp
===================================================================
--- src/network/extra/msnftpconnection.cpp	(revisione 3361)
+++ src/network/extra/msnftpconnection.cpp	(copia locale)
@@ -250,8 +250,8 @@
   unsigned char code;
   unsigned char byte1;
   unsigned char byte2;
-  int           blockSize;
-  int           noBytesRead;
+  qint64        blockSize;
+  qint64        noBytesRead;
 
 
   // Make sure we read all available bytes from the socket before returning
@@ -318,7 +318,7 @@
       noBytesRead = readBlock( rawBlock, blockSize );
 
 #ifdef KMESS_NETWORK_WINDOW
-      QByteArray wrapper = QByteArray::fromRawData( rawBlock, noBytesRead );
+      QByteArray wrapper = QByteArray::fromRawData( rawBlock, (int)noBytesRead );
       KMESS_NET_RECEIVED( this, wrapper );
 #endif
 
@@ -419,7 +419,7 @@
 
 
 // Retrieve a file
-bool MsnFtpConnection::retrieveFile(QFile *outputFile, const QString &ipAddress, const int port)
+bool MsnFtpConnection::retrieveFile(QFile *outputFile, const QString &ipAddress, const quint16 port)
 {
 #ifdef KMESSTEST
   KMESS_ASSERT( authHandle_.length() > 0 );
@@ -491,8 +491,8 @@
   // to parseCommand() or parseReceivedFileData()
 
   char          rawBlock[255];
-  int           blockSize;
-  int           noBytesRead;
+  qint64        blockSize;
+  qint64        noBytesRead;
   QString       commandLine;
   QStringList   command;
 
@@ -524,7 +524,7 @@
     }
 
     // Convert data block to UTF8 string
-    commandLine = QString::fromUtf8( rawBlock, noBytesRead );
+    commandLine = QString::fromUtf8( rawBlock, (int)noBytesRead );
 
 #ifdef KMESS_NETWORK_WINDOW
     KMESS_NET_RECEIVED( this, commandLine.toUtf8() );
@@ -695,8 +695,8 @@
   KMESS_ASSERT( inputStream_ != 0 );
 #endif
 
-  int  noBytesRead;
-  char rawBlock[2048];
+  qint64 noBytesRead;
+  char   rawBlock[2048];
 
   // Read a block from the file.
   noBytesRead = inputStream_->read( rawBlock + 3, sizeof(rawBlock) - 3 );
@@ -723,8 +723,8 @@
 
   // Set the header
   rawBlock[0] = 0;
-  rawBlock[1] = (noBytesRead & 0x00ff);
-  rawBlock[2] = (noBytesRead & 0xff00) >> 8;
+  rawBlock[1] = (char)  ( noBytesRead & 0x00ff );
+  rawBlock[2] = (char)( ( noBytesRead & 0xff00 ) >> 8 );
 
   // Update the progress
   fileBytesRemaining_ -= noBytesRead;
Index: src/network/extra/msndirectconnection.cpp
===================================================================
--- src/network/extra/msndirectconnection.cpp	(revisione 3361)
+++ src/network/extra/msndirectconnection.cpp	(copia locale)
@@ -145,7 +145,7 @@
     // start with a new data block
     if( remainingBlockBytes_ <= 0 )
     {
-      int noBytesPeeked = peekBlock(4);
+      qint64 noBytesPeeked = peekBlock(4);
       if( preambleOffset_ == 0 )
       {
         // First see if there are enough bytes.
@@ -163,7 +163,7 @@
       }
 
       // First 4 bytes indicate the message/block length.
-      int noBytesRead = readBlock( preambleBuffer_, 4 - preambleOffset_, preambleOffset_ );
+      qint64 noBytesRead = readBlock( preambleBuffer_, 4 - preambleOffset_, preambleOffset_ );
       if( noBytesRead == 0 )
       {
 #ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL
@@ -239,7 +239,7 @@
       }
 
       // Allocate the buffer.
-      buffer_.resize(remainingBlockBytes_);
+      buffer_.resize( (int)remainingBlockBytes_ );
       buffer_.fill('\0');
       bufferOffset_ = 0;
 
@@ -258,7 +258,7 @@
 
     // Fill the next part of the buffer with the bytes received.
     // Read as many bytes as possible, test for errors.
-    int noBytesRead = readBlock( buffer_, remainingBlockBytes_, bufferOffset_ );
+    qint64 noBytesRead = readBlock( buffer_, remainingBlockBytes_, bufferOffset_ );
     if( noBytesRead < 0 )
     {
       kWarning() << "read error "
Index: src/network/extra/directconnectionpool.h
===================================================================
--- src/network/extra/directconnectionpool.h	(revisione 3361)
+++ src/network/extra/directconnectionpool.h	(copia locale)
@@ -48,7 +48,7 @@
     virtual               ~DirectConnectionPool();
 
     // Add a connection to the list, tells the object to connect to the given ipaddress/port.
-    bool                   addConnection(DirectConnectionBase *connection, const QString &ipAddress, const int port);
+    bool                   addConnection(DirectConnectionBase *connection, const QString &ipAddress, const quint16 port);
     // Add a connection to the list, starts listening for incoming connections (returns zero if couldn't start listening).
     int                    addServerConnection(DirectConnectionBase *connection);
     // Remove all connections from the pending list
Index: src/network/extra/directconnectionbase.h
===================================================================
--- src/network/extra/directconnectionbase.h	(revisione 3361)
+++ src/network/extra/directconnectionbase.h	(copia locale)
@@ -68,15 +68,15 @@
     // Return true when a write handler is connnected.
     bool                   isWriteHandlerConnected() const;
     // Get the server port that will be used
-    int                    getLocalServerPort();
+    quint16                getLocalServerPort();
     // Get the remote ip the socket is connected with.
     QString                getRemoteIp() const;
     // Get the remote port the socket is connected with.
-    int                    getRemotePort() const;
+    quint16                getRemotePort() const;
     // Return the error description
     QString                getSocketError() const;
     // Connect to a host
-    bool                   openConnection(const QString &ipAddress, const int port);
+    bool                   openConnection( const QString &ipAddress, const quint16 port );
     // Wait for an incoming connection
     bool                   openServerPort();
 
@@ -106,19 +106,19 @@
     // Close and delete the server socket
     bool                   closeServerSocket();
     // Return the number of bytes which are already received in the local buffer
-    int                    getAvailableBytes() const;
+    qint64                 getAvailableBytes() const;
     // Return the name of the locally opened port.
     QString                getListeningServiceName() const;
     // Verify how many bytes the read buffer has. Note this actually reads the data to test it.
-    int                    peekBlock( const int size );
+    qint64                 peekBlock( const qint64 size );
     // Read data from the socket
-    int                    readBlock( char *buffer, const int size );
+    qint64                 readBlock( char *buffer, const qint64 size );
     // Read data from the socket (uses the QByteArray size() as block size)
-    int                    readBlock( QByteArray &buffer, const int maxSize = 0, const int offset = 0 );
+    qint64                 readBlock( QByteArray &buffer, const qint64 maxSize = 0, const qint64 offset = 0 );
     // Mark the remote host as authorized (usually after the handshake was successful)
     void                   setAuthorized(bool authorized);
     // Write data to the socket
-    bool                   writeBlock( const char *block, const int size );
+    bool                   writeBlock( const char *block, const qint64 size );
     // Write data to the socket
     bool                   writeBlock( const QByteArray &block );
 
@@ -140,19 +140,19 @@
     // The timeout handling for openConnection()
     QTimer                 connectionTimer_;
     // The higher limit to the interval of server ports this class will use
-    int                    highestServerPortLimit_;
+    quint16                highestServerPortLimit_;
     // Whether the class acts as server or client
     bool                   isServer_;
     // Whether the last write action failed.
     bool                   lastWriteFailed_;
     // The lower limit to the interval of server ports this class will use
-    int                    lowestServerPortLimit_;
+    quint16                lowestServerPortLimit_;
     // The server socket which listens for incoming connections.
     QTcpServer            *server_;
     // The server port this class will use
-    int                    serverPort_;
+    quint16                serverPort_;
     // The next server port used with a openServerPort() call.
-    static int             nextServerPort_;
+    static quint16         nextServerPort_;
     // The socket over which data is sent or received.
     QTcpSocket            *socket_;
     // Whether an timeout occured
Index: src/network/extra/msnftpconnection.h
===================================================================
--- src/network/extra/msnftpconnection.h	(revisione 3361)
+++ src/network/extra/msnftpconnection.h	(copia locale)
@@ -59,7 +59,7 @@
     // Send a file
     bool                   sendFile(QFile *inputFile);
     // Retrieve a file
-    bool                   retrieveFile(QFile *outputFile, const QString &ipAddress, const int port);
+    bool                   retrieveFile(QFile *outputFile, const QString &ipAddress, const quint16 port);
 
   private slots:
     // This is called when a connection is established.
@@ -134,7 +134,7 @@
     // The stream to write received data to
     QIODevice             *outputStream_;
     // True when only partial file data was received
-    int                    remainingBlockBytes_;
+    qint64                 remainingBlockBytes_;
     // True if the user cancelled the session
     bool                   userCancelled_;
 
Index: src/network/extra/msndirectconnection.h
===================================================================
--- src/network/extra/msndirectconnection.h	(revisione 3361)
+++ src/network/extra/msndirectconnection.h	(copia locale)
@@ -61,7 +61,7 @@
     // The buffer for the incoming p2p messages.
     QByteArray             buffer_;
     // The offset of the currently received block
-    uint                   bufferOffset_;
+    quint64                bufferOffset_;
     // The other contact we're connected with
     QString                contactHandle_;
     // Whether the first message is received
@@ -69,9 +69,9 @@
     // The buffer for the next preamble message.
     QByteArray             preambleBuffer_;
     // The offset in the preamble buffer
-    int                    preambleOffset_;
+    qint64                 preambleOffset_;
     // Set when only partial data was received
-    uint                   remainingBlockBytes_;
+    quint64                remainingBlockBytes_;
 
   signals:
     // Signal that a full message block was received.
Index: src/network/applications/applicationlist.cpp
===================================================================
--- src/network/applications/applicationlist.cpp	(revisione 3361)
+++ src/network/applications/applicationlist.cpp	(copia locale)
@@ -315,7 +315,7 @@
  * @return Whether the socket could be created or not.
  *         Returns false if the socket could not be created.
  */
-bool ApplicationList::addConnection(const QString &ipAddress, const int port)
+bool ApplicationList::addConnection(const QString &ipAddress, const quint16 port)
 {
   // Avoid overwriting the current directConnection_ variable.
   if( directConnection_ != 0 )
@@ -539,7 +539,7 @@
   P2PApplication *app = 0;
 
   // Extract the SLP data message
-  QString slpMessage = QString::fromUtf8( message.getData(), message.getDataSize() );
+  QString slpMessage = QString::fromUtf8( message.getData(), (int) message.getDataSize() );
 
   if(! slpMessage.startsWith("INVITE"))
   {
@@ -1031,7 +1031,7 @@
 
       // Find the call ID
       // Note this assumes that a Call-ID will be found in the first fragment.
-      slpMessage  = QString::fromUtf8( message.getData(), message.getDataSize() );
+      slpMessage  = QString::fromUtf8( message.getData(), (int)message.getDataSize() );
       int callPos = callRE.indexIn( slpMessage );
 
       if( callPos == -1 )
Index: src/network/applications/application.cpp
===================================================================
--- src/network/applications/application.cpp	(revisione 3361)
+++ src/network/applications/application.cpp	(copia locale)
@@ -687,7 +687,7 @@
  *
  * @param bytesTransferred  The number of bytes transferred.
  */
-void Application::showTransferProgress(const uint bytesTransferred)
+void Application::showTransferProgress( const ulong bytesTransferred )
 {
 #ifdef KMESSDEBUG_APPLICATION
   kDebug() << "Transferred " << bytesTransferred << " bytes.";
Index: src/network/applications/applicationlist.h
===================================================================
--- src/network/applications/applicationlist.h	(revisione 3361)
+++ src/network/applications/applicationlist.h	(copia locale)
@@ -117,7 +117,7 @@
     // Add a new application to the list.
     void                   addApplication(P2PApplication *application);
     // Attempt to establish a direct connection at the given ipaddress/port.
-    bool                   addConnection(const QString &ipAddress, const int port);
+    bool                   addConnection(const QString &ipAddress, const quint16 port);
     // Attempt to establish a direct connection by listening at an random port.
     int                    addServerConnection();
     // Abort all applications, the contact is leaving a chat.
Index: src/network/applications/filetransferp2p.cpp
===================================================================
--- src/network/applications/filetransferp2p.cpp	(revisione 3361)
+++ src/network/applications/filetransferp2p.cpp	(copia locale)
@@ -452,7 +452,7 @@
   uint    shortNameLength = shortName.length();
 
   // Get the file data (preview
-  int filesize    = fileData->size();
+  ulong filesize  = fileData->size();
   int flags       = (hasPreview ? 0 : 1);
 
   // Determine the context length
@@ -667,7 +667,7 @@
  * Show the progress made during a transfer.
  * This function is also called from the P2PApplication base class.
  */
-void FileTransferP2P::showTransferProgress(const uint bytesTransferred)
+void FileTransferP2P::showTransferProgress(const ulong bytesTransferred)
 {
   // Display the progress update in the transfer window
   TransferWindow::getInstance()->updateProgress( transferID_, bytesTransferred );
@@ -790,7 +790,7 @@
 
 
   // Read the filename parameters
-  fileSize_ = file_->size();
+  fileSize_ = (uint)file_->size();
 
   // Create a thumbnail, continue when it completes
   // Windows Live Messenger scales the received image down depending on the users settings.
@@ -809,7 +809,7 @@
 
   // Create the session id and context field
   QString context   = createContextField( fileName_, file_, hasPreview );
-  uint    sessionID = KMessShared::generateID();
+  uint    sessionID = (uint)KMessShared::generateID();
 
   // Send the invitation
   sendSlpSessionInvitation(sessionID, getAppId(), 2, context);
Index: src/network/applications/application.h
===================================================================
--- src/network/applications/application.h	(revisione 3361)
+++ src/network/applications/application.h	(copia locale)
@@ -167,7 +167,7 @@
     // Show a message to inform about a transfer event (shown in the transfer dialog, e.g. connecting to host)
     virtual void           showTransferMessage(const QString &message);
     // Show the progress made during a transfer.
-    virtual void           showTransferProgress(const uint bytesTransferred);
+    virtual void           showTransferProgress( const ulong bytesTransferred );
     // Set the cookie from an INVITE command
     void                   startByInvite(const QString &invitationCookie);
     // The user rejected the invitation
Index: src/network/applications/filetransferp2p.h
===================================================================
--- src/network/applications/filetransferp2p.h	(revisione 3361)
+++ src/network/applications/filetransferp2p.h	(copia locale)
@@ -83,7 +83,7 @@
     // Show a message to inform about a transfer event (shown in the transfer dialog, e.g. connecting to host)
     void                   showTransferMessage(const QString &message);
     // Show the progress made during a transfer.
-    void                   showTransferProgress(const uint bytesTransferred);
+    void                   showTransferProgress(const ulong bytesTransferred);
     // Convert a string to some more readable form
     QString                toReadableBytes(uint bytes);
     // The user cancelled the session
Index: src/network/applications/p2papplicationbase.cpp
===================================================================
--- src/network/applications/p2papplicationbase.cpp	(revisione 3361)
+++ src/network/applications/p2papplicationbase.cpp	(copia locale)
@@ -944,7 +944,7 @@
     else
     {
       // Read the data directly from the message
-      slpData = QString::fromUtf8( p2pMessage.getData(), p2pMessage.getDataSize() );
+      slpData = QString::fromUtf8( p2pMessage.getData(), (int)p2pMessage.getDataSize() );
     }
 
     // Remove the first preamble line, because it's not in MIME format.
@@ -1328,7 +1328,7 @@
   {
     // Read the data from the file.
     char buffer[1202]; // 1202 is the max P2P data size.
-    int bytesRead = dataSource_->read( buffer, 1202 );
+    qint64 bytesRead = dataSource_->read( buffer, 1202 );
     if( bytesRead < 0 )
     {
       kWarning() << "Couldn't send more data, "
@@ -1346,7 +1346,7 @@
     }
 
     // Wrap in buffer, without copying.
-    QByteArray data = QByteArray::fromRawData( buffer, bytesRead );
+    QByteArray data = QByteArray::fromRawData( buffer, (int)bytesRead );
 
 #ifdef KMESSDEBUG_P2PAPPLICATION_GENERAL
     kDebug() << "Sending data:"
@@ -1744,8 +1744,8 @@
 
   // Determine the message size:
   uint messageSize = messageData.size();
-  uint totalSize;
-  uint offsetField;
+  ulong totalSize;
+  ulong offsetField;
 
   if( fragmentTotalSize_ == 0 )
   {
@@ -2217,7 +2217,7 @@
 
   // See if the offset should be changed,
   // and if so, update it.
-  if( offset != file->pos() && ! file->seek( offset ) )
+  if( offset != (ulong)file->pos() && ! file->seek( offset ) )
   {
 #ifdef KMESSDEBUG_APPLICATION
     kDebug() << "data is received out of order, updating file offset.";
@@ -2274,7 +2274,7 @@
     }
 
     // Make sure the file position is correct now.
-    if( offset != file->pos() )
+    if( offset != (ulong)file->pos() )
     {
       sendCancelMessage( CANCEL_FAILED );
       return false;
Index: src/network/applications/filetransfer.cpp
===================================================================
--- src/network/applications/filetransfer.cpp	(revisione 3361)
+++ src/network/applications/filetransfer.cpp	(copia locale)
@@ -251,7 +251,7 @@
 
   QString ip;
   QString ipInternal;
-  int     port;
+  quint16 port;
   int     portXInternal;
   int     portX;
   QString authCookie;
@@ -260,7 +260,7 @@
   ip            = message.getValue( "IP-Address"          );
   ipInternal    = message.getValue( "IP-Address-Internal" );          // As of MSN5
   portXInternal = message.getValue( "PortX-Internal"      ).toInt();  // As of MSN5
-  port          = message.getValue( "Port"                ).toInt();
+  port          = (quint16)message.getValue( "Port"       ).toUInt();
   portX         = message.getValue( "PortX"               ).toInt();  // As of MSN5
   authCookie    = message.getValue( "AuthCookie"          );
 
@@ -497,7 +497,7 @@
 
 
 // Convert a string to some more readable form
-QString FileTransfer::toReadableBytes(uint bytes)
+QString FileTransfer::toReadableBytes( ulong bytes )
 {
   QString format;
   if(bytes > 1048576)
Index: src/network/applications/p2papplication.cpp
===================================================================
--- src/network/applications/p2papplication.cpp	(revisione 3361)
+++ src/network/applications/p2papplication.cpp	(copia locale)
@@ -2271,19 +2271,19 @@
     // Get the IP addresses.
     QStringList externalIpAddresses;
     QStringList internalIpAddresses;
-    uint        externalPort = 0;
-    uint        internalPort = 0;
+    quint16     externalPort = 0;
+    quint16     internalPort = 0;
 
     if( listenInternal )
     {
       internalIpAddresses = slpMimeBody.getValue("IPv4Internal-Addrs").split(" ");
-      internalPort        = slpMimeBody.getValue("IPv4Internal-Port").toUInt();
+      internalPort        = (quint16)slpMimeBody.getValue("IPv4Internal-Port").toUInt();
     }
 
     if( listenExternal )
     {
       externalIpAddresses = slpMimeBody.getValue("IPv4External-Addrs").split(" ");
-      externalPort        = slpMimeBody.getValue("IPv4External-Port").toUInt();
+      externalPort        = (quint16)slpMimeBody.getValue("IPv4External-Port").toUInt();
     }
 
     // See if the clients are likely at the same lan.
@@ -2748,8 +2748,8 @@
  * @param  messageContentType  Contact type of the message which is in error (can be empty)
  * @param  messageType         The message type. This is used later when an ACK is received.
  */
-void P2PApplication::sendSlpError(const QString &statusLine,
-                                  const uint sessionID, const QString &messageContentType, P2PMessageType messageType)
+void P2PApplication::sendSlpError( const QString &statusLine,
+                                   const ulong sessionID, const QString &messageContentType, P2PMessageType messageType )
 {
 #ifdef KMESSDEBUG_P2PAPPLICATION_GENERAL
   kDebug() << "Sending SLP error response: " << statusLine;
@@ -3018,7 +3018,7 @@
  * @param  appId      The numeric app-Id value, which also identifies the application type.
  * @param  context    The context field.
  */
-void P2PApplication::sendSlpSessionInvitation(uint sessionID, const QString &eufGuid, const int appId, const QString &context)
+void P2PApplication::sendSlpSessionInvitation( ulong sessionID, const QString &eufGuid, const int appId, const QString &context )
 {
   // Create the message
   MimeMessage invitation;
Index: src/network/applications/filetransfer.h
===================================================================
--- src/network/applications/filetransfer.h	(revisione 3361)
+++ src/network/applications/filetransfer.h	(copia locale)
@@ -66,7 +66,7 @@
     // Create and initilize the progress dialog.
     void                   initializeProgressDialog(bool incoming = false);
     // Convert a string to some more readable form
-    QString                toReadableBytes(uint bytes);
+    QString                toReadableBytes( ulong bytes);
     // Step one of a user-started chat: the user invites the contact
     void                   userStarted1_UserInvitesContact();
     // Step two of a user-started chat: the contact accepts
Index: src/network/applications/p2papplication.h
===================================================================
--- src/network/applications/p2papplication.h	(revisione 3361)
+++ src/network/applications/p2papplication.h	(copia locale)
@@ -149,7 +149,7 @@
     // Send the data preparation ACK.
     void                   sendDataPreparationAck();
     // Send the invitation for a normal session
-    void                   sendSlpSessionInvitation(uint sessionID, const QString &eufGuid, const int appId, const QString &context);
+    void                   sendSlpSessionInvitation( ulong sessionID, const QString &eufGuid, const int appId, const QString &context );
     // Send the invitation for a direct connection.
     void                   sendSlpTransferInvitation();
     // Send an SLP 200/OK message
@@ -215,9 +215,9 @@
     // Send an SLP invitation message
     void                   sendSlpInvitation(const MimeMessage &message, const QString &contentType, P2PMessageType messageType);
     // Send an SLP error message (to decline an invitation for example)
-    void                   sendSlpError(const QString &statusLine, const uint sessionID = 0,
-                                        const QString &messageContentType = 0,
-                                        P2PMessageType messageType = P2P_MSG_SLP_ERROR);
+    void                   sendSlpError( const QString &statusLine, const ulong sessionID = 0,
+                                         const QString &messageContentType = 0,
+                                         P2PMessageType messageType = P2P_MSG_SLP_ERROR );
     // Show a timeout message because an expected message was not received.
     void                   showTimeoutMessage( P2PWaitingState waitingState );
 
Index: src/network/p2pmessage.cpp
===================================================================
--- src/network/p2pmessage.cpp	(revisione 3361)
+++ src/network/p2pmessage.cpp	(copia locale)
@@ -323,7 +323,7 @@
                          };
   for(int i = 0; i < 16; i++)
   {
-    buffer[offset + i] = fixedNonce.mid(noncePos[i] * 2, 2).toUInt(0, 16);
+    buffer[offset + i] = (char)( fixedNonce.mid(noncePos[i] * 2, 2).toUInt(0, 16) );
   }
 }
 
Index: src/network/msnsockethttp.cpp
===================================================================
--- src/network/msnsockethttp.cpp	(revisione 3361)
+++ src/network/msnsockethttp.cpp	(copia locale)
@@ -759,7 +759,7 @@
  * @param  data  Contents of the message which will be sent
  * @return -1 on error, or else always the exact size of the sent data.
  */
-int MsnSocketHttp::writeBinaryData( const QByteArray &data )
+qint64 MsnSocketHttp::writeBinaryData( const QByteArray &data )
 {
   if( ! connected_ )
   {
@@ -830,7 +830,7 @@
  * @param  data  The message which will be sent
  * @return -1 on error, or else always the exact size of the sent data.
  */
-int MsnSocketHttp::writeData( const QString &data )
+qint64 MsnSocketHttp::writeData( const QString &data )
 {
   return writeBinaryData( data.toUtf8() );
 }
Index: src/network/msnsocketbase.h
===================================================================
--- src/network/msnsocketbase.h	(revisione 3361)
+++ src/network/msnsocketbase.h	(copia locale)
@@ -92,9 +92,9 @@
     // Set whether we're sending pings or not
     virtual void       setSendPings( bool sendPings ) = 0;
     // Write data to the socket without conversions
-    virtual int        writeBinaryData( const QByteArray& data ) = 0;
+    virtual qint64     writeBinaryData( const QByteArray& data ) = 0;
     // Write data to the socket
-    virtual int        writeData( const QString& data ) = 0;
+    virtual qint64     writeData( const QString& data ) = 0;
 
 
   protected:  // Protected properties
Index: src/network/msnswitchboardconnection.cpp
===================================================================
--- src/network/msnswitchboardconnection.cpp	(revisione 3361)
+++ src/network/msnswitchboardconnection.cpp	(copia locale)
@@ -1558,7 +1558,7 @@
       QString messagePart;
       QString body = message.getBody();
 
-      int parts = (int) ceil( ( (float) bodyLength / maxSendableSingleMessageLength ) );
+      int parts = (int) ceil( ( (float) bodyLength / (float) maxSendableSingleMessageLength ) );
 
       for( int i = 0; i < parts - 1; i++ )
       {
Index: src/network/msnsockethttp.h
===================================================================
--- src/network/msnsockethttp.h	(revisione 3361)
+++ src/network/msnsockethttp.h	(copia locale)
@@ -92,9 +92,9 @@
     // Set whether to send pings or not
     void                 setSendPings( bool sendPings );
     // Write data to the socket without conversions
-    int                  writeBinaryData( const QByteArray& data );
+    qint64               writeBinaryData( const QByteArray& data );
     // Write data to the socket
-    int                  writeData( const QString& data );
+    qint64               writeData( const QString& data );
 
 
   private: // Private methods
Index: src/network/msnsockettcp.cpp
===================================================================
--- src/network/msnsockettcp.cpp	(revisione 3361)
+++ src/network/msnsockettcp.cpp	(copia locale)
@@ -118,7 +118,7 @@
  */
 void MsnSocketTcp::connectToServer( const QString& server, const quint16 port )
 {
-  int desiredPort;
+  quint16 desiredPort;
   QString desiredServer;
 
   if( server.isEmpty() && port == 0 )
@@ -133,7 +133,7 @@
   }
 
 #ifdef KMESSTEST
-  KMESS_ASSERT( ( desiredPort >= 0 ) && ( desiredPort < 32768 ) );
+  KMESS_ASSERT( desiredPort < 32768 );
 #endif
 
 #ifdef KMESSDEBUG_CONNECTION_SOCKET_TCP
@@ -527,9 +527,9 @@
 
 
 // Write data to the socket without conversions
-int MsnSocketTcp::writeBinaryData( const QByteArray &data )
+qint64 MsnSocketTcp::writeBinaryData( const QByteArray &data )
 {
-  int noBytesWritten;
+  qint64 noBytesWritten;
 
   if( ! isConnected() )
   {
@@ -550,9 +550,9 @@
 
 
 // Write data to the socket
-int MsnSocketTcp::writeData( const QString &data )
+qint64 MsnSocketTcp::writeData( const QString &data )
 {
-  int noBytesWritten;
+  qint64 noBytesWritten;
 
   if( ! isConnected() )
   {
Index: src/network/msnconnection.cpp
===================================================================
--- src/network/msnconnection.cpp	(revisione 3361)
+++ src/network/msnconnection.cpp	(copia locale)
@@ -764,7 +764,7 @@
 #endif
 
   QByteArray binData = data.toUtf8();
-  int noBytesWritten = socket_->writeData( binData );
+  qint64 noBytesWritten = socket_->writeData( binData );
 
   if( noBytesWritten != binData.length() ) // Note that the previous code used data.length instead of unicode.length(), but I
   {                                         // changed this since that is the string we send to the socket... (could be wrong here)
Index: src/network/soap/passportloginservice.cpp
===================================================================
--- src/network/soap/passportloginservice.cpp	(revisione 3361)
+++ src/network/soap/passportloginservice.cpp	(copia locale)
@@ -113,7 +113,7 @@
   QByteArray nonce;
   for( int i = 0; i < 24; i++ )
   {
-   nonce += ( rand() % 74 ) + 48;
+   nonce += (char)( ( rand() % 74 ) + 48 );
   }
   token += "&nonce=" + QUrl::toPercentEncoding( nonce.toBase64() );
 
Index: src/network/msnsockettcp.h
===================================================================
--- src/network/msnsockettcp.h	(revisione 3361)
+++ src/network/msnsockettcp.h	(copia locale)
@@ -68,9 +68,9 @@
     // Set whether we're sending pings or not (also resets ping timer)
     void                 setSendPings( bool sendPings );
     // Write data to the socket without conversions
-    int                  writeBinaryData(const QByteArray& data);
+    qint64               writeBinaryData(const QByteArray& data);
     // Write data to the socket
-    int                  writeData(const QString& data);
+    qint64               writeData(const QString& data);
 
 
   private slots: // Private slots
Index: src/network/msnnotificationconnection.cpp
===================================================================
--- src/network/msnnotificationconnection.cpp	(revisione 3361)
+++ src/network/msnnotificationconnection.cpp	(copia locale)
@@ -1469,7 +1469,7 @@
   QString server     = serverAndPort.section(':', 0, 0);
   QString portString = serverAndPort.section(':', 1, 1);
   bool goodPort;
-  int port = portString.toInt( &goodPort );
+  quint16 port = (quint16) portString.toUInt( &goodPort );
   if ( !goodPort )
   {
     kWarning() << "Couldn't get port from string " << portString;
@@ -1747,7 +1747,7 @@
 
   // Convert the port to an integer
   bool goodPort;
-  int port = portString.toInt( &goodPort );
+  quint16 port = (quint16) portString.toUInt( &goodPort );
 #ifdef KMESSDEBUG_NOTIFICATION_GENERAL
   kDebug() << "Got " << serverType << " transfer to " << server << ":" << port << ".";
 #endif
Index: src/network/chatinformation.cpp
===================================================================
--- src/network/chatinformation.cpp	(revisione 3361)
+++ src/network/chatinformation.cpp	(copia locale)
@@ -38,7 +38,7 @@
 
 // The constructor for a contact-started chat
 ChatInformation::ChatInformation( MsnNotificationConnection *parent, const QString& handle,
-                                  const QString &ip, int port, const QString &authorization, const QString &chatId,
+                                  const QString &ip, quint16 port, const QString &authorization, const QString &chatId,
                                   ConnectionType type )
  : authorization_(authorization)
  , chatId_(chatId)
@@ -103,7 +103,7 @@
 
 
 // Return the switchboard server port
-int ChatInformation::getPort() const
+quint16 ChatInformation::getPort() const
 {
   return port_;
 }
@@ -143,7 +143,7 @@
 
 
 // Set server information
-void ChatInformation::setServerInformation( const QString& ip, const int& port, const QString& authorization )
+void ChatInformation::setServerInformation( const QString& ip, const quint16& port, const QString& authorization )
 {
   ip_ = ip;
   port_ = port;
Index: src/network/multipacketmessage.cpp
===================================================================
--- src/network/multipacketmessage.cpp	(revisione 3361)
+++ src/network/multipacketmessage.cpp	(copia locale)
@@ -51,7 +51,7 @@
 
   // Set the MimeMessage and the number of chunks ( round up )
   result_ = message;
-  float a = (float) messageText_.toUtf8().length() / maxSendableMessageLength;
+  float a = (float) messageText_.toUtf8().length() / (float) maxSendableMessageLength;
   chunks_ = (int) ceil( a );
 
   // Set message guid
Index: src/network/chatinformation.h
===================================================================
--- src/network/chatinformation.h	(revisione 3361)
+++ src/network/chatinformation.h	(copia locale)
@@ -56,7 +56,7 @@
                                                  int transactionId, ConnectionType type );
     // The constructor for a contact-started chat
                                 ChatInformation( MsnNotificationConnection *parent, const QString& handle,
-                                                 const QString &ip, int port, const QString &authorization,
+                                                 const QString &ip, quint16 port, const QString &authorization,
                                                  const QString &chatId, ConnectionType type );
     // The destructor
                                ~ChatInformation();
@@ -71,7 +71,7 @@
     // Return the notification connection that spawned this object
     MsnNotificationConnection  *getNotificationConnection() const;
     // Return the switchboard server port
-    int                         getPort() const;
+    quint16                     getPort() const;
     // Return the time of when the SB transfer request has been sent
     int                         getTime() const;
     // Return the transaction ID used in the "XFR" command.
@@ -81,7 +81,7 @@
     // Return whether the user started the chat
     bool                        getUserStartedChat() const;
     // Set server information
-    void                        setServerInformation( const QString& ip, const int& port, const QString& authorization );
+    void                        setServerInformation( const QString& ip, const quint16& port, const QString& authorization );
 
 
   private: // Private attributes
@@ -98,7 +98,7 @@
     // The notification connection that spawned this object
     MsnNotificationConnection  *notificationConnection_;
     // The switchboard server's port
-    int                         port_;
+    quint16                     port_;
     // The time when the SB transfer request was issued to the notification server
     uint                        requestTime_;
     // The transaction ID used in the "XFR" command.
Index: src/systemtraywidget.cpp
===================================================================
--- src/systemtraywidget.cpp	(revisione 3361)
+++ src/systemtraywidget.cpp	(copia locale)
@@ -159,7 +159,10 @@
 
     // Show the dialog
     KMessageBox::information(kapp->activeWindow(),
-        "<qt><p>" + message + "</p><p><center><img src=\"" + tempFile.fileName() + "\" width=\"" + pictureArea.width() + "\" height=\"" + pictureArea.height() + "\"></center></p></qt>",
+        "<qt><p>" + message + "</p><p><center><img src=\"" + tempFile.fileName() + "\" "
+        "width=\""  + QString::number( pictureArea.width()  ) + "\" "
+        "height=\"" + QString::number( pictureArea.height() ) + "\""
+        "></center></p></qt>",
         i18n("Docking in System Tray"), "hideOnCloseInfo");
 
     // Close the temporary file, it will be deleted when the function returns
Index: src/dialogs/transferentry.cpp
===================================================================
--- src/dialogs/transferentry.cpp	(revisione 3361)
+++ src/dialogs/transferentry.cpp	(copia locale)
@@ -36,7 +36,7 @@
 
 
 // Constructor
-TransferEntry::TransferEntry( QWidget *parent, const QString filename, uint filesize,
+TransferEntry::TransferEntry( QWidget *parent, const QString filename, const ulong filesize,
                               bool incoming, const QImage preview)
 : QWidget( parent ),
  Ui::TransferEntry(),
@@ -259,7 +259,7 @@
 
 
 // Convert a string to some more readable form
-QString TransferEntry::toReadableBytes(uint bytes)
+QString TransferEntry::toReadableBytes( ulong bytes )
 {
   QString format;
   if(bytes > 1048576)
@@ -305,7 +305,7 @@
 
 
 // Update the progress bar
-void TransferEntry::updateProgress( uint bytesTransferred )
+void TransferEntry::updateProgress( ulong bytesTransferred )
 {
 #ifdef KMESSTEST
   KMESS_ASSERT( ! isDone_ );
@@ -356,10 +356,10 @@
 void TransferEntry::updateTransferRate()
 {
   // To avoid to works with different transferred bytes
-  uint tempTransferred = bytesTransferred_;
+  ulong tempTransferred = bytesTransferred_;
 
   // Calculate the bytes transferred from the last calling
-  uint bytesTransferredFromLast =  tempTransferred - previousTransferred_;
+  ulong bytesTransferredFromLast =  tempTransferred - previousTransferred_;
 
   QString speed, eta;
 
Index: src/dialogs/transferentry.h
===================================================================
--- src/dialogs/transferentry.h	(revisione 3361)
+++ src/dialogs/transferentry.h	(copia locale)
@@ -35,7 +35,7 @@
 
 public:
     // Constructor
-    TransferEntry( QWidget *parent, const QString filename, const uint filesize, bool incoming = false,
+    TransferEntry( QWidget *parent, const QString filename, const ulong filesize, bool incoming = false,
                    const QImage preview = QImage() );
     // Destructor
     virtual ~TransferEntry();
@@ -48,7 +48,7 @@
     void setTransferID( int transferID );
 
     // Format nicely the byte quantities
-    static QString toReadableBytes( uint bytes );
+    static QString toReadableBytes( ulong bytes );
 
 public slots:
     // Mark the transfer as failed
@@ -58,7 +58,7 @@
     // Set a status message
     void setStatusMessage( const QString &message );
     // Update the progress bar
-    void updateProgress( uint bytesTransferred );
+    void updateProgress( ulong bytesTransferred );
 
 private slots:
     // The cancel link was pressed
@@ -80,17 +80,17 @@
     // The file name
     QString filename_;
     // The file size
-    uint    filesize_;
+    ulong   filesize_;
     // The image preview
     QPixmap preview_;
     // The previous percentage
     int     previousPercentage_;
     // The current trasferred bytes
-    uint    bytesTransferred_;
+    ulong   bytesTransferred_;
     // The timer for estimated the trasfer rate
     QTimer  *timer_;
      // The previous trasferred bytes
-    uint    previousTransferred_;
+    ulong   previousTransferred_;
     // The ID of this transfer, used by the Transfer Window
     int     transferID_;
 };
Index: src/dialogs/transferwindow.cpp
===================================================================
--- src/dialogs/transferwindow.cpp	(revisione 3361)
+++ src/dialogs/transferwindow.cpp	(copia locale)
@@ -89,7 +89,7 @@
 
 
 // Add an entry to the transfer manager
-int TransferWindow::addEntry( const QString filename, uint filesize, bool incoming, const QImage preview )
+int TransferWindow::addEntry( const QString filename, ulong filesize, bool incoming, const QImage preview )
 {
 #ifdef KMESSDEBUG_TRANSFERWINDOW
   kDebug() << "adding entry for '" << filename << "'.";
@@ -163,7 +163,7 @@
 
 
 // Update the progress bar of a transfer
-void TransferWindow::updateProgress( int transferID, uint bytesTransferred )
+void TransferWindow::updateProgress( int transferID, ulong bytesTransferred )
 {
   if( ! entryList_.contains( transferID ) )
   {
Index: src/dialogs/transferwindow.h
===================================================================
--- src/dialogs/transferwindow.h	(revisione 3361)
+++ src/dialogs/transferwindow.h	(copia locale)
@@ -50,7 +50,7 @@
 
   public:
     // Add a new entry
-    int                        addEntry( const QString filename, uint filesize, bool incoming = false,
+    int                        addEntry( const QString filename, ulong filesize, bool incoming = false,
                                          const QImage preview = QImage() );
     // Destroy the current instance
     static void                destroy();
@@ -65,7 +65,7 @@
     // Set the status message of a transfer
     void                       setStatusMessage( int transferID, const QString &message );
     // Update the progress bar of a transfer
-    void                       updateProgress( int transferID, uint bytesTransferred );
+    void                       updateProgress( int transferID, ulong bytesTransferred );
 
   private slots:
     // The "Clean up" button was pressed.
Index: src/utils/xautolock.cpp
===================================================================
--- src/utils/xautolock.cpp	(revisione 3361)
+++ src/utils/xautolock.cpp	(copia locale)
@@ -62,7 +62,7 @@
   : active_( false ),
     idle_( false ),
     idleTime_( 0 ),
-    lastCheck_( time( 0 ) ),
+    lastCheck_( (uint)time( 0 ) ),
     mitAvailable_( false ),
     mitInfo_( 0 ),
     triggerTime_( 0 )
@@ -97,9 +97,10 @@
 // The main function which checks for idle status
 void XAutoLock::checkIdle()
 {
-  unsigned int now, timeIdle;
+  unsigned int now;
+  unsigned long timeIdle;
 
-  now = time( 0 );
+  now = (uint)time( 0 );
 
   if( abs( lastCheck_ - now ) > 120 )
   {
@@ -139,7 +140,7 @@
 
 
 // Get idle time by asking the MIT-SCREEN-SAVER extension (if available)
-unsigned int XAutoLock::getMitIdle()
+unsigned long XAutoLock::getMitIdle()
 {
   #ifdef HAVE_XSCREENSAVER
     if ( !mitInfo_ ) mitInfo_ = XScreenSaverAllocInfo();
@@ -226,7 +227,7 @@
 void XAutoLock::resetTimer()
 {
   idle_ = false;
-  idleTime_ = time( 0 );
+  idleTime_ = (uint)time( 0 );
 
   emit activity();
 }
Index: src/utils/kmessshared.cpp
===================================================================
--- src/utils/kmessshared.cpp	(revisione 3361)
+++ src/utils/kmessshared.cpp	(copia locale)
@@ -63,8 +63,8 @@
   // Compute the XOR operations
   for(int i=0; i < key.size() - 1; i++ )
   {
-    ipad[i] =  ipad[i] ^ key[i];
-    opad[i] =  opad[i] ^ key[i];
+    ipad[i] = (char) ( ipad[i] ^ key[i] );
+    opad[i] = (char) ( opad[i] ^ key[i] );
   }
 
   // Append the data to ipad
Index: src/utils/xautolock.h
===================================================================
--- src/utils/xautolock.h	(revisione 3361)
+++ src/utils/xautolock.h	(copia locale)
@@ -75,7 +75,7 @@
     // Get idle time by detecting time since last mouse movement
     unsigned int getMouseIdle();
     // Get idle time by asking the MIT-SCREEN-SAVER extension (if available)
-    unsigned int getMitIdle();
+    unsigned long getMitIdle();
     // Reset the timer (after we've just become active again, for example)
     void resetTimer();
 
