okular: remove unused Okular::Movie constructor

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-12-16 17:29:07 +02:00
parent f525fd2094
commit 8b89c85015
5 changed files with 27 additions and 48 deletions

View file

@ -11,7 +11,6 @@
#include "audioplayer_p.h"
// qt/kde includes
#include <qbuffer.h>
#include <qdir.h>
#include <kdebug.h>
#include <krandom.h>

View file

@ -15,7 +15,6 @@
#include <qsignalmapper.h>
#include <kurl.h>
#include <QBuffer>
class PlayData;
class SoundInfo;

View file

@ -14,9 +14,7 @@
#include <qdir.h>
#include <qimage.h>
#include <qstring.h>
#include <kdebug.h>
#include <ktemporaryfile.h>
#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 )

View file

@ -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.
*/

View file

@ -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}
)