+ fix minor issue with url redirection
+ remove const reference
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user