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
7c5f81f0
Commit
7c5f81f0
authored
Dec 02, 2016
by
Laurent Montel
😁
Browse files
Use debug categories
parent
a0bd88a2
Changes
100
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
7c5f81f0
...
...
@@ -21,7 +21,7 @@ set(MLT_MIN_VERSION ${MLT_MIN_MAJOR_VERSION}.${MLT_MIN_MINOR_VERSION}.${MLT_MIN_
set
(
QT_MIN_VERSION 5.5.0
)
find_package
(
ECM
1
.2.0 REQUIRED CONFIG
)
find_package
(
ECM
5
.2
1
.0 REQUIRED CONFIG
)
set
(
CMAKE_MODULE_PATH
${
ECM_MODULE_PATH
}
${
CMAKE_SOURCE_DIR
}
/cmake/modules
)
include
(
FeatureSummary
)
include
(
ECMInstallIcons
)
...
...
@@ -32,6 +32,7 @@ include(KDECompilerSettings)
include
(
ECMOptionalAddSubdirectory
)
include
(
ECMMarkNonGuiExecutable
)
include
(
ECMAddAppIcon
)
include
(
ECMQtDeclareLoggingCategory
)
add_definitions
(
-DQT_NO_CAST_TO_ASCII
)
add_definitions
(
-DQT_NO_URL_CAST_FROM_STRING
)
...
...
@@ -119,6 +120,7 @@ add_subdirectory(thumbnailer)
#add_subdirectory(testingArea)
install
(
FILES kdenlive.categories DESTINATION
${
KDE_INSTALL_CONFDIR
}
)
configure_file
(
config-kdenlive.h.cmake config-kdenlive.h @ONLY
)
feature_summary
(
WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES
)
kdenlive.categories
0 → 100644
View file @
7c5f81f0
org.kde.multimedia.kdenlive kdenlive (kdenlive)
src/CMakeLists.txt
View file @
7c5f81f0
...
...
@@ -123,6 +123,8 @@ list(APPEND kdenlive_SRCS
core.cpp
)
ecm_qt_declare_logging_category
(
kdenlive_SRCS HEADER kdenlive_debug.h IDENTIFIER KDENLIVE_LOG CATEGORY_NAME org.kde.multimedia.kdenlive
)
ki18n_wrap_ui
(
kdenlive_UIS
ui/addtrack_ui.ui
ui/archivewidget_ui.ui
...
...
src/bin/bin.cpp
View file @
7c5f81f0
...
...
@@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include
<QTimeLine>
#include
<QSlider>
#include
<QMenu>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<QtConcurrent>
#include
<QUndoCommand>
#include
<QCryptographicHash>
...
...
@@ -635,7 +635,7 @@ bool Bin::eventFilter(QObject *obj, QEvent *event)
}
}
else
{
qDebug
()
<<
" +++++++ NO VIEW-------!!"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
" +++++++ NO VIEW-------!!"
;
}
return
true
;
}
else
if
(
event
->
type
()
==
QEvent
::
Wheel
)
{
...
...
@@ -746,7 +746,7 @@ void Bin::deleteClip(const QString &id)
}
ProjectClip
*
clip
=
m_rootFolder
->
clip
(
id
);
if
(
!
clip
)
{
qWarning
()
<<
"Cannot bin find clip to delete: "
<<
id
;
q
C
Warning
(
KDENLIVE_LOG
)
<<
"Cannot bin find clip to delete: "
<<
id
;
return
;
}
m_jobManager
->
discardJobs
(
id
);
...
...
@@ -888,7 +888,7 @@ void Bin::slotReloadClip()
}
QDomDocument
doc
;
QDomElement
xml
=
currentItem
->
toXml
(
doc
);
qDebug
()
<<
"*****************
\n
"
<<
doc
.
toString
()
<<
"
\n
******************"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"*****************
\n
"
<<
doc
.
toString
()
<<
"
\n
******************"
;
if
(
!
xml
.
isNull
())
{
currentItem
->
setClipStatus
(
AbstractProjectItem
::
StatusWaiting
);
// We need to set a temporary id before all outdated producers are replaced;
...
...
@@ -912,7 +912,7 @@ void Bin::slotLocateClip()
bool
exists
=
QFile
(
url
.
toLocalFile
()).
exists
();
if
(
currentItem
->
hasUrl
()
&&
exists
)
{
QDesktopServices
::
openUrl
(
url
);
qDebug
()
<<
" / / "
+
url
.
toString
();
q
C
Debug
(
KDENLIVE_LOG
)
<<
" / / "
+
url
.
toString
();
}
else
{
if
(
!
exists
){
emitMessage
(
i18n
(
"Couldn't locate "
)
+
QString
(
" ("
+
url
.
toString
()
+
")"
),
100
,
ErrorMessage
);
...
...
@@ -1184,7 +1184,7 @@ void Bin::doAddFolder(const QString &id, const QString &name, const QString &par
{
ProjectFolder
*
parentFolder
=
m_rootFolder
->
folder
(
parentId
);
if
(
!
parentFolder
)
{
qDebug
()
<<
" / / ERROR IN PARENT FOLDER"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
" / / ERROR IN PARENT FOLDER"
;
return
;
}
//FIXME(style): constructor actually adds the new pointer to parent's children
...
...
@@ -1196,7 +1196,7 @@ void Bin::renameFolder(const QString &id, const QString &name)
{
ProjectFolder
*
folder
=
m_rootFolder
->
folder
(
id
);
if
(
!
folder
||
!
folder
->
parent
())
{
qDebug
()
<<
" / / ERROR IN PARENT FOLDER"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
" / / ERROR IN PARENT FOLDER"
;
return
;
}
folder
->
setName
(
name
);
...
...
@@ -1301,7 +1301,7 @@ void Bin::doRemoveFolder(const QString &id)
{
ProjectFolder
*
folder
=
m_rootFolder
->
folder
(
id
);
if
(
!
folder
)
{
qDebug
()
<<
" / / FOLDER not found"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
" / / FOLDER not found"
;
return
;
}
//TODO: warn user on non-empty folders
...
...
@@ -2003,7 +2003,7 @@ void Bin::emitRefreshPanel(const QString &id)
void
Bin
::
setupGeneratorMenu
()
{
if
(
!
m_menu
)
{
qDebug
()
<<
"Warning, menu was not created, something is wrong"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"Warning, menu was not created, something is wrong"
;
return
;
}
...
...
@@ -2256,7 +2256,7 @@ void Bin::slotCreateProjectClip()
QAction
*
act
=
qobject_cast
<
QAction
*>
(
sender
());
if
(
act
==
0
)
{
// Cannot access triggering action, something is wrong
qDebug
()
<<
"// Error in clip creation action"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"// Error in clip creation action"
;
return
;
}
ClipType
type
=
(
ClipType
)
act
->
data
().
toInt
();
...
...
@@ -2416,7 +2416,7 @@ void Bin::moveEffect(const QString &id, const QList<int> &oldPos, const QList<in
void
Bin
::
removeEffect
(
const
QString
&
id
,
const
QDomElement
&
effect
)
{
if
(
effect
.
isNull
())
{
qWarning
()
<<
" / /ERROR, trying to remove empty effect"
;
q
C
Warning
(
KDENLIVE_LOG
)
<<
" / /ERROR, trying to remove empty effect"
;
return
;
}
ProjectClip
*
currentItem
=
m_rootFolder
->
clip
(
id
);
...
...
@@ -2635,7 +2635,7 @@ void Bin::slotExpandUrl(const ItemInfo &info, const QUrl &url, QUndoCommand *com
QString
singletonId
=
hashToIdMap
.
value
(
hash
,
QString
());
if
(
singletonId
.
length
())
{
// map duplicate producer ID to single bin clip producer ID.
qDebug
()
<<
"found duplicate producer:"
<<
hash
<<
", reusing newID:"
<<
singletonId
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"found duplicate producer:"
<<
hash
<<
", reusing newID:"
<<
singletonId
;
idMap
.
insert
(
originalId
,
singletonId
);
continue
;
}
...
...
@@ -2644,7 +2644,7 @@ void Bin::slotExpandUrl(const ItemInfo &info, const QUrl &url, QUndoCommand *com
// First occurence of a producer, so allocate new bin clip producer ID.
QString
newId
=
QString
::
number
(
getFreeClipId
());
idMap
.
insert
(
originalId
,
newId
);
qDebug
()
<<
"originalId: "
<<
originalId
<<
", newId: "
<<
newId
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"originalId: "
<<
originalId
<<
", newId: "
<<
newId
;
// Ensure to register new bin clip producer ID in hash hashmap for
// those clips that MLT likes to serialize multiple times. This is
...
...
@@ -2668,7 +2668,7 @@ void Bin::slotExpandUrl(const ItemInfo &info, const QUrl &url, QUndoCommand *com
QString
resource
=
EffectsList
::
property
(
clone
,
QStringLiteral
(
"resource"
));
if
(
QFileInfo
(
resource
).
isRelative
())
{
QFileInfo
rootedResource
(
mltRoot
,
resource
);
qDebug
()
<<
"fixed resource path for producer, newId:"
<<
newId
<<
"resource:"
<<
rootedResource
.
absoluteFilePath
();
q
C
Debug
(
KDENLIVE_LOG
)
<<
"fixed resource path for producer, newId:"
<<
newId
<<
"resource:"
<<
rootedResource
.
absoluteFilePath
();
EffectsList
::
setProperty
(
clone
,
QStringLiteral
(
"resource"
),
rootedResource
.
absoluteFilePath
());
}
}
...
...
@@ -2719,7 +2719,7 @@ void Bin::slotStartClipJob(bool enable)
QAction
*
act
=
qobject_cast
<
QAction
*>
(
sender
());
if
(
act
==
0
)
{
// Cannot access triggering action, something is wrong
qDebug
()
<<
"// Error in clip job action"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"// Error in clip job action"
;
return
;
}
startClipJob
(
act
->
data
().
toStringList
());
...
...
@@ -2729,7 +2729,7 @@ void Bin::startClipJob(const QStringList ¶ms)
{
QStringList
data
=
params
;
if
(
data
.
isEmpty
())
{
qDebug
()
<<
"// Error in clip job action"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"// Error in clip job action"
;
return
;
}
AbstractClipJob
::
JOBTYPE
jobType
=
(
AbstractClipJob
::
JOBTYPE
)
data
.
takeFirst
().
toInt
();
...
...
@@ -2955,7 +2955,7 @@ void Bin::slotGotFilterJobResults(const QString &id, int startPos, int track, co
QString
key
=
filterInfo
.
value
(
QStringLiteral
(
"key"
));
int
offset
=
filterInfo
.
value
(
QStringLiteral
(
"offset"
)).
toInt
();
QStringList
value
=
results
.
value
(
key
).
split
(
';'
,
QString
::
SkipEmptyParts
);
//qDebug()<<"// RESULT; "<<key<<" = "<<value;
//q
C
Debug(
KDENLIVE_LOG
)<<"// RESULT; "<<key<<" = "<<value;
if
(
filterInfo
.
contains
(
QStringLiteral
(
"resultmessage"
)))
{
QString
mess
=
filterInfo
.
value
(
QStringLiteral
(
"resultmessage"
));
mess
.
replace
(
QLatin1String
(
"%count"
),
QString
::
number
(
value
.
count
()));
...
...
src/bin/projectclip.cpp
View file @
7c5f81f0
...
...
@@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include
<QDomElement>
#include
<QFile>
#include
<QDir>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<QCryptographicHash>
#include
<QtConcurrent>
#include
<KLocalizedString>
...
...
@@ -331,7 +331,7 @@ QPixmap ProjectClip::thumbnail(int width, int height)
bool
ProjectClip
::
setProducer
(
ClipController
*
controller
,
bool
replaceProducer
)
{
if
(
!
replaceProducer
&&
m_controller
)
{
qDebug
()
<<
"// RECEIVED PRODUCER BUT WE ALREADY HAVE ONE
\n
----------"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"// RECEIVED PRODUCER BUT WE ALREADY HAVE ONE
\n
----------"
;
return
false
;
}
bool
isNewProducer
=
true
;
...
...
@@ -937,7 +937,7 @@ void ProjectClip::discardAudioThumb()
if
(
!
audioThumbPath
.
isEmpty
())
QFile
::
remove
(
audioThumbPath
);
audioFrameCache
.
clear
();
qDebug
()
<<
"//////////////////// DISCARD AUIIO THUMBNS"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"//////////////////// DISCARD AUIIO THUMBNS"
;
m_controller
->
audioThumbCreated
=
false
;
m_abortAudioThumb
=
false
;
}
...
...
src/capture/managecapturesdialog.cpp
View file @
7c5f81f0
...
...
@@ -21,7 +21,7 @@
#include
"managecapturesdialog.h"
#include
"doc/kthumb.h"
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<QFontDatabase>
#include
<KFileItem>
#include
"klocalizedstring.h"
...
...
@@ -108,10 +108,10 @@ void ManageCapturesDialog::slotDeleteCurrent()
if
(
!
item
)
return
;
const
int
i
=
m_view
.
treeWidget
->
indexOfTopLevelItem
(
item
);
m_view
.
treeWidget
->
takeTopLevelItem
(
i
);
//qDebug() << "DELETING FILE: " << item->text(0);
//q
C
Debug(
KDENLIVE_LOG
) << "DELETING FILE: " << item->text(0);
//KIO::NetAccess::del(QUrl(item->text(0)), this);
if
(
!
QFile
::
remove
(
item
->
data
(
0
,
Qt
::
UserRole
).
toString
()))
{
qDebug
()
<<
"// ERRor removing file "
<<
item
->
data
(
0
,
Qt
::
UserRole
).
toString
();
q
C
Debug
(
KDENLIVE_LOG
)
<<
"// ERRor removing file "
<<
item
->
data
(
0
,
Qt
::
UserRole
).
toString
();
}
delete
item
;
item
=
Q_NULLPTR
;
...
...
src/capture/mltdevicecapture.cpp
View file @
7c5f81f0
...
...
@@ -22,7 +22,7 @@
#include
<mlt++/Mlt.h>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<QTimer>
#include
<QString>
...
...
@@ -264,7 +264,7 @@ bool MltDeviceCapture::slotStartPreview(const QString &producer, bool xmlFormat)
delete
m_mltProducer
;
m_mltProducer
=
Q_NULLPTR
;
}
//qDebug()<<"//// ERROR CREATRING PROD";
//q
C
Debug(
KDENLIVE_LOG
)<<"//// ERROR CREATRING PROD";
return
false
;
}
m_mltConsumer
->
connect
(
*
m_mltProducer
);
...
...
@@ -423,7 +423,7 @@ bool MltDeviceCapture::slotStartCapture(const QString ¶ms, const QString &pa
}
if
(
m_mltProducer
==
Q_NULLPTR
||
!
m_mltProducer
->
is_valid
())
{
//qDebug()<<"//// ERROR CREATRING PROD";
//q
C
Debug(
KDENLIVE_LOG
)<<"//// ERROR CREATRING PROD";
if
(
m_mltConsumer
)
{
delete
m_mltConsumer
;
m_mltConsumer
=
Q_NULLPTR
;
...
...
@@ -453,18 +453,18 @@ void MltDeviceCapture::setOverlay(const QString &path)
if
(
m_mltProducer
==
Q_NULLPTR
||
!
m_mltProducer
->
is_valid
())
return
;
Mlt
::
Producer
parentProd
(
m_mltProducer
->
parent
());
if
(
parentProd
.
get_producer
()
==
Q_NULLPTR
)
{
//qDebug() << "PLAYLIST BROKEN, CANNOT INSERT CLIP //////";
//q
C
Debug(
KDENLIVE_LOG
) << "PLAYLIST BROKEN, CANNOT INSERT CLIP //////";
return
;
}
Mlt
::
Service
service
(
parentProd
.
get_service
());
if
(
service
.
type
()
!=
tractor_type
)
{
qWarning
()
<<
"// TRACTOR PROBLEM"
;
q
C
Warning
(
KDENLIVE_LOG
)
<<
"// TRACTOR PROBLEM"
;
return
;
}
Mlt
::
Tractor
tractor
(
service
);
if
(
tractor
.
count
()
<
2
)
{
qWarning
()
<<
"// TRACTOR PROBLEM"
;
q
C
Warning
(
KDENLIVE_LOG
)
<<
"// TRACTOR PROBLEM"
;
return
;
}
mlt_service_lock
(
service
.
get_service
());
...
...
src/colortools.cpp
View file @
7c5f81f0
...
...
@@ -15,7 +15,7 @@
//#define DEBUG_CT
#ifdef DEBUG_CT
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#endif
ColorTools
::
ColorTools
(
QObject
*
parent
)
...
...
@@ -258,9 +258,9 @@ QImage ColorTools::hsvHueShiftPlane(const QSize &size, const uint &S, const uint
QImage
plane
(
size
,
QImage
::
Format_ARGB32
);
#ifdef DEBUG_CT
qDebug
()
<<
"Requested: Saturation "
<<
S
<<
", Value "
<<
V
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"Requested: Saturation "
<<
S
<<
", Value "
<<
V
;
QColor
colTest
(
-
1
,
256
,
257
);
qDebug
()
<<
"-1 mapped to "
<<
colTest
.
red
()
<<
", 256 to "
<<
colTest
.
green
()
<<
", 257 to "
<<
colTest
.
blue
();
q
C
Debug
(
KDENLIVE_LOG
)
<<
"-1 mapped to "
<<
colTest
.
red
()
<<
", 256 to "
<<
colTest
.
green
()
<<
", 257 to "
<<
colTest
.
blue
();
#endif
QColor
col
(
0
,
0
,
0
);
...
...
@@ -273,7 +273,7 @@ QImage ColorTools::hsvHueShiftPlane(const QSize &size, const uint &S, const uint
float
hue
=
x
/
(
size
.
width
()
-
1.0
)
*
359
;
for
(
int
y
=
0
;
y
<
size
.
height
();
++
y
)
{
huediff
=
(
1.0
f
-
y
/
(
size
.
height
()
-
1.0
))
*
hueValues
+
MIN
;
// qDebug() << "hue: " << hue << ", huediff: " << huediff;
// q
C
Debug(
KDENLIVE_LOG
) << "hue: " << hue << ", huediff: " << huediff;
newhue
=
hue
+
huediff
+
360
;
// Avoid negative numbers. Rest (>360) will be mapped correctly.
...
...
src/core.cpp
View file @
7c5f81f0
...
...
@@ -17,7 +17,7 @@ the Free Software Foundation, either version 3 of the License, or
#include
"bin/bin.h"
#include
"library/librarywidget.h"
#include
<QCoreApplication>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<locale>
#ifdef Q_OS_MAC
...
...
@@ -136,7 +136,7 @@ void Core::initLocale()
#endif
char
*
separator
=
localeconv
()
->
decimal_point
;
if
(
QString
::
fromUtf8
(
separator
)
!=
QChar
(
systemLocale
.
decimalPoint
()))
{
//qDebug()<<"------\n!!! system locale is not similar to Qt's locale... be prepared for bugs!!!\n------";
//q
C
Debug(
KDENLIVE_LOG
)<<"------\n!!! system locale is not similar to Qt's locale... be prepared for bugs!!!\n------";
// HACK: There is a locale conflict, so set locale to C
// Make sure to override exported values or it won't work
qputenv
(
"LANG"
,
"C"
);
...
...
src/definitions.h
View file @
7c5f81f0
...
...
@@ -24,7 +24,7 @@
#include
"gentime.h"
#include
"effectslist/effectslist.h"
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<QTreeWidgetItem>
#include
<QString>
...
...
src/dialogs/clipcreationdialog.cpp
View file @
7c5f81f0
...
...
@@ -44,7 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include
<QUndoCommand>
#include
<QStandardPaths>
#include
<QPushButton>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<QDialog>
#include
<QPointer>
#include
<QMimeDatabase>
...
...
@@ -546,7 +546,7 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QStringList
// import as sequence if we found more than one image in the sequence
QStringList
list
;
QString
pattern
=
SlideshowClip
::
selectedPath
(
url
,
false
,
QString
(),
&
list
);
qDebug
()
<<
" / // IMPORT PATTERN: "
<<
pattern
<<
" COUNT: "
<<
list
.
count
();
q
C
Debug
(
KDENLIVE_LOG
)
<<
" / // IMPORT PATTERN: "
<<
pattern
<<
" COUNT: "
<<
list
.
count
();
int
count
=
list
.
count
();
if
(
count
>
1
)
{
delete
fileWidget
;
...
...
src/dialogs/kdenlivesettingsdialog.cpp
View file @
7c5f81f0
...
...
@@ -36,7 +36,7 @@
#include
<KService>
#include
<KRun>
#include
<KOpenWithDialog>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<QDir>
#include
<QTimer>
#include
<QThread>
...
...
@@ -341,7 +341,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap<QString, QString>& map
if
(
version
.
contains
(
' '
))
version
=
version
.
section
(
' '
,
-
1
);
dvgrabVersion
=
version
.
toDouble
();
//qDebug() << "// FOUND DVGRAB VERSION: " << dvgrabVersion;
//q
C
Debug(
KDENLIVE_LOG
) << "// FOUND DVGRAB VERSION: " << dvgrabVersion;
}
delete
versionCheck
;
if
(
dvgrabVersion
<
3.3
)
{
...
...
@@ -409,21 +409,21 @@ void KdenliveSettingsDialog::setupJogshuttleBtns(const QString &device)
QMap
<
QString
,
QString
>
mappable_actions
(
m_mappable_actions
);
QList
<
QString
>
action_names
=
mappable_actions
.
keys
();
QList
<
QString
>::
Iterator
iter
=
action_names
.
begin
();
//qDebug() << "::::::::::::::::";
//q
C
Debug(
KDENLIVE_LOG
) << "::::::::::::::::";
while
(
iter
!=
action_names
.
end
())
{
//qDebug() << *iter;
//q
C
Debug(
KDENLIVE_LOG
) << *iter;
++
iter
;
}
//qDebug() << "::::::::::::::::";
//q
C
Debug(
KDENLIVE_LOG
) << "::::::::::::::::";
qSort
(
action_names
);
iter
=
action_names
.
begin
();
while
(
iter
!=
action_names
.
end
())
{
//qDebug() << *iter;
//q
C
Debug(
KDENLIVE_LOG
) << *iter;
++
iter
;
}
//qDebug() << "::::::::::::::::";
//q
C
Debug(
KDENLIVE_LOG
) << "::::::::::::::::";
// Here we need to compute the action_id -> index-in-action_names. We iterate over the
// action_names, as the sorting may depend on the user-language.
...
...
@@ -515,7 +515,7 @@ void KdenliveSettingsDialog::initDevices()
line
=
stream
.
readLine
();
}
file
.
close
();
}
else
qDebug
()
<<
" / / / /CANNOT READ PCM"
;
}
else
q
C
Debug
(
KDENLIVE_LOG
)
<<
" / / / /CANNOT READ PCM"
;
}
// Add pulseaudio capture option
...
...
@@ -551,11 +551,11 @@ void KdenliveSettingsDialog::initDevices()
void
KdenliveSettingsDialog
::
slotReadAudioDevices
()
{
QString
result
=
QString
(
m_readProcess
.
readAllStandardOutput
());
//qDebug() << "// / / / / / READING APLAY: ";
//qDebug() << result;
//q
C
Debug(
KDENLIVE_LOG
) << "// / / / / / READING APLAY: ";
//q
C
Debug(
KDENLIVE_LOG
) << result;
QStringList
lines
=
result
.
split
(
'\n'
);
foreach
(
const
QString
&
data
,
lines
)
{
////qDebug() << "// READING LINE: " << data;
////q
C
Debug(
KDENLIVE_LOG
) << "// READING LINE: " << data;
if
(
!
data
.
startsWith
(
' '
)
&&
data
.
count
(
':'
)
>
1
)
{
QString
card
=
data
.
section
(
':'
,
0
,
0
).
section
(
' '
,
-
1
);
QString
device
=
data
.
section
(
':'
,
1
,
1
).
section
(
' '
,
-
1
);
...
...
@@ -651,7 +651,7 @@ void KdenliveSettingsDialog::slotUpdateShuttleDevice(int ix)
void
KdenliveSettingsDialog
::
updateWidgets
()
{
// Revert widgets to last saved state (for example when user pressed "Cancel")
// //qDebug() << "// // // KCONFIG Revert called";
// //q
C
Debug(
KDENLIVE_LOG
) << "// // // KCONFIG Revert called";
#ifdef USE_JOGSHUTTLE
// revert jog shuttle device
if
(
m_configShuttle
.
shuttledevicelist
->
count
()
>
0
)
{
...
...
@@ -689,7 +689,7 @@ void KdenliveSettingsDialog::updateWidgets()
void
KdenliveSettingsDialog
::
updateSettings
()
{
// Save changes to settings (for example when user pressed "Apply" or "Ok")
// //qDebug() << "// // // KCONFIG UPDATE called";
// //q
C
Debug(
KDENLIVE_LOG
) << "// // // KCONFIG UPDATE called";
KdenliveSettings
::
setDefault_profile
(
m_pw
->
selectedProfile
());
bool
resetProfile
=
false
;
...
...
src/dialogs/profilesdialog.cpp
View file @
7c5f81f0
...
...
@@ -29,7 +29,7 @@
#include
<QDir>
#include
<QCloseEvent>
#include
<QStandardPaths>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
ProfilesDialog
::
ProfilesDialog
(
const
QString
&
profileDescription
,
QWidget
*
parent
)
:
QDialog
(
parent
),
...
...
@@ -174,7 +174,7 @@ void ProfilesDialog::fillList(const QString &selectedProfile)
m_view
.
profiles_list
->
setCurrentIndex
(
ix
);
}
else
{
// Error, profile not found
qWarning
()
<<
"Project profile not found, disable editing"
;
q
C
Warning
(
KDENLIVE_LOG
)
<<
"Project profile not found, disable editing"
;
}
}
int
ix
=
m_view
.
profiles_list
->
findText
(
selectedProfile
);
...
...
@@ -291,7 +291,7 @@ void ProfilesDialog::slotDeleteProfile()
success
=
QFile
::
remove
(
path
);
fillList
();
}
if
(
!
success
)
qDebug
()
<<
"//// Cannot delete profile "
<<
path
<<
", does not seem to be custom one"
;
if
(
!
success
)
q
C
Debug
(
KDENLIVE_LOG
)
<<
"//// Cannot delete profile "
<<
path
<<
", does not seem to be custom one"
;
}
// static
...
...
@@ -336,11 +336,11 @@ MltVideoProfile ProfilesDialog::getVideoProfile(const QString &name)
if
(
path
.
isEmpty
()
||
!
QFile
::
exists
(
path
))
{
if
(
name
==
QLatin1String
(
"dv_pal"
))
{
//qDebug() << "!!! WARNING, COULD NOT FIND DEFAULT MLT PROFILE";
//q
C
Debug(
KDENLIVE_LOG
) << "!!! WARNING, COULD NOT FIND DEFAULT MLT PROFILE";
return
result
;
}
if
(
name
==
KdenliveSettings
::
default_profile
())
KdenliveSettings
::
setDefault_profile
(
QStringLiteral
(
"dv_pal"
));
//qDebug() << "// WARNING, COULD NOT FIND PROFILE " << name;
//q
C
Debug(
KDENLIVE_LOG
) << "// WARNING, COULD NOT FIND PROFILE " << name;
return
result
;
}
return
getProfileFromPath
(
path
,
name
);
...
...
src/dialogs/renderwidget.cpp
View file @
7c5f81f0
...
...
@@ -35,7 +35,7 @@
#include
<qglobal.h>
#include
<qstring.h>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<QDomDocument>
#include
<QTreeWidgetItem>
#include
<QHeaderView>
...
...
@@ -1324,7 +1324,7 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
// rendering profile contains an MLT profile, so pass it to the running jog item, useful for dvd
QString prof = renderArgs.section(QStringLiteral("mlt_profile="), 1, 1);
prof = prof.section(' ', 0, 0);
qDebug() << "// render profile: " << prof;
q
C
Debug(
KDENLIVE_LOG
) << "// render profile: " << prof;
renderItem->setMetadata(prof);
}
}
...
...
@@ -1713,7 +1713,7 @@ void RenderWidget::parseMltPresets()
QDir
root
(
KdenliveSettings
::
mltpath
());
if
(
!
root
.
cd
(
QStringLiteral
(
"../presets/consumer/avformat"
)))
{
//Cannot find MLT's presets directory
qWarning
()
<<
" / / / WARNING, cannot find MLT's preset folder"
;
q
C
Warning
(
KDENLIVE_LOG
)
<<
" / / / WARNING, cannot find MLT's preset folder"
;
return
;
}
if
(
root
.
cd
(
QStringLiteral
(
"lossless"
)))
{
...
...
@@ -2261,7 +2261,7 @@ void RenderWidget::slotDeleteScript()
bool
success
=
true
;
success
&=
QFile
::
remove
(
path
+
".mlt"
);
success
&=
QFile
::
remove
(
path
);
if
(
!
success
)
qWarning
()
<<
"// Error removing script or playlist: "
<<
path
<<
", "
<<
path
<<
".mlt"
;
if
(
!
success
)
q
C
Warning
(
KDENLIVE_LOG
)
<<
"// Error removing script or playlist: "
<<
path
<<
", "
<<
path
<<
".mlt"
;
parseScriptFiles
();
}
}
...
...
@@ -2334,7 +2334,7 @@ bool RenderWidget::startWaitingRenderJobs()
QString
autoscriptFile
=
getFreeScriptName
(
QUrl
(),
QStringLiteral
(
"auto"
));
QFile
file
(
autoscriptFile
);
if
(
!
file
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Text
))
{
qWarning
()
<<
"////// ERROR writing to file: "
<<
autoscriptFile
;
q
C
Warning
(
KDENLIVE_LOG
)
<<
"////// ERROR writing to file: "
<<
autoscriptFile
;
KMessageBox
::
error
(
0
,
i18n
(
"Cannot write to file %1"
,
autoscriptFile
));
return
false
;
}
...
...
src/dialogs/wizard.cpp
View file @
7c5f81f0
...
...
@@ -45,7 +45,7 @@
#include
<QTimer>
#include
<QStandardPaths>
#include
<QMimeDatabase>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
// Recommended MLT version
const
int
mltVersionMajor
=
MLT_MIN_MAJOR_VERSION
;
...
...
@@ -602,23 +602,23 @@ void Wizard::installExtraMimes(const QString &baseName, const QStringList &globs
}
if
(
missingGlobs
.
isEmpty
())
return
;
if
(
!
mime
.
isValid
()
||
mime
.
isDefault
())
{
qDebug
()
<<
"mimeType "
<<
baseName
<<
" not found"
;
q
C
Debug
(
KDENLIVE_LOG
)
<<
"mimeType "
<<
baseName
<<
" not found"
;
}
else
{
QStringList
extensions
=
mime
.
globPatterns
();
QString
comment
=
mime
.
comment
();
foreach
(
const
QString
&
glob
,
missingGlobs
)
{
if
(
!
extensions
.
contains
(
glob
))
extensions
<<
glob
;
}
//qDebug() << "EXTS: " << extensions;
//q
C
Debug(
KDENLIVE_LOG
) << "EXTS: " << extensions;
QDir
mimeDir
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
GenericDataLocation
)
+
QStringLiteral
(
"/mime/packages/"
));
if
(
!
mimeDir
.
exists
())
{
mimeDir
.
mkpath
(
QStringLiteral
(
"."
));
}
QString
packageFileName
=
mimeDir
.
absoluteFilePath
(
mimefile
+
".xml"
);
//qDebug() << "INSTALLING NEW MIME TO: " << packageFileName;
//q
C
Debug(
KDENLIVE_LOG
) << "INSTALLING NEW MIME TO: " << packageFileName;
QFile
packageFile
(
packageFileName
);
if
(
!
packageFile
.
open
(
QIODevice
::
WriteOnly
))
{
qCritical
()
<<
"Couldn't open"
<<
packageFileName
<<
"for writing"
;
qC
C
ritical
(
KDENLIVE_LOG
)
<<
"Couldn't open"
<<
packageFileName
<<
"for writing"
;
return
;
}
QXmlStreamWriter
writer
(
&
packageFile
);
...
...
@@ -658,7 +658,7 @@ void Wizard::runUpdateMimeDatabase()
proc
<<
localPackageDir
;
const
int
exitCode
=
proc
.
execute
();
if
(
exitCode
)
{
qWarning
()
<<
proc
.
program
()
<<
"exited with error code"
<<
exitCode
;
q
C
Warning
(
KDENLIVE_LOG
)
<<
proc
.
program
()
<<
"exited with error code"
<<
exitCode
;
}
}
...
...
src/doc/documentchecker.cpp
View file @
7c5f81f0
...
...
@@ -30,7 +30,7 @@
#include
<klocalizedstring.h>
#include
<KRecentDirs>
#include
<QD
ebug
>
#include
"kdenlive_d
ebug
.h"
#include
<QFontDatabase>
#include
<QTreeWidgetItem>
#include
<QFile>
...
...
@@ -447,7 +447,7 @@ bool DocumentChecker::hasErrorInClips()
// Tell Kdenlive the source is missing
e
.
setAttribute
(
QStringLiteral
(
"_missingsource"
),
QStringLiteral
(
"1"
));
QTreeWidgetItem
*
subitem
=
new
QTreeWidgetItem
(
item
,
QStringList
()
<<
i18n
(
"Source clip"
));
//qDebug()<<"// Adding missing source clip: "<<realPath;
//q
C
Debug(
KDENLIVE_LOG
)<<"// Adding missing source clip: "<<realPath;
subitem
->
setIcon
(
0
,
KoIconUtils
::
themedIcon
(
QStringLiteral
(
"dialog-close"
)));
subitem
->
setText
(
1
,
realPath
);
subitem
->
setData
(
0
,
hashRole
,
EffectsList
::
property
(
e
,
QStringLiteral
(
"kdenlive:file_hash"
)));
...
...
@@ -666,7 +666,7 @@ QString DocumentChecker::searchFileRecursively(const QDir &dir, const QString &m
}
}
}
////qDebug() << filesAndDirs.at(i) << file.size() << fileHash.toHex();
////q
C
Debug(
KDENLIVE_LOG
) << filesAndDirs.at(i) << file.size() << fileHash.toHex();
}
filesAndDirs
=
dir
.
entryList
(
QDir
::
Dirs
|
QDir
::
Readable
|
QDir
::
Executable
|
QDir
::
NoDotAndDotDot
);
for
(
int
i
=
0
;
i
<
filesAndDirs
.
size
()
&&
foundFileName
.
isEmpty
();
++
i
)
{
...
...
@@ -872,7 +872,7 @@ void DocumentChecker::fixClipItem(QTreeWidgetItem *child, const QDomNodeList &pr
}
if
(
!
luma
.
isEmpty
()
&&
luma
==
child
->
data
(
0
,
idRole
).
toString
())
{
setProperty
(
trans
.
at
(
i
).
toElement
(),
service
==
QLatin1String
(
"luma"
)
?
QStringLiteral
(
"resource"
)
:
QStringLiteral
(
"luma"
),
child
->
text
(
1
));
//qDebug() << "replace with; " << child->text(1);
//q
C
Debug(
KDENLIVE_LOG
) << "replace with; " << child->text(1);
}
}
}
else
if
(
child
->
data
(
0
,
statusRole
).
toInt
()
==
LUMAMISSING
)
{
...
...
@@ -1032,7 +1032,7 @@ void DocumentChecker::checkMissingImagesAndFonts(const QStringList &images, cons
foreach
(
const
QString
&
fontelement
,
fonts
)
{
if
(
m_safeFonts
.
contains
(
fontelement
))
continue
;
QFont
f
(
fontelement
);
////qDebug() << "/ / / CHK FONTS: " << fontelement << " = " << QFontInfo(f).family();
////q
C
Debug(
KDENLIVE_LOG
) << "/ / / CHK FONTS: " << fontelement << " = " << QFontInfo(f).family();
if
(
fontelement
!=
QFontInfo
(
f
).
family
())
{
m_missingFonts
<<
fontelement
;