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
f3283e22
Commit
f3283e22
authored
Jun 13, 2015
by
Jean-Baptiste Mardelle
Browse files
Fix several compile warnings
parent
4a99b141
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/definitions.h
View file @
f3283e22
...
...
@@ -156,8 +156,8 @@ public:
bool
isMute
;
bool
isBlind
;
bool
isLocked
;
EffectsList
effectsList
;
int
duration
;
EffectsList
effectsList
;
TrackInfo
()
:
type
(
VideoTrack
),
isMute
(
0
),
...
...
src/doc/kdenlivedoc.cpp
View file @
f3283e22
...
...
@@ -1112,7 +1112,7 @@ const QString KdenliveDoc::description() const
return
m_url
.
fileName
()
+
" [*]/ "
+
m_profile
.
description
;
}
bool
KdenliveDoc
::
addClip
(
QDomElement
elem
,
const
QString
&
clipId
,
bool
createClipItem
)
bool
KdenliveDoc
::
addClip
(
QDomElement
elem
,
const
QString
&
clipId
)
{
const
QString
producerId
=
clipId
.
section
(
'_'
,
0
,
0
);
elem
.
setAttribute
(
"id"
,
producerId
);
...
...
@@ -1192,12 +1192,7 @@ bool KdenliveDoc::addClip(QDomElement elem, const QString &clipId, bool createCl
clip = new DocClipBase(m_clipManager, elem, producerId);
m_clipManager->addClip(clip);
}
if (createClipItem) {
emit addProjectClip(clip);
}
*/
return
true
;
return true; */
}
void
KdenliveDoc
::
setNewClipResource
(
const
QString
&
id
,
const
QString
&
path
)
...
...
@@ -1259,9 +1254,10 @@ QString KdenliveDoc::searchFileRecursively(const QDir &dir, const QString &match
return
foundFileName
;
}
/*
bool KdenliveDoc::addClipInfo(QDomElement elem, QDomElement orig, const QString &clipId)
{
/*
DocClipBase *clip = m_clipManager->getClipById(clipId);
DocClipBase *clip = m_clipManager->getClipById(clipId);
if (clip == NULL) {
if (!addClip(elem, clipId, false))
return false;
...
...
@@ -1293,8 +1289,8 @@ bool KdenliveDoc::addClipInfo(QDomElement elem, QDomElement orig, const QString
clip->setMetadata(meta);
}
}
return true;
*/
}
return true;
}
*/
void
KdenliveDoc
::
deleteClip
(
const
QString
&
clipId
)
...
...
@@ -1967,10 +1963,10 @@ void KdenliveDoc::slotClipMissing(const QString &path)
{
qDebug
()
<<
"// CLIP: "
<<
path
<<
" WAS MISSING"
;
QStringList
ids
=
pCore
->
binController
()
->
getBinIdsByResource
(
QUrl
::
fromLocalFile
(
path
));
foreach
(
const
QString
&
id
,
ids
)
{
/
/TODO handle missing clips by replacing producer with an invalid producer
//
emit missingClip(id);
}
//TODO handle missing clips by replacing producer with an invalid producer
/
*foreach (const QString &id, ids) {
emit missingClip(id);
}
*/
}
void
KdenliveDoc
::
slotClipAvailable
(
const
QString
&
path
)
...
...
src/doc/kdenlivedoc.h
View file @
f3283e22
...
...
@@ -81,7 +81,7 @@ public:
/** @brief Adds a clip to the project tree.
* @return false if the user aborted the operation, true otherwise */
bool
addClip
(
QDomElement
elem
,
const
QString
&
clipId
,
bool
createClipItem
=
true
);
bool
addClip
(
QDomElement
elem
,
const
QString
&
clipId
);
/** @brief Updates information about a clip.
* @param elem the <kdenlive_producer />
...
...
@@ -91,7 +91,7 @@ public:
* there yet), true otherwise
*
* If the clip wasn't added before, it tries to add it to the project. */
bool
addClipInfo
(
QDomElement
elem
,
QDomElement
orig
,
const
QString
&
clipId
);
//
bool addClipInfo(QDomElement elem, QDomElement orig, const QString &clipId);
void
deleteClip
(
const
QString
&
clipId
);
int
getFramePos
(
const
QString
&
duration
);
/** @brief Get a bin's clip from its id. */
...
...
src/main.cpp
View file @
f3283e22
...
...
@@ -22,6 +22,7 @@
#include
"mainwindow.h"
#include
<KAboutData>
#include
<KMessageBox>
#include
<QDebug>
#include
<QUrl>
//new
...
...
@@ -97,18 +98,12 @@ int main(int argc, char *argv[])
MainWindow
*
window
=
0
;
// see if we are starting with session management
if
(
app
.
isSessionRestored
())
{
int
n
=
1
;
while
(
KMainWindow
::
canBeRestored
(
n
))
{
const
QString
className
=
KXmlGuiWindow
::
classNameOfToplevel
(
n
);
if
(
className
==
QLatin1String
(
"MainWindow"
))
{
window
=
new
MainWindow
();
window
->
restore
(
n
);
}
else
{
qWarning
()
<<
"Unknown class "
<<
className
<<
" in session saved data!"
;
}
++
n
;
}
if
(
qApp
->
isSessionRestored
()){
int
n
=
1
;
while
(
KMainWindow
::
canBeRestored
(
n
)){
(
new
MainWindow
())
->
restore
(
n
);
n
++
;
}
}
else
{
QString
clipsToLoad
=
parser
.
value
(
"i"
);
QString
mltPath
=
parser
.
value
(
"mlt-path"
);
...
...
src/mainwindow.cpp
View file @
f3283e22
...
...
@@ -552,7 +552,7 @@ bool MainWindow::queryClose()
}
// WARNING: According to KMainWindow::queryClose documentation we are not supposed to close the document here?
return
pCore
->
projectManager
()
->
closeCurrentDocument
();
return
pCore
->
projectManager
()
->
closeCurrentDocument
(
true
);
}
void
MainWindow
::
loadPlugins
()
...
...
@@ -628,29 +628,27 @@ void MainWindow::generateClip()
}
}
void
MainWindow
::
saveGlobalProperties
(
KConfigGroup
&
config
)
{
// save properties here, used by session management
pCore
->
projectManager
()
->
saveFile
();
}
void
MainWindow
::
saveProperties
(
KConfigGroup
&
config
)
{
// save properties here
KMainWindow
::
saveProperties
(
config
);
}
void
MainWindow
::
readGlobalProperties
(
const
KConfigGroup
&
config
)
{
// read properties here,used by session management
QString
Lastproject
=
config
.
group
(
"Recent Files"
).
readPathEntry
(
"File1"
,
QString
());
pCore
->
projectManager
()
->
openFile
(
QUrl
(
Lastproject
));
//TODO: fix session management
if
(
qApp
->
isSavingSession
())
{
if
(
pCore
->
projectManager
()
->
current
()
&&
!
pCore
->
projectManager
()
->
current
()
->
url
().
isEmpty
())
{
config
.
writeEntry
(
"kdenlive_lastUrl"
,
pCore
->
projectManager
()
->
current
()
->
url
().
path
());
}
}
}
void
MainWindow
::
readProperties
(
const
KConfigGroup
&
config
)
{
// read properties here
KMainWindow
::
readProperties
(
config
);
//TODO: fix session management
/*if (qApp->isSessionRestored()) {
pCore->projectManager()->openFile(QUrl::fromLocalFile(config.readEntry("kdenlive_lastUrl", QString())));
}*/
}
void
MainWindow
::
slotReloadEffects
()
...
...
@@ -1726,14 +1724,14 @@ void MainWindow::slotRestart()
QApplication
::
closeAllWindows
();
}
void
MainWindow
::
closeEvent
(
QCloseEvent
*
event
)
/*
void MainWindow::closeEvent(QCloseEvent* event)
{
KXmlGuiWindow::closeEvent(event);
if (event->isAccepted()) {
QApplication::exit(m_exitCode);
return;
}
}
}
*/
void
MainWindow
::
slotUpdateCaptureFolder
()
{
...
...
src/mainwindow.h
View file @
f3283e22
...
...
@@ -122,7 +122,7 @@ protected:
* the operation requested (starting waiting jobs or saving file) fails,
* true otherwise */
virtual
bool
queryClose
();
virtual
void
closeEvent
(
QCloseEvent
*
);
//
virtual void closeEvent(QCloseEvent*);
/** @brief Reports a message in the status bar when an error occurs. */
virtual
void
customEvent
(
QEvent
*
e
);
...
...
@@ -131,17 +131,11 @@ protected:
virtual
void
hideEvent
(
QHideEvent
*
e
);
/** @brief Saves the file and the window properties when saving the session. */
virtual
void
saveProperties
(
KConfigGroup
&
config
);
/** @brief Saves the file and the window properties when saving the session. */
virtual
void
saveGlobalProperties
(
KConfigGroup
&
config
);
virtual
void
saveProperties
(
KConfigGroup
&
config
);
/** @brief Restores the window and the file when a session is loaded. */
virtual
void
readProperties
(
const
KConfigGroup
&
config
);
/** @brief Restores the window and the file when a session is loaded. */
virtual
void
readGlobalProperties
(
const
KConfigGroup
&
config
);
private:
QProgressBar
*
m_statusProgressBar
;
...
...
src/monitor/monitor.cpp
View file @
f3283e22
...
...
@@ -1005,6 +1005,7 @@ void Monitor::updateClipProducer(const QString &playlist)
if
(
render
==
NULL
)
return
;
Mlt
::
Producer
*
prod
=
new
Mlt
::
Producer
(
*
profile
(),
playlist
.
toUtf8
().
constData
());
render
->
setProducer
(
prod
,
render
->
seekFramePosition
(),
true
);
render
->
play
(
1.0
);
}
void
Monitor
::
openClip
(
ClipController
*
controller
)
...
...
src/monitor/recmonitor.cpp
View file @
f3283e22
...
...
@@ -173,7 +173,7 @@ void RecMonitor::mouseDoubleClickEvent(QMouseEvent * event)
}*/
}
void
RecMonitor
::
slotSwitchFullScreen
()
void
RecMonitor
::
slotSwitchFullScreen
(
bool
minimizeOnly
)
{
//videoBox->switchFullScreen();
}
...
...
src/monitor/recmonitor.h
View file @
f3283e22
...
...
@@ -156,7 +156,7 @@ public slots:
void
slotUpdateCaptureFolder
(
const
QString
&
currentProjectFolder
);
void
slotUpdateFullScreenGrab
();
void
slotMouseSeek
(
int
eventDelta
,
bool
fast
);
void
slotSwitchFullScreen
();
void
slotSwitchFullScreen
(
bool
minimizeOnly
=
false
);
signals:
void
renderPosition
(
int
);
...
...
src/project/projectmanager.cpp
View file @
f3283e22
...
...
@@ -63,6 +63,9 @@ ProjectManager::ProjectManager(QObject* parent) :
ProjectManager
::~
ProjectManager
()
{
if
(
m_project
)
{
delete
m_project
;
}
}
void
ProjectManager
::
slotLoadOnOpen
()
...
...
@@ -190,19 +193,20 @@ bool ProjectManager::closeCurrentDocument(bool saveChanges)
break
;
}
}
m_autoSaveTimer
.
stop
();
pCore
->
window
()
->
slotTimelineClipSelected
(
NULL
,
false
);
pCore
->
monitorManager
()
->
clipMonitor
()
->
openClip
(
NULL
);
delete
m_project
;
m_project
=
NULL
;
pCore
->
monitorManager
()
->
setDocument
(
m_project
);
pCore
->
window
()
->
m_effectStack
->
clear
();
pCore
->
window
()
->
m_transitionConfig
->
slotTransitionItemSelected
(
NULL
,
0
,
QPoint
(),
false
);
if
(
!
qApp
->
isSavingSession
())
{
m_autoSaveTimer
.
stop
();
pCore
->
window
()
->
slotTimelineClipSelected
(
NULL
,
false
);
pCore
->
monitorManager
()
->
clipMonitor
()
->
openClip
(
NULL
);
delete
m_trackView
;
m_trackView
=
NULL
;
delete
m_project
;
m_project
=
NULL
;
pCore
->
monitorManager
()
->
setDocument
(
m_project
);
pCore
->
window
()
->
m_effectStack
->
clear
();
pCore
->
window
()
->
m_transitionConfig
->
slotTransitionItemSelected
(
NULL
,
0
,
QPoint
(),
false
);
delete
m_trackView
;
m_trackView
=
NULL
;
}
return
true
;
}
...
...
@@ -337,7 +341,7 @@ bool ProjectManager::checkForBackupFile(const QUrl &url)
}
if
(
orphanedFile
)
{
if
(
KMessageBox
::
questionYesNo
(
pCore
->
window
()
,
if
(
KMessageBox
::
questionYesNo
(
0
,
i18n
(
"Auto-saved files exist. Do you want to recover them now?"
),
i18n
(
"File Recovery"
),
KGuiItem
(
i18n
(
"Recover"
)),
KGuiItem
(
i18n
(
"Don't recover"
)))
==
KMessageBox
::
Yes
)
{
...
...
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