Skip to content

Commit

Permalink
+ fix minor issue with url redirection
Browse files Browse the repository at this point in the history
+ remove const reference
  • Loading branch information
wwmayer committed Mar 14, 2016
1 parent fadf2db commit 4f92f5c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Gui/CallTips.cpp
Expand Up @@ -685,7 +685,7 @@ void CallTipsList::callTipItemActivated(QListWidgetItem *item)
cursor.insertText( text );

// get CallTip from item's UserRole-data
const CallTip &callTip = item->data(Qt::UserRole).value<CallTip>();
CallTip callTip = item->data(Qt::UserRole).value<CallTip>();

// if call completion enabled and we've something callable (method or class constructor) ...
if (this->doCallCompletion
Expand Down
12 changes: 9 additions & 3 deletions src/Gui/DownloadManager.cpp
Expand Up @@ -116,9 +116,15 @@ QUrl DownloadManager::redirectUrl(const QUrl& url) const
if (url.host() == QLatin1String("www.dropbox.com")) {
QList< QPair<QString, QString> > query = url.queryItems();
for (QList< QPair<QString, QString> >::iterator it = query.begin(); it != query.end(); ++it) {
if (it->first == QLatin1String("dl") && it->second == QLatin1String("0\r\n")) {
redirectUrl.removeQueryItem(QLatin1String("dl"));
redirectUrl.addQueryItem(QLatin1String("dl"), QLatin1String("1\r\n"));
if (it->first == QLatin1String("dl")) {
if (it->second == QLatin1String("0\r\n")) {
redirectUrl.removeQueryItem(QLatin1String("dl"));
redirectUrl.addQueryItem(QLatin1String("dl"), QLatin1String("1\r\n"));
}
else if (it->second == QLatin1String("0")) {
redirectUrl.removeQueryItem(QLatin1String("dl"));
redirectUrl.addQueryItem(QLatin1String("dl"), QLatin1String("1"));
}
break;
}
}
Expand Down

0 comments on commit 4f92f5c

Please sign in to comment.