Skip to content
GitLab
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
f6cf8896
Commit
f6cf8896
authored
Apr 24, 2017
by
Jean-Baptiste Mardelle
Browse files
Fix some double free on exit, remember display setting for asset info box
parent
ff4c122b
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/abstractmodel/abstracttreemodel.cpp
View file @
f6cf8896
...
...
@@ -24,8 +24,8 @@
AbstractTreeModel
::
AbstractTreeModel
(
QObject
*
parent
)
:
QAbstractItemModel
(
parent
)
,
rootItem
(
new
TreeItem
(
QList
<
QVariant
>
(),
this
))
{
rootItem
=
new
TreeItem
(
QList
<
QVariant
>
(),
this
);
}
AbstractTreeModel
::~
AbstractTreeModel
()
...
...
src/assets/assetlist/view/assetlistwidget.cpp
View file @
f6cf8896
...
...
@@ -21,6 +21,7 @@
#include
"assetlistwidget.hpp"
#include
"assets/assetlist/view/qmltypes/asseticonprovider.hpp"
#include
"kdenlivesettings.h"
#include
<KDeclarative/KDeclarative>
#include
<QQmlContext>
...
...
@@ -80,3 +81,14 @@ void AssetListWidget::activate(const QModelIndex &ix)
emit
activateAsset
(
data
);
}
bool
AssetListWidget
::
showDescription
()
const
{
return
KdenliveSettings
::
showeffectinfo
();
}
void
AssetListWidget
::
setShowDescription
(
bool
show
)
{
KdenliveSettings
::
setShoweffectinfo
(
show
);
emit
showDescriptionChanged
();
}
src/assets/assetlist/view/assetlistwidget.hpp
View file @
f6cf8896
...
...
@@ -35,6 +35,9 @@
class
AssetListWidget
:
public
QQuickWidget
{
Q_OBJECT
/* @brief Should the descriptive info box be displayed
*/
Q_PROPERTY
(
bool
showDescription
READ
showDescription
WRITE
setShowDescription
NOTIFY
showDescriptionChanged
)
public:
AssetListWidget
(
QWidget
*
parent
=
Q_NULLPTR
);
...
...
@@ -55,6 +58,8 @@ public:
Q_INVOKABLE
QVariantMap
getMimeData
(
const
QString
&
assetId
)
const
;
Q_INVOKABLE
void
activate
(
const
QModelIndex
&
ix
);
Q_INVOKABLE
bool
showDescription
()
const
;
Q_INVOKABLE
void
setShowDescription
(
bool
);
protected:
void
setup
();
...
...
@@ -64,6 +69,7 @@ protected:
signals:
void
activateAsset
(
const
QVariantMap
data
);
void
showDescriptionChanged
();
};
#endif
src/assets/assetlist/view/qml/assetList.qml
View file @
f6cf8896
...
...
@@ -142,13 +142,14 @@ Rectangle {
implicitHeight
:
40
iconName
:
"
help-about
"
checkable
:
true
checked
:
true
tooltip
:
i18n
(
'
Show/hide description of the
'
)
+
assetType
()
onCheckedChanged
:{
assetlist
.
showDescription
=
checked
if
(
!
checked
)
{
assetDescription
.
visible
=
false
}
}
Component.onCompleted
:
checked
=
assetlist
.
showDescription
}
}
...
...
src/bin/bin.cpp
View file @
f6cf8896
...
...
@@ -705,7 +705,7 @@ Bin::Bin(QWidget *parent)
m_propertiesPanel
=
new
QScrollArea
(
this
);
m_propertiesPanel
->
setFrameShape
(
QFrame
::
NoFrame
);
// Info widget for failed jobs, other errors
m_infoMessage
=
new
BinMessageWidget
;
m_infoMessage
=
new
BinMessageWidget
(
this
)
;
m_layout
->
addWidget
(
m_infoMessage
);
m_infoMessage
->
setCloseButtonVisible
(
false
);
connect
(
m_infoMessage
,
&
KMessageWidget
::
linkActivated
,
this
,
&
Bin
::
slotShowJobLog
);
...
...
@@ -723,8 +723,6 @@ Bin::~Bin()
m_proxyModel
->
selectionModel
()
->
blockSignals
(
true
);
setEnabled
(
false
);
abortOperations
();
delete
m_infoMessage
;
delete
m_propertiesPanel
;
}
QDockWidget
*
Bin
::
clipPropertiesDock
()
...
...
src/bin/projectitemmodel.cpp
View file @
f6cf8896
...
...
@@ -40,7 +40,6 @@ ProjectItemModel::ProjectItemModel(Bin *bin, QObject *parent)
ProjectItemModel
::~
ProjectItemModel
()
{
delete
rootItem
;
}
int
ProjectItemModel
::
mapToColumn
(
int
column
)
const
...
...
src/mainwindow.cpp
View file @
f6cf8896
...
...
@@ -206,7 +206,7 @@ void MainWindow::init()
new
RenderingAdaptor
(
this
);
QString
defaultProfile
=
KdenliveSettings
::
default_profile
();
KdenliveSettings
::
setCurrent_profile
(
defaultProfile
.
isEmpty
()
?
ProjectManager
::
getDefaultProjectFormat
()
:
defaultProfile
);
m_commandStack
=
new
QUndoGroup
(
this
);
m_commandStack
=
new
QUndoGroup
();
// If using a custom profile, make sure the file exists or fallback to default
if
(
KdenliveSettings
::
current_profile
().
startsWith
(
QLatin1Char
(
'/'
))
&&
!
QFile
::
exists
(
KdenliveSettings
::
current_profile
()))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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