mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- got rid of libMagick++ dependency
This commit is contained in:
parent
3164337c3c
commit
2aea2a0032
10 changed files with 677 additions and 252 deletions
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue