Skip to content
Permalink
Browse files

Fix title from URLs not being picked up in connect dialog.

Fixing the connect dialog after the Qt 5 transition wasn't
done correctly. The QUrlQuery class for parsing the url was
instantiated before the url itself was extracted from the
mime data and hence was always empty. This probably slipped
by as the query data is only used for setting the name of
the server item from the '?title=' part of the url.
  • Loading branch information...
hacst committed May 7, 2015
1 parent b2282e7 commit 78d0db8d6abe6394cf0c7d65ac15f6f731a9be68
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/mumble/ConnectDialog.cpp
@@ -369,9 +369,6 @@ ServerItem *ServerItem::fromMimeData(const QMimeData *mime, QWidget *p) {
return NULL;

QUrl url;
#if QT_VERSION >= 0x050000
QUrlQuery query(url);
#endif
if (mime->hasUrls() && ! mime->urls().isEmpty())
url = mime->urls().at(0);
else if (mime->hasText())
@@ -395,6 +392,10 @@ ServerItem *ServerItem::fromMimeData(const QMimeData *mime, QWidget *p) {
}
}

#if QT_VERSION >= 0x050000
QUrlQuery query(url);
#endif

if (! url.isValid() || (url.scheme() != QLatin1String("mumble")))
return NULL;

0 comments on commit 78d0db8

Please sign in to comment.
You can’t perform that action at this time.