Skip to content

Commit

Permalink
Added --enable-debug switch to the configure script and remove relate…
Browse files Browse the repository at this point in the history
…d code from the project file
  • Loading branch information
Christophe Dumez committed Jan 1, 2011
1 parent b9afd63 commit 2b179a5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
16 changes: 15 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Dependency options:
--disable-gui Disable qBittorrent
Graphical user interface for
headless running
--enable-debug Enable debug mode
--with-libboost-inc=[path] Path to libboost include
files
--with-libboost-lib=[path] Path to libboost library
Expand Down Expand Up @@ -158,6 +159,11 @@ while [ $# -gt 0 ]; do
shift
;;

--enable-debug)
QC_ENABLE_DEBUG="Y"
shift
;;

--with-libboost-inc=*)
QC_WITH_LIBBOOST_INC=$optarg
shift
Expand Down Expand Up @@ -215,6 +221,7 @@ echo BINDIR=$BINDIR
echo DATADIR=$DATADIR
echo EX_QTDIR=$EX_QTDIR
echo QC_DISABLE_GUI=$QC_DISABLE_GUI
echo QC_ENABLE_DEBUG=$QC_ENABLE_DEBUG
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 @@ -328,6 +335,7 @@ cat >$1/modules.cpp <<EOT
-----BEGIN QCMOD-----
name: Qt >= 4.5
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
arg: enable-debug, Enable debug mode
-----END QCMOD-----
*/
class qc_qt4 : public ConfObj
Expand All @@ -338,9 +346,14 @@ public:
QString shortname() const { return "Qt 4.5"; }
bool exec()
{
// NOX mode
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
conf->addExtra("CONFIG += nox");
}
}
// Debug mode
if(!conf->getenv("QC_ENABLE_DEBUG").isEmpty()) {
conf->addExtra("CONFIG += debug");
}
return(QT_VERSION >= 0x040500);
}
};
Expand Down Expand Up @@ -1604,6 +1617,7 @@ export BINDIR
export DATADIR
export EX_QTDIR
export QC_DISABLE_GUI
export QC_ENABLE_DEBUG
export QC_WITH_LIBBOOST_INC
export QC_WITH_LIBBOOST_LIB
export QC_DISABLE_libnotify
Expand Down
8 changes: 7 additions & 1 deletion qcm/qt4.qcm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-----BEGIN QCMOD-----
name: Qt >= 4.5
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
arg: enable-debug, Enable debug mode
-----END QCMOD-----
*/
class qc_qt4 : public ConfObj
Expand All @@ -12,9 +13,14 @@ public:
QString shortname() const { return "Qt 4.5"; }
bool exec()
{
// NOX mode
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
conf->addExtra("CONFIG += nox");
}
}
// Debug mode
if(!conf->getenv("QC_ENABLE_DEBUG").isEmpty()) {
conf->addExtra("CONFIG += debug");
}
return(QT_VERSION >= 0x040500);
}
};
6 changes: 3 additions & 3 deletions src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ QT += network
LANG_PATH = lang
ICONS_PATH = Icons

# use "CONFIG -= debug" to disable debug
CONFIG += debug
#CONFIG += release
CONFIG(debug, debug|release):message(Project is built in DEBUG mode.)
CONFIG(release, debug|release):message(Project is built in RELEASE mode.)

# Disable debug output in release mode
!debug {
message(Disabling debug output.)
DEFINES += QT_NO_DEBUG_OUTPUT
}

Expand Down

0 comments on commit 2b179a5

Please sign in to comment.