Commit 4ce09ae3 authored by Christoph Cullmann's avatar Christoph Cullmann

start to port part, mark all commented out places with FIXME and KF5

parent 084ddce9
......@@ -26,7 +26,7 @@
#include "kateextendedattribute.h"
#include <QtCore/QMap>
#include <QtWidgets/QFont>
#include <QtGui/QFont>
#include <kconfig.h>
......
......@@ -27,6 +27,8 @@
#include <QTimer>
#include <kglobal.h>
#include "kateconfig.h"
#include "kateglobal.h"
#include "katerenderer.h"
......@@ -412,7 +414,7 @@ void KateOnTheFlyChecker::performSpellCheck()
SLOT(misspelling(QString,int)));
connect(m_backgroundChecker, SIGNAL(done()), this, SLOT(spellCheckDone()));
m_backgroundChecker->restore(KGlobal::config().data());
// FIXME KF5 m_backgroundChecker->restore();
}
m_backgroundChecker->setSpeller(m_speller);
m_backgroundChecker->setText(text); // don't call 'start()' after this!
......@@ -670,10 +672,10 @@ QList<KTextEditor::MovingRange*> KateOnTheFlyChecker::installedMovingRanges(cons
void KateOnTheFlyChecker::updateConfig()
{
ON_THE_FLY_DEBUG;
m_speller.restore(KGlobal::config().data());
m_speller.restore();
if(m_backgroundChecker) {
m_backgroundChecker->restore(KGlobal::config().data());
// FIXME KF5 m_backgroundChecker->restore();
}
}
......
......@@ -34,8 +34,10 @@
#include <kaction.h>
#include <kactioncollection.h>
#include <klocalizedstring.h>
#include <kicon.h>
#include <kstandardaction.h>
#include <kglobal.h>
#include <sonnet/dialog.h>
#include <sonnet/backgroundchecker.h>
#include <sonnet/speller.h>
......@@ -110,14 +112,14 @@ void KateSpellCheckDialog::spellcheck( const KTextEditor::Cursor &from, const KT
{
m_speller = new Sonnet::Speller();
}
m_speller->restore(KGlobal::config().data());
m_speller->restore();
if ( !m_backgroundChecker )
{
m_backgroundChecker = new Sonnet::BackgroundChecker(*m_speller);
}
m_backgroundChecker->restore(KGlobal::config().data());
//FIXME KF5 m_backgroundChecker->restore();
if ( !m_sonnetDialog )
{
......
......@@ -26,6 +26,7 @@
#include "kateview.h"
#include "spellcheck/spellcheck.h"
#include <klocalizedstring.h>
#include <kdebug.h>
KateSpellingMenu::KateSpellingMenu(KateView *view)
......@@ -99,10 +100,10 @@ void KateSpellingMenu::createActions(KActionCollection *ac)
m_spellingMenu = m_spellingMenuAction->menu();
connect(m_spellingMenu, SIGNAL(aboutToShow()), this, SLOT(populateSuggestionsMenu()));
m_ignoreWordAction = new KAction(i18n("Ignore Word"), this);
m_ignoreWordAction = new QAction(i18n("Ignore Word"), this);
connect(m_ignoreWordAction, SIGNAL(triggered()), this, SLOT(ignoreCurrentWord()));
m_addToDictionaryAction = new KAction(i18n("Add to Dictionary"), this);
m_addToDictionaryAction = new QAction(i18n("Add to Dictionary"), this);
connect(m_addToDictionaryAction, SIGNAL(triggered()), this, SLOT(addCurrentWordToDictionary()));
setEnabled(false);
......@@ -188,7 +189,7 @@ void KateSpellingMenu::populateSuggestionsMenu()
int counter = 0;
for(QStringList::iterator i = m_currentSuggestions.begin(); i != m_currentSuggestions.end() && counter < 10; ++i) {
const QString& suggestion = *i;
KAction *action = new KAction(suggestion, m_spellingMenu);
QAction *action = new QAction(suggestion, m_spellingMenu);
connect(action, SIGNAL(triggered()), m_suggestionsSignalMapper, SLOT(map()));
m_suggestionsSignalMapper->setMapping(action, suggestion);
m_spellingMenu->addAction(action);
......
......@@ -63,8 +63,8 @@ class KateSpellingMenu : public QObject {
protected:
KateView *m_view;
KActionMenu *m_spellingMenuAction;
KAction *m_ignoreWordAction, *m_addToDictionaryAction;
KMenu *m_spellingMenu;
QAction *m_ignoreWordAction, *m_addToDictionaryAction;
QMenu *m_spellingMenu;
KTextEditor::MovingRange *m_currentMisspelledRange;
KTextEditor::MovingRange *m_currentMouseMisspelledRange;
KTextEditor::MovingRange *m_currentCaretMisspelledRange;
......
......@@ -29,11 +29,11 @@
#include "kateview.h"
#include "kateextendedattribute.h"
#include "katedocument.h"
// #include "katebuffer.h"
#include <klocale.h>
#include <kdebug.h>
#include <kmenu.h>
#include <klocalizedstring.h>
#include <cctype>
......
......@@ -34,6 +34,7 @@
#include <kxmlguifactory.h>
#include <ktoggleaction.h>
#include <kactionmenu.h>
#include <klocalizedstring.h>
#include <QtCore/QRegExp>
#include <QtCore/QEvent>
......
......@@ -36,6 +36,7 @@
#include "katecmd.h"
#include <kdebug.h>
#include <klocalizedstring.h>
#include <klocale.h>
#include <kurl.h>
#include <kshellcompletion.h>
......
......@@ -34,6 +34,7 @@
#include <kcolorutils.h>
#include <kcharsets.h>
#include <klocale.h>
#include <kglobal.h>
#include <kcomponentdata.h>
#include <kdebug.h>
......
This diff is collapsed.
......@@ -36,6 +36,7 @@
#include <kservicetypetrader.h>
#include <kdebug.h>
#include <kdeversion.h>
KatePartPluginInfo::KatePartPluginInfo(KService::Ptr service)
: m_pluginInfo(service)
......
......@@ -36,9 +36,11 @@
#include <kapplication.h>
#include <kcolorbutton.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <kfontdialog.h>
#include <klocale.h>
#include <kglobal.h>
#include <kdeprintdialog.h>
#include <kurl.h>
#include <kuser.h> // for loginName
......@@ -46,11 +48,11 @@
#include <knuminput.h>
#include <kcombobox.h>
#include <QtWidgets/QPainter>
#include <QtGui/QPainter>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QPrintDialog>
#include <QtWidgets/QPrinter>
#include <QtPrintSupport/QPrintDialog>
#include <QtPrintSupport/QPrinter>
#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>
......@@ -241,7 +243,7 @@ bool KatePrinter::print (KateDocument *doc)
tags["y"] = KGlobal::locale()->formatDate(dt.date(), KLocale::ShortDate);
tags["Y"] = KGlobal::locale()->formatDate(dt.date(), KLocale::LongDate);
tags["f"] = doc->url().fileName();
tags["U"] = doc->url().pathOrUrl();
tags["U"] = doc->url().toString();
if ( selectionOnly )
{
QString s( i18n("(Selection of) ") );
......
......@@ -34,6 +34,7 @@
#include <QtWidgets/QLabel>
#include <QtWidgets/QCompleter>
#include <QtWidgets/QApplication>
#include <QtWidgets/QAbstractItemView>
#include <KDE/KColorScheme>
#include <algorithm>
......
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