Commit 08284e5f authored by Michal Humpula's avatar Michal Humpula

migrate away from KShortcut

parent cebd94fe
......@@ -41,10 +41,9 @@
#include <kxmlguifactory.h>
#include <kdeversion.h>
#include <klocalizedstring.h>
#include <KShortcut>
#include <QEvent>
//Added by qt3to4:
#include <QShortcut>
#include <QContextMenuEvent>
#include <QPixmap>
#include <QChildEvent>
......@@ -158,12 +157,17 @@ namespace KateMDI
QString aname = QString("kate_mdi_toolview_") + tv->id;
// try to read the action shortcut
KShortcut sc;
QList<QKeySequence> shortcuts;
KSharedConfig::Ptr cfg = KGlobal::config();
sc = KShortcut( cfg->group("Shortcuts").readEntry( aname, QString() ) );
QString shortcutString = cfg->group("Shortcuts").readEntry(aname, QString());
foreach (const QString &shortcut, shortcutString.split(";")) {
shortcuts << QKeySequence::fromString(shortcut);
}
KToggleAction *a = new ToggleToolViewAction(i18n("Show %1", tv->text), tv, this );
// FIXME KF5 a->setShortcut(sc, QAction::ActiveShortcut); // no DefaultShortcut! see bug #144945
a->setShortcuts(shortcuts);
actionCollection()->addAction( aname.toLatin1(), a );
m_toolViewActions.append(a);
......
......@@ -56,7 +56,7 @@ KateFileTreePlugin::KateFileTreePlugin(QObject* parent, const QList<QVariant>&)
m_fileCommand(0)
{
// TODO: Remove once Qt allows an external app to change a debug category (ETA Qt 5.3)
#ifndef NDEBUG
#if 0
QLoggingCategory::setFilterRules(QStringLiteral("kate-filetree.debug = true"));
#endif
......
......@@ -33,7 +33,6 @@
#include <KPushButton>
#include <KMimeTypeTrader>
#include <KIcon>
#include <KShortcut>
#include <KTextEditor/Document>
#include <KTextEditor/View>
#include <khelpclient.h>
......@@ -109,7 +108,7 @@ EditSnippet::EditSnippet(SnippetRepository* repository, Snippet* snippet, QWidge
connect(m_ui->snippetArgumentsEdit, SIGNAL(textEdited(QString)), this, SLOT(topBoxModified()));
connect(m_ui->snippetPostfixEdit, SIGNAL(textEdited(QString)), this, SLOT(topBoxModified()));
connect(m_ui->snippetPrefixEdit, SIGNAL(textEdited(QString)), this, SLOT(topBoxModified()));
connect(m_ui->snippetShortcutWidget, SIGNAL(shortcutChanged(KShortcut)), this, SLOT(topBoxModified()));
connect(m_ui->snippetShortcutWidget, SIGNAL(shortcutChanged(QList<QKeySequence>)), this, SLOT(topBoxModified()));
connect(m_snippetView->document(), SIGNAL(textChanged(KTextEditor::Document*)), this, SLOT(validate()));
// if we edit a snippet, add all existing data
......
......@@ -45,8 +45,6 @@
#include <KUser>
#include <KShortcut>
#include "snippetstore.h"
#include "katepartdebug.h"
......
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