From 93938d8597fdb481be7cc2febb372eb0ae2639af Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 23 Jul 2007 12:46:36 +0000 Subject: [PATCH] - still optimizing includes --- src/FinishedTorrents.cpp | 1 + src/GUI.cpp | 8 +++++--- src/GUI.h | 10 +++++----- src/bittorrent.cpp | 10 ++++++++++ src/bittorrent.h | 18 +++--------------- src/properties_imp.cpp | 4 ++++ src/properties_imp.h | 8 ++++---- src/rss_imp.cpp | 7 ++++--- src/rss_imp.h | 5 +++-- 9 files changed, 39 insertions(+), 32 deletions(-) diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index 0507b73b2..9fea4eb9b 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -29,6 +29,7 @@ #include #include #include +#include FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession){ setupUi(this); diff --git a/src/GUI.cpp b/src/GUI.cpp index 92de49f8e..2ed569ef7 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -28,9 +28,7 @@ #include #include #include - -#include -#include +#include #include "GUI.h" #include "misc.h" @@ -45,6 +43,10 @@ #include "FinishedTorrents.h" #include "allocationDlg.h" #include "bittorrent.h" +#include "about_imp.h" +#include "trackerLogin.h" +#include "previewSelect.h" +#include "options_imp.h" /***************************************************** * * diff --git a/src/GUI.h b/src/GUI.h index ec2aed5fe..eb6c1d8ab 100644 --- a/src/GUI.h +++ b/src/GUI.h @@ -22,15 +22,11 @@ #ifndef GUI_H #define GUI_H -#include #include #include +#include #include "ui_MainWindow.h" -#include "options_imp.h" -#include "about_imp.h" -#include "previewSelect.h" -#include "trackerLogin.h" class bittorrent; class createtorrent; @@ -45,6 +41,10 @@ class QTcpSocket; class QCloseEvent; class RSSImp; class QShortcut; +class about; +class previewSelect; +class options_imp; +class QStandardItemModel; using namespace libtorrent; namespace fs = boost::filesystem; diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 2276c0330..f582fbddd 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -23,9 +23,19 @@ #include #include +#include +#include + +#include +#include +#include +#include +#include + #include "bittorrent.h" #include "misc.h" #include "downloadThread.h" +#include "deleteThread.h" #define ETAS_MAX_VALUES 8 diff --git a/src/bittorrent.h b/src/bittorrent.h index 239607b3c..79f3b1e85 100644 --- a/src/bittorrent.h +++ b/src/bittorrent.h @@ -23,27 +23,15 @@ #include #include +#include -#include -#include +#include #include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "deleteThread.h" using namespace libtorrent; class downloadThread; +class deleteThread; class bittorrent : public QObject{ Q_OBJECT diff --git a/src/properties_imp.cpp b/src/properties_imp.cpp index b03bc12da..a10bf5199 100644 --- a/src/properties_imp.cpp +++ b/src/properties_imp.cpp @@ -22,9 +22,13 @@ #include "properties_imp.h" #include "misc.h" #include "PropListDelegate.h" +#include "bittorrent.h" + #include #include #include +#include +#include // Constructor properties::properties(QWidget *parent, bittorrent *BTSession, torrent_handle &h, QStringList trackerErrors): QDialog(parent), h(h){ diff --git a/src/properties_imp.h b/src/properties_imp.h index 244073fb7..4767da661 100644 --- a/src/properties_imp.h +++ b/src/properties_imp.h @@ -23,12 +23,12 @@ #define PROPERTIES_H #include "ui_properties.h" -#include "bittorrent.h" -#include -#include -#include +#include class PropListDelegate; +class QTimer; +class bittorrent; +class QStandardItemModel; using namespace libtorrent; diff --git a/src/rss_imp.cpp b/src/rss_imp.cpp index a6a40ed4b..feca0da8c 100644 --- a/src/rss_imp.cpp +++ b/src/rss_imp.cpp @@ -25,7 +25,7 @@ #include #include #include -#include "misc.h" +#include // display a right-click menu void RSSImp::displayRSSListMenu(const QPoint& pos){ @@ -292,9 +292,10 @@ connect(actionRefresh, SIGNAL(triggered()), this, SLOT(refreshStream())); connect(actionCreate, SIGNAL(triggered()), this, SLOT(createStream())); connect(actionRefreshAll, SIGNAL(triggered()), this, SLOT(refreshAllStreams())); - connect(&refreshTimeTimer, SIGNAL(timeout()), this, SLOT(updateLastRefreshedTimeForStreams())); connect(&rssmanager, SIGNAL(streamNeedRefresh(const unsigned short&, const unsigned short&)), this, SLOT(updateStreamName(const unsigned short&, const unsigned short&))); - refreshTimeTimer.start(60000); // 1min + refreshTimeTimer = new QTimer(this); + connect(refreshTimeTimer, SIGNAL(timeout()), this, SLOT(updateLastRefreshedTimeForStreams())); + refreshTimeTimer->start(60000); // 1min refreshStreamList(); refreshTextBrowser(); qDebug("RSSImp constructed"); diff --git a/src/rss_imp.h b/src/rss_imp.h index c3c601d2c..d2a38882e 100644 --- a/src/rss_imp.h +++ b/src/rss_imp.h @@ -23,7 +23,6 @@ #define REFRESH_MAX_LATENCY 600000 -#include #include "ui_rss.h" #include "rss.h" @@ -31,12 +30,14 @@ #define URL_CHILD 1 #define TIME_CHILD 2 +class QTimer; + class RSSImp : public QWidget, public Ui::RSS{ Q_OBJECT private: RssManager rssmanager; - QTimer refreshTimeTimer; + QTimer *refreshTimeTimer; protected slots: void on_addStream_button_clicked();