[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/network/ktorrent/libbtcore
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2008-05-13 17:43:54
Message-ID: 1210700634.691549.15201.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 807357 by chehrlic:

win32 compile++ of kget / change return value of bytesAvailable() to uint64

 M  +2 -2      CMakeLists.txt  
 M  +1 -1      btcore_export.h  
 M  +2 -2      torrent/timeestimator.cpp  
 M  +1 -1      torrent/timeestimator.h  


--- trunk/extragear/network/ktorrent/libbtcore/CMakeLists.txt #807356:807357
@@ -170,10 +170,10 @@
 	btversion.cpp
 )
 
-if(CMAKE_SYSTEM MATCHES "Windows")
+if(WIN32)
 # Compile MinGW stuff on windows
 set(libbtcore_SRC ${libbtcore_SRC} util/mingw.cpp)
-endif(CMAKE_SYSTEM MATCHES "Windows")
+endif(WIN32)
 
 
 # kde4_add_ui_files(libbtcore_SRC ${libbtcore_UI})
--- trunk/extragear/network/ktorrent/libbtcore/btcore_export.h #807356:807357
@@ -24,7 +24,7 @@
 #include <kdemacros.h>
 
 #ifndef BTCORE_EXPORT
-# if defined(MAKE_BTCORE_LIB)
+# if defined(MAKE_BTCORE_LIB) || defined(MAKE_KGET_BITTORRENTFACTORY_LIB)
    /* We are building this library */ 
 #  define BTCORE_EXPORT KDE_EXPORT
 # else
--- trunk/extragear/network/ktorrent/libbtcore/torrent/timeestimator.cpp \
#807356:807357 @@ -55,7 +55,7 @@
 			return s.download_rate;
 		}
 	}
-	Uint32 TimeEstimator::bytesLeft() const
+	Uint64 TimeEstimator::bytesLeft() const
 	{
 		const TorrentStats& s = m_tc->getStats();
 		if (s.completed)
@@ -276,7 +276,7 @@
 			return m_lastETA;
 		}
 
-		if (percentage >= 99 && m_samples->last() > 0 && bytesLeft() <= 10*1024*1024*1024) \
//1% of a very large torrent could be hundreds of MB so limit it to 10MB +		if \
(percentage >= 99 && m_samples->last() > 0 && bytesLeft() <= 10*1024*1024*1024LL) \
//1% of a very large torrent could be hundreds of MB so limit it to 10MB  {
 
 			if (!m_samples->isFull())
--- trunk/extragear/network/ktorrent/libbtcore/torrent/timeestimator.h #807356:807357
@@ -104,7 +104,7 @@
 			int estimateKT();
 			
 			Uint32 sample() const;
-			Uint32 bytesLeft() const;
+			Uint64 bytesLeft() const;
 			
 			TorrentControl* m_tc;
 			SampleQueue* m_samples;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic