Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
9917df1a
Commit
9917df1a
authored
Apr 16, 2021
by
Julius Künzel
Committed by
Jean-Baptiste Mardelle
Apr 18, 2021
Browse files
remove unnecessary version checks for mlt 6 versions (new min is ver 7)
Related to
#991
parent
ad41a1c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
9917df1a
...
...
@@ -76,8 +76,6 @@
#include "dialogs/textbasededit.h"
#include "project/dialogs/temporarydata.h"
#include <framework/mlt_version.h>
#ifdef USE_JOGSHUTTLE
#include "jogshuttle/jogmanager.h"
#endif
...
...
@@ -105,7 +103,6 @@
#include <kns3/knewstuffaction.h>
#include <ktogglefullscreenaction.h>
#include <kwidgetsaddons_version.h>
#include <KRun>
#include "kdenlive_debug.h"
#include <QAction>
...
...
@@ -360,14 +357,9 @@ void MainWindow::init(const QString &mltPath)
auto
*
onlineResources
=
new
ResourceWidget
(
this
);
m_onlineResourcesDock
=
addDock
(
i18n
(
"Online Resources"
),
QStringLiteral
(
"onlineresources"
),
onlineResources
);
connect
(
onlineResources
,
&
ResourceWidget
::
previewClip
,
[
&
](
const
QString
&
path
,
const
QString
&
title
)
{
qDebug
()
<<
"MLT VER: "
<<
LIBMLT_VERSION_INT
<<
"; QTVER: "
<<
QT_VERSION_CHECK
(
6
,
26
,
0
);
#if LIBMLT_VERSION_INT == QT_VERSION_CHECK(6,26,0)
new
KRun
(
QUrl
(
path
),
this
);
#else
m_clipMonitor
->
slotPreviewResource
(
path
,
title
);
m_clipMonitorDock
->
show
();
m_clipMonitorDock
->
raise
();
#endif
});
connect
(
onlineResources
,
&
ResourceWidget
::
addClip
,
this
,
&
MainWindow
::
slotAddProjectClip
);
...
...
@@ -1461,7 +1453,6 @@ void MainWindow::setupActions()
overlayAudioInfo
->
setEnabled
(
toggled
);
});
#if LIBMLT_VERSION_INT >= QT_VERSION_CHECK(6,20,0)
// Monitor resolution scaling
KActionCategory
*
resolutionActionCategory
=
new
KActionCategory
(
i18n
(
"Preview Resolution"
),
actionCollection
());
m_scaleGroup
=
new
QActionGroup
(
this
);
...
...
@@ -1513,7 +1504,6 @@ void MainWindow::setupActions()
// Clear timeline selection so that any qml monitor scene is reset
emit
pCore
->
monitorManager
()
->
updatePreviewScaling
();
});
#endif
QAction
*
dropFrames
=
new
QAction
(
QIcon
(),
i18n
(
"Real Time (drop frames)"
),
this
);
dropFrames
->
setCheckable
(
true
);
...
...
src/monitor/glwidget.cpp
View file @
9917df1a
...
...
@@ -1844,7 +1844,6 @@ void GLWidget::setConsumerProperty(const QString &name, const QString &value)
bool
GLWidget
::
updateScaling
()
{
#if LIBMLT_VERSION_INT >= QT_VERSION_CHECK(6,20,0)
int
previewHeight
=
pCore
->
getCurrentFrameSize
().
height
();
switch
(
KdenliveSettings
::
previewScaling
())
{
case
2
:
...
...
@@ -1876,21 +1875,6 @@ bool GLWidget::updateScaling()
m_consumer
->
set
(
"height"
,
m_profileSize
.
height
());
resizeGL
(
width
(),
height
());
}
#else
int
previewHeight
=
pCore
->
getCurrentFrameSize
().
height
();
int
pWidth
=
previewHeight
*
pCore
->
getCurrentDar
()
/
pCore
->
getCurrentSar
();
if
(
pWidth
%
2
>
0
)
{
pWidth
++
;
}
QSize
profileSize
(
pWidth
,
previewHeight
);
if
(
profileSize
==
m_profileSize
)
{
return
false
;
}
m_profileSize
=
profileSize
;
if
(
m_consumer
)
{
resizeGL
(
width
(),
height
());
}
#endif
return
true
;
}
...
...
src/titler/titlewidget.cpp
View file @
9917df1a
...
...
@@ -195,16 +195,6 @@ TitleWidget::TitleWidget(const QUrl &url, QString projectTitlePath, Monitor *mon
connect
(
tw_rd_line
,
&
QRadioButton
::
toggled
,
this
,
&
TitleWidget
::
slotUpdateTW
);
connect
(
tw_rd_custom
,
&
QRadioButton
::
toggled
,
this
,
&
TitleWidget
::
slotUpdateTW
);
tw_rd_custom
->
setEnabled
(
false
);
if
(
mlt_version_get_int
()
<
0x061900
)
{
typewriterBox
->
setEnabled
(
false
);
auto
*
twinfo
=
new
KMessageWidget
(
typewriterBox
);
twinfo
->
setText
(
i18n
(
"Typewriter requires MLT-6.26.0 or newer."
));
twinfo
->
setMessageType
(
KMessageWidget
::
Warning
);
twinfo
->
setCloseButtonVisible
(
false
);
twinfo
->
setEnabled
(
true
);
gridLayout_12
->
addWidget
(
twinfo
,
3
,
0
,
1
,
4
);
}
connect
(
fontColorButton
,
&
KColorButton
::
changed
,
this
,
&
TitleWidget
::
slotUpdateText
);
connect
(
plain_color
,
&
QAbstractButton
::
clicked
,
this
,
&
TitleWidget
::
slotUpdateText
);
...
...
@@ -411,9 +401,6 @@ TitleWidget::TitleWidget(const QUrl &url, QString projectTitlePath, Monitor *mon
m_buttonEllipse
->
setShortcut
(
Qt
::
ALT
+
Qt
::
Key_E
);
m_buttonEllipse
->
setToolTip
(
i18n
(
"Add Ellipse"
)
+
QLatin1Char
(
' '
)
+
m_buttonEllipse
->
shortcut
().
toString
());
connect
(
m_buttonEllipse
,
&
QAction
::
triggered
,
this
,
&
TitleWidget
::
slotEllipseTool
);
if
(
mlt_version_get_int
()
<
0x061900
)
{
m_buttonEllipse
->
setVisible
(
false
);
}
m_buttonImage
=
m_toolbar
->
addAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"insert-image"
)),
i18n
(
"Add Image"
));
m_buttonImage
->
setCheckable
(
false
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment