[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdev-ruby] /: Use more override and without redundant virtual
From:       Friedrich W. H. Kossebau <null () kde ! org>
Date:       2018-09-12 2:45:59
Message-ID: E1fzvAF-0005nt-1I () code ! kde ! org
[Download RAW message or body]

Git commit 0026f2ecd861bb2e26424d33a1ae0b7fc8ab0fcd by Friedrich W. H. Kossebau.
Committed on 12/09/2018 at 02:43.
Pushed by kossebau into branch 'master'.

Use more override and without redundant virtual

M  +3    -3    completion/context.h
M  +5    -5    completion/items/keyworditem.h
M  +3    -3    completion/items/normalitem.h
M  +2    -2    completion/items/requirefileitem.h
M  +1    -1    completion/model.h
M  +1    -1    completion/tests/completion.h
M  +6    -6    duchain/builders/contextbuilder.h
M  +1    -1    duchain/builders/declarationbuilder.h
M  +5    -5    duchain/rubyducontext.h
M  +1    -1    duchain/tests/duchain.h
M  +1    -1    duchain/tests/uses.h
M  +2    -2    highlighting.h
M  +4    -4    languagesupport.h
M  +3    -3    parsejob.h
M  +2    -2    rails/dataprovider.h
M  +1    -1    rails/support.h

https://commits.kde.org/kdev-ruby/0026f2ecd861bb2e26424d33a1ae0b7fc8ab0fcd

diff --git a/completion/context.h b/completion/context.h
index a64422c..ede74e4 100644
--- a/completion/context.h
+++ b/completion/context.h
@@ -54,11 +54,11 @@ public:
                           const KDevelop::CursorInRevision &pos,
                           int depth = 0);
 
-    virtual ~CodeCompletionContext();
+    ~CodeCompletionContext() override;
 
     /// Re-implemented from KDevelop::CodeCompletionContext.
-    virtual QList<KDevelop::CompletionTreeItemPointer> completionItems(bool &abort,
-                                                                       bool \
fullCompletion = true) override; +    QList<KDevelop::CompletionTreeItemPointer> \
completionItems(bool &abort, +                                                        \
bool fullCompletion = true) override;  
     /// Re-implemented from KDevelop::CodeCompletionContext.
     QList<KDevelop::CompletionTreeElementPointer> ungroupedElements() override;
diff --git a/completion/items/keyworditem.h b/completion/items/keyworditem.h
index b28dbcc..6a38f3d 100644
--- a/completion/items/keyworditem.h
+++ b/completion/items/keyworditem.h
@@ -53,13 +53,13 @@ public:
                          bool line = false);
 
     /// Re-implemented from KDevelop::NormalDeclarationCompletionItem.
-    virtual void execute(KTextEditor::View *view,
-                         const KTextEditor::Range &word) override;
+    void execute(KTextEditor::View *view,
+                 const KTextEditor::Range &word) override;
 
     /// Re-implemented from KDevelop::NormalDeclarationCompletionItem.
-    virtual QVariant data(const QModelIndex &index,
-                          int role,
-                          const KDevelop::CodeCompletionModel *model) const \
override; +    QVariant data(const QModelIndex &index,
+                  int role,
+                  const KDevelop::CodeCompletionModel *model) const override;
 
 private:
     QString m_keyword;
diff --git a/completion/items/normalitem.h b/completion/items/normalitem.h
index dee45d9..d0bdf61 100644
--- a/completion/items/normalitem.h
+++ b/completion/items/normalitem.h
@@ -40,9 +40,9 @@ public:
                         int inheritanceDepth = 0);
 
     /// Re-implemented from KDevelop::NormalDeclarationCompletionItem.
-    virtual QVariant data(const QModelIndex &index,
-                          int role,
-                          const KDevelop::CodeCompletionModel *model) const \
override; +    QVariant data(const QModelIndex &index,
+                  int role,
+                  const KDevelop::CodeCompletionModel *model) const override;
 
 protected:
     /// Re-implemented from KDevelop::NormalDeclarationCompletionItem.
diff --git a/completion/items/requirefileitem.h b/completion/items/requirefileitem.h
index 55c6a67..8f405c0 100644
--- a/completion/items/requirefileitem.h
+++ b/completion/items/requirefileitem.h
@@ -39,8 +39,8 @@ public:
     RequireFileItem(const KDevelop::IncludeItem &include, const char closing);
 
     /// Re-implemented from KDevelop::AbstractIncludeFileCompletionItem
-    virtual void execute(KTextEditor::View *View,
-                         const KTextEditor::Range &word) override;
+    void execute(KTextEditor::View *View,
+                 const KTextEditor::Range &word) override;
 
 private:
     /// The character that may enclose this item.
diff --git a/completion/model.h b/completion/model.h
index 347a2e9..49c3184 100644
--- a/completion/model.h
+++ b/completion/model.h
@@ -40,7 +40,7 @@ public:
     explicit CodeCompletionModel(QObject *parent);
 
     /// Destructor.
-    virtual ~CodeCompletionModel();
+    ~CodeCompletionModel() override;
 
 protected:
     /// Re-implemented from KDevelop::CodeCompletionModel.
diff --git a/completion/tests/completion.h b/completion/tests/completion.h
index 28aba0b..3528a29 100644
--- a/completion/tests/completion.h
+++ b/completion/tests/completion.h
@@ -40,7 +40,7 @@ public:
 
 protected:
     /// Re-implemented from DUChainTestBase.
-    virtual KDevelop::TopDUContext * parse(const QByteArray &code, const QString \
&id); +    KDevelop::TopDUContext * parse(const QByteArray &code, const QString &id) \
override;  
 private:
     /// Verify that all the items in @p shoulda are contained in @p list.
diff --git a/duchain/builders/contextbuilder.h b/duchain/builders/contextbuilder.h
index eb9e8e5..645ee49 100644
--- a/duchain/builders/contextbuilder.h
+++ b/duchain/builders/contextbuilder.h
@@ -46,12 +46,12 @@ class KDEVRUBYDUCHAIN_EXPORT ContextBuilder
 {
 public:
     ContextBuilder();
-    virtual ~ContextBuilder();
+    ~ContextBuilder() override;
 
     /// Re-implemented from KDevelop::AbstractContextBuilder.
-    virtual KDevelop::ReferencedTopDUContext build(const KDevelop::IndexedString \
                &url,
-                                                   Ast *node,
-                                                   const \
KDevelop::ReferencedTopDUContext& updateContext = {}) override; +    \
KDevelop::ReferencedTopDUContext build(const KDevelop::IndexedString &url, +          \
Ast *node, +                                           const \
KDevelop::ReferencedTopDUContext& updateContext = {}) override;  
     /// @returns a list of unresolved imports.
     inline const QVector<KDevelop::IndexedString> unresolvedImports() const
@@ -83,8 +83,8 @@ protected:
     void setContextOnNode(Ast *node, KDevelop::DUContext *ctx) override;
     KDevelop::DUContext * contextFromNode(Ast *node) override;
     KDevelop::DUContext * newContext(const KDevelop::RangeInRevision &range) \
                override;
-    virtual KDevelop::TopDUContext * newTopContext(const KDevelop::RangeInRevision \
                &range,
-                                                   KDevelop::ParsingEnvironmentFile \
*file = nullptr) override; +    KDevelop::TopDUContext * newTopContext(const \
KDevelop::RangeInRevision &range, +                                           \
KDevelop::ParsingEnvironmentFile *file = nullptr) override;  
     /// And now methods that deal with nodes, documents and ranges.
 
diff --git a/duchain/builders/declarationbuilder.h \
b/duchain/builders/declarationbuilder.h index fc87fcd..1a93a98 100644
--- a/duchain/builders/declarationbuilder.h
+++ b/duchain/builders/declarationbuilder.h
@@ -46,7 +46,7 @@ class KDEVRUBYDUCHAIN_EXPORT DeclarationBuilder : public \
DeclarationBuilderBase  {
 public:
     explicit DeclarationBuilder(EditorIntegrator *editor);
-    virtual ~DeclarationBuilder();
+    ~DeclarationBuilder() override;
 
 protected:
     /// Re-implemented from KDevelop::AbstractDeclarationBuilder.
diff --git a/duchain/rubyducontext.h b/duchain/rubyducontext.h
index d88e775..3517b7b 100644
--- a/duchain/rubyducontext.h
+++ b/duchain/rubyducontext.h
@@ -73,11 +73,11 @@ public:
      * @param htmlPrefix Html-formatted text that should be prepended before any \
                information shown by this widget
      * @param htmlSuffix Html-formatted text that should be appended to any \
                information shown by this widget
      */
-    virtual QWidget * createNavigationWidget(KDevelop::Declaration *decl = nullptr,
-                                             KDevelop::TopDUContext *topContext = \
                nullptr,
-                                             const QString &htmlPrefix = QString(),
-                                             const QString &htmlSuffix = QString(),
-                                             \
KDevelop::AbstractNavigationWidget::DisplayHints hints = \
KDevelop::AbstractNavigationWidget::NoHints) const override; +    QWidget * \
createNavigationWidget(KDevelop::Declaration *decl = nullptr, +                       \
KDevelop::TopDUContext *topContext = nullptr, +                                     \
const QString &htmlPrefix = QString(), +                                     const \
QString &htmlSuffix = QString(), +                                     \
KDevelop::AbstractNavigationWidget::DisplayHints hints = \
KDevelop::AbstractNavigationWidget::NoHints) const override;  
 public:
     enum { Identity = BaseContext::Identity + 41 };
diff --git a/duchain/tests/duchain.h b/duchain/tests/duchain.h
index 70f7592..bdb2c2d 100644
--- a/duchain/tests/duchain.h
+++ b/duchain/tests/duchain.h
@@ -45,7 +45,7 @@ public:
 
 protected:
     /// Re-implemented from DUChainTestBase.
-    virtual KDevelop::TopDUContext * parse(const QByteArray &code, const QString \
&id); +    KDevelop::TopDUContext * parse(const QByteArray &code, const QString &id) \
override;  
 private:
     /**
diff --git a/duchain/tests/uses.h b/duchain/tests/uses.h
index eb5bc8e..51ba3a6 100644
--- a/duchain/tests/uses.h
+++ b/duchain/tests/uses.h
@@ -39,7 +39,7 @@ public:
 
 protected:
     /// Re-implemented from DUChainTestBase.
-    virtual KDevelop::TopDUContext * parse(const QByteArray &code, const QString \
&id); +    KDevelop::TopDUContext * parse(const QByteArray &code, const QString &id) \
override;  
 private:
     /// Compare the uses of the given declaration @p dec with the given @p range.
diff --git a/highlighting.h b/highlighting.h
index d97d9e5..5211e8a 100644
--- a/highlighting.h
+++ b/highlighting.h
@@ -40,8 +40,8 @@ public:
      * @param decl The involved declaration.
      * @param ctx The context from where the declaration is used.
      */
-    virtual Types typeForDeclaration(KDevelop::Declaration *decl,
-                                     KDevelop::DUContext *ctx) const override;
+    Types typeForDeclaration(KDevelop::Declaration *decl,
+                             KDevelop::DUContext *ctx) const override;
 
     /**
      * Re-implemented from CodeHighlightingInstance to decide whether to
diff --git a/languagesupport.h b/languagesupport.h
index 769c980..6d3eb5a 100644
--- a/languagesupport.h
+++ b/languagesupport.h
@@ -54,7 +54,7 @@ class LanguageSupport
 
 public:
     explicit LanguageSupport(QObject *parent, const QVariantList &args = {});
-    virtual ~LanguageSupport();
+    ~LanguageSupport() override;
 
     /**
      * @return an instance of this LanguageSupport.
@@ -90,9 +90,9 @@ public:
     /**
      * Setup the actions defined by this plugin.
      */
-    virtual void createActionsForMainWindow(Sublime::MainWindow *window,
-                                            QString &xmlFile,
-                                            KActionCollection &actions) override;
+    void createActionsForMainWindow(Sublime::MainWindow *window,
+                                    QString &xmlFile,
+                                    KActionCollection &actions) override;
 
 private:
     Highlighting *m_highlighting;
diff --git a/parsejob.h b/parsejob.h
index 7fe8e19..4d8e2c6 100644
--- a/parsejob.h
+++ b/parsejob.h
@@ -49,15 +49,15 @@ public:
      */
     ParseJob(const KDevelop::IndexedString &url,
              KDevelop::ILanguageSupport *languageSupport);
-    virtual ~ParseJob();
+    ~ParseJob() override;
 
 protected:
     /**
      * Runs this ParseJob. Both of the parameters being passed come from
      * ThreadWeaver and they are both ignored in the implementation.
      */
-    virtual void run(ThreadWeaver::JobPointer pointer,
-                     ThreadWeaver::Thread *thread) override;
+    void run(ThreadWeaver::JobPointer pointer,
+             ThreadWeaver::Thread *thread) override;
 
 private:
     /**
diff --git a/rails/dataprovider.h b/rails/dataprovider.h
index 031f437..46ec006 100644
--- a/rails/dataprovider.h
+++ b/rails/dataprovider.h
@@ -71,8 +71,8 @@ protected:
     uint itemCount() const override;
     uint unfilteredItemCount() const override;
     KDevelop::QuickOpenDataPointer data(uint row) const override;
-    virtual void enableData(const QStringList &items,
-                            const QStringList &scopes) override;
+    void enableData(const QStringList &items,
+                    const QStringList &scopes) override;
 
 private:
     Kind m_kind;
diff --git a/rails/support.h b/rails/support.h
index 1fcf085..74c728f 100644
--- a/rails/support.h
+++ b/rails/support.h
@@ -43,7 +43,7 @@ class KDEVRUBYRAILS_EXPORT Support : public QObject
 
 public:
     explicit Support(ruby::LanguageSupport *language);
-    virtual ~Support();
+    ~Support() override;
 
     /**
      * Setup the Main Window actions.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic