Ticket #216: UNCOMMITTED-warnings-fixes.patch
| File UNCOMMITTED-warnings-fixes.patch, 57.4 KB (added by valerio, 4 years ago) |
|---|
-
src/notification/newemailnotification.cpp
43 43 44 44 45 45 // 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)46 void NewEmailNotification::notify( QString sender, QString subject, bool inInbox, QString folder ) 47 47 { 48 48 currentAccount_ = CurrentAccount::instance(); 49 49 -
src/notification/newemailnotification.h
49 49 50 50 public slots: 51 51 // 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 ); 53 53 54 54 private slots: 55 55 // Trigger this event's action (Open the mailbox where the new mail is) -
src/network/upnp/igdcontrolpoint.cpp
37 37 38 38 39 39 // The constructor 40 IgdControlPoint::IgdControlPoint(const QString &hostname, intport, const QString &rootUrl)40 IgdControlPoint::IgdControlPoint(const QString &hostname, quint16 port, const QString &rootUrl) 41 41 : QObject() 42 42 , forwardingService_(0) 43 43 , gatewayAvailable_(false) -
src/network/upnp/ssdpconnection.h
52 52 virtual ~SsdpConnection(); 53 53 54 54 // Send a broadcast to detect all devices 55 void queryDevices( int bindPort = 1500);55 void queryDevices( quint16 bindPort = 1500 ); 56 56 57 57 private slots: 58 58 // Data was received by the socket -
src/network/upnp/manager.h
64 64 // The broadcast failed 65 65 void slotBroadcastTimeout(); 66 66 // A device was discovered by the SSDP broadcast 67 void slotDeviceFound(const QString &hostname, intport, const QString &rootUrl);67 void slotDeviceFound(const QString &hostname, quint16 port, const QString &rootUrl); 68 68 69 69 70 70 private: // private methods -
src/network/upnp/service.cpp
42 42 43 43 44 44 // The constructor for information services 45 Service::Service(const QString &hostname, intport, const QString &informationUrl)45 Service::Service(const QString &hostname, quint16 port, const QString &informationUrl) 46 46 : informationUrl_(informationUrl) 47 47 , pendingRequests_(0) 48 48 { -
src/network/upnp/igdcontrolpoint.h
47 47 public: // public methods 48 48 49 49 // The constructor 50 IgdControlPoint(const QString &hostname, intport, const QString &rootUrl);50 IgdControlPoint(const QString &hostname, quint16 port, const QString &rootUrl); 51 51 // The destructor 52 52 virtual ~IgdControlPoint(); 53 53 … … 74 74 // The host of the gateway 75 75 QString igdHostname_; 76 76 // The port of the gateway 77 intigdPort_;77 quint16 igdPort_; 78 78 // The root service 79 79 RootService *rootService_; 80 80 // The wan connection service -
src/network/upnp/rootservice.cpp
126 126 127 127 128 128 // The contructor 129 RootService::RootService(const QString &hostname, intport,129 RootService::RootService(const QString &hostname, quint16 port, 130 130 const QString &rootUrl) 131 131 : Service(hostname, port, rootUrl) 132 132 , hostname_(hostname) -
src/network/upnp/service.h
36 36 struct ServiceParameters 37 37 { 38 38 QString hostname; 39 intport;39 quint16 port; 40 40 QString scdpUrl; 41 41 QString controlUrl; 42 42 QString serviceId; … … 60 60 61 61 public: // public methods 62 62 // The constructor for the root service 63 Service(const QString &hostname, intport,63 Service(const QString &hostname, quint16 port, 64 64 const QString &informationUrl); 65 65 // The constructor for action services 66 66 Service(const ServiceParameters ¶ms); -
src/network/upnp/rootservice.h
38 38 public: // public methods 39 39 40 40 // The constructor 41 RootService(const QString &hostname, intport, const QString &rootUrl);41 RootService(const QString &hostname, quint16 port, const QString &rootUrl); 42 42 // The destructor 43 43 virtual ~RootService(); 44 44 … … 76 76 // The hostname of the device 77 77 QString hostname_; 78 78 // The port of the device 79 intport_;79 quint16 port_; 80 80 // The udn of the root device 81 81 QString rootUdn_; 82 82 }; -
src/network/upnp/ssdpconnection.cpp
82 82 while( socket_->hasPendingDatagrams() ) 83 83 { 84 84 datagram.clear(); 85 datagram.resize( socket_->pendingDatagramSize() );85 datagram.resize( (int)socket_->pendingDatagramSize() ); 86 86 87 87 // Get the HTTP-like content 88 88 socket_->readDatagram( datagram.data(), datagram.size() ); … … 106 106 107 107 108 108 // Send a broadcast to detect all devices 109 void SsdpConnection::queryDevices( int bindPort)109 void SsdpConnection::queryDevices( quint16 bindPort ) 110 110 { 111 111 #ifdef KMESSDEBUG_UPNP_GENERAL 112 112 kDebug() << "Sending broadcast packet."; … … 134 134 } 135 135 136 136 // Send the data 137 intbytesWritten = socket_->writeDatagram( data.toAscii(), address, 1900 );137 qint64 bytesWritten = socket_->writeDatagram( data.toAscii(), address, 1900 ); 138 138 139 139 if(bytesWritten == -1) 140 140 { -
src/network/upnp/manager.cpp
137 137 138 138 139 139 // A device was discovered by the SSDP broadcast 140 void Manager::slotDeviceFound(const QString &hostname, intport, const QString &rootUrl)140 void Manager::slotDeviceFound(const QString &hostname, quint16 port, const QString &rootUrl) 141 141 { 142 142 #ifdef KMESSDEBUG_UPNP_GENERAL 143 143 kDebug() << "Device found, initializing IgdControlPoint to query it."; -
src/network/extra/directconnectionpool.cpp
66 66 * Add a connection to the list, tells the object to connect to the given ipaddress/port. 67 67 * Returns true when the connection could be added to the pending list (e.g. it's openConnection() method didn't fail). 68 68 */ 69 bool DirectConnectionPool::addConnection(DirectConnectionBase *connection, const QString &ipAddress, const intport)69 bool DirectConnectionPool::addConnection(DirectConnectionBase *connection, const QString &ipAddress, const quint16 port) 70 70 { 71 71 // Refuse if there is already an active connection 72 72 if( activeConnection_ != 0 ) -
src/network/extra/directconnectionbase.cpp
32 32 #endif 33 33 34 34 35 int DirectConnectionBase::nextServerPort_(-1);35 quint16 DirectConnectionBase::nextServerPort_( 0 ); 36 36 37 37 38 38 … … 53 53 54 54 // Read the interval of ports which we'll use to try establishing a connection 55 55 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 ); 58 58 #ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL 59 59 kDebug() << "Using port interval" << lowestServerPortLimit_ << "-" << highestServerPortLimit_; 60 60 #endif … … 220 220 221 221 222 222 // Return the number of bytes which are already received in the local buffer 223 intDirectConnectionBase::getAvailableBytes() const223 qint64 DirectConnectionBase::getAvailableBytes() const 224 224 { 225 225 if(KMESS_NULL(socket_)) return -2; // same as KExtendedSocket API, means "invalid state" 226 226 return socket_->bytesAvailable(); … … 229 229 230 230 231 231 // Get the server port that will be used 232 intDirectConnectionBase::getLocalServerPort()232 quint16 DirectConnectionBase::getLocalServerPort() 233 233 { 234 234 // Port not chosen yet 235 if( serverPort_ <0 )235 if( serverPort_ == 0 ) 236 236 { 237 237 // It's possible to use a random port nowadays, 238 238 // old clients with the "only port 6891" are no longer in use. … … 242 242 // 243 243 // TODO: verify whether we can use the port by calling openServerPort() earlier. 244 244 245 if( nextServerPort_ <0 || nextServerPort_ > highestServerPortLimit_ )245 if( nextServerPort_ == 0 || nextServerPort_ > highestServerPortLimit_ ) 246 246 { 247 247 nextServerPort_ = lowestServerPortLimit_; 248 248 } … … 275 275 276 276 277 277 // Get the remote port the socket is connected with. 278 intDirectConnectionBase::getRemotePort() const278 quint16 DirectConnectionBase::getRemotePort() const 279 279 { 280 280 if(socket_ == 0) 281 281 { … … 283 283 } 284 284 else 285 285 { 286 #warning localPort() returns quint16 in native byte order.287 286 return socket_->localPort(); 288 287 } 289 288 } … … 376 375 377 376 378 377 // Connect to a host 379 bool DirectConnectionBase::openConnection( const QString &ipAddress, const int port)378 bool DirectConnectionBase::openConnection( const QString &ipAddress, const quint16 port ) 380 379 { 381 380 #ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL 382 381 kDebug() << "Connecting to " << ipAddress << " port " << port << "."; … … 428 427 KMESS_ASSERT( server_ == 0 ); 429 428 #endif 430 429 431 intport;430 quint16 port; 432 431 433 432 // Get the port 434 433 port = getLocalServerPort(); … … 467 466 468 467 469 468 // Verify how many bytes the read buffer has. Note this actually reads the data to test it. 470 int DirectConnectionBase::peekBlock( const intsize )469 qint64 DirectConnectionBase::peekBlock( const qint64 size ) 471 470 { 472 471 // Avoid crashes 473 472 if(KMESS_NULL(socket_)) return -1; … … 475 474 // Read the data and see how much got read. 476 475 // This is the only reliable method, but expensive in terms of performance. 477 476 QByteArray buffer; 478 buffer.resize( size );477 buffer.resize( (int)size ); 479 478 #ifdef KMESSTEST 480 479 KMESS_ASSERT( size > 0 ); 481 480 KMESS_ASSERT( buffer.size() == size ); … … 486 485 487 486 488 487 // Read data from the socket 489 int DirectConnectionBase::readBlock( char *buffer, intsize )488 qint64 DirectConnectionBase::readBlock( char *buffer, qint64 size ) 490 489 { 491 490 // Avoid crashes 492 491 if(KMESS_NULL(socket_)) return -1; … … 518 517 519 518 520 519 // Read data from the socket (uses the QByteArray size() as block size) 521 int DirectConnectionBase::readBlock( QByteArray &buffer, const int maxSize, const intbufferOffset )520 qint64 DirectConnectionBase::readBlock( QByteArray &buffer, const qint64 maxSize, const qint64 bufferOffset ) 522 521 { 523 522 // Avoid crashes 524 523 if(KMESS_NULL(socket_)) return -1; … … 531 530 } 532 531 533 532 // Determine the maximum number of bytes we can write to the buffer 534 intbufferSpace = buffer.size() - bufferOffset;533 qint64 bufferSpace = buffer.size() - bufferOffset; 535 534 536 535 // API usage check. 537 536 // Warn if certain sizes get a unusual value … … 554 553 // Fill the buffer from the give offset, 555 554 // size argument is limited to what the buffer can/may sustain. 556 555 char *bufferStart = buffer.data() + bufferOffset; 557 intsize = qMin( bufferSpace, maxSize );556 qint64 size = qMin( bufferSpace, maxSize ); 558 557 return readBlock( bufferStart, size ); 559 558 } 560 559 … … 891 890 * @param size Size of the block to read. 892 891 * @returns Whether the has been a write error. 893 892 */ 894 bool DirectConnectionBase::writeBlock( const char *block, const intsize )893 bool DirectConnectionBase::writeBlock( const char *block, const qint64 size ) 895 894 { 896 895 lastWriteFailed_ = true; 897 896 if(KMESS_NULL(socket_)) return false; … … 927 926 #endif 928 927 } 929 928 930 additionalWriteBuffer_.append( QByteArray::fromRawData( block, size ) );929 additionalWriteBuffer_.append( QByteArray::fromRawData( block, (int)size ) ); 931 930 932 931 // Protect against consuming all system memory 933 932 // 50 kB is more then enough if you're writing messages of 1300 bytes! … … 952 951 // Log in network window. 953 952 // Use actual size of written block. 954 953 #ifdef KMESS_NETWORK_WINDOW 955 QByteArray wrapper = QByteArray::fromRawData( block, noBytesWritten );954 QByteArray wrapper = QByteArray::fromRawData( block, (int)noBytesWritten ); 956 955 KMESS_NET_SENT(this, wrapper); 957 956 #endif 958 957 … … 963 962 kWarning() << "only " << noBytesWritten 964 963 << " of " << size << " bytes could be written!"; 965 964 966 additionalWriteBuffer_.append( QByteArray::fromRawData( block + noBytesWritten, size - noBytesWritten) );965 additionalWriteBuffer_.append( QByteArray::fromRawData( block + noBytesWritten, (int)(size - noBytesWritten) ) ); 967 966 } 968 967 else 969 968 { -
src/network/extra/msnftpconnection.cpp
250 250 unsigned char code; 251 251 unsigned char byte1; 252 252 unsigned char byte2; 253 intblockSize;254 intnoBytesRead;253 qint64 blockSize; 254 qint64 noBytesRead; 255 255 256 256 257 257 // Make sure we read all available bytes from the socket before returning … … 318 318 noBytesRead = readBlock( rawBlock, blockSize ); 319 319 320 320 #ifdef KMESS_NETWORK_WINDOW 321 QByteArray wrapper = QByteArray::fromRawData( rawBlock, noBytesRead );321 QByteArray wrapper = QByteArray::fromRawData( rawBlock, (int)noBytesRead ); 322 322 KMESS_NET_RECEIVED( this, wrapper ); 323 323 #endif 324 324 … … 419 419 420 420 421 421 // Retrieve a file 422 bool MsnFtpConnection::retrieveFile(QFile *outputFile, const QString &ipAddress, const intport)422 bool MsnFtpConnection::retrieveFile(QFile *outputFile, const QString &ipAddress, const quint16 port) 423 423 { 424 424 #ifdef KMESSTEST 425 425 KMESS_ASSERT( authHandle_.length() > 0 ); … … 491 491 // to parseCommand() or parseReceivedFileData() 492 492 493 493 char rawBlock[255]; 494 intblockSize;495 intnoBytesRead;494 qint64 blockSize; 495 qint64 noBytesRead; 496 496 QString commandLine; 497 497 QStringList command; 498 498 … … 524 524 } 525 525 526 526 // Convert data block to UTF8 string 527 commandLine = QString::fromUtf8( rawBlock, noBytesRead );527 commandLine = QString::fromUtf8( rawBlock, (int)noBytesRead ); 528 528 529 529 #ifdef KMESS_NETWORK_WINDOW 530 530 KMESS_NET_RECEIVED( this, commandLine.toUtf8() ); … … 695 695 KMESS_ASSERT( inputStream_ != 0 ); 696 696 #endif 697 697 698 intnoBytesRead;699 char rawBlock[2048];698 qint64 noBytesRead; 699 char rawBlock[2048]; 700 700 701 701 // Read a block from the file. 702 702 noBytesRead = inputStream_->read( rawBlock + 3, sizeof(rawBlock) - 3 ); … … 723 723 724 724 // Set the header 725 725 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 ); 728 728 729 729 // Update the progress 730 730 fileBytesRemaining_ -= noBytesRead; -
src/network/extra/msndirectconnection.cpp
145 145 // start with a new data block 146 146 if( remainingBlockBytes_ <= 0 ) 147 147 { 148 intnoBytesPeeked = peekBlock(4);148 qint64 noBytesPeeked = peekBlock(4); 149 149 if( preambleOffset_ == 0 ) 150 150 { 151 151 // First see if there are enough bytes. … … 163 163 } 164 164 165 165 // First 4 bytes indicate the message/block length. 166 intnoBytesRead = readBlock( preambleBuffer_, 4 - preambleOffset_, preambleOffset_ );166 qint64 noBytesRead = readBlock( preambleBuffer_, 4 - preambleOffset_, preambleOffset_ ); 167 167 if( noBytesRead == 0 ) 168 168 { 169 169 #ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL … … 239 239 } 240 240 241 241 // Allocate the buffer. 242 buffer_.resize( remainingBlockBytes_);242 buffer_.resize( (int)remainingBlockBytes_ ); 243 243 buffer_.fill('\0'); 244 244 bufferOffset_ = 0; 245 245 … … 258 258 259 259 // Fill the next part of the buffer with the bytes received. 260 260 // Read as many bytes as possible, test for errors. 261 intnoBytesRead = readBlock( buffer_, remainingBlockBytes_, bufferOffset_ );261 qint64 noBytesRead = readBlock( buffer_, remainingBlockBytes_, bufferOffset_ ); 262 262 if( noBytesRead < 0 ) 263 263 { 264 264 kWarning() << "read error " -
src/network/extra/directconnectionpool.h
48 48 virtual ~DirectConnectionPool(); 49 49 50 50 // 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 intport);51 bool addConnection(DirectConnectionBase *connection, const QString &ipAddress, const quint16 port); 52 52 // Add a connection to the list, starts listening for incoming connections (returns zero if couldn't start listening). 53 53 int addServerConnection(DirectConnectionBase *connection); 54 54 // Remove all connections from the pending list -
src/network/extra/directconnectionbase.h
68 68 // Return true when a write handler is connnected. 69 69 bool isWriteHandlerConnected() const; 70 70 // Get the server port that will be used 71 intgetLocalServerPort();71 quint16 getLocalServerPort(); 72 72 // Get the remote ip the socket is connected with. 73 73 QString getRemoteIp() const; 74 74 // Get the remote port the socket is connected with. 75 intgetRemotePort() const;75 quint16 getRemotePort() const; 76 76 // Return the error description 77 77 QString getSocketError() const; 78 78 // Connect to a host 79 bool openConnection( const QString &ipAddress, const int port);79 bool openConnection( const QString &ipAddress, const quint16 port ); 80 80 // Wait for an incoming connection 81 81 bool openServerPort(); 82 82 … … 106 106 // Close and delete the server socket 107 107 bool closeServerSocket(); 108 108 // Return the number of bytes which are already received in the local buffer 109 intgetAvailableBytes() const;109 qint64 getAvailableBytes() const; 110 110 // Return the name of the locally opened port. 111 111 QString getListeningServiceName() const; 112 112 // Verify how many bytes the read buffer has. Note this actually reads the data to test it. 113 int peekBlock( const intsize );113 qint64 peekBlock( const qint64 size ); 114 114 // Read data from the socket 115 int readBlock( char *buffer, const intsize );115 qint64 readBlock( char *buffer, const qint64 size ); 116 116 // Read data from the socket (uses the QByteArray size() as block size) 117 int readBlock( QByteArray &buffer, const int maxSize = 0, const intoffset = 0 );117 qint64 readBlock( QByteArray &buffer, const qint64 maxSize = 0, const qint64 offset = 0 ); 118 118 // Mark the remote host as authorized (usually after the handshake was successful) 119 119 void setAuthorized(bool authorized); 120 120 // Write data to the socket 121 bool writeBlock( const char *block, const intsize );121 bool writeBlock( const char *block, const qint64 size ); 122 122 // Write data to the socket 123 123 bool writeBlock( const QByteArray &block ); 124 124 … … 140 140 // The timeout handling for openConnection() 141 141 QTimer connectionTimer_; 142 142 // The higher limit to the interval of server ports this class will use 143 inthighestServerPortLimit_;143 quint16 highestServerPortLimit_; 144 144 // Whether the class acts as server or client 145 145 bool isServer_; 146 146 // Whether the last write action failed. 147 147 bool lastWriteFailed_; 148 148 // The lower limit to the interval of server ports this class will use 149 intlowestServerPortLimit_;149 quint16 lowestServerPortLimit_; 150 150 // The server socket which listens for incoming connections. 151 151 QTcpServer *server_; 152 152 // The server port this class will use 153 intserverPort_;153 quint16 serverPort_; 154 154 // The next server port used with a openServerPort() call. 155 static intnextServerPort_;155 static quint16 nextServerPort_; 156 156 // The socket over which data is sent or received. 157 157 QTcpSocket *socket_; 158 158 // Whether an timeout occured -
src/network/extra/msnftpconnection.h
59 59 // Send a file 60 60 bool sendFile(QFile *inputFile); 61 61 // Retrieve a file 62 bool retrieveFile(QFile *outputFile, const QString &ipAddress, const intport);62 bool retrieveFile(QFile *outputFile, const QString &ipAddress, const quint16 port); 63 63 64 64 private slots: 65 65 // This is called when a connection is established. … … 134 134 // The stream to write received data to 135 135 QIODevice *outputStream_; 136 136 // True when only partial file data was received 137 intremainingBlockBytes_;137 qint64 remainingBlockBytes_; 138 138 // True if the user cancelled the session 139 139 bool userCancelled_; 140 140 -
src/network/extra/msndirectconnection.h
61 61 // The buffer for the incoming p2p messages. 62 62 QByteArray buffer_; 63 63 // The offset of the currently received block 64 uintbufferOffset_;64 quint64 bufferOffset_; 65 65 // The other contact we're connected with 66 66 QString contactHandle_; 67 67 // Whether the first message is received … … 69 69 // The buffer for the next preamble message. 70 70 QByteArray preambleBuffer_; 71 71 // The offset in the preamble buffer 72 intpreambleOffset_;72 qint64 preambleOffset_; 73 73 // Set when only partial data was received 74 uintremainingBlockBytes_;74 quint64 remainingBlockBytes_; 75 75 76 76 signals: 77 77 // Signal that a full message block was received. -
src/network/applications/applicationlist.cpp
315 315 * @return Whether the socket could be created or not. 316 316 * Returns false if the socket could not be created. 317 317 */ 318 bool ApplicationList::addConnection(const QString &ipAddress, const intport)318 bool ApplicationList::addConnection(const QString &ipAddress, const quint16 port) 319 319 { 320 320 // Avoid overwriting the current directConnection_ variable. 321 321 if( directConnection_ != 0 ) … … 539 539 P2PApplication *app = 0; 540 540 541 541 // Extract the SLP data message 542 QString slpMessage = QString::fromUtf8( message.getData(), message.getDataSize() );542 QString slpMessage = QString::fromUtf8( message.getData(), (int) message.getDataSize() ); 543 543 544 544 if(! slpMessage.startsWith("INVITE")) 545 545 { … … 1031 1031 1032 1032 // Find the call ID 1033 1033 // 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() ); 1035 1035 int callPos = callRE.indexIn( slpMessage ); 1036 1036 1037 1037 if( callPos == -1 ) -
src/network/applications/application.cpp
687 687 * 688 688 * @param bytesTransferred The number of bytes transferred. 689 689 */ 690 void Application::showTransferProgress( const uint bytesTransferred)690 void Application::showTransferProgress( const ulong bytesTransferred ) 691 691 { 692 692 #ifdef KMESSDEBUG_APPLICATION 693 693 kDebug() << "Transferred " << bytesTransferred << " bytes."; -
src/network/applications/applicationlist.h
117 117 // Add a new application to the list. 118 118 void addApplication(P2PApplication *application); 119 119 // Attempt to establish a direct connection at the given ipaddress/port. 120 bool addConnection(const QString &ipAddress, const intport);120 bool addConnection(const QString &ipAddress, const quint16 port); 121 121 // Attempt to establish a direct connection by listening at an random port. 122 122 int addServerConnection(); 123 123 // Abort all applications, the contact is leaving a chat. -
src/network/applications/filetransferp2p.cpp
452 452 uint shortNameLength = shortName.length(); 453 453 454 454 // Get the file data (preview 455 int filesize= fileData->size();455 ulong filesize = fileData->size(); 456 456 int flags = (hasPreview ? 0 : 1); 457 457 458 458 // Determine the context length … … 667 667 * Show the progress made during a transfer. 668 668 * This function is also called from the P2PApplication base class. 669 669 */ 670 void FileTransferP2P::showTransferProgress(const u intbytesTransferred)670 void FileTransferP2P::showTransferProgress(const ulong bytesTransferred) 671 671 { 672 672 // Display the progress update in the transfer window 673 673 TransferWindow::getInstance()->updateProgress( transferID_, bytesTransferred ); … … 790 790 791 791 792 792 // Read the filename parameters 793 fileSize_ = file_->size();793 fileSize_ = (uint)file_->size(); 794 794 795 795 // Create a thumbnail, continue when it completes 796 796 // Windows Live Messenger scales the received image down depending on the users settings. … … 809 809 810 810 // Create the session id and context field 811 811 QString context = createContextField( fileName_, file_, hasPreview ); 812 uint sessionID = KMessShared::generateID();812 uint sessionID = (uint)KMessShared::generateID(); 813 813 814 814 // Send the invitation 815 815 sendSlpSessionInvitation(sessionID, getAppId(), 2, context); -
src/network/applications/application.h
167 167 // Show a message to inform about a transfer event (shown in the transfer dialog, e.g. connecting to host) 168 168 virtual void showTransferMessage(const QString &message); 169 169 // Show the progress made during a transfer. 170 virtual void showTransferProgress( const uint bytesTransferred);170 virtual void showTransferProgress( const ulong bytesTransferred ); 171 171 // Set the cookie from an INVITE command 172 172 void startByInvite(const QString &invitationCookie); 173 173 // The user rejected the invitation -
src/network/applications/filetransferp2p.h
83 83 // Show a message to inform about a transfer event (shown in the transfer dialog, e.g. connecting to host) 84 84 void showTransferMessage(const QString &message); 85 85 // Show the progress made during a transfer. 86 void showTransferProgress(const u intbytesTransferred);86 void showTransferProgress(const ulong bytesTransferred); 87 87 // Convert a string to some more readable form 88 88 QString toReadableBytes(uint bytes); 89 89 // The user cancelled the session -
src/network/applications/p2papplicationbase.cpp
944 944 else 945 945 { 946 946 // Read the data directly from the message 947 slpData = QString::fromUtf8( p2pMessage.getData(), p2pMessage.getDataSize() );947 slpData = QString::fromUtf8( p2pMessage.getData(), (int)p2pMessage.getDataSize() ); 948 948 } 949 949 950 950 // Remove the first preamble line, because it's not in MIME format. … … 1328 1328 { 1329 1329 // Read the data from the file. 1330 1330 char buffer[1202]; // 1202 is the max P2P data size. 1331 intbytesRead = dataSource_->read( buffer, 1202 );1331 qint64 bytesRead = dataSource_->read( buffer, 1202 ); 1332 1332 if( bytesRead < 0 ) 1333 1333 { 1334 1334 kWarning() << "Couldn't send more data, " … … 1346 1346 } 1347 1347 1348 1348 // Wrap in buffer, without copying. 1349 QByteArray data = QByteArray::fromRawData( buffer, bytesRead );1349 QByteArray data = QByteArray::fromRawData( buffer, (int)bytesRead ); 1350 1350 1351 1351 #ifdef KMESSDEBUG_P2PAPPLICATION_GENERAL 1352 1352 kDebug() << "Sending data:" … … 1744 1744 1745 1745 // Determine the message size: 1746 1746 uint messageSize = messageData.size(); 1747 u inttotalSize;1748 u intoffsetField;1747 ulong totalSize; 1748 ulong offsetField; 1749 1749 1750 1750 if( fragmentTotalSize_ == 0 ) 1751 1751 { … … 2217 2217 2218 2218 // See if the offset should be changed, 2219 2219 // and if so, update it. 2220 if( offset != file->pos() && ! file->seek( offset ) )2220 if( offset != (ulong)file->pos() && ! file->seek( offset ) ) 2221 2221 { 2222 2222 #ifdef KMESSDEBUG_APPLICATION 2223 2223 kDebug() << "data is received out of order, updating file offset."; … … 2274 2274 } 2275 2275 2276 2276 // Make sure the file position is correct now. 2277 if( offset != file->pos() )2277 if( offset != (ulong)file->pos() ) 2278 2278 { 2279 2279 sendCancelMessage( CANCEL_FAILED ); 2280 2280 return false; -
src/network/applications/filetransfer.cpp
251 251 252 252 QString ip; 253 253 QString ipInternal; 254 intport;254 quint16 port; 255 255 int portXInternal; 256 256 int portX; 257 257 QString authCookie; … … 260 260 ip = message.getValue( "IP-Address" ); 261 261 ipInternal = message.getValue( "IP-Address-Internal" ); // As of MSN5 262 262 portXInternal = message.getValue( "PortX-Internal" ).toInt(); // As of MSN5 263 port = message.getValue( "Port" ).toInt();263 port = (quint16)message.getValue( "Port" ).toUInt(); 264 264 portX = message.getValue( "PortX" ).toInt(); // As of MSN5 265 265 authCookie = message.getValue( "AuthCookie" ); 266 266 … … 497 497 498 498 499 499 // Convert a string to some more readable form 500 QString FileTransfer::toReadableBytes( uint bytes)500 QString FileTransfer::toReadableBytes( ulong bytes ) 501 501 { 502 502 QString format; 503 503 if(bytes > 1048576) -
src/network/applications/p2papplication.cpp
2271 2271 // Get the IP addresses. 2272 2272 QStringList externalIpAddresses; 2273 2273 QStringList internalIpAddresses; 2274 uintexternalPort = 0;2275 uintinternalPort = 0;2274 quint16 externalPort = 0; 2275 quint16 internalPort = 0; 2276 2276 2277 2277 if( listenInternal ) 2278 2278 { 2279 2279 internalIpAddresses = slpMimeBody.getValue("IPv4Internal-Addrs").split(" "); 2280 internalPort = slpMimeBody.getValue("IPv4Internal-Port").toUInt();2280 internalPort = (quint16)slpMimeBody.getValue("IPv4Internal-Port").toUInt(); 2281 2281 } 2282 2282 2283 2283 if( listenExternal ) 2284 2284 { 2285 2285 externalIpAddresses = slpMimeBody.getValue("IPv4External-Addrs").split(" "); 2286 externalPort = slpMimeBody.getValue("IPv4External-Port").toUInt();2286 externalPort = (quint16)slpMimeBody.getValue("IPv4External-Port").toUInt(); 2287 2287 } 2288 2288 2289 2289 // See if the clients are likely at the same lan. … … 2748 2748 * @param messageContentType Contact type of the message which is in error (can be empty) 2749 2749 * @param messageType The message type. This is used later when an ACK is received. 2750 2750 */ 2751 void P2PApplication::sendSlpError( const QString &statusLine,2752 const uint sessionID, const QString &messageContentType, P2PMessageType messageType)2751 void P2PApplication::sendSlpError( const QString &statusLine, 2752 const ulong sessionID, const QString &messageContentType, P2PMessageType messageType ) 2753 2753 { 2754 2754 #ifdef KMESSDEBUG_P2PAPPLICATION_GENERAL 2755 2755 kDebug() << "Sending SLP error response: " << statusLine; … … 3018 3018 * @param appId The numeric app-Id value, which also identifies the application type. 3019 3019 * @param context The context field. 3020 3020 */ 3021 void P2PApplication::sendSlpSessionInvitation( uint sessionID, const QString &eufGuid, const int appId, const QString &context)3021 void P2PApplication::sendSlpSessionInvitation( ulong sessionID, const QString &eufGuid, const int appId, const QString &context ) 3022 3022 { 3023 3023 // Create the message 3024 3024 MimeMessage invitation; -
src/network/applications/filetransfer.h
66 66 // Create and initilize the progress dialog. 67 67 void initializeProgressDialog(bool incoming = false); 68 68 // Convert a string to some more readable form 69 QString toReadableBytes( uintbytes);69 QString toReadableBytes( ulong bytes); 70 70 // Step one of a user-started chat: the user invites the contact 71 71 void userStarted1_UserInvitesContact(); 72 72 // Step two of a user-started chat: the contact accepts -
src/network/applications/p2papplication.h
149 149 // Send the data preparation ACK. 150 150 void sendDataPreparationAck(); 151 151 // 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 ); 153 153 // Send the invitation for a direct connection. 154 154 void sendSlpTransferInvitation(); 155 155 // Send an SLP 200/OK message … … 215 215 // Send an SLP invitation message 216 216 void sendSlpInvitation(const MimeMessage &message, const QString &contentType, P2PMessageType messageType); 217 217 // Send an SLP error message (to decline an invitation for example) 218 void sendSlpError( const QString &statusLine, const uintsessionID = 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 ); 221 221 // Show a timeout message because an expected message was not received. 222 222 void showTimeoutMessage( P2PWaitingState waitingState ); 223 223 -
src/network/p2pmessage.cpp
323 323 }; 324 324 for(int i = 0; i < 16; i++) 325 325 { 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) ); 327 327 } 328 328 } 329 329 -
src/network/msnsockethttp.cpp
759 759 * @param data Contents of the message which will be sent 760 760 * @return -1 on error, or else always the exact size of the sent data. 761 761 */ 762 intMsnSocketHttp::writeBinaryData( const QByteArray &data )762 qint64 MsnSocketHttp::writeBinaryData( const QByteArray &data ) 763 763 { 764 764 if( ! connected_ ) 765 765 { … … 830 830 * @param data The message which will be sent 831 831 * @return -1 on error, or else always the exact size of the sent data. 832 832 */ 833 intMsnSocketHttp::writeData( const QString &data )833 qint64 MsnSocketHttp::writeData( const QString &data ) 834 834 { 835 835 return writeBinaryData( data.toUtf8() ); 836 836 } -
src/network/msnsocketbase.h
92 92 // Set whether we're sending pings or not 93 93 virtual void setSendPings( bool sendPings ) = 0; 94 94 // Write data to the socket without conversions 95 virtual intwriteBinaryData( const QByteArray& data ) = 0;95 virtual qint64 writeBinaryData( const QByteArray& data ) = 0; 96 96 // Write data to the socket 97 virtual intwriteData( const QString& data ) = 0;97 virtual qint64 writeData( const QString& data ) = 0; 98 98 99 99 100 100 protected: // Protected properties -
src/network/msnswitchboardconnection.cpp
1558 1558 QString messagePart; 1559 1559 QString body = message.getBody(); 1560 1560 1561 int parts = (int) ceil( ( (float) bodyLength / maxSendableSingleMessageLength ) );1561 int parts = (int) ceil( ( (float) bodyLength / (float) maxSendableSingleMessageLength ) ); 1562 1562 1563 1563 for( int i = 0; i < parts - 1; i++ ) 1564 1564 { -
src/network/msnsockethttp.h
92 92 // Set whether to send pings or not 93 93 void setSendPings( bool sendPings ); 94 94 // Write data to the socket without conversions 95 intwriteBinaryData( const QByteArray& data );95 qint64 writeBinaryData( const QByteArray& data ); 96 96 // Write data to the socket 97 intwriteData( const QString& data );97 qint64 writeData( const QString& data ); 98 98 99 99 100 100 private: // Private methods -
src/network/msnsockettcp.cpp
118 118 */ 119 119 void MsnSocketTcp::connectToServer( const QString& server, const quint16 port ) 120 120 { 121 intdesiredPort;121 quint16 desiredPort; 122 122 QString desiredServer; 123 123 124 124 if( server.isEmpty() && port == 0 ) … … 133 133 } 134 134 135 135 #ifdef KMESSTEST 136 KMESS_ASSERT( ( desiredPort >= 0 ) && ( desiredPort < 32768 ));136 KMESS_ASSERT( desiredPort < 32768 ); 137 137 #endif 138 138 139 139 #ifdef KMESSDEBUG_CONNECTION_SOCKET_TCP … … 527 527 528 528 529 529 // Write data to the socket without conversions 530 intMsnSocketTcp::writeBinaryData( const QByteArray &data )530 qint64 MsnSocketTcp::writeBinaryData( const QByteArray &data ) 531 531 { 532 intnoBytesWritten;532 qint64 noBytesWritten; 533 533 534 534 if( ! isConnected() ) 535 535 { … … 550 550 551 551 552 552 // Write data to the socket 553 intMsnSocketTcp::writeData( const QString &data )553 qint64 MsnSocketTcp::writeData( const QString &data ) 554 554 { 555 intnoBytesWritten;555 qint64 noBytesWritten; 556 556 557 557 if( ! isConnected() ) 558 558 { -
src/network/msnconnection.cpp
764 764 #endif 765 765 766 766 QByteArray binData = data.toUtf8(); 767 intnoBytesWritten = socket_->writeData( binData );767 qint64 noBytesWritten = socket_->writeData( binData ); 768 768 769 769 if( noBytesWritten != binData.length() ) // Note that the previous code used data.length instead of unicode.length(), but I 770 770 { // changed this since that is the string we send to the socket... (could be wrong here) -
src/network/soap/passportloginservice.cpp
113 113 QByteArray nonce; 114 114 for( int i = 0; i < 24; i++ ) 115 115 { 116 nonce += ( rand() % 74 ) + 48;116 nonce += (char)( ( rand() % 74 ) + 48 ); 117 117 } 118 118 token += "&nonce=" + QUrl::toPercentEncoding( nonce.toBase64() ); 119 119 -
src/network/msnsockettcp.h
68 68 // Set whether we're sending pings or not (also resets ping timer) 69 69 void setSendPings( bool sendPings ); 70 70 // Write data to the socket without conversions 71 intwriteBinaryData(const QByteArray& data);71 qint64 writeBinaryData(const QByteArray& data); 72 72 // Write data to the socket 73 intwriteData(const QString& data);73 qint64 writeData(const QString& data); 74 74 75 75 76 76 private slots: // Private slots -
src/network/msnnotificationconnection.cpp
1469 1469 QString server = serverAndPort.section(':', 0, 0); 1470 1470 QString portString = serverAndPort.section(':', 1, 1); 1471 1471 bool goodPort; 1472 int port = portString.toInt( &goodPort );1472 quint16 port = (quint16) portString.toUInt( &goodPort ); 1473 1473 if ( !goodPort ) 1474 1474 { 1475 1475 kWarning() << "Couldn't get port from string " << portString; … … 1747 1747 1748 1748 // Convert the port to an integer 1749 1749 bool goodPort; 1750 int port = portString.toInt( &goodPort );1750 quint16 port = (quint16) portString.toUInt( &goodPort ); 1751 1751 #ifdef KMESSDEBUG_NOTIFICATION_GENERAL 1752 1752 kDebug() << "Got " << serverType << " transfer to " << server << ":" << port << "."; 1753 1753 #endif -
src/network/chatinformation.cpp
38 38 39 39 // The constructor for a contact-started chat 40 40 ChatInformation::ChatInformation( MsnNotificationConnection *parent, const QString& handle, 41 const QString &ip, intport, const QString &authorization, const QString &chatId,41 const QString &ip, quint16 port, const QString &authorization, const QString &chatId, 42 42 ConnectionType type ) 43 43 : authorization_(authorization) 44 44 , chatId_(chatId) … … 103 103 104 104 105 105 // Return the switchboard server port 106 intChatInformation::getPort() const106 quint16 ChatInformation::getPort() const 107 107 { 108 108 return port_; 109 109 } … … 143 143 144 144 145 145 // Set server information 146 void ChatInformation::setServerInformation( const QString& ip, const int& port, const QString& authorization )146 void ChatInformation::setServerInformation( const QString& ip, const quint16& port, const QString& authorization ) 147 147 { 148 148 ip_ = ip; 149 149 port_ = port; -
src/network/multipacketmessage.cpp
51 51 52 52 // Set the MimeMessage and the number of chunks ( round up ) 53 53 result_ = message; 54 float a = (float) messageText_.toUtf8().length() / maxSendableMessageLength;54 float a = (float) messageText_.toUtf8().length() / (float) maxSendableMessageLength; 55 55 chunks_ = (int) ceil( a ); 56 56 57 57 // Set message guid -
src/network/chatinformation.h
56 56 int transactionId, ConnectionType type ); 57 57 // The constructor for a contact-started chat 58 58 ChatInformation( MsnNotificationConnection *parent, const QString& handle, 59 const QString &ip, intport, const QString &authorization,59 const QString &ip, quint16 port, const QString &authorization, 60 60 const QString &chatId, ConnectionType type ); 61 61 // The destructor 62 62 ~ChatInformation(); … … 71 71 // Return the notification connection that spawned this object 72 72 MsnNotificationConnection *getNotificationConnection() const; 73 73 // Return the switchboard server port 74 intgetPort() const;74 quint16 getPort() const; 75 75 // Return the time of when the SB transfer request has been sent 76 76 int getTime() const; 77 77 // Return the transaction ID used in the "XFR" command. … … 81 81 // Return whether the user started the chat 82 82 bool getUserStartedChat() const; 83 83 // 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 ); 85 85 86 86 87 87 private: // Private attributes … … 98 98 // The notification connection that spawned this object 99 99 MsnNotificationConnection *notificationConnection_; 100 100 // The switchboard server's port 101 intport_;101 quint16 port_; 102 102 // The time when the SB transfer request was issued to the notification server 103 103 uint requestTime_; 104 104 // The transaction ID used in the "XFR" command. -
src/systemtraywidget.cpp
159 159 160 160 // Show the dialog 161 161 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>", 163 166 i18n("Docking in System Tray"), "hideOnCloseInfo"); 164 167 165 168 // Close the temporary file, it will be deleted when the function returns -
src/dialogs/transferentry.cpp
36 36 37 37 38 38 // Constructor 39 TransferEntry::TransferEntry( QWidget *parent, const QString filename, uintfilesize,39 TransferEntry::TransferEntry( QWidget *parent, const QString filename, const ulong filesize, 40 40 bool incoming, const QImage preview) 41 41 : QWidget( parent ), 42 42 Ui::TransferEntry(), … … 259 259 260 260 261 261 // Convert a string to some more readable form 262 QString TransferEntry::toReadableBytes( uint bytes)262 QString TransferEntry::toReadableBytes( ulong bytes ) 263 263 { 264 264 QString format; 265 265 if(bytes > 1048576) … … 305 305 306 306 307 307 // Update the progress bar 308 void TransferEntry::updateProgress( u intbytesTransferred )308 void TransferEntry::updateProgress( ulong bytesTransferred ) 309 309 { 310 310 #ifdef KMESSTEST 311 311 KMESS_ASSERT( ! isDone_ ); … … 356 356 void TransferEntry::updateTransferRate() 357 357 { 358 358 // To avoid to works with different transferred bytes 359 u inttempTransferred = bytesTransferred_;359 ulong tempTransferred = bytesTransferred_; 360 360 361 361 // Calculate the bytes transferred from the last calling 362 u intbytesTransferredFromLast = tempTransferred - previousTransferred_;362 ulong bytesTransferredFromLast = tempTransferred - previousTransferred_; 363 363 364 364 QString speed, eta; 365 365 -
src/dialogs/transferentry.h
35 35 36 36 public: 37 37 // Constructor 38 TransferEntry( QWidget *parent, const QString filename, const u intfilesize, bool incoming = false,38 TransferEntry( QWidget *parent, const QString filename, const ulong filesize, bool incoming = false, 39 39 const QImage preview = QImage() ); 40 40 // Destructor 41 41 virtual ~TransferEntry(); … … 48 48 void setTransferID( int transferID ); 49 49 50 50 // Format nicely the byte quantities 51 static QString toReadableBytes( u intbytes );51 static QString toReadableBytes( ulong bytes ); 52 52 53 53 public slots: 54 54 // Mark the transfer as failed … … 58 58 // Set a status message 59 59 void setStatusMessage( const QString &message ); 60 60 // Update the progress bar 61 void updateProgress( u intbytesTransferred );61 void updateProgress( ulong bytesTransferred ); 62 62 63 63 private slots: 64 64 // The cancel link was pressed … … 80 80 // The file name 81 81 QString filename_; 82 82 // The file size 83 u intfilesize_;83 ulong filesize_; 84 84 // The image preview 85 85 QPixmap preview_; 86 86 // The previous percentage 87 87 int previousPercentage_; 88 88 // The current trasferred bytes 89 u intbytesTransferred_;89 ulong bytesTransferred_; 90 90 // The timer for estimated the trasfer rate 91 91 QTimer *timer_; 92 92 // The previous trasferred bytes 93 u intpreviousTransferred_;93 ulong previousTransferred_; 94 94 // The ID of this transfer, used by the Transfer Window 95 95 int transferID_; 96 96 }; -
src/dialogs/transferwindow.cpp
89 89 90 90 91 91 // Add an entry to the transfer manager 92 int TransferWindow::addEntry( const QString filename, u intfilesize, bool incoming, const QImage preview )92 int TransferWindow::addEntry( const QString filename, ulong filesize, bool incoming, const QImage preview ) 93 93 { 94 94 #ifdef KMESSDEBUG_TRANSFERWINDOW 95 95 kDebug() << "adding entry for '" << filename << "'."; … … 163 163 164 164 165 165 // Update the progress bar of a transfer 166 void TransferWindow::updateProgress( int transferID, u intbytesTransferred )166 void TransferWindow::updateProgress( int transferID, ulong bytesTransferred ) 167 167 { 168 168 if( ! entryList_.contains( transferID ) ) 169 169 { -
src/dialogs/transferwindow.h
50 50 51 51 public: 52 52 // Add a new entry 53 int addEntry( const QString filename, u intfilesize, bool incoming = false,53 int addEntry( const QString filename, ulong filesize, bool incoming = false, 54 54 const QImage preview = QImage() ); 55 55 // Destroy the current instance 56 56 static void destroy(); … … 65 65 // Set the status message of a transfer 66 66 void setStatusMessage( int transferID, const QString &message ); 67 67 // Update the progress bar of a transfer 68 void updateProgress( int transferID, u intbytesTransferred );68 void updateProgress( int transferID, ulong bytesTransferred ); 69 69 70 70 private slots: 71 71 // The "Clean up" button was pressed. -
src/utils/xautolock.cpp
62 62 : active_( false ), 63 63 idle_( false ), 64 64 idleTime_( 0 ), 65 lastCheck_( time( 0 ) ),65 lastCheck_( (uint)time( 0 ) ), 66 66 mitAvailable_( false ), 67 67 mitInfo_( 0 ), 68 68 triggerTime_( 0 ) … … 97 97 // The main function which checks for idle status 98 98 void XAutoLock::checkIdle() 99 99 { 100 unsigned int now, timeIdle; 100 unsigned int now; 101 unsigned long timeIdle; 101 102 102 now = time( 0 );103 now = (uint)time( 0 ); 103 104 104 105 if( abs( lastCheck_ - now ) > 120 ) 105 106 { … … 139 140 140 141 141 142 // Get idle time by asking the MIT-SCREEN-SAVER extension (if available) 142 unsigned intXAutoLock::getMitIdle()143 unsigned long XAutoLock::getMitIdle() 143 144 { 144 145 #ifdef HAVE_XSCREENSAVER 145 146 if ( !mitInfo_ ) mitInfo_ = XScreenSaverAllocInfo(); … … 226 227 void XAutoLock::resetTimer() 227 228 { 228 229 idle_ = false; 229 idleTime_ = time( 0 );230 idleTime_ = (uint)time( 0 ); 230 231 231 232 emit activity(); 232 233 } -
src/utils/kmessshared.cpp
63 63 // Compute the XOR operations 64 64 for(int i=0; i < key.size() - 1; i++ ) 65 65 { 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] ); 68 68 } 69 69 70 70 // Append the data to ipad -
src/utils/xautolock.h
75 75 // Get idle time by detecting time since last mouse movement 76 76 unsigned int getMouseIdle(); 77 77 // Get idle time by asking the MIT-SCREEN-SAVER extension (if available) 78 unsigned intgetMitIdle();78 unsigned long getMitIdle(); 79 79 // Reset the timer (after we've just become active again, for example) 80 80 void resetTimer(); 81 81
