Skip to content

Commit

Permalink
Merge branch 'url_chunks' into 'mer-5.4'
Browse files Browse the repository at this point in the history
[qtwayland] Fix url getting broken on openUrl. Contributes to JB#46776

See merge request mer-core/qtwayland!18
  • Loading branch information
pvuorela committed Oct 15, 2019
2 parents af8ac71 + bea490a commit e312cf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/qwaylandwindowmanagerintegration.cpp
Expand Up @@ -134,13 +134,13 @@ QByteArray QWaylandWindowManagerIntegration::desktopEnvironment() const
void QWaylandWindowManagerIntegration::openUrl_helper(const QUrl &url)
{
if (isInitialized()) {
QByteArray data = url.toString().toUtf8();
QString data = url.toString();

static const int chunkSize = 128;
while (!data.isEmpty()) {
QByteArray chunk = data.left(chunkSize);
QString chunk = data.left(chunkSize);
data = data.mid(chunkSize);
open_url(!data.isEmpty(), QString::fromUtf8(chunk));
open_url(!data.isEmpty(), chunk);
}
}
}
Expand Down

0 comments on commit e312cf8

Please sign in to comment.