From 8b89c85015e985cba9304da25868f847d2d047f4 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 16 Dec 2022 17:29:07 +0200 Subject: [PATCH] okular: remove unused Okular::Movie constructor Signed-off-by: Ivailo Monev --- okular/core/audioplayer.cpp | 1 - okular/core/audioplayer_p.h | 1 - okular/core/movie.cpp | 34 +++--------------------- okular/core/movie.h | 5 ---- okular/generators/spectre/CMakeLists.txt | 34 ++++++++++++++++-------- 5 files changed, 27 insertions(+), 48 deletions(-) diff --git a/okular/core/audioplayer.cpp b/okular/core/audioplayer.cpp index 8072bd29..6e81ce62 100644 --- a/okular/core/audioplayer.cpp +++ b/okular/core/audioplayer.cpp @@ -11,7 +11,6 @@ #include "audioplayer_p.h" // qt/kde includes -#include #include #include #include diff --git a/okular/core/audioplayer_p.h b/okular/core/audioplayer_p.h index 0cccf111..caf048e6 100644 --- a/okular/core/audioplayer_p.h +++ b/okular/core/audioplayer_p.h @@ -15,7 +15,6 @@ #include #include -#include class PlayData; class SoundInfo; diff --git a/okular/core/movie.cpp b/okular/core/movie.cpp index 78062f6a..f2a6e15c 100644 --- a/okular/core/movie.cpp +++ b/okular/core/movie.cpp @@ -14,9 +14,7 @@ #include #include #include - #include -#include #include "debug_p.h" @@ -29,7 +27,6 @@ class Movie::Private : m_url( url ), m_rotation( Rotation0 ), m_playMode( PlayOnce ), - m_tmp( nullptr ), m_showControls( false ), m_autoPlay( false ), m_showPosterImage( false ) @@ -40,11 +37,10 @@ class Movie::Private QSize m_aspect; Rotation m_rotation; PlayMode m_playMode; - KTemporaryFile *m_tmp; QImage m_posterImage; - bool m_showControls : 1; - bool m_autoPlay : 1; - bool m_showPosterImage : 1; + bool m_showControls; + bool m_autoPlay; + bool m_showPosterImage; }; Movie::Movie( const QString& fileName ) @@ -52,36 +48,14 @@ Movie::Movie( const QString& fileName ) { } -Movie::Movie( const QString& fileName, const QByteArray &data ) - : d( new Private( fileName ) ) -{ - /* Store movie data as temporary file. - * - * Originally loaded movie data directly using a QBuffer, but sadly phonon - * fails to play on a few of my test systems (I think it's the Phonon - * GStreamer backend). Storing the data in a temporary file works fine - * though, not to mention, it releases much needed memory. (gamaral) - */ - d->m_tmp = new KTemporaryFile(); - if ( d->m_tmp->open() ) { - d->m_tmp->write( data ); - d->m_tmp->flush(); - } - else kDebug(OkularDebug) << "Failed to create temporary file for video data."; -} - Movie::~Movie() { - delete d->m_tmp; delete d; } QString Movie::url() const { - if (d->m_tmp) - return d->m_tmp->fileName(); - else - return d->m_url; + return d->m_url; } void Movie::setSize( const QSize &aspect ) diff --git a/okular/core/movie.h b/okular/core/movie.h index 759a7ca7..94e44aa6 100644 --- a/okular/core/movie.h +++ b/okular/core/movie.h @@ -44,11 +44,6 @@ class OKULAR_EXPORT Movie */ explicit Movie( const QString& fileName ); - /** - * Creates a new movie object with the given movie data. - */ - explicit Movie( const QString& fileName, const QByteArray &data ); - /** * Destroys the movie object. */ diff --git a/okular/generators/spectre/CMakeLists.txt b/okular/generators/spectre/CMakeLists.txt index 515fdf94..b25f6980 100644 --- a/okular/generators/spectre/CMakeLists.txt +++ b/okular/generators/spectre/CMakeLists.txt @@ -11,24 +11,36 @@ add_subdirectory(conf) ########### next target ############### set(okularGenerator_ghostview_SRCS - generator_ghostview.cpp - rendererthread.cpp - gssettingswidget.ui + generator_ghostview.cpp + rendererthread.cpp + gssettingswidget.ui ) kde4_add_kcfg_files(okularGenerator_ghostview_SRCS conf/gssettings.kcfgc ) - kde4_add_plugin(okularGenerator_ghostview ${okularGenerator_ghostview_SRCS}) -target_link_libraries(okularGenerator_ghostview okularcore ${LIBSPECTRE_LIBRARY} ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY}) - -install(TARGETS okularGenerator_ghostview DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}) +target_link_libraries(okularGenerator_ghostview + ${KDE4_KDEUI_LIBS} + ${QT_QTXML_LIBRARY} + ${LIBSPECTRE_LIBRARY} + okularcore +) +install( + TARGETS okularGenerator_ghostview + DESTINATION ${KDE4_PLUGIN_INSTALL_DIR} +) ########### install files ############### -install( FILES libokularGenerator_ghostview.desktop okularGhostview.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR} ) -install( PROGRAMS okularApplication_ghostview.desktop DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR} ) - -kde4_install_icons(${KDE4_DATA_INSTALL_DIR}/okular/icons) +install( + FILES + libokularGenerator_ghostview.desktop + okularGhostview.desktop + DESTINATION ${KDE4_SERVICES_INSTALL_DIR} +) +install( + PROGRAMS okularApplication_ghostview.desktop + DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR} +)