mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 02:42:52 +00:00
okular: remove unused Okular::Movie constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f525fd2094
commit
8b89c85015
5 changed files with 27 additions and 48 deletions
|
@ -11,7 +11,6 @@
|
||||||
#include "audioplayer_p.h"
|
#include "audioplayer_p.h"
|
||||||
|
|
||||||
// qt/kde includes
|
// qt/kde includes
|
||||||
#include <qbuffer.h>
|
|
||||||
#include <qdir.h>
|
#include <qdir.h>
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <krandom.h>
|
#include <krandom.h>
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include <qsignalmapper.h>
|
#include <qsignalmapper.h>
|
||||||
#include <kurl.h>
|
#include <kurl.h>
|
||||||
|
|
||||||
#include <QBuffer>
|
|
||||||
class PlayData;
|
class PlayData;
|
||||||
class SoundInfo;
|
class SoundInfo;
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,7 @@
|
||||||
#include <qdir.h>
|
#include <qdir.h>
|
||||||
#include <qimage.h>
|
#include <qimage.h>
|
||||||
#include <qstring.h>
|
#include <qstring.h>
|
||||||
|
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <ktemporaryfile.h>
|
|
||||||
|
|
||||||
#include "debug_p.h"
|
#include "debug_p.h"
|
||||||
|
|
||||||
|
@ -29,7 +27,6 @@ class Movie::Private
|
||||||
: m_url( url ),
|
: m_url( url ),
|
||||||
m_rotation( Rotation0 ),
|
m_rotation( Rotation0 ),
|
||||||
m_playMode( PlayOnce ),
|
m_playMode( PlayOnce ),
|
||||||
m_tmp( nullptr ),
|
|
||||||
m_showControls( false ),
|
m_showControls( false ),
|
||||||
m_autoPlay( false ),
|
m_autoPlay( false ),
|
||||||
m_showPosterImage( false )
|
m_showPosterImage( false )
|
||||||
|
@ -40,11 +37,10 @@ class Movie::Private
|
||||||
QSize m_aspect;
|
QSize m_aspect;
|
||||||
Rotation m_rotation;
|
Rotation m_rotation;
|
||||||
PlayMode m_playMode;
|
PlayMode m_playMode;
|
||||||
KTemporaryFile *m_tmp;
|
|
||||||
QImage m_posterImage;
|
QImage m_posterImage;
|
||||||
bool m_showControls : 1;
|
bool m_showControls;
|
||||||
bool m_autoPlay : 1;
|
bool m_autoPlay;
|
||||||
bool m_showPosterImage : 1;
|
bool m_showPosterImage;
|
||||||
};
|
};
|
||||||
|
|
||||||
Movie::Movie( const QString& fileName )
|
Movie::Movie( const QString& fileName )
|
||||||
|
@ -52,35 +48,13 @@ 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()
|
Movie::~Movie()
|
||||||
{
|
{
|
||||||
delete d->m_tmp;
|
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Movie::url() const
|
QString Movie::url() const
|
||||||
{
|
{
|
||||||
if (d->m_tmp)
|
|
||||||
return d->m_tmp->fileName();
|
|
||||||
else
|
|
||||||
return d->m_url;
|
return d->m_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,6 @@ class OKULAR_EXPORT Movie
|
||||||
*/
|
*/
|
||||||
explicit Movie( const QString& fileName );
|
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.
|
* Destroys the movie object.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,17 +18,29 @@ set(okularGenerator_ghostview_SRCS
|
||||||
|
|
||||||
kde4_add_kcfg_files(okularGenerator_ghostview_SRCS conf/gssettings.kcfgc )
|
kde4_add_kcfg_files(okularGenerator_ghostview_SRCS conf/gssettings.kcfgc )
|
||||||
|
|
||||||
|
|
||||||
kde4_add_plugin(okularGenerator_ghostview ${okularGenerator_ghostview_SRCS})
|
kde4_add_plugin(okularGenerator_ghostview ${okularGenerator_ghostview_SRCS})
|
||||||
|
|
||||||
target_link_libraries(okularGenerator_ghostview okularcore ${LIBSPECTRE_LIBRARY} ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY})
|
target_link_libraries(okularGenerator_ghostview
|
||||||
|
${KDE4_KDEUI_LIBS}
|
||||||
install(TARGETS okularGenerator_ghostview DESTINATION ${KDE4_PLUGIN_INSTALL_DIR})
|
${QT_QTXML_LIBRARY}
|
||||||
|
${LIBSPECTRE_LIBRARY}
|
||||||
|
okularcore
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS okularGenerator_ghostview
|
||||||
|
DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
########### install files ###############
|
########### install files ###############
|
||||||
|
|
||||||
install( FILES libokularGenerator_ghostview.desktop okularGhostview.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR} )
|
install(
|
||||||
install( PROGRAMS okularApplication_ghostview.desktop DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR} )
|
FILES
|
||||||
|
libokularGenerator_ghostview.desktop
|
||||||
kde4_install_icons(${KDE4_DATA_INSTALL_DIR}/okular/icons)
|
okularGhostview.desktop
|
||||||
|
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
install(
|
||||||
|
PROGRAMS okularApplication_ghostview.desktop
|
||||||
|
DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue