Commit d1e034a8 authored by Julius Künzel's avatar Julius Künzel
Browse files

Add option to copy debug information to clipboard

parent f4dabe7f
Pipeline #56492 passed with stage
in 10 minutes and 56 seconds
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="kdenlive" version="199" translationDomain="kdenlive">
<kpartgui name="kdenlive" version="200" translationDomain="kdenlive">
<MenuBar>
<Menu name="file" >
<Action name="file_save"/>
......@@ -269,6 +269,7 @@
</Menu>
<Menu name="help" >
<Action name="reset_config" />
<Action name="copy_debuginfo"/>
</Menu>
</MenuBar>
<ToolBar name="timelineToolBar" fullWidth="true" newline="true" noMerge="1" position="bottom">
......
......@@ -80,6 +80,8 @@
#include "jogshuttle/jogmanager.h"
#endif
#include <KAboutData>
#include <KCoreAddons>
#include <KActionCategory>
#include <KActionCollection>
#include <KActionMenu>
......@@ -1818,6 +1820,9 @@ void MainWindow::setupActions()
redo->setEnabled(enable);
});
addAction(QStringLiteral("copy_debuginfo"), i18n("Copy Debug Information"), this, SLOT(slotCopyDebugInfo()),
QIcon::fromTheme(QStringLiteral("edit-copy")));
QAction *disableEffects = addAction(QStringLiteral("disable_timeline_effects"), i18n("Disable Timeline Effects"), pCore->projectManager(),
SLOT(slotDisableTimelineEffects(bool)), QIcon::fromTheme(QStringLiteral("favorite")));
disableEffects->setData("disable_timeline_effects");
......@@ -4371,6 +4376,20 @@ void MainWindow::slotSpeechRecognition()
getCurrentTimeline()->controller()->subtitleSpeechRecognition();
}
void MainWindow::slotCopyDebugInfo() {
QString debuginfo = QStringLiteral("Kdenlive: %1\n").arg(KAboutData::applicationData().version());
debuginfo.append(QStringLiteral("MLT: %1\n").arg(mlt_version_get_string()));
debuginfo.append(QStringLiteral("Qt: %1 (built against %2 %3)\n").arg(QString::fromLocal8Bit(qVersion())).arg(QT_VERSION_STR).arg(QSysInfo::buildAbi()));
debuginfo.append(QStringLiteral("Frameworks: %2\n").arg(KCoreAddons::versionString()));
debuginfo.append(QStringLiteral("System: %1\n").arg(QSysInfo::prettyProductName()));
debuginfo.append(QStringLiteral("Kernel: %1 %2\n").arg(QSysInfo::kernelType()).arg(QSysInfo::kernelVersion()));
debuginfo.append(QStringLiteral("CPU: %1\n").arg(QSysInfo::currentCpuArchitecture()));
debuginfo.append(QStringLiteral("Windowing System: %1\n").arg(QGuiApplication::platformName()));
debuginfo.append(QStringLiteral("Movit (GPU): %1\n").arg(KdenliveSettings::gpu_accel() ? QStringLiteral("enabled") : QStringLiteral("disabled")));
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(debuginfo);
}
#ifdef DEBUG_MAINW
#undef DEBUG_MAINW
#endif
......@@ -539,6 +539,8 @@ private slots:
void slotExportSubtitle();
/** @brief Start a speech recognition on timeline zone */
void slotSpeechRecognition();
/** @brief Copy debug information like lib versions, gpu mode state,... to clipboard */
void slotCopyDebugInfo();
signals:
Q_SCRIPTABLE void abortRenderJob(const QString &url);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment