mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
- got rid of libMagick++ dependency
This commit is contained in:
19
src/rss.h
19
src/rss.h
@@ -38,11 +38,6 @@
|
||||
#include "misc.h"
|
||||
#include "downloadThread.h"
|
||||
|
||||
#ifdef HAVE_MAGICK
|
||||
#include <Magick++.h>
|
||||
using namespace Magick;
|
||||
#endif
|
||||
|
||||
class RssManager;
|
||||
class RssStream;
|
||||
class RssItem;
|
||||
@@ -588,20 +583,6 @@ class RssManager : public QObject{
|
||||
if(url.endsWith("favicon.ico")){
|
||||
// Icon downloaded
|
||||
QImage fileIcon;
|
||||
#ifdef HAVE_MAGICK
|
||||
try{
|
||||
QFile::copy(path, path+".ico");
|
||||
Image image(QDir::cleanPath(path+".ico").toUtf8().data());
|
||||
// Convert to PNG since we can't read ICO format
|
||||
image.magick("PNG");
|
||||
// Resize to 16x16px
|
||||
image.sample(Geometry(16, 16));
|
||||
image.write(path.toUtf8().data());
|
||||
QFile::remove(path+".ico");
|
||||
}catch(Magick::Exception &error_){
|
||||
qDebug("favicon conversion to PNG failure: %s", error_.what());
|
||||
}
|
||||
#endif
|
||||
if(fileIcon.load(path)) {
|
||||
QList<RssStream*> res = findFeedsWithIcon(url);
|
||||
RssStream* stream;
|
||||
|
||||
Reference in New Issue
Block a user