Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Use newer version of QUrl::fromUserInput, drop QRegExp hack

parent 3399935b
......@@ -144,13 +144,9 @@ int OktetaProgram::execute()
// take arguments
if( ! urls.isEmpty() )
{
const QRegExp withProtocolChecker( QStringLiteral("^[a-zA-Z]+:") );
const QString currentPath = QDir::currentPath();
foreach (const QString &url, urls) {
const QUrl u = (withProtocolChecker.indexIn(url) == 0) ?
QUrl::fromUserInput( url ) :
QUrl::fromLocalFile(QDir::current().absoluteFilePath(url));
mDocumentStrategy->load( u );
mDocumentStrategy->load( QUrl::fromUserInput(url, currentPath, QUrl::AssumeLocalFile) );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment