~ubuntu-branches/ubuntu/saucy/minitube/saucy

« back to all changes in this revision

Viewing changes to src/channelsuggest.cpp

  • Committer: Package Import Robot
  • Author(s): Jakob Haufe
  • Date: 2013-05-23 13:54:01 UTC
  • mfrom: (1.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20130523135401-wsbh1xtf71nkfvkt
Tags: 2.0-1
* New upstream version
* Switch from hardening-wrapper to buildflags.mk
* Refresh patches:
  - Drop gcc-4.7.patch, fixed upstream
  - Rebuild assure-quit-keybinding
  - Rebuild disable-update-check
* Update Standards-Version to 3.9.4
  - Add Vcs-* control fields
  - No further changes needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
    NetworkAccess* http();
6
6
}
7
7
 
8
 
ChannelSuggest::ChannelSuggest(QObject *parent) : Suggester() {
 
8
ChannelSuggest::ChannelSuggest(QObject *parent) : Suggester(parent) {
9
9
 
10
10
}
11
11
 
12
12
void ChannelSuggest::suggest(QString query) {
13
 
 
14
 
    /* // TODO how to localize results?
15
 
    QString locale = QLocale::system().name().replace("_", "-");
16
 
    // case for system locales such as "C"
17
 
    if (locale.length() < 2) {
18
 
        locale = "en-US";
19
 
    }*/
20
 
 
21
 
    QUrl url("http://www.youtube.com/results?search_type=search_users");
 
13
    QUrl url("http://www.youtube.com/results");
 
14
    url.addQueryItem("search_type", "search_users");
22
15
    url.addQueryItem("search_query", query);
23
 
    // url.addQueryItem("hl", "it-IT");
24
 
 
25
16
    QObject *reply = The::http()->get(url);
26
17
    connect(reply, SIGNAL(data(QByteArray)), SLOT(handleNetworkData(QByteArray)));
27
18
}