diff --git a/Changelog b/Changelog index 18f8d18eb..470c29c23 100644 --- a/Changelog +++ b/Changelog @@ -6,6 +6,7 @@ - FEATURE: Inhibit system sleep when torrents are active (Vladimir Golovnev) - FEATURE: Added option to bypass Web UI authentication for localhost - FEATURE: Added option to disable program exit confirmation + - BUGFIX: Fix compilation with namespaced Qt (Christian Kandeler) * Sun Jan 9 2011 - Christophe Dumez - v2.6.0 - FEATURE: Use system icons (Linux, Qt >= 4.6) diff --git a/src/downloadthread.h b/src/downloadthread.h index 887630ca2..3115c3588 100644 --- a/src/downloadthread.h +++ b/src/downloadthread.h @@ -36,7 +36,9 @@ #include #include +QT_BEGIN_NAMESPACE class QNetworkAccessManager; +QT_END_NAMESPACE class DownloadThread : public QObject { Q_OBJECT diff --git a/src/executionlog.h b/src/executionlog.h index 5ceb56725..bc51e27eb 100644 --- a/src/executionlog.h +++ b/src/executionlog.h @@ -3,9 +3,11 @@ #include +QT_BEGIN_NAMESPACE namespace Ui { class ExecutionLog; } +QT_END_NAMESPACE class ExecutionLog : public QWidget { diff --git a/src/lineedit/src/lineedit.h b/src/lineedit/src/lineedit.h index 73f351fca..a0b51959d 100644 --- a/src/lineedit/src/lineedit.h +++ b/src/lineedit/src/lineedit.h @@ -12,7 +12,9 @@ #include +QT_BEGIN_NAMESPACE class QToolButton; +QT_END_NAMESPACE class LineEdit : public QLineEdit { diff --git a/src/mainwindow.h b/src/mainwindow.h index fc335fc6a..a5b4712a7 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -38,18 +38,13 @@ #include "qtorrenthandle.h" class QBtSession; -class QTimer; class downloadFromURL; class SearchEngine; -class QCloseEvent; class RSSImp; -class QShortcut; class about; class options_imp; -class QTabWidget; class TransferListWidget; class TransferListFiltersWidget; -class QSplitter; class PropertiesWidget; class StatusBar; class consoleDlg; @@ -58,10 +53,18 @@ class TorrentCreatorDlg; class downloadFromURL; class HidableTabWidget; class LineEdit; -class QFileSystemWatcher; class ExecutionLog; class PowerManagement; +QT_BEGIN_NAMESPACE +class QCloseEvent; +class QFileSystemWatcher; +class QShortcut; +class QSplitter; +class QTabWidget; +class QTimer; +QT_END_NAMESPACE + class MainWindow : public QMainWindow, private Ui::MainWindow{ Q_OBJECT diff --git a/src/powermanagement/powermanagement_x11.h b/src/powermanagement/powermanagement_x11.h index ecd68506d..963d57581 100644 --- a/src/powermanagement/powermanagement_x11.h +++ b/src/powermanagement/powermanagement_x11.h @@ -33,7 +33,9 @@ #include +QT_BEGIN_NAMESPACE class QDBusPendingCallWatcher; +QT_END_NAMESPACE class PowerManagementInhibitor : public QObject { diff --git a/src/preferences/options_imp.h b/src/preferences/options_imp.h index 0e29334e2..f255242c5 100644 --- a/src/preferences/options_imp.h +++ b/src/preferences/options_imp.h @@ -37,9 +37,12 @@ // actions on double-click on torrents enum DoubleClickAction {TOGGLE_PAUSE, OPEN_DEST, NO_ACTION}; -class QCloseEvent; class AdvancedSettings; +QT_BEGIN_NAMESPACE +class QCloseEvent; +QT_END_NAMESPACE + class options_imp : public QDialog, private Ui_Preferences { Q_OBJECT private: diff --git a/src/previewselect.h b/src/previewselect.h index d67960cfd..998f4aa91 100644 --- a/src/previewselect.h +++ b/src/previewselect.h @@ -36,9 +36,12 @@ #include "ui_preview.h" #include "qtorrenthandle.h" -class QStandardItemModel; class PreviewListDelegate; +QT_BEGIN_NAMESPACE +class QStandardItemModel; +QT_END_NAMESPACE + class PreviewSelect: public QDialog, private Ui::preview { Q_OBJECT diff --git a/src/properties/peerlistwidget.h b/src/properties/peerlistwidget.h index 554dd5e4e..511699cf7 100644 --- a/src/properties/peerlistwidget.h +++ b/src/properties/peerlistwidget.h @@ -39,13 +39,16 @@ #include "qtorrenthandle.h" #include "misc.h" -class QStandardItemModel; -class QStandardItem; -class QSortFilterProxyModel; class PeerListDelegate; class ReverseResolution; class PropertiesWidget; +QT_BEGIN_NAMESPACE +class QSortFilterProxyModel; +class QStandardItem; +class QStandardItemModel; +QT_END_NAMESPACE + #include #if BOOST_VERSION < 103500 #include diff --git a/src/properties/propertieswidget.h b/src/properties/propertieswidget.h index acb63d9f2..9e656fbd3 100644 --- a/src/properties/propertieswidget.h +++ b/src/properties/propertieswidget.h @@ -37,10 +37,8 @@ class TransferListWidget; -class QTimer; class TorrentFilesFilterModel; class PropListDelegate; -class QAction; class torrent_file; class PeerListWidget; class TrackerList; @@ -50,6 +48,11 @@ class PieceAvailabilityBar; class PropTabBar; class LineEdit; +QT_BEGIN_NAMESPACE +class QAction; +class QTimer; +QT_END_NAMESPACE + class PropertiesWidget : public QWidget, private Ui::PropertiesWidget { Q_OBJECT Q_DISABLE_COPY(PropertiesWidget) diff --git a/src/properties/proptabbar.h b/src/properties/proptabbar.h index 9550512e4..23c1d3774 100644 --- a/src/properties/proptabbar.h +++ b/src/properties/proptabbar.h @@ -33,7 +33,9 @@ #include +QT_BEGIN_NAMESPACE class QButtonGroup; +QT_END_NAMESPACE class PropTabBar : public QHBoxLayout { diff --git a/src/qtlibtorrent/qbtsession.h b/src/qtlibtorrent/qbtsession.h index 35059efc3..0d748c92f 100644 --- a/src/qtlibtorrent/qbtsession.h +++ b/src/qtlibtorrent/qbtsession.h @@ -53,7 +53,6 @@ #define MAX_SAMPLES 20 class DownloadThread; -class QTimer; class FilterParserThread; class HttpServer; class BandwidthScheduler; diff --git a/src/qtlibtorrent/qtorrenthandle.h b/src/qtlibtorrent/qtorrenthandle.h index 9b9a8fdf7..6fc1dced7 100644 --- a/src/qtlibtorrent/qtorrenthandle.h +++ b/src/qtlibtorrent/qtorrenthandle.h @@ -36,7 +36,10 @@ #include #include + +QT_BEGIN_NAMESPACE class QStringList; +QT_END_NAMESPACE // A wrapper for torrent_handle in libtorrent // to interact well with Qt types diff --git a/src/rss/automatedrssdownloader.h b/src/rss/automatedrssdownloader.h index 1aefb4255..86e434701 100644 --- a/src/rss/automatedrssdownloader.h +++ b/src/rss/automatedrssdownloader.h @@ -34,12 +34,17 @@ #include #include "rssdownloadrule.h" +QT_BEGIN_NAMESPACE namespace Ui { class AutomatedRssDownloader; } +QT_END_NAMESPACE class RssDownloadRuleList; + +QT_BEGIN_NAMESPACE class QListWidgetItem; +QT_END_NAMESPACE class AutomatedRssDownloader : public QDialog { diff --git a/src/rss/cookiesdlg.h b/src/rss/cookiesdlg.h index 9f32c936c..3e7469973 100644 --- a/src/rss/cookiesdlg.h +++ b/src/rss/cookiesdlg.h @@ -33,9 +33,11 @@ #include +QT_BEGIN_NAMESPACE namespace Ui { class CookiesDlg; } +QT_END_NAMESPACE class CookiesDlg : public QDialog { diff --git a/src/rss/rss_imp.h b/src/rss/rss_imp.h index f03e45b1a..fc0aac51d 100644 --- a/src/rss/rss_imp.h +++ b/src/rss/rss_imp.h @@ -37,10 +37,13 @@ #include "ui_rss.h" class FeedListWidget; -class QTreeWidgetItem; class RssFolder; class RssManager; +QT_BEGIN_NAMESPACE +class QTreeWidgetItem; +QT_END_NAMESPACE + class RSSImp : public QWidget, public Ui::RSS { Q_OBJECT diff --git a/src/rss/rsssettingsdlg.h b/src/rss/rsssettingsdlg.h index 6027f0f6a..a4d88d177 100644 --- a/src/rss/rsssettingsdlg.h +++ b/src/rss/rsssettingsdlg.h @@ -33,9 +33,11 @@ #include +QT_BEGIN_NAMESPACE namespace Ui { class RssSettingsDlg; } +QT_END_NAMESPACE class RssSettingsDlg : public QDialog { diff --git a/src/searchengine/engineselectdlg.h b/src/searchengine/engineselectdlg.h index 1e61b54b7..31acdcd47 100644 --- a/src/searchengine/engineselectdlg.h +++ b/src/searchengine/engineselectdlg.h @@ -35,7 +35,10 @@ #include "supportedengines.h" class DownloadThread; + +QT_BEGIN_NAMESPACE class QDropEvent; +QT_END_NAMESPACE class engineSelectDlg : public QDialog, public Ui::engineSelect{ Q_OBJECT diff --git a/src/searchengine/searchengine.h b/src/searchengine/searchengine.h index 4c9e628f6..3b9629e6c 100644 --- a/src/searchengine/searchengine.h +++ b/src/searchengine/searchengine.h @@ -42,10 +42,13 @@ #include "supportedengines.h" class DownloadThread; -class QTimer; class SearchEngine; class MainWindow; +QT_BEGIN_NAMESPACE +class QTimer; +QT_END_NAMESPACE + class SearchEngine : public QWidget, public Ui::search_engine{ Q_OBJECT Q_DISABLE_COPY(SearchEngine) diff --git a/src/searchengine/searchtab.h b/src/searchengine/searchtab.h index 16f2dd781..dfc77c2e2 100644 --- a/src/searchengine/searchtab.h +++ b/src/searchengine/searchtab.h @@ -38,10 +38,13 @@ class SearchListDelegate; class SearchEngine; + +QT_BEGIN_NAMESPACE class QTreeView; class QHeaderView; class QStandardItemModel; class QSortFilterProxyModel; +QT_END_NAMESPACE class SearchTab: public QWidget, public Ui::search_engine { Q_OBJECT diff --git a/src/smtp.h b/src/smtp.h index a16e05585..8e3cbb456 100644 --- a/src/smtp.h +++ b/src/smtp.h @@ -16,9 +16,11 @@ #include #include +QT_BEGIN_NAMESPACE struct QTextStream; struct QTcpSocket; class QTextCodec; +QT_END_NAMESPACE class Smtp : public QObject { Q_OBJECT diff --git a/src/torrentimportdlg.h b/src/torrentimportdlg.h index bc59f58de..e8118b09e 100644 --- a/src/torrentimportdlg.h +++ b/src/torrentimportdlg.h @@ -36,9 +36,11 @@ #include #include +QT_BEGIN_NAMESPACE namespace Ui { class TorrentImportDlg; } +QT_END_NAMESPACE class QBtSession; diff --git a/src/transferlistwidget.h b/src/transferlistwidget.h index 0da2d83cf..80f55edbd 100644 --- a/src/transferlistwidget.h +++ b/src/transferlistwidget.h @@ -35,13 +35,16 @@ #include #include "qtorrenthandle.h" -class QStandardItemModel; -class QSortFilterProxyModel; class QBtSession; class TransferListDelegate; class MainWindow; class TorrentModel; +QT_BEGIN_NAMESPACE +class QSortFilterProxyModel; +class QStandardItemModel; +QT_END_NAMESPACE + enum TorrentFilter {FILTER_ALL, FILTER_DOWNLOADING, FILTER_COMPLETED, FILTER_PAUSED, FILTER_ACTIVE, FILTER_INACTIVE}; class TransferListWidget: public QTreeView { diff --git a/src/webui/httpconnection.h b/src/webui/httpconnection.h index e5878e80f..8c1f34dba 100644 --- a/src/webui/httpconnection.h +++ b/src/webui/httpconnection.h @@ -36,9 +36,12 @@ #include "httpresponsegenerator.h" #include -class QTcpSocket; class HttpServer; +QT_BEGIN_NAMESPACE +class QTcpSocket; +QT_END_NAMESPACE + class HttpConnection : public QObject { Q_OBJECT diff --git a/src/webui/httpserver.h b/src/webui/httpserver.h index d93dd00b7..b8886d67f 100644 --- a/src/webui/httpserver.h +++ b/src/webui/httpserver.h @@ -38,9 +38,12 @@ #include #include "preferences.h" -class QTimer; class EventManager; +QT_BEGIN_NAMESPACE +class QTimer; +QT_END_NAMESPACE + const int MAX_AUTH_FAILED_ATTEMPTS = 5; class HttpServer : public QTcpServer {