diff --git a/language/codegen/utilities.h b/language/codegen/utilities.h index 0b6da79e0c..00f9e62d19 100644 --- a/language/codegen/utilities.h +++ b/language/codegen/utilities.h @@ -1,74 +1,74 @@ /* Copyright 2009 Ramón Zarazúa This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #ifndef KDEVPLATFORM_CODEGEN_UTILITIES_H #define KDEVPLATFORM_CODEGEN_UTILITIES_H namespace KDevelop { class IndexedString; class DUContext; class Declaration; namespace CodeGenUtils { /*! * A validator object that verifies if a string would be an acceptable identifier * If inserted into the given context, including if it conflicts with any other identifier */ class KDEVPLATFORMLANGUAGE_EXPORT IdentifierValidator : public QValidator { Q_OBJECT public: explicit IdentifierValidator( DUContext * context); - ~IdentifierValidator(); + ~IdentifierValidator() override; - virtual State validate(QString & input, int &) const override; + State validate(QString & input, int &) const override; private: DUContext * m_context; }; /** * @brief Search for the file that contains the implementation of a specified type * * Search for the file that contains the implementation of @p targetClass. For languages that * allow implementation of a type through multiple files, the file with the most implementations of * class methods will be chosen, if a tie is found, then the file with the most uses will be chosen. * Else the file that contains the declaration is chosen. * * @note If called with a Forward declaration, the real declaration will be searched for. * * @return The file that matched best */ KDEVPLATFORMLANGUAGE_EXPORT IndexedString fetchImplementationFileForClass(const Declaration & targetClass); } } #endif //KDEVPLATFORM_CODEGEN_UTILITIES_H diff --git a/language/duchain/navigation/abstractdeclarationnavigationcontext.h b/language/duchain/navigation/abstractdeclarationnavigationcontext.h index a63e6ff374..9c5f9bcd82 100644 --- a/language/duchain/navigation/abstractdeclarationnavigationcontext.h +++ b/language/duchain/navigation/abstractdeclarationnavigationcontext.h @@ -1,95 +1,95 @@ /* Copyright 2007 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDEVPLATFORM_ABSTRACTDECLARATIONNAVIGATIONCONTEXT_H #define KDEVPLATFORM_ABSTRACTDECLARATIONNAVIGATIONCONTEXT_H #include "abstractnavigationcontext.h" #include "../declaration.h" #include "../duchainpointer.h" #include "../types/abstracttype.h" namespace KDevelop { class IdentifiedType; class Identifier; class QualifiedIdentifier; class KDEVPLATFORMLANGUAGE_EXPORT AbstractDeclarationNavigationContext : public AbstractNavigationContext { Q_OBJECT public: AbstractDeclarationNavigationContext( DeclarationPointer decl, KDevelop::TopDUContextPointer topContext, AbstractNavigationContext* previousContext = 0 ); - virtual QString name() const override; + QString name() const override; DeclarationPointer declaration() const; ///Execute an action. For example "show_uses" shows the uses of the declaration. ///Returns the context pointer for the new state. - virtual NavigationContextPointer executeKeyAction(QString key) override; + NavigationContextPointer executeKeyAction(QString key) override; protected: - virtual QString html(bool shorten = false) override; + QString html(bool shorten = false) override; DeclarationPointer m_declaration; ///Should returns a stripped version of the declarations qualified identifier, with all implicit/redundant parts removed virtual QualifiedIdentifier prettyQualifiedIdentifier(DeclarationPointer decl) const; ///Returns a stripped version of the declarations identifier, using prettyQualifiedIdentifier Identifier prettyIdentifier(DeclarationPointer decl) const; /// @return String version of the qualified identifier of @p decl, '' on an invalid QID QString prettyQualifiedName(DeclarationPointer decl) const; /** * Return a rich-text version of the identifier @p identifier representing the declaration @p decl * * @note In case @p declaration is deprecated, the resulting string will get a special formatting */ QString identifierHighlight(const QString& identifier, const DeclarationPointer& decl) const; static QString stringFromAccess(Declaration::AccessPolicy access); static QString stringFromAccess(DeclarationPointer decl); QString declarationName( DeclarationPointer decl ) const; static QStringList declarationDetails(DeclarationPointer decl); ///This can be used for example to resolve typedefs within the type. ///All types that are visualized in the navigation-context are/should be mangled through this. ///The default-implementation returns the original type. virtual AbstractType::Ptr typeToShow(AbstractType::Ptr type); ///Print the function-signature in a way that return-type and argument can be jumped to virtual void htmlFunction(); ///Navigation for additional less important links, like what function was overloaded etc. virtual void htmlAdditionalNavigation(); virtual void htmlClass(); virtual void htmlIdentifiedType(AbstractType::Ptr type, const IdentifiedType* idType); ///Creates and registers a link for the given type that jumps to its declaration and to the template-argument declarations virtual void eventuallyMakeTypeLinks( KDevelop::AbstractType::Ptr type ); ///Creates a link that triggers a recomputation of this context with m_fullBackwardSearch set to true void createFullBackwardSearchLink(QString string); bool m_fullBackwardSearch; }; } #endif diff --git a/language/duchain/navigation/abstractincludenavigationcontext.h b/language/duchain/navigation/abstractincludenavigationcontext.h index b5effb943d..ac6e59dae3 100644 --- a/language/duchain/navigation/abstractincludenavigationcontext.h +++ b/language/duchain/navigation/abstractincludenavigationcontext.h @@ -1,80 +1,80 @@ /* Copyright 2007 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDEVPLATFORM_ABSTRACTINCLUDENAVIGATIONCONTEXT_H #define KDEVPLATFORM_ABSTRACTINCLUDENAVIGATIONCONTEXT_H #include "abstractnavigationcontext.h" #include "../../util/includeitem.h" #include "../../duchain/parsingenvironment.h" #include namespace KDevelop { /** * Abstract navigation context for file includes. * * Example usage: * \code * namespace LANG { * class IncludeNavigationContext : public AbstractIncludeNavigationContext * { * public: * IncludeNavigationContext(const IncludeItem& item, TopDuContextPointer topContext) * : AbstractIncludeNavigationContext(item, topContext, KDevelop::LANGParsingEnvironment) {} * protected: * virtual void getFileInfo(KDevelop::TopDUContext* duchain) * { * // write language dependent stuff via modifyHtml() * } * }; * } * \endcode */ class KDEVPLATFORMLANGUAGE_EXPORT AbstractIncludeNavigationContext : public AbstractNavigationContext { Q_OBJECT public: AbstractIncludeNavigationContext(const IncludeItem& item, TopDUContextPointer topContext, const ParsingEnvironmentType& type); - virtual QString html(bool shorten) override; - virtual QString name() const override; + QString html(bool shorten) override; + QString name() const override; protected: /// Overwrite this to add language dependent information for a given file. /// By default only "included by" and "includes" /// NOTE: You should always append a newline (
) if you write anything. virtual void getFileInfo(KDevelop::TopDUContext* duchain); ///Should return true if this declaration should be shown, and false if not ///The duchain is locked when this is called virtual bool filterDeclaration(Declaration* decl); private: /// Only environments with this type will be considered ParsingEnvironmentType m_type; ///@param first must initially be true typedef QPair IdentifierPair; void addDeclarationsFromContext(KDevelop::DUContext* ctx, bool& first, QList& addedDeclarations, const QString& indent = {} ); IncludeItem m_item; }; } #endif // KDEVPLATFORM_ABSTRACTINCLUDENAVIGATIONCONTEXT_H diff --git a/language/duchain/navigation/abstractnavigationcontext.h b/language/duchain/navigation/abstractnavigationcontext.h index 4d4c9015b2..884f6765ad 100644 --- a/language/duchain/navigation/abstractnavigationcontext.h +++ b/language/duchain/navigation/abstractnavigationcontext.h @@ -1,191 +1,191 @@ /* Copyright 2007 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDEVPLATFORM_ABSTRACTNAVIGATIONCONTEXT_H #define KDEVPLATFORM_ABSTRACTNAVIGATIONCONTEXT_H #include #include #include "../indexeddeclaration.h" #include "navigationaction.h" namespace KDevelop { /** A helper-class for elegant colorization of html-strings . * * Initialize it with a html-color like "990000". and colorize strings * using operator() */ struct KDEVPLATFORMLANGUAGE_EXPORT Colorizer { enum FormattingFlag { Nothing = 0x0, Bold = 0x1, Italic = 0x2, Fixed = 0x4 }; Q_DECLARE_FLAGS(Formatting, FormattingFlag) Colorizer(const QString& color, Formatting formatting = Nothing) : m_color(color), m_formatting(formatting) { } QString operator()(const QString& str) const; QString m_color; Formatting m_formatting; }; class AbstractNavigationContext; typedef QExplicitlySharedDataPointer NavigationContextPointer; class KDEVPLATFORMLANGUAGE_EXPORT AbstractNavigationContext : public QObject, public QSharedData { Q_OBJECT public: explicit AbstractNavigationContext( KDevelop::TopDUContextPointer topContext = KDevelop::TopDUContextPointer(), AbstractNavigationContext* previousContext = 0 ); - virtual ~AbstractNavigationContext() { + ~AbstractNavigationContext() override { } void nextLink(); void previousLink(); void up(); void down(); void setPrefixSuffix( const QString& prefix, const QString& suffix ); NavigationContextPointer accept(); NavigationContextPointer back(); NavigationContextPointer accept(IndexedDeclaration decl); NavigationContextPointer acceptLink(const QString& link); NavigationAction currentAction() const; virtual QString name() const = 0; ///Here the context can return html to be displayed. virtual QString html(bool shorten = false); ///Here the context can return a widget to be displayed. ///The widget stays owned by this navigation-context. ///The widget may have a signal "navigateDeclaration(KDevelop::IndexedDeclaration)". ///If that signal is emitted, the new declaration is navigated in the navigation-wdiget. virtual QWidget* widget() const; ///Whether the widget returned by widget() should take the maximum possible spsace. ///The default implementation returns true. virtual bool isWidgetMaximized() const; ///Returns whether this context's string has already been computed, and is up to date. ///After clear() was called, this returns false again. bool alreadyComputed() const; void setTopContext(TopDUContextPointer context); TopDUContextPointer topContext() const; NavigationContextPointer executeLink(QString link); NavigationContextPointer execute(const NavigationAction& action); Q_SIGNALS: void contentsChanged(); protected: /// Returns the html font-size prefix (aka. or similar) for the given mode QString fontSizePrefix(bool shorten) const; /// Returns the html font-size suffix (aka. or similar) for the given mode QString fontSizeSuffix(bool shorten) const; virtual void setPreviousContext(AbstractNavigationContext* previous); struct TextHandler { TextHandler(AbstractNavigationContext* c) : context(c) { } void operator+=(const QString& str) const { context->addHtml(str); } AbstractNavigationContext* context; }; ///Override this to execute own key-actions using NavigationAction virtual NavigationContextPointer executeKeyAction(QString key); ///Adds given the text to currentHtml() void addHtml(QString html); ///Returns the html text being built in its current state QString currentHtml() const; ///Returns a convenience object that allows writing "modifyHtml() += "Hallo";" TextHandler modifyHtml() { return TextHandler(this); } //Clears the computed html and links void clear(); void addExternalHtml( const QString& text ); ///Creates and registers a link to the given declaration, labeled by the given name virtual void makeLink( const QString& name, DeclarationPointer declaration, NavigationAction::Type actionType ); ///Creates a link that executes the given action and adds it to the current context void makeLink( const QString& name, QString targetId, const NavigationAction& action); ///Creates a link that executes the given action and returns it QString createLink(const QString& name, QString targetId, const NavigationAction& action); int m_selectedLink; //The link currently selected NavigationAction m_selectedLinkAction; //Target of the currently selected link NavigationContextPointer registerChild(DeclarationPointer /*declaration*/); NavigationContextPointer registerChild( AbstractNavigationContext* context ); QList m_children; //Useed to keep alive all children until this is deleted bool m_shorten; int m_currentLine; //A counter used while building the html-code to count the used links. int m_linkCount; //Something else than -1 if the current position is represented by a line-number, not a link. int m_currentPositionLine; QMap m_links; QMap m_linkLines; //Holds the line for each link QMap m_intLinks; AbstractNavigationContext* m_previousContext; QString m_prefix, m_suffix; KDevelop::TopDUContextPointer m_topContext; virtual QString declarationKind(DeclarationPointer decl); static const Colorizer typeHighlight; static const Colorizer errorHighlight; static const Colorizer labelHighlight; static const Colorizer codeHighlight; static const Colorizer propertyHighlight; static const Colorizer navigationHighlight; static const Colorizer importantHighlight; static const Colorizer commentHighlight; static const Colorizer nameHighlight; private: QString m_currentText; //Here the text is built }; } Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::Colorizer::Formatting); #endif diff --git a/language/duchain/navigation/problemnavigationcontext.h b/language/duchain/navigation/problemnavigationcontext.h index c1bc01cc2e..02bac5fb93 100644 --- a/language/duchain/navigation/problemnavigationcontext.h +++ b/language/duchain/navigation/problemnavigationcontext.h @@ -1,49 +1,49 @@ /* Copyright 2009 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDEVPLATFORM_PROBLEMNAVIGATIONCONTEXT_H #define KDEVPLATFORM_PROBLEMNAVIGATIONCONTEXT_H #include #include #include #include namespace KDevelop { class KDEVPLATFORMLANGUAGE_EXPORT ProblemNavigationContext : public AbstractNavigationContext { Q_OBJECT public: explicit ProblemNavigationContext(const IProblem::Ptr& problem); - ~ProblemNavigationContext(); + ~ProblemNavigationContext() override; - virtual QString name() const override; - virtual QString html(bool shorten = false) override; - virtual QWidget* widget() const override; - virtual bool isWidgetMaximized() const override; + QString name() const override; + QString html(bool shorten = false) override; + QWidget* widget() const override; + bool isWidgetMaximized() const override; private: IProblem::Ptr m_problem; QPointer m_widget; }; } #endif // KDEVPLATFORM_PROBLEMNAVIGATIONCONTEXT_H diff --git a/language/duchain/navigation/usesnavigationcontext.h b/language/duchain/navigation/usesnavigationcontext.h index 2863068da7..a117d75369 100644 --- a/language/duchain/navigation/usesnavigationcontext.h +++ b/language/duchain/navigation/usesnavigationcontext.h @@ -1,43 +1,43 @@ /* Copyright 2008 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDEVPLATFORM_USESNAVIGATIONCONTEXT_H #define KDEVPLATFORM_USESNAVIGATIONCONTEXT_H #include "abstractnavigationwidget.h" #include namespace KDevelop { class UsesWidget; class KDEVPLATFORMLANGUAGE_EXPORT UsesNavigationContext : public AbstractNavigationContext { Q_OBJECT public: explicit UsesNavigationContext( KDevelop::IndexedDeclaration declaration, AbstractNavigationContext* previousContext = 0 ); - ~UsesNavigationContext(); + ~UsesNavigationContext() override; - virtual QString name() const override; - virtual QWidget* widget() const override; - virtual QString html(bool shorten) override; + QString name() const override; + QWidget* widget() const override; + QString html(bool shorten) override; private: KDevelop::IndexedDeclaration m_declaration; UsesWidget* m_widget; }; } #endif diff --git a/outputview/outputdelegate.h b/outputview/outputdelegate.h index f2046b0033..92741b677a 100644 --- a/outputview/outputdelegate.h +++ b/outputview/outputdelegate.h @@ -1,57 +1,57 @@ /*************************************************************************** * This file is part of KDevelop * * Copyright (C) 2007 Andreas Pakulat * * Copyright (C) 2012 Morten Danielsen Volden mvolden2@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef KDEVPLATFORM_OUTPUTDELEGATE_H #define KDEVPLATFORM_OUTPUTDELEGATE_H #include "outputviewexport.h" #include #include namespace KDevelop { struct OutputDelegatePrivate { OutputDelegatePrivate(); KStatefulBrush errorBrush; KStatefulBrush warningBrush; KStatefulBrush informationBrush; KStatefulBrush builtBrush; }; class KDEVPLATFORMOUTPUTVIEW_EXPORT OutputDelegate : public QItemDelegate { Q_OBJECT public: explicit OutputDelegate( QObject* parent = 0 ); - virtual ~OutputDelegate(); + ~OutputDelegate() override; void paint( QPainter*, const QStyleOptionViewItem&, const QModelIndex& ) const override; private: OutputDelegatePrivate* const d; }; } #endif diff --git a/plugins/documentswitcher/documentswitchertreeview.h b/plugins/documentswitcher/documentswitchertreeview.h index c72f15ee8d..0b4e3c2355 100644 --- a/plugins/documentswitcher/documentswitchertreeview.h +++ b/plugins/documentswitcher/documentswitchertreeview.h @@ -1,39 +1,39 @@ /*************************************************************************** * Copyright 2009 Andreas Pakulat * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef KDEVPLATFORM_PLUGIN_DOCUMENTSWITCHERTREEVIEW_H #define KDEVPLATFORM_PLUGIN_DOCUMENTSWITCHERTREEVIEW_H #include class DocumentSwitcherPlugin; class DocumentSwitcherTreeView : public QListView { Q_OBJECT public: explicit DocumentSwitcherTreeView( DocumentSwitcherPlugin* ); protected: -virtual void keyPressEvent(QKeyEvent* event) override; -virtual void keyReleaseEvent(QKeyEvent* ) override; +void keyPressEvent(QKeyEvent* event) override; +void keyReleaseEvent(QKeyEvent* ) override; private: DocumentSwitcherPlugin* plugin; }; #endif // KDEVPLATFORM_PLUGIN_DOCUMENTSWITCHERTREEVIEW_H diff --git a/plugins/filemanager/filemanager.h b/plugins/filemanager/filemanager.h index 0a61d260c6..10f8f6a08c 100644 --- a/plugins/filemanager/filemanager.h +++ b/plugins/filemanager/filemanager.h @@ -1,68 +1,68 @@ /*************************************************************************** * Copyright 2006 Alexander Dymo * * Copyright 2006 Andreas Pakulat * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef KDEVPLATFORM_PLUGIN_FILEMANAGER_H #define KDEVPLATFORM_PLUGIN_FILEMANAGER_H #include #include #include #include class KActionCollection; class QAction; class QString; class QMenu; class KDevFileManagerPlugin; class BookmarkHandler; class FileManager: public QWidget { Q_OBJECT public: FileManager(KDevFileManagerPlugin *plugin, QWidget* parent); - ~FileManager(); + ~FileManager() override; QList toolBarActions() const; KActionCollection* actionCollection() const; KDirOperator* dirOperator() const; KDevFileManagerPlugin* plugin() const; private slots: void fileCreated(KJob *job); void openFile(const KFileItem&); void gotoUrl(const QUrl&); void updateNav( const QUrl& url ); void syncCurrentDocumentDirectory(); void fillContextMenu(KFileItem item, QMenu *menu); void createNewFile(); private: void setupActions(); QList tbActions; QAction* newFileAction; QList contextActions; KDirOperator* dirop; KUrlNavigator* urlnav; BookmarkHandler *m_bookmarkHandler; KActionCollection *m_actionCollection; KDevFileManagerPlugin *m_plugin; }; #endif diff --git a/plugins/grepview/grepoutputdelegate.h b/plugins/grepview/grepoutputdelegate.h index ac17219448..53d11c1711 100644 --- a/plugins/grepview/grepoutputdelegate.h +++ b/plugins/grepview/grepoutputdelegate.h @@ -1,43 +1,43 @@ /*************************************************************************** * This file is part of KDevelop * * Copyright (C) 2007 Andreas Pakulat * * Copyright 2010 Julien Desgats * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef KDEVPLATFORM_PLUGIN_GREPOUTPUTDELEGATE_H #define KDEVPLATFORM_PLUGIN_GREPOUTPUTDELEGATE_H #include class GrepOutputDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit GrepOutputDelegate(QObject* parent); - virtual ~GrepOutputDelegate(); + ~GrepOutputDelegate() override; static GrepOutputDelegate* self(); void paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const override; - virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override; + QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override; private: static GrepOutputDelegate* m_self; QColor blendColor(QColor color1, QColor color2, double blend) const; }; #endif diff --git a/plugins/quickopen/actionsquickopenprovider.h b/plugins/quickopen/actionsquickopenprovider.h index 80da0c4ff0..022090b2e4 100644 --- a/plugins/quickopen/actionsquickopenprovider.h +++ b/plugins/quickopen/actionsquickopenprovider.h @@ -1,44 +1,44 @@ /* * This file is part of KDevelop * * Copyright 2015 Aleix Pol Gonzalez * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDEVPLATFORM_PLUGIN_ACTIONSPROVIDER_H #define KDEVPLATFORM_PLUGIN_ACTIONSPROVIDER_H #include #include class ActionsQuickOpenProvider : public KDevelop::QuickOpenDataProviderBase { Q_OBJECT public: ActionsQuickOpenProvider(); - virtual KDevelop::QuickOpenDataPointer data(uint row) const override; - virtual uint unfilteredItemCount() const override; - virtual uint itemCount() const override; - virtual void reset() override; - virtual void setFilterText(const QString& text) override; + KDevelop::QuickOpenDataPointer data(uint row) const override; + uint unfilteredItemCount() const override; + uint itemCount() const override; + void reset() override; + void setFilterText(const QString& text) override; private: QVector m_results; }; #endif // KDEVPLATFORM_PLUGIN_ACTIONSPROVIDER_H diff --git a/plugins/quickopen/declarationlistquickopen.h b/plugins/quickopen/declarationlistquickopen.h index 7d45c52ebc..7ad79a271b 100644 --- a/plugins/quickopen/declarationlistquickopen.h +++ b/plugins/quickopen/declarationlistquickopen.h @@ -1,44 +1,44 @@ /* This file is part of the KDE libraries Copyright (C) 2008 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDEVPLATFORM_PLUGIN_DECLARATION_LIST_QUICKOPEN_H #define KDEVPLATFORM_PLUGIN_DECLARATION_LIST_QUICKOPEN_H #include "duchainitemquickopen.h" namespace KDevelop { class IQuickOpen; } class DeclarationListDataProvider : public DUChainItemDataProvider { Q_OBJECT public: DeclarationListDataProvider( KDevelop::IQuickOpen* quickopen, const QList& items, bool openDefinitions = false ); - virtual void reset() override; + void reset() override; private: QList m_items; }; #endif diff --git a/plugins/quickopen/documentationquickopenprovider.h b/plugins/quickopen/documentationquickopenprovider.h index 50a782556a..0f3b398f34 100644 --- a/plugins/quickopen/documentationquickopenprovider.h +++ b/plugins/quickopen/documentationquickopenprovider.h @@ -1,44 +1,44 @@ /* * This file is part of KDevelop * * Copyright 2013 Aleix Pol Gonzalez * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDEVPLATFORM_PLUGIN_DOCUMENTATIONPROVIDER_H #define KDEVPLATFORM_PLUGIN_DOCUMENTATIONPROVIDER_H #include #include class DocumentationQuickOpenProvider : public KDevelop::QuickOpenDataProviderBase { Q_OBJECT public: DocumentationQuickOpenProvider(); - virtual KDevelop::QuickOpenDataPointer data(uint row) const override; - virtual uint unfilteredItemCount() const override; - virtual uint itemCount() const override; - virtual void reset() override; - virtual void setFilterText(const QString& text) override; + KDevelop::QuickOpenDataPointer data(uint row) const override; + uint unfilteredItemCount() const override; + uint itemCount() const override; + void reset() override; + void setFilterText(const QString& text) override; private: QVector m_results; }; #endif // KDEVPLATFORM_PLUGIN_DOCUMENTATIONPROVIDER_H diff --git a/plugins/quickopen/duchainitemquickopen.h b/plugins/quickopen/duchainitemquickopen.h index bf7a472094..fe96265f87 100644 --- a/plugins/quickopen/duchainitemquickopen.h +++ b/plugins/quickopen/duchainitemquickopen.h @@ -1,103 +1,103 @@ /* This file is part of the KDE libraries Copyright (C) 2007 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef DUCHAIN_ITEM_QUICKOPEN #define DUCHAIN_ITEM_QUICKOPEN #include #include #include #include namespace KDevelop { class IQuickOpen; } struct DUChainItem { DUChainItem() : m_noHtmlDestription(false) { } KDevelop::IndexedDeclaration m_item; QString m_text; QString m_project; bool m_noHtmlDestription; }; Q_DECLARE_TYPEINFO(DUChainItem, Q_MOVABLE_TYPE); class DUChainItemData : public KDevelop::QuickOpenDataBase { public: explicit DUChainItemData( const DUChainItem& item, bool openDefinition = false ); - virtual QString text() const override; - virtual QString htmlDescription() const override; - virtual QList highlighting() const override; + QString text() const override; + QString htmlDescription() const override; + QList highlighting() const override; bool execute( QString& filterText ) override; - virtual bool isExpandable() const override; - virtual QWidget* expandingWidget() const override; + bool isExpandable() const override; + QWidget* expandingWidget() const override; - virtual QIcon icon() const override; + QIcon icon() const override; private: DUChainItem m_item; bool m_openDefinition; }; /** * A QuickOpenDataProvider that presents a list of declarations. * The declarations need to be set using setItems(..) in a re-implemented reset() function. * */ class DUChainItemDataProvider : public KDevelop::QuickOpenDataProviderBase, public KDevelop::Filter { Q_OBJECT public: typedef KDevelop::Filter Base; /// When openDefinitions is true, the definitions will be opened if available on execute(). explicit DUChainItemDataProvider( KDevelop::IQuickOpen* quickopen, bool openDefinitions = false ); - virtual void setFilterText( const QString& text ) override; - virtual uint itemCount() const override; - virtual uint unfilteredItemCount() const override; - virtual KDevelop::QuickOpenDataPointer data( uint row ) const override; + void setFilterText( const QString& text ) override; + uint itemCount() const override; + uint unfilteredItemCount() const override; + KDevelop::QuickOpenDataPointer data( uint row ) const override; - virtual void reset() override; + void reset() override; protected: //Override to create own DUChainItemData derived classes DUChainItemData* createData( const DUChainItem& item ) const; //Reimplemented from Base<..> - virtual QString itemText( const DUChainItem& data ) const override; + QString itemText( const DUChainItem& data ) const override; KDevelop::IQuickOpen* m_quickopen; private: bool m_openDefinitions; }; #endif diff --git a/plugins/quickopen/projectitemquickopen.h b/plugins/quickopen/projectitemquickopen.h index 7da59c3f71..f80ba6511e 100644 --- a/plugins/quickopen/projectitemquickopen.h +++ b/plugins/quickopen/projectitemquickopen.h @@ -1,85 +1,85 @@ /* This file is part of the KDE libraries Copyright (C) 2007 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef PROJECT_ITEM_QUICKOPEN #define PROJECT_ITEM_QUICKOPEN #include "duchainitemquickopen.h" #include #include struct CodeModelViewItem { CodeModelViewItem() { } CodeModelViewItem(const KDevelop::IndexedString& file, const KDevelop::QualifiedIdentifier& id) : m_file(file) , m_id(id) { } KDevelop::IndexedString m_file; KDevelop::QualifiedIdentifier m_id; }; Q_DECLARE_TYPEINFO(CodeModelViewItem, Q_MOVABLE_TYPE); typedef QMap > AddedItems; class ProjectItemDataProvider : public KDevelop::QuickOpenDataProviderBase { Q_OBJECT public: enum ItemTypes { NoItems = 0, Classes = 1, Functions = 2, AllItemTypes = Classes + Functions }; explicit ProjectItemDataProvider( KDevelop::IQuickOpen* quickopen ); - virtual void enableData( const QStringList& items, const QStringList& scopes ) override; + void enableData( const QStringList& items, const QStringList& scopes ) override; - virtual void setFilterText( const QString& text ) override; + void setFilterText( const QString& text ) override; virtual QList data( uint start, uint end ) const; - virtual void reset() override; + void reset() override; - virtual uint itemCount() const override; - virtual uint unfilteredItemCount() const override; + uint itemCount() const override; + uint unfilteredItemCount() const override; static QStringList supportedItemTypes(); private: KDevelop::QuickOpenDataPointer data( uint pos ) const override; ItemTypes m_itemTypes; KDevelop::IQuickOpen* m_quickopen; QSet m_files; QVector m_currentItems; QString m_currentFilter; QVector m_filteredItems; //Maps positions to the additional items behind those positions //Here additional inserted items are stored, that are not represented in m_filteredItems. //This is needed at least to also show overloaded function declarations mutable AddedItems m_addedItems; }; #endif diff --git a/plugins/subversion/svnlocationwidget.h b/plugins/subversion/svnlocationwidget.h index 6b8c5f0eba..f6060bf864 100644 --- a/plugins/subversion/svnlocationwidget.h +++ b/plugins/subversion/svnlocationwidget.h @@ -1,26 +1,26 @@ /*************************************************************************** * Copyright 2010 Aleix Pol Gonzalez * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef KDEVPLATFORM_PLUGIN_SVNLOCATIONWIDGET_H #define KDEVPLATFORM_PLUGIN_SVNLOCATIONWIDGET_H #include class SvnLocationWidget : public KDevelop::StandardVcsLocationWidget { Q_OBJECT public: explicit SvnLocationWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); - virtual KDevelop::VcsLocation location() const override; - virtual bool isCorrect() const override; + KDevelop::VcsLocation location() const override; + bool isCorrect() const override; }; #endif // KDEVPLATFORM_PLUGIN_SVNLOCATIONWIDGET_H diff --git a/shell/completionsettings.h b/shell/completionsettings.h index 31ac38167a..66a05b18ce 100644 --- a/shell/completionsettings.h +++ b/shell/completionsettings.h @@ -1,75 +1,75 @@ /*************************************************************************** * Copyright 2008 David Nolden * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef KDEVPLATFORM_COMPLETIONSETTINGS_H #define KDEVPLATFORM_COMPLETIONSETTINGS_H #include #include #include namespace KDevelop { class CompletionSettings : public KDevelop::ICompletionSettings { Q_OBJECT public: - virtual CompletionLevel completionLevel() const override; + CompletionLevel completionLevel() const override; - virtual bool automaticCompletionEnabled() const override; + bool automaticCompletionEnabled() const override; void emitChanged() { emit settingsChanged(this); } - virtual int localColorizationLevel() const override; + int localColorizationLevel() const override; - virtual int globalColorizationLevel() const override; + int globalColorizationLevel() const override; - virtual bool highlightSemanticProblems() const override; + bool highlightSemanticProblems() const override; - virtual bool highlightProblematicLines() const override; + bool highlightProblematicLines() const override; - virtual bool boldDeclarations() const override; + bool boldDeclarations() const override; - virtual bool showMultiLineSelectionInformation() const override; + bool showMultiLineSelectionInformation() const override; - virtual int minFilesForSimplifiedParsing() const override; + int minFilesForSimplifiedParsing() const override; - virtual QStringList todoMarkerWords() const override; + QStringList todoMarkerWords() const override; static CompletionSettings& self(); private: CompletionSettings(); const CompletionLevel m_level; const bool m_automatic; const bool m_highlightSemanticProblems; const bool m_highlightProblematicLines; const bool m_showMultiLineInformation; const bool m_boldDeclarations; const int m_localColorizationLevel; const int m_globalColorizationLevel; const int m_minFilesForSimplifiedParsing; const QString m_todoMarkerWords; const KConfigGroup m_languageGroup; }; } #endif diff --git a/shell/settings/uipreferences.h b/shell/settings/uipreferences.h index 0f4845a015..328be87269 100644 --- a/shell/settings/uipreferences.h +++ b/shell/settings/uipreferences.h @@ -1,54 +1,54 @@ /* KDevelop * * Copyright 2007 Andreas Pakulat * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. */ #ifndef KDEVPLATFORM_UIPREFERENCES_H #define KDEVPLATFORM_UIPREFERENCES_H #include "configpage.h" namespace Ui{ class UiConfig; } /** @author Andreas Pakulat */ class UiPreferences : public KDevelop::ConfigPage { Q_OBJECT public: explicit UiPreferences(QWidget* parent = nullptr); - ~UiPreferences(); + ~UiPreferences() override; - virtual QString name() const override; - virtual QString fullName() const override; - virtual QIcon icon() const override; + QString name() const override; + QString fullName() const override; + QIcon icon() const override; public Q_SLOTS: // need to customize behaviour - virtual void apply() override; + void apply() override; private: Ui::UiConfig* m_uiconfigUi; }; #endif diff --git a/sublime/tooldocument.h b/sublime/tooldocument.h index c73b114385..09a05a0f05 100644 --- a/sublime/tooldocument.h +++ b/sublime/tooldocument.h @@ -1,91 +1,91 @@ /*************************************************************************** * Copyright 2006-2007 Alexander Dymo * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef KDEVPLATFORM_SUBLIMETOOLDOCUMENT_H #define KDEVPLATFORM_SUBLIMETOOLDOCUMENT_H #include "document.h" #include "sublimeexport.h" class QAction; namespace Sublime { class ToolDocument; /** @short Factory to create widgets for toolviews */ class KDEVPLATFORMSUBLIME_EXPORT ToolFactory { public: virtual ~ToolFactory() {} virtual QWidget* create(ToolDocument *doc, QWidget *parent = 0) = 0; virtual QList toolBarActions( QWidget* viewWidget ) const = 0; virtual QList contextMenuActions( QWidget* viewWidget ) const = 0; virtual QString id() const = 0; }; /** @short Simple factory that just creates a new widget of given type */ template class SimpleToolWidgetFactory: public ToolFactory { public: SimpleToolWidgetFactory(const QString &id): ToolFactory(), m_id(id) {} - virtual QWidget* create(ToolDocument * /*doc*/, QWidget *parent = 0) override + QWidget* create(ToolDocument * /*doc*/, QWidget *parent = 0) override { return new Widget(parent); } - virtual QList toolBarActions( QWidget* ) const override { return QList(); } - virtual QList< QAction* > contextMenuActions(QWidget* /*viewWidget*/) const override { return QList(); } - virtual QString id() const override { return m_id; } + QList toolBarActions( QWidget* ) const override { return QList(); } + QList< QAction* > contextMenuActions(QWidget* /*viewWidget*/) const override { return QList(); } + QString id() const override { return m_id; } virtual bool viewsWantProgressIndicator() const { return false; } private: QString m_id; }; /** @short Document to represent and manage widgets as toolviews */ class KDEVPLATFORMSUBLIME_EXPORT ToolDocument: public Document { Q_OBJECT public: /**Initializes tool document with given @p factory. Document takes ownership over the factory and deletes it together with itself*/ ToolDocument(const QString &title, Controller *controller, ToolFactory *factory); - ~ToolDocument(); + ~ToolDocument() override; - virtual QString documentType() const override; + QString documentType() const override; - virtual QString documentSpecifier() const override; + QString documentSpecifier() const override; protected: - virtual QWidget *createViewWidget(QWidget *parent = 0) override; + QWidget *createViewWidget(QWidget *parent = 0) override; ToolFactory *factory() const; private: struct ToolDocumentPrivate * const d; friend class View; }; } #endif