From 744457710833170f53bb42755164bf01c0c78d17 Mon Sep 17 00:00:00 2001 From: APTX Date: Sun, 10 Jun 2012 21:15:48 +0200 Subject: [PATCH] Make it possible to start the udp client in management-gui. Fix opening episode/file. --- management-gui/mainwindow.cpp | 12 ++++++++---- management-gui/mainwindow.h | 2 ++ management-gui/mainwindow.ui | 7 +++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/management-gui/mainwindow.cpp b/management-gui/mainwindow.cpp index 1430309..640acc9 100644 --- a/management-gui/mainwindow.cpp +++ b/management-gui/mainwindow.cpp @@ -148,8 +148,7 @@ void MainWindow::on_myListView_openFileRequested(const QModelIndex &index) q.prepare( "SELECT fl.path FROM file f " " LEFT JOIN file_location fl ON fl.fid = f.fid " - " WHERE f.my_watched IS NULL " - " AND f.eid = :eid " + " WHERE f.eid = :eid " " AND fl.path IS NOT NULL " " ORDER BY f.version DESC "); q.bindValue(":eid", id); @@ -159,8 +158,7 @@ void MainWindow::on_myListView_openFileRequested(const QModelIndex &index) q.prepare( "SELECT fl.path FROM file f " " LEFT JOIN file_location fl ON fl.fid = f.fid " - " WHERE f.my_watched IS NULL " - " AND f.fid = :fid " + " WHERE f.fid = :fid " " AND fl.path IS NOT NULL "); q.bindValue(":fid", id); } @@ -187,3 +185,9 @@ void MainWindow::on_myListView_openFileRequested(const QModelIndex &index) ui->statusBar->showMessage(tr("Openieng file: %1").arg(path)); } + +void MainWindow::on_actionStartUDPCLient_triggered() +{ + MyList::instance()->setupUdpClient(); + MyList::instance()->setupRequestHandler(); +} diff --git a/management-gui/mainwindow.h b/management-gui/mainwindow.h index de85a11..9fb61d0 100644 --- a/management-gui/mainwindow.h +++ b/management-gui/mainwindow.h @@ -39,6 +39,8 @@ private slots: void on_actionHandlePendingRequests_triggered(); void on_myListView_openFileRequested(const QModelIndex &index); + void on_actionStartUDPCLient_triggered(); + private: Ui::MainWindow *ui; diff --git a/management-gui/mainwindow.ui b/management-gui/mainwindow.ui index aa9631d..2c9a408 100644 --- a/management-gui/mainwindow.ui +++ b/management-gui/mainwindow.ui @@ -36,6 +36,8 @@ + + @@ -127,6 +129,11 @@ Reset Pending Requests + + + Start UDP CLient + + -- 2.52.0