summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-10 12:42:51 (GMT)
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-10 12:42:54 (GMT)
commit0c7a45c7a53486028cf1d8515a3005293ae8e5ad (patch)
treeee8d048bb481c50d76169d0e7b987ca94a6da479
parentfc73cbf8869e60a1089a01f4bd0717d523fc74f9 (diff)
Disable lots of stuff and compile
The text generator is the only one compiled now. This version links for me but then doesn't find its KPart on startup. TTS has been completely disabled as well as some other things like the about dialog.
-rw-r--r--CMakeLists.txt2
-rw-r--r--core/document.h4
-rw-r--r--core/generator.cpp10
-rw-r--r--core/generator.h7
-rw-r--r--core/textdocumentgenerator.cpp12
-rw-r--r--core/textdocumentgenerator.h12
-rw-r--r--generators/CMakeLists.txt67
-rw-r--r--generators/txt/CMakeLists.txt2
-rw-r--r--generators/txt/generator_txt.cpp6
-rw-r--r--generators/txt/generator_txt.h14
-rw-r--r--generators/txt/libokularGenerator_txt.desktop95
-rw-r--r--part.cpp61
-rw-r--r--part.h2
-rw-r--r--ui/pageview.cpp88
-rw-r--r--ui/propertiesdialog.cpp7
15 files changed, 142 insertions, 247 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4eddb75..8db2a70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,7 +261,7 @@ message("KF5: Enable ui/tts.cpp again")
kde4_add_plugin(okularpart SHARED ${okularpart_SRCS})
-target_link_libraries(okularpart okularcore Qt5::Svg KF5::Parts ${MATH_LIB} KF5::Phonon KF5::Solid)
+target_link_libraries(okularpart okularcore Qt5::Svg KF5::Parts ${MATH_LIB} Phonon::phonon4qt5 KF5::Solid)
install(TARGETS okularpart DESTINATION ${PLUGIN_INSTALL_DIR})
diff --git a/core/document.h b/core/document.h
index bf00215..99d9b42 100644
--- a/core/document.h
+++ b/core/document.h
@@ -22,14 +22,14 @@
#include <QtPrintSupport/QPrinter>
#include <QtXml/QDomDocument>
-#include <kmimetype.h>
#include <kcomponentdata.h>
+#include <kmimetype.h>
+#include <kurl.h>
class QPrintDialog;
class KBookmark;
class KConfigDialog;
class KXMLGUIClient;
-class KUrl;
class DocumentItem;
namespace Okular {
diff --git a/core/generator.cpp b/core/generator.cpp
index cef260f..1308921 100644
--- a/core/generator.cpp
+++ b/core/generator.cpp
@@ -157,18 +157,16 @@ QImage GeneratorPrivate::image( PixmapRequest * )
}
-Generator::Generator( QObject *parent, const QVariantList &args )
- : QObject( parent ), d_ptr( new GeneratorPrivate() )
+Generator::Generator()
+ : d_ptr( new GeneratorPrivate() )
{
d_ptr->q_ptr = this;
- Q_UNUSED( args )
}
-Generator::Generator( GeneratorPrivate &dd, QObject *parent, const QVariantList &args )
- : QObject( parent ), d_ptr( &dd )
+Generator::Generator( GeneratorPrivate &dd )
+ : d_ptr( &dd )
{
d_ptr->q_ptr = this;
- Q_UNUSED( args )
}
Generator::~Generator()
diff --git a/core/generator.h b/core/generator.h
index 506f8a8..3be8c9a 100644
--- a/core/generator.h
+++ b/core/generator.h
@@ -213,7 +213,7 @@ class OKULAR_EXPORT Generator : public QObject
/**
* Creates a new generator.
*/
- Generator( QObject *parent, const QVariantList &args );
+ Generator();
/**
* Destroys the generator.
@@ -554,7 +554,7 @@ class OKULAR_EXPORT Generator : public QObject
protected:
/// @cond PRIVATE
- Generator( GeneratorPrivate &dd, QObject *parent, const QVariantList &args );
+ Generator(GeneratorPrivate &dd);
Q_DECLARE_PRIVATE( Generator )
GeneratorPrivate *d_ptr;
@@ -690,6 +690,9 @@ class OKULAR_EXPORT PixmapRequest
Q_DECLARE_METATYPE(Okular::Generator::PrintError)
+#define OkularGeneratorInterface_iid "org.kde.okular.Generator"
+Q_DECLARE_INTERFACE(Okular::Generator, OkularGeneratorInterface_iid)
+
#ifndef QT_NO_DEBUG_STREAM
OKULAR_EXPORT QDebug operator<<( QDebug str, const Okular::PixmapRequest &req );
#endif
diff --git a/core/textdocumentgenerator.cpp b/core/textdocumentgenerator.cpp
index b7516ed..bcfa609 100644
--- a/core/textdocumentgenerator.cpp
+++ b/core/textdocumentgenerator.cpp
@@ -272,8 +272,8 @@ void TextDocumentGeneratorPrivate::initializeGenerator()
q, SIGNAL(notice(QString,int)) );
}
-TextDocumentGenerator::TextDocumentGenerator( TextDocumentConverter *converter, const QString& configName, QObject *parent, const QVariantList &args )
- : Okular::Generator( *new TextDocumentGeneratorPrivate( converter ), parent, args )
+TextDocumentGenerator::TextDocumentGenerator( TextDocumentConverter *converter, const QString& configName )
+ : Okular::Generator( *new TextDocumentGeneratorPrivate( converter ) )
{
Q_D( TextDocumentGenerator );
d->mGeneralSettings = new TextDocumentSettings( configName, this );
@@ -281,14 +281,6 @@ TextDocumentGenerator::TextDocumentGenerator( TextDocumentConverter *converter,
d->initializeGenerator();
}
-TextDocumentGenerator::TextDocumentGenerator( TextDocumentConverter *converter, QObject *parent, const QVariantList &args )
- : Okular::Generator( *new TextDocumentGeneratorPrivate( converter ), parent, args )
-{
- Q_D( TextDocumentGenerator );
-
- d->initializeGenerator();
-}
-
TextDocumentGenerator::~TextDocumentGenerator()
{
}
diff --git a/core/textdocumentgenerator.h b/core/textdocumentgenerator.h
index ec331d6..f920e26 100644
--- a/core/textdocumentgenerator.h
+++ b/core/textdocumentgenerator.h
@@ -169,16 +169,8 @@ class OKULAR_EXPORT TextDocumentGenerator : public Generator, public Okular::Con
* don't have to delete it yourself
* @since 0.17 (KDE 4.11)
*/
- TextDocumentGenerator( TextDocumentConverter *converter, const QString& configName, QObject *parent, const QVariantList &args );
- /**
- * Creates a new generator that uses the specified @p converter.
- *
- * @deprecated use the one with configName
- *
- * @note the generator will take ownership of the converter, so you
- * don't have to delete it yourself
- */
- KDE_DEPRECATED TextDocumentGenerator( TextDocumentConverter *converter, QObject *parent, const QVariantList &args );
+ TextDocumentGenerator(TextDocumentConverter *converter, const QString& configName);
+
virtual ~TextDocumentGenerator();
// [INHERITED] load a document and fill up the pagesVector
diff --git a/generators/CMakeLists.txt b/generators/CMakeLists.txt
index 92340da..df568ed 100644
--- a/generators/CMakeLists.txt
+++ b/generators/CMakeLists.txt
@@ -79,52 +79,53 @@ set_package_properties("libqmobipocket" PROPERTIES
# let's enable the generators properly configured
-if(POPPLER_FOUND)
- add_subdirectory(poppler)
-endif(POPPLER_FOUND)
+message("KF5 enable generators")
+#if(POPPLER_FOUND)
+# add_subdirectory(poppler)
+#endif(POPPLER_FOUND)
-if(LIBSPECTRE_FOUND)
- add_subdirectory(spectre)
-endif(LIBSPECTRE_FOUND)
+#if(LIBSPECTRE_FOUND)
+# add_subdirectory(spectre)
+#endif(LIBSPECTRE_FOUND)
-if(KEXIV2_FOUND)
- add_subdirectory( kimgio )
-endif(KEXIV2_FOUND)
+#if(KEXIV2_FOUND)
+# add_subdirectory( kimgio )
+#endif(KEXIV2_FOUND)
-if(CHM_FOUND)
- add_subdirectory( chm )
-endif(CHM_FOUND)
+#if(CHM_FOUND)
+# add_subdirectory( chm )
+#endif(CHM_FOUND)
-if(DJVULIBRE_FOUND)
- add_subdirectory(djvu)
-endif(DJVULIBRE_FOUND)
+#if(DJVULIBRE_FOUND)
+# add_subdirectory(djvu)
+#endif(DJVULIBRE_FOUND)
-add_subdirectory(dvi)
+#add_subdirectory(dvi)
-if(TIFF_FOUND)
- add_subdirectory(tiff)
-endif(TIFF_FOUND)
+#if(TIFF_FOUND)
+# add_subdirectory(tiff)
+#endif(TIFF_FOUND)
-add_subdirectory(xps)
+#add_subdirectory(xps)
-add_subdirectory(ooo)
+#add_subdirectory(ooo)
-add_subdirectory(fictionbook)
+#add_subdirectory(fictionbook)
-add_subdirectory(comicbook)
+#add_subdirectory(comicbook)
-add_subdirectory(fax)
+#add_subdirectory(fax)
-if(JPEG_FOUND AND ZLIB_FOUND)
- add_subdirectory(plucker)
-endif(JPEG_FOUND AND ZLIB_FOUND)
+#if(JPEG_FOUND AND ZLIB_FOUND)
+# add_subdirectory(plucker)
+#endif(JPEG_FOUND AND ZLIB_FOUND)
-if(EPUB_FOUND)
- add_subdirectory(epub)
-endif(EPUB_FOUND)
+#if(EPUB_FOUND)
+# add_subdirectory(epub)
+#endif(EPUB_FOUND)
add_subdirectory(txt)
-if(QMOBIPOCKET_FOUND)
- add_subdirectory(mobipocket)
-endif()
+#if(QMOBIPOCKET_FOUND)
+# add_subdirectory(mobipocket)
+#endif()
diff --git a/generators/txt/CMakeLists.txt b/generators/txt/CMakeLists.txt
index faae13a..d798cc5 100644
--- a/generators/txt/CMakeLists.txt
+++ b/generators/txt/CMakeLists.txt
@@ -21,5 +21,5 @@ install(TARGETS okularGenerator_txt DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
-install( FILES libokularGenerator_txt.desktop okularTxt.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+install( FILES okularTxt.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( PROGRAMS okularApplication_txt.desktop active-documentviewer_txt.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
diff --git a/generators/txt/generator_txt.cpp b/generators/txt/generator_txt.cpp
index 6ff3d38..8a8f0f3 100644
--- a/generators/txt/generator_txt.cpp
+++ b/generators/txt/generator_txt.cpp
@@ -29,10 +29,8 @@ static KAboutData createAboutData()
return aboutData;
}
-OKULAR_EXPORT_PLUGIN( TxtGenerator, createAboutData() )
-
-TxtGenerator::TxtGenerator( QObject *parent, const QVariantList &args )
- : Okular::TextDocumentGenerator( new Txt::Converter, "okular_txt_generator_settings", parent, args )
+TxtGenerator::TxtGenerator()
+ : Okular::TextDocumentGenerator( new Txt::Converter, "okular_txt_generator_settings" )
{
}
diff --git a/generators/txt/generator_txt.h b/generators/txt/generator_txt.h
index d074a58..173d8e4 100644
--- a/generators/txt/generator_txt.h
+++ b/generators/txt/generator_txt.h
@@ -16,12 +16,14 @@
class TxtGenerator : public Okular::TextDocumentGenerator
{
- public:
- TxtGenerator( QObject *parent, const QVariantList &args );
- ~TxtGenerator() {}
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID OkularGeneratorInterface_iid FILE "generator_txt.json")
- // [INHERITED] reparse configuration
- void addPages( KConfigDialog* dlg );
+public:
+ TxtGenerator();
+ ~TxtGenerator() {}
+
+ void addPages( KConfigDialog* dlg ) Q_DECL_OVERRIDE;
};
-#endif \ No newline at end of file
+#endif
diff --git a/generators/txt/libokularGenerator_txt.desktop b/generators/txt/libokularGenerator_txt.desktop
deleted file mode 100644
index 24fdc2e..0000000
--- a/generators/txt/libokularGenerator_txt.desktop
+++ /dev/null
@@ -1,95 +0,0 @@
-[Desktop Entry]
-Type=Service
-Name=txt
-Name[bg]=txt
-Name[bs]=txt
-Name[ca]=txt
-Name[ca@valencia]=txt
-Name[cs]=txt
-Name[da]=txt
-Name[de]=Text
-Name[el]=txt
-Name[en_GB]=txt
-Name[es]=txt
-Name[et]=txt
-Name[fi]=txt
-Name[fr]=txt
-Name[gl]=txt
-Name[hu]=txt
-Name[ia]=txt
-Name[is]=txt
-Name[it]=testo
-Name[kk]=txt
-Name[ko]=txt
-Name[lt]=txt
-Name[mr]=txt
-Name[nb]=tekst
-Name[nds]=TXT
-Name[nl]=tekst
-Name[pa]=txt
-Name[pl]=txt
-Name[pt]=txt
-Name[pt_BR]=txt
-Name[ru]=txt
-Name[sk]=txt
-Name[sl]=txt
-Name[sr]=обични текст
-Name[sr@ijekavian]=обични текст
-Name[sr@ijekavianlatin]=obični tekst
-Name[sr@latin]=obični tekst
-Name[sv]=txt
-Name[tr]=txt
-Name[ug]=txt
-Name[uk]=txt
-Name[x-test]=xxtxtxx
-Name[zh_CN]=txt
-Name[zh_TW]=txt
-Comment=Txt backend for Okular
-Comment[bg]=Текстово ядро за Okular
-Comment[bs]=Pozadina txt-a za Okular
-Comment[ca]=Dorsal de txt per a l'Okular
-Comment[ca@valencia]=Dorsal de txt per a l'Okular
-Comment[cs]= Implementace Txt pro Okular
-Comment[da]=Txt-motor til Okular
-Comment[de]=Anzeigemodul für Text in Okular
-Comment[el]=Σύστημα υποστήριξης txt για το Okular
-Comment[en_GB]=Txt backend for Okular
-Comment[es]=Motor Txt para Okular
-Comment[et]=Okulari txt-i taustaprogramm
-Comment[fi]=TXT-taustaosa Okularille
-Comment[fr]=Moteur Txt pour Okular
-Comment[gl]=Infraestrutura de Txt para Okular
-Comment[hu]=Txt-bővítmény az Okularhoz
-Comment[ia]=Retro-administration per Txt pro Okular
-Comment[is]=TXT stuðningur fyrir Okular
-Comment[it]=Backend di testo semplice per Okular
-Comment[kk]=Okular-дың Txt тетігі
-Comment[ko]=Okular의 TXT 백엔드
-Comment[lt]=Txt programinė sąsaja, skirta Okular
-Comment[mr]=ओक्युलर करिता Txt बॅकएन्ड
-Comment[nb]=Txt-motor for Okular
-Comment[nds]=TXT-Hülpprogramm för Okular
-Comment[nl]=Tekst-backend voor Okular
-Comment[pa]=ਓਕੁਲਾਰ ਲਈ Txt ਬੈਕਐਂਡ
-Comment[pl]=Obsługa Txt dla Okulara
-Comment[pt]=Infra-estrutura de TXT para o Okular
-Comment[pt_BR]=Infraestrutura Txt para o Okular
-Comment[ru]=Модуль поддержки формата Txt для Okular
-Comment[sk]=Txt backend pre Okular
-Comment[sl]=Zaledje za txt za Okular
-Comment[sr]=Позадина обичног текста за Окулар
-Comment[sr@ijekavian]=Позадина обичног текста за Окулар
-Comment[sr@ijekavianlatin]=Pozadina običnog teksta za Okular
-Comment[sr@latin]=Pozadina običnog teksta za Okular
-Comment[sv]=Txt-gränssnitt för Okular
-Comment[tr]=Okular için txt arka ucu
-Comment[uk]=Додаток текстових файлів для Okular
-Comment[x-test]=xxTxt backend for Okularxx
-Comment[zh_CN]=Okular 的 Txt 格式后端
-Comment[zh_TW]=Okular txt 後端
-X-KDE-ServiceTypes=okular/Generator
-MimeType=text/plain;
-X-KDE-Library=okularGenerator_txt
-X-KDE-Priority=2
-X-KDE-okularAPIVersion=1
-X-KDE-okularHasInternalSettings=true
diff --git a/part.cpp b/part.cpp
index ae79964..b4836e2 100644
--- a/part.cpp
+++ b/part.cpp
@@ -157,7 +157,6 @@ class FileKeeper
};
Okular::PartFactory::PartFactory()
-: KPluginFactory(okularAboutData())
{
}
@@ -169,7 +168,7 @@ QObject *Okular::PartFactory::create(const char *iface, QWidget *parentWidget, Q
{
Q_UNUSED ( keyword );
- Okular::Part *object = new Okular::Part( parentWidget, parent, args, componentData() );
+ Okular::Part *object = new Okular::Part( parentWidget, parent, args );
object->setReadWrite( QLatin1String(iface) == QLatin1String("KParts::ReadWritePart") );
return object;
}
@@ -202,7 +201,7 @@ static QString compressedMimeFor( const QString& mime_to_check )
std::auto_ptr< KFilterBase > f;
compressedMimeMap[ QString::fromLatin1( "image/x-gzeps" ) ] = app_gzip;
// check we can read bzip2-compressed files
- f.reset( KFilterBase::findFilterByMimeType( app_bzip ) );
+ f.reset( KCompressionDevice::filterForCompressionType( KCompressionDevice::BZip2 ) );
if ( f.get() )
{
supportBzip = true;
@@ -212,7 +211,7 @@ static QString compressedMimeFor( const QString& mime_to_check )
compressedMimeMap[ QString::fromLatin1( "image/x-bzeps" ) ] = app_bzip;
}
// check if we can read XZ-compressed files
- f.reset( KFilterBase::findFilterByMimeType( app_xz ) );
+ f.reset( KCompressionDevice::filterForCompressionType( KCompressionDevice::Xz ) );
if ( f.get() )
{
supportXz = true;
@@ -302,8 +301,7 @@ namespace Okular
Part::Part(QWidget *parentWidget,
QObject *parent,
-const QVariantList &args,
-KComponentData componentData )
+const QVariantList &args)
: KParts::ReadWritePart(parent),
m_tempfile( 0 ), m_fileWasRemoved( false ), m_showMenuBarAction( 0 ), m_showFullScreenAction( 0 ), m_actionsSearched( false ),
m_cliPresentation(false), m_cliPrint(false), m_embedMode(detectEmbedMode(parentWidget, parent, args)), m_generatorGuiClient(0), m_keeper( 0 )
@@ -344,7 +342,8 @@ m_cliPresentation(false), m_cliPrint(false), m_embedMode(detectEmbedMode(parentW
new OkularLiveConnectExtension( this );
// we need an instance
- setComponentData( componentData );
+#pragma message("KF5 figure out if component data is needed here")
+// setComponentData( componentData );
GuiUtils::addIconLoader( iconLoader() );
@@ -1225,9 +1224,10 @@ bool Part::openFile()
{
KMimeType::Ptr mime;
QString fileNameToOpen = localFilePath();
- const bool isstdin = url().isLocalFile() && url().adjusted(QUrl::RemoveFilename) == QLatin1String( "-" );
+#pragma message("KF5: fix reading from stdin")
+ const bool isStdin = false; // url().isLocalFile() && url().adjusted(QUrl::RemoveFilename) == QLatin1String( "-" );
const QFileInfo fileInfo( fileNameToOpen );
- if ( !isstdin && !fileInfo.exists() )
+ if ( (!isStdin) && (!fileInfo.exists()) )
return false;
if ( !arguments().mimeType().isEmpty() )
{
@@ -2531,27 +2531,28 @@ void Part::enableStartWithPrint()
void Part::slotAboutBackend()
{
- const KComponentData *data = m_document->componentData();
- if ( !data )
- return;
-
- KAboutData aboutData( *data->aboutData() );
-
- if ( aboutData.programIconName().isEmpty() || aboutData.programIconName() == aboutData.appName() )
- {
- if ( const Okular::DocumentInfo *documentInfo = m_document->documentInfo() )
- {
- const QString mimeTypeName = documentInfo->get("mimeType");
- if ( !mimeTypeName.isEmpty() )
- {
- if ( KMimeType::Ptr type = KMimeType::mimeType( mimeTypeName ) )
- aboutData.setProgramIconName( type->iconName() );
- }
- }
- }
-
- KAboutApplicationDialog dlg( &aboutData, widget() );
- dlg.exec();
+#pragma message("KF5 Part::slotAboutBackend disabled")
+// const KComponentData *data = m_document->componentData();
+// if ( !data )
+// return;
+
+// KAboutData aboutData( *data->aboutData() );
+
+// if ( aboutData.programIconName().isEmpty() || aboutData.programIconName() == aboutData.appName() )
+// {
+// if ( const Okular::DocumentInfo *documentInfo = m_document->documentInfo() )
+// {
+// const QString mimeTypeName = documentInfo->get("mimeType");
+// if ( !mimeTypeName.isEmpty() )
+// {
+// if ( KMimeType::Ptr type = KMimeType::mimeType( mimeTypeName ) )
+// aboutData.setProgramIconName( type->iconName() );
+// }
+// }
+// }
+
+// KAboutApplicationDialog dlg( &aboutData, widget() );
+// dlg.exec();
}
diff --git a/part.h b/part.h
index 2b02ab9..e12e0c0 100644
--- a/part.h
+++ b/part.h
@@ -112,7 +112,7 @@ class OKULAR_PART_EXPORT Part : public KParts::ReadWritePart, public Okular::Doc
* which config file should be used by adding a string containing "ConfigFileName=<file name>"
* to 'args'.
**/
- Part(QWidget* parentWidget, QObject* parent, const QVariantList& args, KComponentData componentData);
+ Part(QWidget* parentWidget, QObject* parent, const QVariantList& args);
// Destructor
~Part();
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 214d581..fc3174f 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -67,7 +67,7 @@
#include "pageviewannotator.h"
#include "priorities.h"
#include "toolaction.h"
-#include "tts.h"
+//#include "tts.h"
#include "videowidget.h"
#include "core/action.h"
#include "core/area.h"
@@ -116,7 +116,7 @@ public:
PageViewPrivate( PageView *qq );
FormWidgetsController* formWidgetsController();
- OkularTTS* tts();
+// OkularTTS* tts();
QString selectedText() const;
// the document, pageviewItems and the 'visible cache'
@@ -172,7 +172,7 @@ public:
PageViewMessage * messageWindow; // in pageviewutils.h
bool m_formsVisible;
FormWidgetsController *formsWidgetController;
- OkularTTS * m_tts;
+// OkularTTS * m_tts;
QTimer * refreshTimer;
int refreshPage;
@@ -240,22 +240,22 @@ FormWidgetsController* PageViewPrivate::formWidgetsController()
return formsWidgetController;
}
-OkularTTS* PageViewPrivate::tts()
-{
- if ( !m_tts )
- {
- m_tts = new OkularTTS( q );
- if ( aSpeakStop )
- {
- QObject::connect( m_tts, SIGNAL(hasSpeechs(bool)),
- aSpeakStop, SLOT(setEnabled(bool)) );
- QObject::connect( m_tts, SIGNAL(errorMessage(QString)),
- q, SLOT(errorMessage(QString)) );
- }
- }
+//OkularTTS* PageViewPrivate::tts()
+//{
+// if ( !m_tts )
+// {
+// m_tts = new OkularTTS( q );
+// if ( aSpeakStop )
+// {
+// QObject::connect( m_tts, SIGNAL(hasSpeechs(bool)),
+// aSpeakStop, SLOT(setEnabled(bool)) );
+// QObject::connect( m_tts, SIGNAL(errorMessage(QString)),
+// q, SLOT(errorMessage(QString)) );
+// }
+// }
- return m_tts;
-}
+// return m_tts;
+//}
/* PageView. What's in this file? -> quick overview.
@@ -300,7 +300,7 @@ PageView::PageView( QWidget *parent, Okular::Document *document )
d->messageWindow = new PageViewMessage(this);
d->m_formsVisible = false;
d->formsWidgetController = 0;
- d->m_tts = 0;
+// d->m_tts = 0;
d->refreshTimer = 0;
d->refreshPage = -1;
d->aRotateClockwise = 0;
@@ -405,8 +405,8 @@ PageView::PageView( QWidget *parent, Okular::Document *document )
PageView::~PageView()
{
- if ( d->m_tts )
- d->m_tts->stopAllSpeechs();
+// if ( d->m_tts )
+// d->m_tts->stopAllSpeechs();
// delete the local storage structure
@@ -2652,7 +2652,7 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
else if ( choice == speakText )
{
// [2] speech selection using KTTSD
- d->tts()->say( selectedText );
+// d->tts()->say( selectedText );
}
}
}
@@ -2836,8 +2836,8 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
QAction *textToClipboard = menu.addAction( KIcon( "edit-copy" ), i18n( "Copy Text" ) );
QAction *speakText = 0;
QAction *httpLink = 0;
- if ( Okular::Settings::useKTTSD() )
- speakText = menu.addAction( KIcon( "text-speak" ), i18n( "Speak Text" ) );
+// if ( Okular::Settings::useKTTSD() )
+// speakText = menu.addAction( KIcon( "text-speak" ), i18n( "Speak Text" ) );
if ( !d->document->isAllowed( Okular::AllowCopy ) )
{
textToClipboard->setEnabled( false );
@@ -2862,7 +2862,7 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
else if ( choice == speakText )
{
const QString text = d->selectedText();
- d->tts()->say( text );
+// d->tts()->say( text );
}
else if ( choice == httpLink )
new KRun( KUrl( url ), this );
@@ -4910,37 +4910,37 @@ void PageView::slotRefreshPage()
void PageView::slotSpeakDocument()
{
- QString text;
- QVector< PageViewItem * >::const_iterator it = d->items.constBegin(), itEnd = d->items.constEnd();
- for ( ; it < itEnd; ++it )
- {
- Okular::RegularAreaRect * area = textSelectionForItem( *it );
- text.append( (*it)->page()->text( area ) );
- text.append( '\n' );
- delete area;
- }
+// QString text;
+// QVector< PageViewItem * >::const_iterator it = d->items.constBegin(), itEnd = d->items.constEnd();
+// for ( ; it < itEnd; ++it )
+// {
+// Okular::RegularAreaRect * area = textSelectionForItem( *it );
+// text.append( (*it)->page()->text( area ) );
+// text.append( '\n' );
+// delete area;
+// }
- d->tts()->say( text );
+// d->tts()->say( text );
}
void PageView::slotSpeakCurrentPage()
{
- const int currentPage = d->document->viewport().pageNumber;
+// const int currentPage = d->document->viewport().pageNumber;
- PageViewItem *item = d->items.at( currentPage );
- Okular::RegularAreaRect * area = textSelectionForItem( item );
- const QString text = item->page()->text( area );
- delete area;
+// PageViewItem *item = d->items.at( currentPage );
+// Okular::RegularAreaRect * area = textSelectionForItem( item );
+// const QString text = item->page()->text( area );
+// delete area;
- d->tts()->say( text );
+// d->tts()->say( text );
}
void PageView::slotStopSpeaks()
{
- if ( !d->m_tts )
- return;
+// if ( !d->m_tts )
+// return;
- d->m_tts->stopAllSpeechs();
+// d->m_tts->stopAllSpeechs();
}
void PageView::slotAction( Okular::Action *action )
diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp
index 5aed457..04e86dc 100644
--- a/ui/propertiesdialog.cpp
+++ b/ui/propertiesdialog.cpp
@@ -180,9 +180,12 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc)
}
// current width: left columnt + right column + dialog borders
- int width = layout->minimumSize().width() + valMaxWidth + 2 * marginHint() + spacingHint() + 30;
+#pragma message("KF5 figure out margin/spacing")
+// int width = layout->minimumSize().width() + valMaxWidth + 2 * marginHint() + spacingHint() + 30;
+ int width = layout->minimumSize().width() + valMaxWidth + 30;
if ( page2Layout )
- width = qMax( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 );
+// width = qMax( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 );
+ width = qMax( width, page2Layout->sizeHint().width() + 31 );
// stay inside the 2/3 of the screen width
QRect screenContainer = KGlobalSettings::desktopGeometry( this );
width = qMin( width, 2*screenContainer.width()/3 );