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
a8279d49
Commit
a8279d49
authored
Oct 11, 2020
by
Pushkar Kukde
Browse files
Fixed titlewidget.cpp again
parents
f8af6b85
4f51bc3e
Changes
27
Hide whitespace changes
Inline
Side-by-side
data/kdenlive.notifyrc
View file @
a8279d49
...
...
@@ -390,7 +390,7 @@ Name[tr]=Hata
Name[ug]=خاتالىق
Name[uk]=Помилка
Name[x-test]=xxErrorxx
Name[zh_CN]=误
差
Name[zh_CN]=
错
误
Name[zh_TW]=錯誤
Comment=An error occurred in Kdenlive
Comment[ar]=حدث خطأ في «كدينلايڤ»
...
...
data/org.kde.kdenlive.appdata.xml
View file @
a8279d49
...
...
@@ -292,6 +292,8 @@
</artifact>
</artifacts>
</release>
<release
version=
"20.08.0"
date=
"2020-08-13"
/>
<release
date=
"2020-04-15"
version=
"20.07.70"
/>
</releases>
<url
type=
"homepage"
>
https://kdenlive.org/
</url>
<url
type=
"bugtracker"
>
https://bugs.kde.org
</url>
...
...
src/assets/assetlist/view/assetlistwidget.hpp
View file @
a8279d49
...
...
@@ -54,6 +54,7 @@ public:
/* @brief Delete a custom effect */
void
deleteCustomEffect
(
const
QModelIndex
&
index
);
virtual
void
reloadCustomEffectIx
(
const
QModelIndex
&
index
)
=
0
;
/* @brief Returns the description of the asset given its model index */
QString
getDescription
(
bool
isEffect
,
const
QModelIndex
&
index
)
const
;
...
...
src/assets/assetlist/view/qml/assetList.qml
View file @
a8279d49
...
...
@@ -283,9 +283,10 @@ Rectangle {
sel
.
setCurrentIndex
(
styleData
.
index
,
ItemSelectionModel
.
ClearAndSelect
)
if
(
mouse
.
button
===
Qt
.
LeftButton
)
{
drag
.
target
=
parent
parent
.
grabToImage
(
function
(
result
)
{
// grabToImage does not work on QQuickWidget from AssetListWidget. We should use QQuickView + QWidget::createWindowContainer
/*parent.grabToImage(function(result) {
parent.Drag.imageSource = result.url
})
})
*/
}
else
{
drag
.
target
=
undefined
assetContextMenu
.
isItemFavorite
=
assetThumb
.
isFavorite
...
...
@@ -329,6 +330,14 @@ Rectangle {
assetlist
.
deleteCustomEffect
(
sel
.
currentIndex
)
}
}
MenuItem
{
id
:
reloadMenu
text
:
i18n
(
"
Reload custom effect
"
)
visible
:
isEffectList
&&
assetContextMenu
.
isCustom
onTriggered
:
{
assetlist
.
reloadCustomEffectIx
(
sel
.
currentIndex
)
}
}
}
TableViewColumn
{
role
:
"
identifier
"
;
title
:
i18n
(
"
Name
"
);
}
...
...
src/assets/keyframes/view/keyframeview.cpp
View file @
a8279d49
...
...
@@ -25,6 +25,7 @@
#include
<QMouseEvent>
#include
<QApplication>
#include
<QStylePainter>
#include
<QtMath>
#include
<KColorScheme>
#include
<QFontDatabase>
...
...
@@ -414,8 +415,8 @@ void KeyframeView::paintEvent(QPaintEvent *event)
int
headOffset
=
m_lineHeight
/
2
;
int
offset
=
pCore
->
getItemIn
(
m_model
->
getOwnerId
());
m_zoomStart
=
m_zoomHandle
.
x
()
*
maxWidth
;
double
zoomEnd
=
m_zoomHandle
.
y
()
*
maxWidth
;
m_zoomFactor
=
maxWidth
/
(
zoomEnd
-
m_zoomStart
);
m_zoomFactor
=
maxWidth
/
(
m_zoomHandle
.
y
()
*
maxWidth
-
m_zoomStart
)
;
int
zoomEnd
=
qCeil
(
m_zoomHandle
.
y
()
*
maxWidth
);
/* ticks */
double
fps
=
pCore
->
getCurrentFps
();
int
displayedLength
=
m_duration
/
m_zoomFactor
/
fps
;
...
...
@@ -470,15 +471,15 @@ void KeyframeView::paintEvent(QPaintEvent *event)
for
(
const
auto
&
keyframe
:
*
m_model
.
get
())
{
int
pos
=
keyframe
.
first
.
frames
(
fps
)
-
offset
;
if
(
pos
<
0
)
continue
;
double
scaledPos
=
pos
*
m_scale
;
if
(
scaledPos
<
m_zoomStart
||
qFloor
(
scaledPos
)
>
zoomEnd
)
{
continue
;
}
if
(
pos
==
m_currentKeyframe
||
pos
==
m_hoverKeyframe
)
{
p
.
setBrush
(
m_colSelected
);
}
else
{
p
.
setBrush
(
m_colKeyframe
);
}
double
scaledPos
=
pos
*
m_scale
;
if
(
scaledPos
<
m_zoomStart
||
scaledPos
>
zoomEnd
)
{
continue
;
}
scaledPos
-=
m_zoomStart
;
scaledPos
*=
m_zoomFactor
;
scaledPos
+=
m_offset
;
...
...
@@ -515,7 +516,7 @@ void KeyframeView::paintEvent(QPaintEvent *event)
*/
if
(
m_position
>=
0
&&
m_position
<
m_duration
)
{
double
scaledPos
=
m_position
*
m_scale
;
if
(
scaledPos
>=
m_zoomStart
&&
scaledPos
<=
zoomEnd
)
{
if
(
scaledPos
>=
m_zoomStart
&&
qFloor
(
scaledPos
)
<=
zoomEnd
)
{
scaledPos
-=
m_zoomStart
;
scaledPos
*=
m_zoomFactor
;
scaledPos
+=
m_offset
;
...
...
src/assets/view/widgets/colorwheel.cpp
View file @
a8279d49
...
...
@@ -218,7 +218,11 @@ QSize WheelContainer::minimumSizeHint() const
void
WheelContainer
::
wheelEvent
(
QWheelEvent
*
event
)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
if
(
m_sliderRegion
.
contains
(
event
->
pos
()))
{
# else
if
(
m_sliderRegion
.
contains
(
event
->
position
().
toPoint
()))
{
#endif
double
y
=
m_color
.
valueF
();
if
(
event
->
modifiers
()
&
Qt
::
ShiftModifier
)
{
y
+=
event
->
angleDelta
().
y
()
>
0
?
0.002
:
-
0.002
;
...
...
src/bin/bin.cpp
View file @
a8279d49
...
...
@@ -1333,7 +1333,7 @@ bool Bin::eventFilter(QObject *obj, QEvent *event)
if
(
event
->
type
()
==
QEvent
::
Wheel
)
{
auto
*
e
=
static_cast
<
QWheelEvent
*>
(
event
);
if
((
e
!=
nullptr
)
&&
e
->
modifiers
()
==
Qt
::
ControlModifier
)
{
wheelAccumulatedDelta
+=
e
->
delta
();
wheelAccumulatedDelta
+=
e
->
angleDelta
().
y
();
if
(
abs
(
wheelAccumulatedDelta
)
>=
QWheelEvent
::
DefaultDeltasPerStep
)
{
slotZoomView
(
wheelAccumulatedDelta
>
0
);
}
...
...
src/dialogs/markerdialog.cpp
View file @
a8279d49
...
...
@@ -115,7 +115,11 @@ void MarkerDialog::slotUpdateThumb()
QImage
MarkerDialog
::
markerImage
()
const
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
return
clip_thumb
->
pixmap
()
->
toImage
();
#else
return
clip_thumb
->
pixmap
(
Qt
::
ReturnByValue
).
toImage
();
#endif
}
CommentedTime
MarkerDialog
::
newMarker
()
...
...
src/dialogs/profilesdialog.cpp
View file @
a8279d49
...
...
@@ -72,7 +72,7 @@ ProfilesDialog::ProfilesDialog(const QString &profileDescription, QWidget *paren
void
ProfilesDialog
::
connectDialog
()
{
connect
(
m_view
.
profiles_list
,
static_cast
<
void
(
QComboBox
::*
)(
const
QString
&
)
>
(
&
QComboBox
::
currentIndexChanged
),
this
,
[
&
]()
{
slotUpdateDisplay
();
});
connect
(
m_view
.
profiles_list
,
static_cast
<
void
(
QComboBox
::*
)(
int
)
>
(
&
QComboBox
::
currentIndexChanged
),
this
,
[
&
](
int
ix
)
{
slotUpdateDisplay
(
m_view
.
profiles_list
->
itemText
(
ix
)
);
});
connect
(
m_view
.
button_create
,
&
QAbstractButton
::
clicked
,
this
,
&
ProfilesDialog
::
slotCreateProfile
);
connect
(
m_view
.
button_save
,
&
QAbstractButton
::
clicked
,
this
,
&
ProfilesDialog
::
slotSaveProfile
);
connect
(
m_view
.
button_delete
,
&
QAbstractButton
::
clicked
,
this
,
&
ProfilesDialog
::
slotDeleteProfile
);
...
...
src/dialogs/renderwidget.cpp
View file @
a8279d49
...
...
@@ -1214,7 +1214,7 @@ void RenderWidget::prepareRendering(bool delayedRendering, const QString &chapte
in
=
pMon
->
getZoneStart
();
out
=
pMon
->
getZoneEnd
()
-
1
;
}
else
{
out
=
pCore
->
projectDuration
()
-
2
;
out
=
pCore
->
projectDuration
()
-
1
;
}
QString
playlistContent
=
pCore
->
projectManager
()
->
projectSceneList
(
project
->
url
().
adjusted
(
QUrl
::
RemoveFilename
|
QUrl
::
StripTrailingSlash
).
toLocalFile
());
...
...
src/dvdwizard/dvdwizardmenu.cpp
View file @
a8279d49
...
...
@@ -412,9 +412,9 @@ void DvdWizardMenu::changeProfile(DVDFORMAT format)
void
DvdWizardMenu
::
updatePreview
()
{
m_scene
->
setProfile
(
m_width
,
m_height
);
Q
Matrix
matrix
;
Q
Transform
matrix
;
matrix
.
scale
(
0.5
,
0.5
);
m_view
.
menu_preview
->
set
Matrix
(
matrix
);
m_view
.
menu_preview
->
set
Transform
(
matrix
);
m_view
.
menu_preview
->
setMinimumSize
(
m_width
/
2
+
4
,
m_height
/
2
+
8
);
if
(
m_color
)
{
...
...
src/effects/effectlist/model/effecttreemodel.cpp
View file @
a8279d49
...
...
@@ -113,6 +113,16 @@ std::shared_ptr<EffectTreeModel> EffectTreeModel::construct(const QString &categ
return
self
;
}
void
EffectTreeModel
::
reloadEffectFromIndex
(
const
QModelIndex
&
index
)
{
if
(
!
index
.
isValid
())
{
return
;
}
std
::
shared_ptr
<
TreeItem
>
item
=
getItemById
((
int
)
index
.
internalId
());
const
QString
path
=
EffectsRepository
::
get
()
->
getCustomPath
(
item
->
dataColumn
(
idCol
).
toString
());
reloadEffect
(
path
);
}
void
EffectTreeModel
::
reloadEffect
(
const
QString
&
path
)
{
QPair
<
QString
,
QString
>
asset
=
EffectsRepository
::
get
()
->
reloadCustom
(
path
);
...
...
src/effects/effectlist/model/effecttreemodel.hpp
View file @
a8279d49
...
...
@@ -38,6 +38,7 @@ protected:
public:
static
std
::
shared_ptr
<
EffectTreeModel
>
construct
(
const
QString
&
categoryFile
,
QObject
*
parent
);
void
reloadEffect
(
const
QString
&
path
);
void
reloadEffectFromIndex
(
const
QModelIndex
&
index
);
void
reloadAssetMenu
(
QMenu
*
effectsMenu
,
KActionCategory
*
effectActions
)
override
;
void
setFavorite
(
const
QModelIndex
&
index
,
bool
favorite
,
bool
isEffect
)
override
;
void
deleteEffect
(
const
QModelIndex
&
index
)
override
;
...
...
src/effects/effectlist/view/effectlistwidget.cpp
View file @
a8279d49
...
...
@@ -84,6 +84,13 @@ QString EffectListWidget::getMimeType(const QString &assetId) const
return
QStringLiteral
(
"kdenlive/effect"
);
}
void
EffectListWidget
::
reloadCustomEffectIx
(
const
QModelIndex
&
index
)
{
static_cast
<
EffectTreeModel
*>
(
m_model
.
get
())
->
reloadEffectFromIndex
(
m_proxyModel
->
mapToSource
(
index
));
m_proxyModel
->
sort
(
0
,
Qt
::
AscendingOrder
);
}
void
EffectListWidget
::
reloadCustomEffect
(
const
QString
&
path
)
{
static_cast
<
EffectTreeModel
*>
(
m_model
.
get
())
->
reloadEffect
(
path
);
...
...
src/effects/effectlist/view/effectlistwidget.hpp
View file @
a8279d49
...
...
@@ -47,6 +47,7 @@ public:
QString
getMimeType
(
const
QString
&
assetId
)
const
override
;
void
updateFavorite
(
const
QModelIndex
&
index
);
void
reloadEffectMenu
(
QMenu
*
effectsMenu
,
KActionCategory
*
effectActions
);
void
reloadCustomEffectIx
(
const
QModelIndex
&
index
)
override
;
public
slots
:
void
reloadCustomEffect
(
const
QString
&
path
);
...
...
@@ -72,6 +73,7 @@ public:
}
Q_INVOKABLE
QString
getName
(
const
QModelIndex
&
index
)
const
{
return
q
->
getName
(
index
);
}
Q_INVOKABLE
bool
isFavorite
(
const
QModelIndex
&
index
)
const
{
return
q
->
isFavorite
(
index
);
}
Q_INVOKABLE
void
reloadCustomEffectIx
(
const
QModelIndex
&
index
)
const
{
q
->
reloadCustomEffectIx
(
index
);
}
Q_INVOKABLE
void
setFavorite
(
const
QModelIndex
&
index
,
bool
favorite
)
const
{
q
->
setFavorite
(
index
,
favorite
,
true
);
...
...
src/effects/effectsrepository.cpp
View file @
a8279d49
...
...
@@ -231,6 +231,16 @@ bool EffectsRepository::hasInternalEffect(const QString &effectId) const
return
false
;
}
QString
EffectsRepository
::
getCustomPath
(
const
QString
&
id
)
{
QString
customAssetDir
=
QStandardPaths
::
locate
(
QStandardPaths
::
AppDataLocation
,
QStringLiteral
(
"effects"
),
QStandardPaths
::
LocateDirectory
);
QPair
<
QStringList
,
QStringList
>
results
;
QDir
current_dir
(
customAssetDir
);
qDebug
()
<<
"==== FETCHING CUSTOM PATH FOR ID: "
<<
id
;
return
current_dir
.
absoluteFilePath
(
QString
(
"%1.xml"
).
arg
(
id
));
}
QPair
<
QString
,
QString
>
EffectsRepository
::
reloadCustom
(
const
QString
&
path
)
{
std
::
unordered_map
<
QString
,
Info
>
customAssets
;
...
...
src/effects/effectsrepository.hpp
View file @
a8279d49
...
...
@@ -45,6 +45,7 @@ public:
/* @brief returns true if an effect exists in MLT (bypasses the blacklist/metadata parsing) */
bool
hasInternalEffect
(
const
QString
&
effectId
)
const
;
QPair
<
QString
,
QString
>
reloadCustom
(
const
QString
&
path
);
QString
getCustomPath
(
const
QString
&
id
);
/* @brief Returns whether this belongs to main effects */
bool
isPreferred
(
const
QString
&
effectId
)
const
;
...
...
src/jobs/audiothumbjob.cpp
View file @
a8279d49
...
...
@@ -217,6 +217,7 @@ bool AudioThumbJob::computeWithFFMPEG()
}
else
if
(
offset
>
250
)
{
intraOffset
=
offset
/
10
;
}
long
maxAudioLevel
=
1
;
if
(
!
m_successful
)
{
m_done
=
true
;
...
...
@@ -313,6 +314,12 @@ bool AudioThumbJob::startJob()
return
false
;
}
m_lengthInFrames
=
m_prod
->
get_length
();
// Multiply this if we want more than 1 sample per frame
if
(
m_lengthInFrames
==
INT_MAX
)
{
// This is a broken file or live feed, don't attempt to generate audio thumbnails
m_done
=
true
;
m_successful
=
false
;
return
false
;
}
m_frequency
=
m_binClip
->
audioInfo
()
->
samplingRate
();
m_frequency
=
m_frequency
<=
0
?
48000
:
m_frequency
;
...
...
src/jobs/loadjob.cpp
View file @
a8279d49
...
...
@@ -411,6 +411,32 @@ bool LoadJob::startJob()
m_errorMessage
.
append
(
i18n
(
"ERROR: Could not load clip %1: producer is invalid"
,
m_resource
));
return
false
;
}
if
(
m_producer
->
get_length
()
==
INT_MAX
&&
m_producer
->
get
(
"eof"
)
==
QLatin1String
(
"loop"
))
{
// This is a live source or broken clip
m_done
=
true
;
m_successful
=
false
;
if
(
m_producer
)
{
m_producer
.
reset
();
}
qDebug
()
<<
"=== MAX DURATION: "
<<
INT_MAX
<<
", DURATION: "
<<
(
INT_MAX
/
25
/
60
);
QMetaObject
::
invokeMethod
(
pCore
.
get
(),
"displayBinMessage"
,
Qt
::
QueuedConnection
,
Q_ARG
(
QString
,
i18n
(
"Cannot get duration for file %1"
,
m_resource
)),
Q_ARG
(
int
,
(
int
)
KMessageWidget
::
Warning
));
m_errorMessage
.
append
(
i18n
(
"ERROR: Could not load clip %1: producer is invalid"
,
m_resource
));
return
false
;
}
if
(
m_producer
->
get_length
()
==
INT_MAX
&&
m_producer
->
get
(
"eof"
)
==
QLatin1String
(
"loop"
))
{
// This is a live source or broken clip
m_done
=
true
;
m_successful
=
false
;
if
(
m_producer
)
{
m_producer
.
reset
();
}
qDebug
()
<<
"=== MAX DURATION: "
<<
INT_MAX
<<
", DURATION: "
<<
(
INT_MAX
/
25
/
60
);
QMetaObject
::
invokeMethod
(
pCore
.
get
(),
"displayBinMessage"
,
Qt
::
QueuedConnection
,
Q_ARG
(
QString
,
i18n
(
"Cannot get duration for file %1"
,
m_resource
)),
Q_ARG
(
int
,
(
int
)
KMessageWidget
::
Warning
));
m_errorMessage
.
append
(
i18n
(
"ERROR: Could not load clip %1: producer is invalid"
,
m_resource
));
return
false
;
}
processProducerProperties
(
m_producer
,
m_xml
);
QString
clipName
=
Xml
::
getXmlProperty
(
m_xml
,
QStringLiteral
(
"kdenlive:clipname"
));
if
(
clipName
.
isEmpty
())
{
...
...
src/jobs/proxyclipjob.cpp
View file @
a8279d49
...
...
@@ -189,7 +189,7 @@ bool ProxyJob::startJob()
if
(
exif
>
1
)
{
// Rotate image according to exif data
QImage
processed
;
Q
Matrix
matrix
;
Q
Transform
matrix
;
switch
(
exif
)
{
case
2
:
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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