[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdevplatform/5.1] /: Move qRegisterMetaType calls into constructors of methods' classes
From: Friedrich W. H. Kossebau <null () kde ! org>
Date: 2017-06-30 17:19:16
Message-ID: E1dQzZc-0004Vy-LZ () code ! kde ! org
[Download RAW message or body]
Git commit 6055d62d28df8f6da47a77d1e3f066a14c973db3 by Friedrich W. H. Kossebau.
Committed on 30/06/2017 at 17:18.
Pushed by kossebau into branch '5.1'.
Move qRegisterMetaType calls into constructors of methods' classes
M +2 -2 language/duchain/navigation/abstractnavigationcontext.cpp
M +2 -2 plugins/contextbrowser/contextbrowser.cpp
M +2 -1 plugins/grepview/grepjob.cpp
https://commits.kde.org/kdevplatform/6055d62d28df8f6da47a77d1e3f066a14c973db3
diff --git a/language/duchain/navigation/abstractnavigationcontext.cpp \
b/language/duchain/navigation/abstractnavigationcontext.cpp index \
6ede1ae3b..9ae6ba44d 100644
--- a/language/duchain/navigation/abstractnavigationcontext.cpp
+++ b/language/duchain/navigation/abstractnavigationcontext.cpp
@@ -53,6 +53,8 @@ AbstractNavigationContext::AbstractNavigationContext( \
KDevelop::TopDUContextPoin : m_selectedLink(0), m_shorten(false), m_linkCount(-1), \
m_currentPositionLine(0), m_previousContext(previousContext), \
m_topContext(topContext) {
+ qRegisterMetaType<KTextEditor::Cursor>("KTextEditor::Cursor");
+ qRegisterMetaType<IDocumentation::Ptr>("IDocumentation::Ptr");
}
void AbstractNavigationContext::addExternalHtml( const QString& text )
@@ -162,7 +164,6 @@ NavigationContextPointer AbstractNavigationContext::execute(const \
NavigationActi
qCDebug(LANGUAGE) << "Navigation-action has invalid declaration" << endl;
return NavigationContextPointer(this);
}
- qRegisterMetaType<KTextEditor::Cursor>("KTextEditor::Cursor");
switch( action.type ) {
case NavigationAction::ExecuteKey:
@@ -215,7 +216,6 @@ NavigationContextPointer AbstractNavigationContext::execute(const \
NavigationActi
auto doc = ICore::self()->documentationController()->documentationForDeclaration(action.decl.data());
// This is used to execute the slot delayed in the event-loop, so crashes \
are avoided
// which can happen e.g. due to focus change events resulting in tooltip \
destruction and thus this object
- qRegisterMetaType<IDocumentation::Ptr>("IDocumentation::Ptr");
QMetaObject::invokeMethod(ICore::self()->documentationController(), \
"showDocumentation", Qt::QueuedConnection, Q_ARG(IDocumentation::Ptr, doc)); }
break;
diff --git a/plugins/contextbrowser/contextbrowser.cpp \
b/plugins/contextbrowser/contextbrowser.cpp index ec0271489..b3e73f388 100644
--- a/plugins/contextbrowser/contextbrowser.cpp
+++ b/plugins/contextbrowser/contextbrowser.cpp
@@ -296,6 +296,8 @@ ContextBrowserPlugin::ContextBrowserPlugin(QObject *parent, const \
QVariantList&) , m_nextHistoryIndex(0)
, m_textHintProvider(this)
{
+ qRegisterMetaType<KDevelop::IndexedDeclaration>("KDevelop::IndexedDeclaration");
+
core()->uiController()->addToolView(i18n("Code Browser"), m_viewFactory);
connect( core()->documentController(), &IDocumentController::textDocumentCreated, \
this, &ContextBrowserPlugin::textDocumentCreated ); @@ -345,8 +347,6 @@ \
KDevelop::ContextMenuExtension ContextBrowserPlugin::contextMenuExtension(KDevel \
if(!codeContext->declaration().data()) return menuExt;
- qRegisterMetaType<KDevelop::IndexedDeclaration>("KDevelop::IndexedDeclaration");
-
menuExt.addAction(KDevelop::ContextMenuExtension::ExtensionGroup, m_findUses);
return menuExt;
diff --git a/plugins/grepview/grepjob.cpp b/plugins/grepview/grepjob.cpp
index b7516f42f..a2b938bc6 100644
--- a/plugins/grepview/grepjob.cpp
+++ b/plugins/grepview/grepjob.cpp
@@ -92,6 +92,8 @@ GrepJob::GrepJob( QObject* parent )
, m_fileIndex(0)
, m_findSomething(false)
{
+ qRegisterMetaType<GrepOutputItem::List>();
+
setCapabilities(Killable);
KDevelop::ICore::self()->uiController()->registerStatus(this);
@@ -235,7 +237,6 @@ void GrepJob::start()
m_findSomething = false;
m_outputModel->clear();
- qRegisterMetaType<GrepOutputItem::List>();
connect(this, &GrepJob::foundMatches,
m_outputModel, &GrepOutputModel::appendOutputs, Qt::QueuedConnection);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic