Skip to content

Commit

Permalink
Fix WebVfx filters on Windows and re-enable them.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Oct 11, 2014
1 parent 8c295bf commit 83fd465
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/docks/filtersdock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ static QActionList getFilters(FiltersDock* dock, Ui::FiltersDock* ui)
QQmlComponent component(&engine, subdir.absoluteFilePath(fileName));
QmlMetadata *meta = qobject_cast<QmlMetadata*>(component.create());
if (meta && (meta->isAudio() || (meta->needsGPU() == Settings.playerGPU()))) {
#ifdef Q_OS_WIN
if (meta->mlt_service() == "webvfx") {
delete meta;
continue;
}
#endif
// Check if mlt_service is available.
if (MLT.repository()->filters()->get_data(meta->mlt_service().toLatin1().constData())) {
qDebug() << "added filter" << meta->name();
Expand Down
13 changes: 13 additions & 0 deletions src/qmltypes/qmlfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ void QmlFile::setUrl(const QUrl& url)
QUrl::RemovePort |
QUrl::RemoveAuthority |
QUrl::RemoveQuery );

#ifdef Q_OS_WIN
QString s = adj.toString();
// If there is a slash before a drive letter.
// On Windows, file URLs look like file:///C:/Users/....
// The scheme is removed but only "://" (not 3 slashes) between scheme and path.
if (s.size() > 2 && s[0] == '/' && s[2] == ':') {
// Remove the leading slash.
s = s.right(s.size() - 1);
adj = QUrl(s);
}
#endif

if(m_url != adj) {
m_url = adj;
emit urlChanged(m_url);
Expand Down

0 comments on commit 83fd465

Please sign in to comment.