Advertisement
tasuku

Untitled

Apr 27th, 2013
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.69 KB | None | 0 0
  1. diff --git a/opt/qneptunea/themedownloader.cpp b/opt/qneptunea/themedownloader.cpp
  2. index 7007cb0..03d7208 100644
  3. --- a/opt/qneptunea/themedownloader.cpp
  4. +++ b/opt/qneptunea/themedownloader.cpp
  5. @@ -149,6 +149,17 @@ void ThemeDownloader::Private::finished()
  6.          return;
  7.      }
  8.  
  9. +    int httpStatusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
  10. +    switch (httpStatusCode) {
  11. +    case 301:
  12. +    case 302:
  13. +        q->setRemoteUrl(reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toString());
  14. +        start();
  15. +        return;
  16. +    default:
  17. +        break;
  18. +    }
  19. +
  20.      QString qmlFile;
  21.      QDir dir(localPath);
  22.      QBuffer buffer;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement