summaryrefslogtreecommitdiff
blob: a2921d541a28c9d855946823509d613b4e3b615c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Index: src/ui/addurldialog.h
===================================================================
--- old/src/ui/addurldialog.h	(revision 774)
+++ new/src/ui/addurldialog.h	(working copy)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2006-2008 by Ilya Kotov                                 *
+ *   Copyright (C) 2006-2009 by Ilya Kotov                                 *
  *   forkotov02@hotmail.ru                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -48,8 +48,7 @@
     virtual void accept();
 
 private slots:
-    void processResponse(int, bool);
-    void readResponse(const QHttpResponseHeader&);
+    void readResponse(bool);
 
 private:
     void setModel(PlayListModel*);
Index: src/ui/addurldialog.cpp
===================================================================
--- old/src/ui/addurldialog.cpp	(revision 774)
+++ new/src/ui/addurldialog.cpp	(working copy)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2006-2008 by Ilya Kotov                                 *
+ *   Copyright (C) 2006-2009 by Ilya Kotov                                 *
  *   forkotov02@hotmail.ru                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -39,9 +39,7 @@
     m_history = settings.value("URLDialog/history").toStringList();
     urlComboBox->addItems(m_history);
     m_http = new QHttp(this);
-    connect(m_http, SIGNAL(requestFinished (int, bool)), SLOT(processResponse(int, bool)));
-    connect(m_http, SIGNAL(readyRead (const QHttpResponseHeader&)),
-            SLOT(readResponse(const QHttpResponseHeader&)));
+    connect(m_http, SIGNAL(done (bool)), SLOT(readResponse(bool)));
 
     //use global proxy settings
     if (settings.value ("Proxy/use_proxy", FALSE).toBool())
@@ -104,23 +102,16 @@
     QDialog::accept();
 }
 
-void AddUrlDialog::processResponse(int, bool error)
+void AddUrlDialog::readResponse(bool error)
 {
     if (error)
-    {
         QMessageBox::critical (this, tr("Error"), m_http->errorString ());
-        QDialog::accept();
-    }
-}
-
-void AddUrlDialog::readResponse(const QHttpResponseHeader&)
-{
-    QString s = urlComboBox->currentText();
-    PlaylistFormat* prs = PlaylistParser::instance()->findByPath(s);
-    if (prs)
+    else
     {
-        m_model->addFiles(prs->decode(m_http->readAll()));
-        return;
+        QString s = urlComboBox->currentText();
+        PlaylistFormat* prs = PlaylistParser::instance()->findByPath(s);
+        if (prs)
+            m_model->addFiles(prs->decode(m_http->readAll()));
     }
     QDialog::accept();
 }