summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-10 00:04:40 (GMT)
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-10 00:04:40 (GMT)
commitb32d8153013ab7b744e00ef999957621bf85554a (patch)
treeca638ef625c1c714bbb792d1822be4dad9f5c4f3
parent96b0e27c44ce8a4b5c6ca19aed518a27e4953350 (diff)
A few action and include fixes
-rw-r--r--ui/annotationwidgets.cpp2
-rw-r--r--ui/annotwindow.cpp4
-rw-r--r--ui/fileprinterpreview.cpp1
-rw-r--r--ui/formwidgets.cpp17
-rw-r--r--ui/minibar.cpp1
5 files changed, 14 insertions, 11 deletions
diff --git a/ui/annotationwidgets.cpp b/ui/annotationwidgets.cpp
index 523edb2..6cd48f8 100644
--- a/ui/annotationwidgets.cpp
+++ b/ui/annotationwidgets.cpp
@@ -659,7 +659,7 @@ QWidget * FileAttachmentAnnotationWidget::createExtraWidget()
Okular::EmbeddedFile *ef = m_attachAnn->embeddedFile();
const int size = ef->size();
- const QString sizeString = size <= 0 ? i18nc( "Not available size", "N/A" ) : KGlobal::locale()->formatByteSize( size );
+ const QString sizeString = size <= 0 ? i18nc( "Not available size", "N/A" ) : KLocale::global()->formatByteSize( size );
const QString descString = ef->description().isEmpty() ? i18n( "No description available." ) : ef->description();
QGridLayout * lay = new QGridLayout( widget );
diff --git a/ui/annotwindow.cpp b/ui/annotwindow.cpp
index 1a54bf1..5eeb7e0 100644
--- a/ui/annotwindow.cpp
+++ b/ui/annotwindow.cpp
@@ -301,8 +301,8 @@ void AnnotWindow::slotUpdateUndoAndRedoInContextMenu(QMenu* menu)
QList<QAction *> actionList = menu->actions();
enum { UndoAct, RedoAct, CutAct, CopyAct, PasteAct, ClearAct, SelectAllAct, NCountActs };
- KAction *kundo = KStandardAction::create( KStandardAction::Undo, m_document, SLOT(undo()), menu);
- KAction *kredo = KStandardAction::create( KStandardAction::Redo, m_document, SLOT(redo()), menu);
+ QAction *kundo = KStandardAction::create( KStandardAction::Undo, m_document, SLOT(undo()), menu);
+ QAction *kredo = KStandardAction::create( KStandardAction::Redo, m_document, SLOT(redo()), menu);
connect(m_document, SIGNAL(canUndoChanged(bool)), kundo, SLOT(setEnabled(bool)));
connect(m_document, SIGNAL(canRedoChanged(bool)), kredo, SLOT(setEnabled(bool)));
kundo->setEnabled(m_document->canUndo());
diff --git a/ui/fileprinterpreview.cpp b/ui/fileprinterpreview.cpp
index f595ec0..1ffcb0b 100644
--- a/ui/fileprinterpreview.cpp
+++ b/ui/fileprinterpreview.cpp
@@ -18,6 +18,7 @@
#include <QtWidgets/QLabel>
#include <QtGui/QShowEvent>
+#include <klocalizedstring.h>
#include <kmimetypetrader.h>
#include <kparts/readonlypart.h>
#include <kpluginfactory.h>
diff --git a/ui/formwidgets.cpp b/ui/formwidgets.cpp
index a7f7ffd..e5f86e9 100644
--- a/ui/formwidgets.cpp
+++ b/ui/formwidgets.cpp
@@ -18,6 +18,7 @@
#include <klocale.h>
#include <kstandardaction.h>
#include <kaction.h>
+#include <kurl.h>
// local includes
#include "core/form.h"
@@ -440,8 +441,8 @@ void FormLineEdit::contextMenuEvent( QContextMenuEvent* event )
QList<QAction *> actionList = menu->actions();
enum { UndoAct, RedoAct, CutAct, CopyAct, PasteAct, DeleteAct, SelectAllAct };
- KAction *kundo = KStandardAction::create( KStandardAction::Undo, m_controller, SIGNAL( requestUndo() ), menu );
- KAction *kredo = KStandardAction::create( KStandardAction::Redo, m_controller, SIGNAL( requestRedo() ), menu );
+ QAction *kundo = KStandardAction::create( KStandardAction::Undo, m_controller, SIGNAL( requestUndo() ), menu );
+ QAction *kredo = KStandardAction::create( KStandardAction::Redo, m_controller, SIGNAL( requestRedo() ), menu );
connect( m_controller, SIGNAL( canUndoChanged( bool ) ), kundo, SLOT( setEnabled( bool ) ) );
connect( m_controller, SIGNAL( canRedoChanged( bool ) ), kredo, SLOT( setEnabled( bool ) ) );
kundo->setEnabled( m_controller->canUndo() );
@@ -554,8 +555,8 @@ void TextAreaEdit::slotUpdateUndoAndRedoInContextMenu( QMenu* menu )
QList<QAction *> actionList = menu->actions();
enum { UndoAct, RedoAct, CutAct, CopyAct, PasteAct, ClearAct, SelectAllAct, NCountActs };
- KAction *kundo = KStandardAction::create( KStandardAction::Undo, m_controller, SIGNAL( requestUndo() ), menu );
- KAction *kredo = KStandardAction::create( KStandardAction::Redo, m_controller, SIGNAL( requestRedo() ), menu );
+ QAction *kundo = KStandardAction::create( KStandardAction::Undo, m_controller, SIGNAL( requestUndo() ), menu );
+ QAction *kredo = KStandardAction::create( KStandardAction::Redo, m_controller, SIGNAL( requestRedo() ), menu );
connect(m_controller, SIGNAL( canUndoChanged( bool ) ), kundo, SLOT( setEnabled( bool ) ) );
connect(m_controller, SIGNAL( canRedoChanged( bool ) ), kredo, SLOT( setEnabled( bool ) ) );
kundo->setEnabled( m_controller->canUndo() );
@@ -670,8 +671,8 @@ bool FileEdit::eventFilter( QObject* obj, QEvent* event )
QList< QAction* > actionList = menu->actions();
enum { UndoAct, RedoAct, CutAct, CopyAct, PasteAct, DeleteAct, SelectAllAct };
- KAction *kundo = KStandardAction::create( KStandardAction::Undo, m_controller, SIGNAL( requestUndo() ), menu );
- KAction *kredo = KStandardAction::create( KStandardAction::Redo, m_controller, SIGNAL( requestRedo() ), menu );
+ QAction *kundo = KStandardAction::create( KStandardAction::Undo, m_controller, SIGNAL( requestUndo() ), menu );
+ QAction *kredo = KStandardAction::create( KStandardAction::Redo, m_controller, SIGNAL( requestRedo() ), menu );
connect(m_controller, SIGNAL( canUndoChanged( bool ) ), kundo, SLOT( setEnabled( bool ) ) );
connect(m_controller, SIGNAL( canRedoChanged( bool ) ), kredo, SLOT( setEnabled( bool ) ) );
kundo->setEnabled( m_controller->canUndo() );
@@ -933,8 +934,8 @@ void ComboEdit::contextMenuEvent( QContextMenuEvent* event )
QList<QAction *> actionList = menu->actions();
enum { UndoAct, RedoAct, CutAct, CopyAct, PasteAct, DeleteAct, SelectAllAct };
- KAction *kundo = KStandardAction::create( KStandardAction::Undo, m_controller, SIGNAL( requestUndo() ), menu );
- KAction *kredo = KStandardAction::create( KStandardAction::Redo, m_controller, SIGNAL( requestRedo() ), menu );
+ QAction *kundo = KStandardAction::create( KStandardAction::Undo, m_controller, SIGNAL( requestUndo() ), menu );
+ QAction *kredo = KStandardAction::create( KStandardAction::Redo, m_controller, SIGNAL( requestRedo() ), menu );
connect( m_controller, SIGNAL( canUndoChanged( bool ) ), kundo, SLOT( setEnabled( bool ) ) );
connect( m_controller, SIGNAL( canRedoChanged( bool ) ), kredo, SLOT( setEnabled( bool ) ) );
kundo->setEnabled( m_controller->canUndo() );
diff --git a/ui/minibar.cpp b/ui/minibar.cpp
index 48b95f8..adecff7 100644
--- a/ui/minibar.cpp
+++ b/ui/minibar.cpp
@@ -22,6 +22,7 @@
#include <QtWidgets/QToolButton>
#include <qvalidator.h>
#include <qpainter.h>
+#include <kglobalsettings.h>
#include <kicon.h>
#include <kicontheme.h>
#include <klineedit.h>