1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 13:04:23 +00:00

- Added headlessloader class to prepare Fred's work

This commit is contained in:
Christophe Dumez 2009-12-15 11:08:22 +00:00
parent e2aaf5d1de
commit af166f53d3
3 changed files with 52 additions and 2 deletions

43
src/headlessloader.h Normal file
View File

@ -0,0 +1,43 @@
/*
* Bittorrent Client using Qt4 and libtorrent.
* Copyright (C) 2006 Christophe Dumez, Frédéric Lassabe
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Contact : chris@qbittorrent.org
*/
#ifndef HEADLESSLOADER_H
#define HEADLESSLOADER_H
#include <QObject>
class HeadlessLoader: QObject {
public:
HeadlessLoader() {
}
};
#endif

View File

@ -33,7 +33,7 @@
#include <QTranslator>
#include <QFile>
#ifndef DIABLE_GUI
#ifndef DISABLE_GUI
#include <QSplashScreen>
#include <QPlastiqueStyle>
#include "qgnomelook.h"
@ -47,6 +47,8 @@
#endif
#include "GUI.h"
#include "ico.h"
#else
#include "headlessloader.h"
#endif
#include <QSettings>
@ -231,11 +233,14 @@ int main(int argc, char *argv[]){
#else
// Load Headless class
// TODO: by Frederic Lassabe
HeadlessLoader *loader = new HeadlessLoader();
#endif
int ret = app->exec();
#ifndef DISABLE_GUI
delete window;
qDebug("GUI was deleted!");
#else
delete loader;
#endif
qDebug("Deleting app...");
delete app;

View File

@ -186,7 +186,9 @@ HEADERS += misc.h \
filesystemwatcher.h \
preferences.h
!contains(DEFINES, DISABLE_GUI) {
contains(DEFINES, DISABLE_GUI) {
HEADERS += headlessloader.h
} else {
FORMS += GUI.h \
feedList.h \
supportedengines.h \