SVN commit 1280602 by mfuchs: Adds FileDeleter which manages the removal of files. Users of FileDeleter simply specify the url of the file to delete and are then able to connect to the job. FileDeleter makes sure that for each file there is only one job, i.e. it is possible to call deleteFile multiple times. Also adds a unit test for FileDeleter. M +1 -0 CMakeLists.txt A core/filedeleter.cpp [License: GPL (v2+)] A core/filedeleter.h [License: GPL (v2+)] A core/filedeleter_p.h [License: GPL (v2+)] M +13 -0 tests/CMakeLists.txt A tests/filedeletertest.cpp [License: GPL (v2+)] A tests/filedeletertest.h [License: GPL (v2+)] --- trunk/KDE/kdenetwork/kget/CMakeLists.txt #1280601:1280602 @@ -122,6 +122,7 @@ core/urlchecker.cpp core/basedialog.cpp core/mostlocalurl.cpp + core/filedeleter.cpp ) if(HAVE_NEPOMUK) --- trunk/KDE/kdenetwork/kget/tests/CMakeLists.txt #1280601:1280602 @@ -57,3 +57,16 @@ if (HAVE_NEPOMUK) target_link_libraries(metalinktest ${SOPRANO_LIBRARIES} ${NEPOMUK_LIBRARIES}) endif (HAVE_NEPOMUK) + +#===========FileDeleter=========== +set(filedeletertest_SRCS + filedeletertest.cpp + ../core/filedeleter.cpp +) + +kde4_add_unit_test(filedeletertest + TESTNAME kget-filedeletertest + ${filedeletertest_SRCS} +) + +target_link_libraries(filedeletertest ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY})