Commit 96b0e27c authored by Frederik Gladhorn's avatar Frederik Gladhorn

QAction, more includes fixed

parent 4ce837a7
......@@ -42,7 +42,7 @@ PreferencesDialog::PreferencesDialog( QWidget * parent, KConfigSkeleton * skelet
addPage( m_performance, i18n("Performance"), "preferences-system-performance", i18n("Performance Tuning") );
if( embedMode == Okular::ViewerWidgetMode )
{
setCaption( i18n("Configure Viewer") );
setWindowTitle( i18n("Configure Viewer") );
}
else
{
......
......@@ -39,7 +39,6 @@
#include <kaboutdata.h>
#include <k4aboutdata.h>
#include <kauthorized.h>
#include <kcomponentdata.h>
#include <kconfigdialog.h>
#include <kdebug.h>
#include <klibloader.h>
......
......@@ -23,9 +23,9 @@
#include <QtXml/QDomDocument>
#include <kmimetype.h>
#include <kcomponentdata.h>
class QPrintDialog;
class KComponentData;
class KBookmark;
class KConfigDialog;
class KXMLGUIClient;
......
......@@ -12,6 +12,7 @@
#define _EXTENSIONS_H_
#include <kparts/browserextension.h>
#include <kparts/liveconnectextension.h>
namespace Okular
{
......
......@@ -12,6 +12,7 @@
#include "converter.h"
#include <kaboutdata.h>
#include <klocalizedstring.h>
#include <KConfigDialog>
static KAboutData createAboutData()
......
......@@ -37,6 +37,7 @@
#include <kaboutapplicationdialog.h>
#include <kaction.h>
#include <kactioncollection.h>
#include <kbookmarkaction.h>
#include <kdirwatch.h>
#include <kstandardaction.h>
#include <kpluginfactory.h>
......@@ -210,7 +211,7 @@ static QString compressedMimeFor( const QString& mime_to_check )
compressedMimeMap[ QString::fromLatin1( "application/x-bzdvi" ) ] = app_bzip;
compressedMimeMap[ QString::fromLatin1( "image/x-bzeps" ) ] = app_bzip;
}
// check we can read XZ-compressed files
// check if we can read XZ-compressed files
f.reset( KFilterBase::findFilterByMimeType( app_xz ) );
if ( f.get() )
{
......@@ -713,7 +714,7 @@ void Part::setupViewerActions()
reload->setIcon( KIcon( "view-refresh" ) );
reload->setWhatsThis( i18n( "Reload the current document from disk." ) );
connect( reload, SIGNAL(triggered()), this, SLOT(slotReload()) );
reload->setShortcut( KStandardShortcut::reload() );
reload->setShortcut( QKeySequence(QKeySequence::Refresh) );
m_reload = reload;
m_closeFindBar = ac->addAction( "close_find_bar", this, SLOT(slotHideFindBar()) );
......@@ -755,7 +756,7 @@ void Part::setupActions()
m_saveCopyAs = KStandardAction::saveAs( this, SLOT(slotSaveCopyAs()), ac );
m_saveCopyAs->setText( i18n( "Save &Copy As..." ) );
m_saveCopyAs->setShortcut( KShortcut() );
m_saveCopyAs->setShortcut( QKeySequence(QKeySequence::SaveAs) );
ac->addAction( "file_save_copy", m_saveCopyAs );
m_saveCopyAs->setEnabled( false );
......@@ -1050,7 +1051,7 @@ void Part::loadCancelled(const QString &reason)
{
if (!reason.isEmpty())
{
KMessageBox::error( widget(), i18n("Could not open %1. Reason: %2", url().prettyUrl(), reason ) );
KMessageBox::error( widget(), i18n("Could not open %1. Reason: %2", url().toDisplayString(), reason ) );
}
}
}
......@@ -1081,11 +1082,11 @@ KConfigDialog * Part::slotGeneratorPreferences( )
if( m_embedMode == ViewerWidgetMode )
{
dialog->setCaption( i18n( "Configure Viewer Backends" ) );
dialog->setWindowTitle( i18n( "Configure Viewer Backends" ) );
}
else
{
dialog->setCaption( i18n( "Configure Backends" ) );
dialog->setWindowTitle( i18n( "Configure Backends" ) );
}
m_document->fillConfigDialog( dialog );
......@@ -1224,7 +1225,7 @@ bool Part::openFile()
{
KMimeType::Ptr mime;
QString fileNameToOpen = localFilePath();
const bool isstdin = url().isLocalFile() && url().fileName( KUrl::ObeyTrailingSlash ) == QLatin1String( "-" );
const bool isstdin = url().isLocalFile() && url().adjusted(QUrl::RemoveFilename) == QLatin1String( "-" );
const QFileInfo fileInfo( fileNameToOpen );
if ( !isstdin && !fileInfo.exists() )
return false;
......@@ -1304,7 +1305,7 @@ bool Part::openFile()
// if the user presses cancel, abort opening
KPasswordDialog dlg( widget(), wallet ? KPasswordDialog::ShowKeepPassword : KPasswordDialog::KPasswordDialogFlags() );
dlg.setCaption( i18n( "Document Password" ) );
dlg.setWindowTitle( i18n( "Document Password" ) );
dlg.setPrompt( prompt );
if( !dlg.exec() )
break;
......@@ -2083,7 +2084,7 @@ void Part::slotPreviousBookmark()
if ( !bookmark.isNull() )
{
DocumentViewport vp( bookmark.url().htmlRef() );
DocumentViewport vp( bookmark.url().fragment(QUrl::FullyDecoded) );
m_document->setViewport( vp );
}
}
......@@ -2095,7 +2096,7 @@ void Part::slotNextBookmark()
if ( !bookmark.isNull() )
{
DocumentViewport vp( bookmark.url().htmlRef() );
DocumentViewport vp( bookmark.url().fragment(QUrl::FullyDecoded) );
m_document->setViewport( vp );
}
}
......@@ -2574,7 +2575,7 @@ void Part::slotExportAs(QAction * act)
filter = m_exportFormats.at( id - 2 ).mimeType()->name();
break;
}
QString fileName = KFileDialog::getSaveFileName( url().isLocalFile() ? url().directory() : QString(),
QString fileName = KFileDialog::getSaveFileName( url().isLocalFile() ? url().adjusted(QUrl::RemoveFilename) : QString(),
filter, widget(), QString(),
KFileDialog::ConfirmOverwrite );
if ( !fileName.isEmpty() )
......
......@@ -16,7 +16,7 @@
#ifndef _PART_H_
#define _PART_H_
#include <kparts/part.h>
#include <kparts/readwritepart.h>
#include <kpluginfactory.h>
#include <kmessagewidget.h>
#include <qicon.h>
......@@ -24,6 +24,7 @@
#include <qpointer.h>
#include <qprocess.h>
#include <kurl.h>
#include <kio/job.h>
#include "core/observer.h"
#include "core/document.h"
#include "kdocumentviewer.h"
......@@ -293,39 +294,39 @@ class OKULAR_PART_EXPORT Part : public KParts::ReadWritePart, public Okular::Doc
QStringList m_searchHistory;
// actions
KAction *m_gotoPage;
KAction *m_prevPage;
KAction *m_nextPage;
KAction *m_beginningOfDocument;
KAction *m_endOfDocument;
KAction *m_historyBack;
KAction *m_historyNext;
KAction *m_addBookmark;
KAction *m_renameBookmark;
KAction *m_prevBookmark;
KAction *m_nextBookmark;
KAction *m_copy;
KAction *m_selectAll;
KAction *m_find;
KAction *m_findNext;
KAction *m_findPrev;
KAction *m_saveAs;
KAction *m_saveCopyAs;
KAction *m_printPreview;
KAction *m_showProperties;
KAction *m_showEmbeddedFiles;
KAction *m_exportAs;
QAction *m_gotoPage;
QAction *m_prevPage;
QAction *m_nextPage;
QAction *m_beginningOfDocument;
QAction *m_endOfDocument;
QAction *m_historyBack;
QAction *m_historyNext;
QAction *m_addBookmark;
QAction *m_renameBookmark;
QAction *m_prevBookmark;
QAction *m_nextBookmark;
QAction *m_copy;
QAction *m_selectAll;
QAction *m_find;
QAction *m_findNext;
QAction *m_findPrev;
QAction *m_saveAs;
QAction *m_saveCopyAs;
QAction *m_printPreview;
QAction *m_showProperties;
QAction *m_showEmbeddedFiles;
QAction *m_exportAs;
QAction *m_exportAsText;
QAction *m_exportAsDocArchive;
KAction *m_showPresentation;
QAction *m_showPresentation;
KToggleAction* m_showMenuBarAction;
KToggleAction* m_showLeftPanel;
KToggleAction* m_showBottomBar;
KToggleFullScreenAction* m_showFullScreenAction;
KAction *m_aboutBackend;
KAction *m_reload;
QAction *m_aboutBackend;
QAction *m_reload;
QMenu *m_exportAsMenu;
KAction *m_closeFindBar;
QAction *m_closeFindBar;
bool m_actionsSearched;
BrowserExtension *m_bExtension;
......
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