Skip to content

Commit

Permalink
Get rid of QtSVG dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Dumez committed Mar 26, 2011
1 parent a24dc14 commit 93a8465
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 53 deletions.
43 changes: 0 additions & 43 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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-----
Expand Down Expand Up @@ -726,9 +687,6 @@ cat >$1/modules_new.cpp <<EOT
o = new qc_qt_dbus(conf);
o->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;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions qbittorrent.qc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
</dep>
<dep type='qt-dbus'>
</dep>
<dep type='qt-svg'>
</dep>
<dep type='pkg-config'>
<required/>
</dep>
Expand Down
Binary file added src/Icons/skin/qbittorrent_mono_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<file>Icons/skin/slider-area.gif</file>
<file>Icons/skin/stalledDL.png</file>
<file>Icons/skin/error.png</file>
<file>Icons/skin/qbittorrent_mono_dark.png</file>
<file>Icons/skin/handle-icon-horizontal.gif</file>
<file>Icons/skin/qbittorrent32.png</file>
<file>Icons/skin/knob.gif</file>
Expand All @@ -34,7 +35,6 @@
<file>Icons/skin/firewalled.png</file>
<file>Icons/skin/downloading.png</file>
<file>Icons/skin/toolbox-divider.gif</file>
<file>Icons/skin/qbittorrent_mono.svg</file>
<file>Icons/skin/stalledUP.png</file>
<file>Icons/skin/filteractive.png</file>
<file>Icons/skin/bg-handle-horizontal.gif</file>
Expand Down
4 changes: 2 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/preferences/options_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/update_qrc_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
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 = '''<!DOCTYPE RCC><RCC version="1.0">
Expand Down
4 changes: 1 addition & 3 deletions unixconf.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93a8465

Please sign in to comment.