diff options
author | Montel Laurent <laurent.montel@kdab.com> | 2012-12-05 11:43:14 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-05 13:27:27 +0100 |
commit | 422b8dd24ec99caed2a22735f53ffbef110a35ad (patch) | |
tree | c1bb1d7f8b4c4ab833534cf256a19dbf01a37f84 /examples/network | |
parent | 4d178743e496515566af740e9c2826a2cfe31874 (diff) | |
download | qtbase-422b8dd24ec99caed2a22735f53ffbef110a35ad.tar.gz |
Fix compile with -DQT_NO_DRAGANDDROP
Change-Id: Ic7b42ae164f913f270c8350c2de6ce35f0be8c2a
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'examples/network')
-rw-r--r-- | examples/network/torrent/mainwindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp index 1b10241f6e..b574429808 100644 --- a/examples/network/torrent/mainwindow.cpp +++ b/examples/network/torrent/mainwindow.cpp @@ -52,12 +52,14 @@ class TorrentView : public QTreeWidget public: TorrentView(QWidget *parent = 0); +#ifndef QT_NO_DRAGANDDROP signals: void fileDropped(const QString &fileName); protected: void dragMoveEvent(QDragMoveEvent *event); void dropEvent(QDropEvent *event); +#endif }; // TorrentViewDelegate is used to draw the progress bars. @@ -688,9 +690,12 @@ void MainWindow::closeEvent(QCloseEvent *) TorrentView::TorrentView(QWidget *parent) : QTreeWidget(parent) { +#ifndef QT_NO_DRAGANDDROP setAcceptDrops(true); +#endif } +#ifndef QT_NO_DRAGANDDROP void TorrentView::dragMoveEvent(QDragMoveEvent *event) { // Accept file actions with a '.torrent' extension. @@ -708,5 +713,6 @@ void TorrentView::dropEvent(QDropEvent *event) if (QFile::exists(fileName) && fileName.toLower().endsWith(".torrent")) emit fileDropped(fileName); } +#endif #include "mainwindow.moc" |