From 93a84655b6907937bb50b20fecdff5969640f4ee Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 26 Mar 2011 09:03:12 +0000 Subject: [PATCH] Get rid of QtSVG dependency --- configure | 43 ----------------------- qbittorrent.qc | 2 -- src/Icons/skin/qbittorrent_mono_dark.png | Bin 0 -> 1495 bytes src/icons.qrc | 2 +- src/mainwindow.cpp | 4 +-- src/preferences/options_imp.cpp | 2 +- src/update_qrc_files.py | 2 +- unixconf.pri | 4 +-- 8 files changed, 6 insertions(+), 53 deletions(-) create mode 100644 src/Icons/skin/qbittorrent_mono_dark.png diff --git a/configure b/configure index 156629ede..1dc591b4f 100755 --- a/configure +++ b/configure @@ -23,7 +23,6 @@ Dependency options: Graphical user interface for headless running --disable-qt-dbus Disable use of qt-dbus - --disable-qt-svg Disable use of qt-svg --with-libboost-inc=[path] Path to libboost include files --with-libboost-lib=[path] Path to libboost library @@ -169,11 +168,6 @@ while [ $# -gt 0 ]; do shift ;; - --disable-qt-svg) - QC_DISABLE_qt_svg="Y" - shift - ;; - --with-libboost-inc=*) QC_WITH_LIBBOOST_INC=$optarg shift @@ -228,7 +222,6 @@ echo EX_QTDIR=$EX_QTDIR echo QC_ENABLE_DEBUG=$QC_ENABLE_DEBUG echo QC_DISABLE_GUI=$QC_DISABLE_GUI echo QC_DISABLE_qt_dbus=$QC_DISABLE_qt_dbus -echo QC_DISABLE_qt_svg=$QC_DISABLE_qt_svg echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC echo QC_WITH_LIBBOOST_LIB=$QC_WITH_LIBBOOST_LIB echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify @@ -401,38 +394,6 @@ public: return false; } }; -#line 1 "qt-svg.qcm" -/* ------BEGIN QCMOD----- -name: qt-svg ------END QCMOD----- -*/ -// see Conf::findPkgConfig -class qc_qt_svg : public ConfObj -{ -public: - qc_qt_svg(Conf *c) : ConfObj(c) {} - QString name() const { return "QtSvg >= 4.5"; } - QString shortname() const { return "qt-svg"; } - QString checkString() const { - if(!conf->getenv("QC_DISABLE_qt_svg").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) - return ""; - return ConfObj::checkString(); - } - bool exec(){ - if(!conf->getenv("QC_DISABLE_qt_svg").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) - return false; - QStringList incs; - QString req_ver = "4.5.0"; - QString version, libs, other; - VersionMode mode = VersionMin; - if(conf->findPkgConfig("QtSvg", mode, req_ver, &version, &incs, &libs, &other)) { - conf->addExtra("CONFIG += svg"); - return true; - } - return false; - } -}; #line 1 "pkg-config.qcm" /* -----BEGIN QCMOD----- @@ -726,9 +687,6 @@ cat >$1/modules_new.cpp <required = false; o->disabled = false; - o = new qc_qt_svg(conf); - o->required = false; - o->disabled = false; o = new qc_pkg_config(conf); o->required = true; o->disabled = false; @@ -1695,7 +1653,6 @@ export EX_QTDIR export QC_ENABLE_DEBUG export QC_DISABLE_GUI export QC_DISABLE_qt_dbus -export QC_DISABLE_qt_svg export QC_WITH_LIBBOOST_INC export QC_WITH_LIBBOOST_LIB export QC_DISABLE_libnotify diff --git a/qbittorrent.qc b/qbittorrent.qc index 88d46d1d0..59726552b 100644 --- a/qbittorrent.qc +++ b/qbittorrent.qc @@ -8,8 +8,6 @@ - - diff --git a/src/Icons/skin/qbittorrent_mono_dark.png b/src/Icons/skin/qbittorrent_mono_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..0427fc94009be55907edb40a0841374e03db93a5 GIT binary patch literal 1495 zcmV;|1t|K7P)Ez6#xJL8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H11yo5yK~zYIrI%}nRaF$n|7+cQXXczcQ&eV|A_aXgp(m9+sid@` zOiM!OO9V*;hS8TuBBP|pf`JOmh$sk(j8LdFilB#PVlNp`FF6*5jnOd9J$v7|d!KXu zeQ2L)I^G#aT(H^athM&~?Z-NIuPY=m4Ur^Cu2fGtf5Wr!Qo8mZr5x~(C23u?I1kf)cX957pqX0Go z_=V)bJkNhu)vijVG6TTbd7du>aGQwqg%CqomOati+xuZh0LgNTjWKUnYe%iMqsEvW z*4kx*gM&RCeE-)PjYhXIW{EN8#|h)#CRr`}mIrH+B=3g-!^W7W1_lPYrh>KG?fKsO zTS=ZeaRRMY>q%qGUm@1(BxO>tF=m~$b~H(nA#3e|C*bFYO28gb5j84_tjhvYiwoU_ik_ndR@ zI_H|sIp1!#R|Mb481t*OcC^`S-dGipYr~Ac0+0jf1F#7|O7i-yuC4(9aL&CZBHv80 z#b*Gxp;oKy0s!y*WdOcW)t3N#1fV4%+X39As`In}ll(Sp@s$AP0(h%{0zg++*B+7^ zrvPs(pa4*-)qVi*4$0Zhxw`{ne^}%^&GY=6@Uk};FADva<;beKWiqOWd|cL%+!h|^ z2cP{xKTlP)$k;6O7Y4{sIZ&FWhb9AOS@wH}$s7v(c>&l6rg;jW5|nunzZh2z)YH>5 zHW^q|`#PyZZvY_A^VYb5WC8${O6Bx0y92>#Rym6I{uo^$B{PD@CBJ!|vZXBMb=|TW20PLw$DqDm4>fk$ACHb9*0KiR2lFaPw?L8tQkCOb9 zi5UBY6h^CnAsG-%=#UyVBuoJ*_)oS$%05HbfBO-ky z8&MSP07+PDmxT-aAjx{^UagU=kc9XC#_~^Qho&U|S3Hc2jGShz-508o)#LYZ6h&J| z9uSe!jWMs37Ul8ZH$EN70l0~ZTCLU(U>3<=qbS-4{P&$@03IaiRdul=qA|`5ewiq0H3Mqww|7zW3IIcons/skin/slider-area.gif Icons/skin/stalledDL.png Icons/skin/error.png + Icons/skin/qbittorrent_mono_dark.png Icons/skin/handle-icon-horizontal.gif Icons/skin/qbittorrent32.png Icons/skin/knob.gif @@ -34,7 +35,6 @@ Icons/skin/firewalled.png Icons/skin/downloading.png Icons/skin/toolbox-divider.gif - Icons/skin/qbittorrent_mono.svg Icons/skin/stalledUP.png Icons/skin/filteractive.png Icons/skin/bg-handle-horizontal.gif diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8ee6e6feb..96319ed30 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1349,9 +1349,9 @@ void MainWindow::checkForActiveTorrents() QIcon MainWindow::getSystrayIcon() const { -#if defined(Q_WS_X11) && defined(QT_SVG_LIB) +#if defined(Q_WS_X11) if(Preferences().useMonochromeTrayIcon()) { - return QIcon(":/Icons/skin/qbittorrent_mono.svg"); + return QIcon(":/Icons/skin/qbittorrent_mono_dark.png"); } #endif QIcon icon; diff --git a/src/preferences/options_imp.cpp b/src/preferences/options_imp.cpp index 363cfa86d..d669248ad 100644 --- a/src/preferences/options_imp.cpp +++ b/src/preferences/options_imp.cpp @@ -106,7 +106,7 @@ options_imp::options_imp(QWidget *parent): checkShowSystray->setChecked(false); checkShowSystray->setEnabled(false); } -#if !defined(Q_WS_X11) || !defined(QT_SVG_LIB) +#if !defined(Q_WS_X11) checkUseMonoSystrayIcon->setVisible(false); #endif // Connect signals / slots diff --git a/src/update_qrc_files.py b/src/update_qrc_files.py index 20ebfbd62..fe6fae412 100755 --- a/src/update_qrc_files.py +++ b/src/update_qrc_files.py @@ -71,7 +71,7 @@ for root, dirs, files in os.walk('Icons'): if 'skin_unused' in dirs: dirs.remove('skin_unused') for file in files: - if splitext(file)[-1] in ('.png', '.jpg', '.gif', '.svg'): + if splitext(file)[-1] in ('.png', '.jpg', '.gif'): icons_list.append(join(root, file)) output = ''' diff --git a/unixconf.pri b/unixconf.pri index 940d3377d..57c940dd5 100644 --- a/unixconf.pri +++ b/unixconf.pri @@ -5,9 +5,7 @@ include(conf.pri) !nox:dbus { QT += dbus } -!nox:svg { - QT += svg -} + QMAKE_LFLAGS_APP += -rdynamic CONFIG += link_pkgconfig PKGCONFIG += libtorrent-rasterbar