Commit 01783d64 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use Q_OBJECT macro with more QObject subclasses

Introspection data useful e.g. in debugging, so default to using it
parent aabb466d
......@@ -110,6 +110,7 @@ class KDevelopApplication:
public QApplication
#endif
{
Q_OBJECT
public:
explicit KDevelopApplication(int &argc, char **argv, bool GUIenabled = true)
#if KDEVELOP_SINGLE_APP
......@@ -847,3 +848,5 @@ int main( int argc, char *argv[] )
return app.exec();
}
#include "main.moc"
......@@ -53,6 +53,7 @@ using namespace KDevelop;
#ifndef USE_QTWEBKIT
class StandardDocumentationPage : public QWebEnginePage
{
Q_OBJECT
public:
StandardDocumentationPage(QWebEngineProfile* profile, KDevelop::StandardDocumentationView* parent)
: QWebEnginePage(profile, parent),
......@@ -289,6 +290,7 @@ void KDevelop::StandardDocumentationView::setHtml(const QString& html)
#ifndef USE_QTWEBKIT
class CustomSchemeHandler : public QWebEngineUrlSchemeHandler
{
Q_OBJECT
public:
explicit CustomSchemeHandler(QNetworkAccessManager* nam, QObject *parent = nullptr)
: QWebEngineUrlSchemeHandler(parent), m_nam(nam) {}
......@@ -386,3 +388,7 @@ void StandardDocumentationView::wheelEvent(QWheelEvent* event)
}
QWidget::wheelEvent(event);
}
#ifndef USE_QTWEBKIT
#include "standarddocumentationview.moc"
#endif
......@@ -32,6 +32,8 @@ using namespace KDevelop;
class IdentityRuntime : public IRuntime
{
Q_OBJECT
public:
QString name() const override { return i18n("Host System"); }
void startProcess(KProcess *process) const override {
......@@ -163,3 +165,5 @@ void KDevelop::RuntimeController::addRuntimes(KDevelop::IRuntime * runtime)
m_runtimes << runtime;
}
#include "runtimecontroller.moc"
......@@ -34,6 +34,7 @@ class ParseSessionData;
class ClangParseJob : public KDevelop::ParseJob
{
Q_OBJECT
public:
ClangParseJob(const KDevelop::IndexedString& url,
KDevelop::ILanguageSupport* languageSupport);
......
......@@ -31,6 +31,7 @@
class KDEVCLANGPRIVATE_EXPORT MacroNavigationContext : public KDevelop::AbstractNavigationContext
{
Q_OBJECT
public:
explicit MacroNavigationContext(const MacroDefinition::Ptr& macro,
const KDevelop::DocumentCursor& expansionLocation = KDevelop::DocumentCursor::invalid());
......
......@@ -62,6 +62,7 @@ private:
class OpenProjectForFileAssistant : public KDevelop::IAssistantAction
{
Q_OBJECT
public:
explicit OpenProjectForFileAssistant(const KDevelop::IndexedString& path)
: m_path(path)
......@@ -84,6 +85,7 @@ private:
class MissingIncludePathAssistant : public ClangFixitAssistant
{
Q_OBJECT
public:
MissingIncludePathAssistant(const QString& title, const KDevelop::IndexedString& path)
: ClangFixitAssistant(title, {})
......
......@@ -33,6 +33,7 @@ using namespace KDevelop;
class DeclarationNavigationContext : public AbstractDeclarationNavigationContext
{
Q_OBJECT
public:
using AbstractDeclarationNavigationContext::AbstractDeclarationNavigationContext;
......@@ -62,6 +63,7 @@ public:
class IncludeNavigationContext : public KDevelop::AbstractIncludeNavigationContext
{
Q_OBJECT
public:
IncludeNavigationContext(const KDevelop::IncludeItem& item, const KDevelop::TopDUContextPointer& topContext);
......@@ -126,3 +128,5 @@ QString ClangNavigationWidget::shortDescription(const IncludeItem& includeItem)
IncludeNavigationContext ctx(includeItem, {});
return ctx.html(true);
}
#include "navigationwidget.moc"
......@@ -33,6 +33,7 @@ namespace KTextEditor { class Document; class Range; }
class CMakeCodeCompletionModel : public KTextEditor::CodeCompletionModel
{
Q_OBJECT
public:
explicit CMakeCodeCompletionModel(QObject *parent);
......
......@@ -25,6 +25,7 @@
class CMakeHomeDocumentation : public KDevelop::IDocumentation
{
Q_OBJECT
public:
KDevelop::IDocumentationProvider* provider() const override;
QString name() const override;
......
......@@ -27,6 +27,7 @@ using namespace KDevelop;
class CMakeNavigationContext: public AbstractNavigationContext
{
Q_OBJECT
public:
CMakeNavigationContext(const TopDUContextPointer& top, const QString& name, const QString& html)
: AbstractNavigationContext(top, nullptr), mName(name), mDescription(html) {}
......@@ -45,6 +46,7 @@ class CMakeNavigationContext: public AbstractNavigationContext
class CMakeDeclarationNavigationContext: public AbstractDeclarationNavigationContext
{
Q_OBJECT
public:
CMakeDeclarationNavigationContext(const DeclarationPointer& decl, const TopDUContextPointer& top)
: AbstractDeclarationNavigationContext(decl, top) {}
......@@ -59,3 +61,5 @@ CMakeNavigationWidget::CMakeNavigationWidget(const KDevelop::DUChainPointer< KDe
{
setContext(NavigationContextPointer(new CMakeDeclarationNavigationContext(DeclarationPointer(decl), top)));
}
#include "cmakenavigationwidget.moc"
......@@ -29,6 +29,7 @@ namespace KDevelop { class IDocumentation; }
class CMakeNavigationWidget : public KDevelop::AbstractNavigationWidget
{
Q_OBJECT
public:
CMakeNavigationWidget(const KDevelop::TopDUContextPointer& top, const KDevelop::IDocumentation::Ptr& doc);
CMakeNavigationWidget(const KDevelop::TopDUContextPointer& top, KDevelop::Declaration* decl);
......
......@@ -47,6 +47,7 @@ K_PLUGIN_FACTORY_WITH_JSON(CMakeBuilderFactory, "kdevcmakebuilder.json", registe
class ErrorJob : public KJob
{
Q_OBJECT
public:
ErrorJob(QObject* parent, const QString& error)
: KJob(parent)
......
......@@ -34,6 +34,7 @@ class Plugin;
class ProblemModel : public KDevelop::ProblemModel
{
Q_OBJECT
public:
explicit ProblemModel(Plugin* plugin);
~ProblemModel() override;
......
......@@ -31,6 +31,7 @@ namespace KDevMI {
class SelectCoreDialog : public QDialog
{
Q_OBJECT
public:
explicit SelectCoreDialog(QWidget *parent = nullptr);
QUrl executableFile() const;
......
......@@ -54,6 +54,7 @@ namespace GDB
*/
class MemoryRangeSelector : public QWidget
{
Q_OBJECT
public:
QLineEdit* startAddressLineEdit;
QLineEdit* amountLineEdit;
......@@ -468,3 +469,5 @@ void MemoryViewerWidget::slotChildCaptionChanged(const QString& caption)
} // end of namespace GDB
} // end of namespace KDevMI
#include "memviewdlg.moc"
......@@ -184,6 +184,7 @@ KDevelop::ConfigPage* NinjaBuilder::perProjectConfigPage(int number, const KDeve
class ErrorJob
: public KJob
{
Q_OBJECT
public:
ErrorJob(QObject* parent, const QString& error)
: KJob(parent)
......
......@@ -31,6 +31,7 @@ namespace QmlJS {
class KDEVQMLJSCOMPLETION_EXPORT CodeCompletionModel : public KDevelop::CodeCompletionModel
{
Q_OBJECT
public:
explicit CodeCompletionModel(QObject* parent);
protected:
......
......@@ -30,6 +30,7 @@ namespace QmlJS {
class CodeCompletionWorker : public KDevelop::CodeCompletionWorker
{
Q_OBJECT
public:
explicit CodeCompletionWorker(KDevelop::CodeCompletionModel* model);
......
......@@ -29,6 +29,7 @@ namespace QmlJS {
class DeclarationNavigationContext : public KDevelop::AbstractDeclarationNavigationContext
{
Q_OBJECT
public:
using KDevelop::AbstractDeclarationNavigationContext::AbstractDeclarationNavigationContext;
......
......@@ -34,6 +34,7 @@ namespace QmlJS {
class KDEVQMLJSDUCHAIN_EXPORT NavigationWidget : public KDevelop::AbstractNavigationWidget
{
Q_OBJECT
public:
NavigationWidget(KDevelop::Declaration* decl,
KDevelop::TopDUContext* topContext,
......
......@@ -24,6 +24,7 @@
class QmlJsParseJob : public KDevelop::ParseJob
{
Q_OBJECT
public:
QmlJsParseJob(const KDevelop::IndexedString& url,
KDevelop::ILanguageSupport* languageSupport);
......
......@@ -48,6 +48,7 @@ enum Column
class QtHelpConfigEditDialog : public QDialog, public Ui_QtHelpConfigEditDialog
{
Q_OBJECT
public:
explicit QtHelpConfigEditDialog(QTreeWidgetItem* modifiedItem, QtHelpConfig* parent = nullptr)
: QDialog(parent)
......@@ -353,3 +354,5 @@ QTreeWidgetItem * QtHelpConfig::addTableItem(const QString &icon, const QString
return item;
}
#include "qthelpconfig.moc"
......@@ -29,6 +29,7 @@
class HelpNetworkReply : public QNetworkReply
{
Q_OBJECT
public:
HelpNetworkReply(const QNetworkRequest &request, const QByteArray &fileData, const QString &mimeType);
......@@ -45,6 +46,7 @@ class HelpNetworkReply : public QNetworkReply
class HelpNetworkAccessManager : public QNetworkAccessManager
{
Q_OBJECT
public:
explicit HelpNetworkAccessManager(QHelpEngineCore *engine, QObject *parent = nullptr);
~HelpNetworkAccessManager() override;
......
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