diff --git a/kdevplatform/vcs/widgets/vcsannotationitemdelegate.h b/kdevplatform/vcs/widgets/vcsannotationitemdelegate.h index e90b49c82a..42ed5d0a0d 100644 --- a/kdevplatform/vcs/widgets/vcsannotationitemdelegate.h +++ b/kdevplatform/vcs/widgets/vcsannotationitemdelegate.h @@ -1,95 +1,95 @@ /* This file is part of KDevelop * * Copyright 2017-2018 Friedrich W. H. Kossebau * * 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_VCSANNITATIONITEMDELEGATE_H -#define KDEVPLATFORM_VCSANNITATIONITEMDELEGATE_H +#ifndef KDEVPLATFORM_VCSANNOTATIONITEMDELEGATE_H +#define KDEVPLATFORM_VCSANNOTATIONITEMDELEGATE_H // KDev #include // KF #include // Qt #include #include namespace KDevelop { class VcsAnnotationLine; class VcsAnnotationItemDelegate : public KTextEditor::AbstractAnnotationItemDelegate { Q_OBJECT public: VcsAnnotationItemDelegate(KTextEditor::View* view, KTextEditor::AnnotationModel* model, QObject* parent); ~VcsAnnotationItemDelegate() override; public: // AbstractAnnotationItemDelegate APO void paint(QPainter* painter, const KTextEditor::StyleOptionAnnotationItem& option, KTextEditor::AnnotationModel* model, int line) const override; QSize sizeHint(const KTextEditor::StyleOptionAnnotationItem& option, KTextEditor::AnnotationModel* model, int line) const override; bool helpEvent(QHelpEvent* event, KTextEditor::View* view, const KTextEditor::StyleOptionAnnotationItem& option, KTextEditor::AnnotationModel *model, int line) override; void hideTooltip(KTextEditor::View *view) override; private: void renderBackground(QPainter* painter, const KTextEditor::StyleOptionAnnotationItem& option, const VcsAnnotationLine& annotationLine) const; void renderMessageAndAge(QPainter* painter, const KTextEditor::StyleOptionAnnotationItem& option, const QRect& messageRect, const QString& messageText, const QRect& ageRect, const QString& ageText) const; void renderAuthor(QPainter* painter, const KTextEditor::StyleOptionAnnotationItem& option, const QRect& authorRect, const QString& authorText) const; void renderHighlight(QPainter* painter, const KTextEditor::StyleOptionAnnotationItem& option) const; void doMessageLineLayout(const KTextEditor::StyleOptionAnnotationItem& option, QRect* messageRect, QRect* ageRect) const; void doAuthorLineLayout(const KTextEditor::StyleOptionAnnotationItem& option, QRect* authorRect) const; protected: // QObject API bool eventFilter(QObject* object, QEvent* event) override; private Q_SLOTS: void resetBackgrounds(); private: int widthHintFromViewWidth(int viewWidth) const; private: KTextEditor::AnnotationModel* const m_model; // TODO: make this configurable const int m_maxWidthViewPercent = 25; mutable QHash m_backgrounds; mutable int m_lastCharBasedWidthHint = 0; mutable int m_lastViewBasedWidthHint = 0; }; } #endif diff --git a/plugins/clang/codegen/clangrefactoring.h b/plugins/clang/codegen/clangrefactoring.h index 766dead6db..999b837d59 100644 --- a/plugins/clang/codegen/clangrefactoring.h +++ b/plugins/clang/codegen/clangrefactoring.h @@ -1,61 +1,61 @@ /* * This file is part of KDevelop * * Copyright 2015 Sergey Kalinichev * * 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) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * 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, see . * */ -#ifndef SIMPLEREFACTORING_H -#define SIMPLEREFACTORING_H +#ifndef CLANGREFACTORING_H +#define CLANGREFACTORING_H #include "clangprivateexport.h" #include class TestRefactoring; namespace KDevelop { class Declaration; } class KDEVCLANGPRIVATE_EXPORT ClangRefactoring : public KDevelop::BasicRefactoring { Q_OBJECT public: explicit ClangRefactoring(QObject* parent = nullptr); void fillContextMenu(KDevelop::ContextMenuExtension& extension, KDevelop::Context* context, QWidget* parent) override; QString moveIntoSource(const KDevelop::IndexedDeclaration& iDecl); public Q_SLOTS: void executeMoveIntoSourceAction(); protected: KDevelop::DocumentChangeSet::ChangeResult applyChangesToDeclarations(const QString& oldName, const QString& newName, KDevelop::DocumentChangeSet& changes, const QList& declarations) override; private: friend TestRefactoring; bool validCandidateToMoveIntoSource(KDevelop::Declaration* decl); }; #endif diff --git a/plugins/clangtidy/parsers/replacementparser.h b/plugins/clangtidy/parsers/replacementparser.h index 2609ed53f8..87051d018b 100644 --- a/plugins/clangtidy/parsers/replacementparser.h +++ b/plugins/clangtidy/parsers/replacementparser.h @@ -1,102 +1,102 @@ /* * This file is part of KDevelop * * Copyright 2016 Carlos Nihelton * * 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 CLANGTIDY_REPLACEMENT_H -#define CLANGTIDY_REPLACEMENT_H +#ifndef CLANGTIDY_REPLACEMENTPARSER_H +#define CLANGTIDY_REPLACEMENTPARSER_H // KDevPlatform #include // Qt #include #include #include // Boost #include using KDevelop::DocumentRange; using KDevelop::IndexedString; namespace ClangTidy { /** * \struct * \brief contains basic elements for one replacement in source code. * */ struct Replacement { size_t offset, length; ///< read from YAML. QString replacementText; ///< read from YAML. DocumentRange range; ///< created from line and column. }; using Replacements = QVector; /** * Implements the parser for the YAML file generated by clang-tidy with the recommended corrections. */ class ReplacementParser { public: ReplacementParser() = default; explicit ReplacementParser(const QString& yaml_file, const QString& source_file); public: void parse(); size_t count() const { return cReplacements; } Replacements allReplacements() { return all_replacements; } protected: /** * \function * \brief generates the next replacement from the regex capture list. * \param smatch the captured match. * \return Replacement */ Replacement nextNode(const QRegularExpressionMatch& smatch); /** * \function * \brief compose a range in KTextEditor from the offset and length components of the Replacement being processed. * \return KDevelop::DocumentRange * \warning the range can be invalid in case offset and length overcome the substring length. */ KDevelop::DocumentRange composeNextNodeRange(size_t offset, size_t length); private: size_t currentLine; ///< current line on source code while parsing. size_t currentColumn; ///< current column on source code while parsing. size_t currentOffset; ///< current offset in bytes since the beginning of the source code while parsing. size_t cReplacements; ///< current count of replacements parsed. QString m_yamlname; QString m_sourceFile; IndexedString i_source; QString m_yamlContent; std::string m_sourceCode; boost::string_ref m_sourceView; static const QRegularExpression regex, check; Replacements all_replacements; }; } #endif // CLANGTIDY_REPLACEMENT_H diff --git a/plugins/cmake/cmakedoc.h b/plugins/cmake/cmakedoc.h index b3f852d6e1..ee32af2e82 100644 --- a/plugins/cmake/cmakedoc.h +++ b/plugins/cmake/cmakedoc.h @@ -1,46 +1,46 @@ /* KDevelop CMake Support * * Copyright 2009 Aleix Pol * * 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 CMAKEHELPDOC_H -#define CMAKEHELPDOC_H +#ifndef CMAKEDOC_H +#define CMAKEDOC_H #include class CMakeDocumentation; class CMakeDoc : public KDevelop::IDocumentation { Q_OBJECT public: CMakeDoc(const QString& name, const QString& desc) : mName(name), mDesc(desc) {} QString description() const override { return mDesc; } QString name() const override { return mName; } KDevelop::IDocumentationProvider* provider() const override; QWidget* documentationWidget(KDevelop::DocumentationFindWidget* findWidget, QWidget* parent = nullptr) override; static CMakeDocumentation* s_provider; private: QString mName, mDesc; }; #endif diff --git a/plugins/compileanalyzercommon/compileanalyzeproblemmodel.h b/plugins/compileanalyzercommon/compileanalyzeproblemmodel.h index 83f311c481..72f74233cc 100644 --- a/plugins/compileanalyzercommon/compileanalyzeproblemmodel.h +++ b/plugins/compileanalyzercommon/compileanalyzeproblemmodel.h @@ -1,76 +1,76 @@ /* * This file is part of KDevelop * * Copyright 2018,2020 Friedrich W. H. Kossebau * * 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 COMPILEANALYZER_PROBLEMMODEL_H -#define COMPILEANALYZER_PROBLEMMODEL_H +#ifndef COMPILEANALYZER_COMPILEANALYZEPROBLEMMODEL_H +#define COMPILEANALYZER_COMPILEANALYZEPROBLEMMODEL_H // KDevPlatfrom #include // Qt #include namespace KDevelop { class IProject; } namespace KDevelop { class CompileAnalyzeProblemModel : public KDevelop::ProblemModel { Q_OBJECT public: explicit CompileAnalyzeProblemModel(const QString& toolName, QObject* parent); ~CompileAnalyzeProblemModel() override; public: // KDevelop::ProblemModel API void forceFullUpdate() override; public: void addProblems(const QVector& problems); void finishAddProblems(); void reset(); void reset(KDevelop::IProject* project, const QUrl& path, bool allFiles); KDevelop::IProject* project() const; Q_SIGNALS: void rerunRequested(const QUrl& path, bool allFiles); private: void setMessage(const QString& message); bool problemExists(KDevelop::IProblem::Ptr newProblem); private: const QString m_toolName; KDevelop::IProject* m_project = nullptr; QUrl m_path; bool m_allFiles = false; KDevelop::DocumentRange m_pathLocation; QVector m_problems; int m_maxProblemDescriptionLength = 0; }; } #endif diff --git a/plugins/custom-definesandincludes/compilerprovider/compilerprovider.h b/plugins/custom-definesandincludes/compilerprovider/compilerprovider.h index 3a229cadac..2aa8b46b3b 100644 --- a/plugins/custom-definesandincludes/compilerprovider/compilerprovider.h +++ b/plugins/custom-definesandincludes/compilerprovider/compilerprovider.h @@ -1,81 +1,81 @@ /* * This file is part of KDevelop * * Copyright 2014 Sergey Kalinichev * * 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) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * 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, see . * */ -#ifndef COMPILERSPROVIDER_H -#define COMPILERSPROVIDER_H +#ifndef COMPILERPROVIDER_H +#define COMPILERPROVIDER_H #include "icompilerfactory.h" #include class SettingsManager; class CompilerProvider : public QObject, public KDevelop::IDefinesAndIncludesManager::Provider { Q_OBJECT public: explicit CompilerProvider( SettingsManager* settings, QObject* parent = nullptr ); ~CompilerProvider() override; KDevelop::Defines defines( const QString& path ) const override; KDevelop::Defines defines( KDevelop::ProjectBaseItem* item ) const override; KDevelop::Path::List includes( const QString& path ) const override; KDevelop::Path::List includes( KDevelop::ProjectBaseItem* item ) const override; KDevelop::Path::List frameworkDirectories( const QString& path ) const override; KDevelop::Path::List frameworkDirectories( KDevelop::ProjectBaseItem* item ) const override; KDevelop::IDefinesAndIncludesManager::Type type() const override; /// @return current compiler for the @p item CompilerPointer compilerForItem( KDevelop::ProjectBaseItem* item ) const; /// @return list of all available compilers QVector compilers() const; /** * Adds compiler to the list of available compilers * @return true on success (if there is no compiler with the same name registered). */ bool registerCompiler(const CompilerPointer& compiler); /// Removes compiler from the list of available compilers void unregisterCompiler( const CompilerPointer& compiler ); /// @return All available factories QVector compilerFactories() const; /// @returns a default compiler CompilerPointer defaultCompiler() const; private Q_SLOTS: void retrieveUserDefinedCompilers(); void projectChanged(KDevelop::IProject* p); private: mutable CompilerPointer m_defaultProvider; QVector m_compilers; QVector m_factories; SettingsManager* m_settings; }; #endif // COMPILERSPROVIDER_H diff --git a/plugins/custom-definesandincludes/compilerprovider/widget/compilersmodel.h b/plugins/custom-definesandincludes/compilerprovider/widget/compilersmodel.h index c406a55f89..bcc3dbbbf7 100644 --- a/plugins/custom-definesandincludes/compilerprovider/widget/compilersmodel.h +++ b/plugins/custom-definesandincludes/compilerprovider/widget/compilersmodel.h @@ -1,69 +1,69 @@ /* * This file is part of KDevelop * * Copyright 2014 Sergey Kalinichev * * 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) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * 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, see . * */ -#ifndef COMPILERMODEL_H -#define COMPILERMODEL_H +#ifndef COMPILERSMODEL_H +#define COMPILERSMODEL_H #include #include #include "../compilerprovider/icompiler.h" class TreeItem; class CompilersModel : public QAbstractItemModel { Q_OBJECT public: enum SpecialRole { CompilerDataRole = Qt::UserRole + 1 }; explicit CompilersModel( QObject* parent = nullptr ); ~CompilersModel() override; void setCompilers( const QVector& compilers ); QVector compilers() const; QModelIndex addCompiler(const CompilerPointer& compiler); void updateCompiler(const QItemSelection& compiler); Q_SIGNALS: /// emitted whenever new compiler added or existing one modified/deleted. void compilerChanged(); public: QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override; int rowCount( const QModelIndex& parent = QModelIndex() ) const override; Qt::ItemFlags flags( const QModelIndex& index ) const override; int columnCount( const QModelIndex& parent = QModelIndex() ) const override; QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override; QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; QModelIndex parent(const QModelIndex& child) const override; bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override; private: TreeItem* m_rootItem; }; #endif // COMPILERMODEL_H diff --git a/plugins/custom-definesandincludes/compilerprovider/widget/compilerswidget.h b/plugins/custom-definesandincludes/compilerprovider/widget/compilerswidget.h index 0a939b6258..ef43aa16d8 100644 --- a/plugins/custom-definesandincludes/compilerprovider/widget/compilerswidget.h +++ b/plugins/custom-definesandincludes/compilerprovider/widget/compilerswidget.h @@ -1,81 +1,81 @@ /* * This file is part of KDevelop * * Copyright 2014 Sergey Kalinichev * * 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) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * 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, see . * */ -#ifndef COMPILERWIDGET_H -#define COMPILERWIDGET_H +#ifndef COMPILERSWIDGET_H +#define COMPILERSWIDGET_H #include #include #include #include "../compilerprovider/icompiler.h" namespace Ui { class CompilersWidget; } class CompilersModel; class QMenu; class CompilersWidget : public KDevelop::ConfigPage { Q_OBJECT public: explicit CompilersWidget(QWidget* parent = nullptr); ~CompilersWidget() override; void setCompilers(const QVector& compilers); QVector compilers() const; void clear(); QString name() const override; QString fullName() const override; QIcon icon() const override; KDevelop::ConfigPage::ConfigPageType configPageType() const override; void apply() override; void reset() override; void defaults() override; private Q_SLOTS: void deleteCompiler(); void addCompiler(const QString& factoryName); void compilerSelected(const QModelIndex& index); void compilerEdited(); Q_SIGNALS: void compilerChanged(); private: void enableItems(bool enable); QScopedPointer m_ui; CompilersModel* m_compilersModel; QMenu *m_addMenu; }; #endif diff --git a/plugins/custom-definesandincludes/kcm_widget/definesandincludesconfigpage.h b/plugins/custom-definesandincludes/kcm_widget/definesandincludesconfigpage.h index f6ee3dff0a..9a67d06fab 100644 --- a/plugins/custom-definesandincludes/kcm_widget/definesandincludesconfigpage.h +++ b/plugins/custom-definesandincludes/kcm_widget/definesandincludesconfigpage.h @@ -1,45 +1,45 @@ /************************************************************************ * * * Copyright 2010 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 or version 3 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, see . * ************************************************************************/ -#ifndef KCM_CUSTOMBUILDSYSTEM_H -#define KCM_CUSTOMBUILDSYSTEM_H +#ifndef KCM_DEFINESANDINCLUDESCONFIGPAGE_H +#define KCM_DEFINESANDINCLUDESCONFIGPAGE_H #include #include "customdefinesandincludes.h" class DefinesAndIncludesConfigPage : public ProjectConfigPage { Q_OBJECT public: DefinesAndIncludesConfigPage(KDevelop::IPlugin* plugin, const KDevelop::ProjectConfigOptions& options, QWidget* parent); ~DefinesAndIncludesConfigPage() override; QString name() const override; QString fullName() const override; QIcon icon() const override; void apply() override; void reset() override; private: class ProjectPathsWidget* configWidget; void loadFrom( KConfig* cfg ); void saveTo( KConfig* cfg, KDevelop::IProject* ); }; #endif diff --git a/plugins/custommake/makefileresolver/makefileresolver.h b/plugins/custommake/makefileresolver/makefileresolver.h index 2c40df3a86..b96ca4a547 100644 --- a/plugins/custommake/makefileresolver/makefileresolver.h +++ b/plugins/custommake/makefileresolver/makefileresolver.h @@ -1,102 +1,102 @@ /* * KDevelop C++ Language Support * * Copyright 2007 David Nolden * Copyright 2014 Kevin Funk * * 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 INCLUDEPATHRESOLVER_H -#define INCLUDEPATHRESOLVER_H +#ifndef MAKEFILERESOLVER_H +#define MAKEFILERESOLVER_H #include #include #include struct PathResolutionResult { explicit PathResolutionResult(bool success = false, const QString& errorMessage = QString(), const QString& longErrorMessage = QString()); bool success; QString errorMessage; QString longErrorMessage; KDevelop::ModificationRevisionSet includePathDependency; KDevelop::Path::List paths; // the list of framework directories specified with explicit -iframework and/or -F arguments. // Mainly for OS X, but available everywhere to avoid #ifdefs and // because clang is an out-of-the-box cross-compiler. KDevelop::Path::List frameworkDirectories; QHash defines; void mergeWith(const PathResolutionResult& rhs); operator bool() const; }; class SourcePathInformation; ///One resolution-try can issue up to 4 make-calls in worst case class MakeFileResolver { public: MakeFileResolver(); ///Same as below, but uses the directory of the file as working-directory. The argument must be absolute. PathResolutionResult resolveIncludePath( const QString& file ); ///The include-path is only computed once for a whole directory, then it is cached using the modification-time of the Makefile. ///source and build must be absolute paths void setOutOfSourceBuildSystem( const QString& source, const QString& build ); ///resets to in-source build system void resetOutOfSourceBuild(); static void clearCache(); KDevelop::ModificationRevisionSet findIncludePathDependency(const QString& file); void enableMakeResolution(bool enable); PathResolutionResult processOutput(const QString& fullOutput, const QString& workingDirectory) const; static QRegularExpression defineRegularExpression(); private: PathResolutionResult resolveIncludePath( const QString& file, const QString& workingDirectory, int maxStepsUp = 20 ); bool m_isResolving = false; bool m_outOfSource = false; QString mapToBuild(const QString &path) const; ///Executes the command using KProcess bool executeCommand( const QString& command, const QString& workingDirectory, QString& result ) const; ///file should be the name of the target, without extension(because that may be different) PathResolutionResult resolveIncludePathInternal( const QString& file, const QString& workingDirectory, const QString& makeParameters, const SourcePathInformation& source, int maxDepth ); QString m_source; QString m_build; // reuse cached instances of Paths and strings, to share memory where possible mutable QHash m_pathCache; mutable QSet m_stringCache; KDevelop::Path internPath(const QString& path) const; QString internString(const QString& string) const; }; #endif diff --git a/plugins/executeplasmoid/plasmoidexecutionconfig.h b/plugins/executeplasmoid/plasmoidexecutionconfig.h index e0496d0d41..4f09aaddde 100644 --- a/plugins/executeplasmoid/plasmoidexecutionconfig.h +++ b/plugins/executeplasmoid/plasmoidexecutionconfig.h @@ -1,99 +1,99 @@ /* This file is part of KDevelop Copyright 2009 Andreas Pakulat Copyright 2009 Niko Sams This library 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 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 SCRIPTAPPCONFIGTYPE_H -#define SCRIPTAPPCONFIGTYPE_H +#ifndef PLASMOIDEXECUTIONCONFIG_H +#define PLASMOIDEXECUTIONCONFIG_H #include #include #include #include #include "ui_plasmoidexecutionconfig.h" class ExecutePlasmoidPlugin; class PlasmoidExecutionConfig : public KDevelop::LaunchConfigurationPage, Ui::PlasmoidExecutionPage { Q_OBJECT public: explicit PlasmoidExecutionConfig( QWidget* parent ); void loadFromConfiguration( const KConfigGroup& cfg, KDevelop::IProject* project = nullptr ) override; void saveToConfiguration( KConfigGroup cfg, KDevelop::IProject* project = nullptr ) const override; QString title() const override; QIcon icon() const override; }; class PlasmoidLauncher : public KDevelop::ILauncher { public: explicit PlasmoidLauncher( ExecutePlasmoidPlugin* plugin ); QList< KDevelop::LaunchConfigurationPageFactory* > configPages() const override; QString description() const override; QString id() override; QString name() const override; KJob* start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg) override; virtual KJob* dependencies(KDevelop::ILaunchConfiguration* cfg); QStringList supportedModes() const override; static KJob* calculateDependencies(KDevelop::ILaunchConfiguration* cfg); private: ExecutePlasmoidPlugin* m_plugin; }; class PlasmoidPageFactory : public KDevelop::LaunchConfigurationPageFactory { public: PlasmoidPageFactory(); KDevelop::LaunchConfigurationPage* createWidget(QWidget* parent) override; }; /** * A specific configuration to start a launchable, this could be a native * compiled application, or some script file or byte-compiled file or something else * Provides access to the various configured information, as well as its type and a name */ class PlasmoidExecutionConfigType : public KDevelop::LaunchConfigurationType { Q_OBJECT public: PlasmoidExecutionConfigType(); ~PlasmoidExecutionConfigType() override; static QString typeId(); QString id() const override { return typeId(); } QString name() const override; QList configPages() const override; QIcon icon() const override; bool canLaunch( const QUrl &file ) const override; bool canLaunch(KDevelop::ProjectBaseItem* item) const override; void configureLaunchFromItem(KConfigGroup config, KDevelop::ProjectBaseItem* item) const override; void configureLaunchFromCmdLineArguments(KConfigGroup config, const QStringList& args) const override; QMenu* launcherSuggestions() override; private: QList factoryList; public Q_SLOTS: void suggestionTriggered(); }; #endif diff --git a/plugins/gdb/debuggerplugin.h b/plugins/gdb/debuggerplugin.h index 9f8e14d7c7..a3bc849e31 100644 --- a/plugins/gdb/debuggerplugin.h +++ b/plugins/gdb/debuggerplugin.h @@ -1,75 +1,75 @@ /* * GDB Debugger Support * Copyright 2016 Aetf * * 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) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * 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, see . * */ -#ifndef _DEBUGGERPART_H_ -#define _DEBUGGERPART_H_ +#ifndef GDBDEBUGGERPLUGIN_H +#define GDBDEBUGGERPLUGIN_H #include #include #include #include #include #include "midebuggerplugin.h" #include "debugsession.h" class GdbLauncher; namespace KDevMI { class DisassembleWidget; namespace GDB { class GDBOutputWidget; class MemoryViewerWidget; class CppDebuggerPlugin : public MIDebuggerPlugin { Q_OBJECT public: friend class DebugSession; explicit CppDebuggerPlugin(QObject *parent, const QVariantList & = QVariantList()); ~CppDebuggerPlugin() override; void unload() override; DebugSession *createSession() override; void unloadToolViews() override; void setupToolViews() override; private: void setupExecutePlugin(KDevelop::IPlugin* plugin, bool load); DebuggerToolFactory* disassemblefactory; DebuggerToolFactory* gdbfactory; DebuggerToolFactory* memoryviewerfactory; QHash m_launchers; }; } // end of namespace GDB } // end of namespace KDevMI #endif diff --git a/plugins/gdb/gdbconfigpage.h b/plugins/gdb/gdbconfigpage.h index eeac3ed41b..70729bde6a 100644 --- a/plugins/gdb/gdbconfigpage.h +++ b/plugins/gdb/gdbconfigpage.h @@ -1,86 +1,87 @@ /* * GDB Debugger Support * * Copyright 2006 Vladimir Prus * Copyright 2007 Hamish Rodda * 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 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 GDBLAUNCHCONFIG -#define GDBLAUNCHCONFIG + +#ifndef GDBCONFIGPAGE_H +#define GDBCONFIGPAGE_H #include #include #include class IExecutePlugin; namespace Ui { class GdbConfigPage; } namespace KDevelop { class ILaunchConfiguration; class IProject; } namespace KDevMI { namespace GDB { class CppDebuggerPlugin; } } class GdbConfigPageFactory : public KDevelop::LaunchConfigurationPageFactory { public: KDevelop::LaunchConfigurationPage* createWidget(QWidget* parent) override; }; class GdbConfigPage : public KDevelop::LaunchConfigurationPage { Q_OBJECT public: explicit GdbConfigPage( QWidget* parent = nullptr ); ~GdbConfigPage() override; QIcon icon() const override; void loadFromConfiguration(const KConfigGroup& cfg, KDevelop::IProject* = nullptr) override; void saveToConfiguration(KConfigGroup, KDevelop::IProject* = nullptr ) const override; QString title() const override; private: Ui::GdbConfigPage* ui; }; class GdbLauncher : public KDevelop::ILauncher { public: GdbLauncher( KDevMI::GDB::CppDebuggerPlugin* plugin, IExecutePlugin* execute ); QList< KDevelop::LaunchConfigurationPageFactory* > configPages() const override; QString description() const override; QString id() override; QString name() const override; KJob* start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg) override; QStringList supportedModes() const override; private: QList factoryList; QPointer m_plugin; IExecutePlugin* m_execute; }; #endif diff --git a/plugins/qmljs/qmljsparsejob.h b/plugins/qmljs/qmljsparsejob.h index cb5d970b9c..7d417e475e 100644 --- a/plugins/qmljs/qmljsparsejob.h +++ b/plugins/qmljs/qmljsparsejob.h @@ -1,36 +1,36 @@ /************************************************************************************* * Copyright (C) 2012 by Aleix Pol * * Copyright (C) 2012 by Milian Wolff * * * * 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 PARSEQMLJSJOB_H -#define PARSEQMLJSJOB_H +#ifndef QMLJSPARSEJOB_H +#define QMLJSPARSEJOB_H #include class QmlJsParseJob : public KDevelop::ParseJob { Q_OBJECT public: QmlJsParseJob(const KDevelop::IndexedString& url, KDevelop::ILanguageSupport* languageSupport); protected: void run(ThreadWeaver::JobPointer pointer, ThreadWeaver::Thread* thread) override; }; #endif // PARSEQMLJSJOB_H diff --git a/plugins/vcschangesview/vcschangesviewplugin.h b/plugins/vcschangesview/vcschangesviewplugin.h index 61046ccc78..73e07456f2 100644 --- a/plugins/vcschangesview/vcschangesviewplugin.h +++ b/plugins/vcschangesview/vcschangesviewplugin.h @@ -1,51 +1,51 @@ /* This file is part of KDevelop Copyright 2010 Aleix Pol This library 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 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_VCSPROJECTINTEGRATIONPLUGIN_H -#define KDEVPLATFORM_PLUGIN_VCSPROJECTINTEGRATIONPLUGIN_H +#ifndef KDEVPLATFORM_PLUGIN_VCSCHANGESVIEWPLUGIN_H +#define KDEVPLATFORM_PLUGIN_VCSCHANGESVIEWPLUGIN_H #include #include class QModelIndex; namespace KDevelop { class IProject; class IDocument; class ProjectChangesModel; } class VcsProjectIntegrationPlugin : public KDevelop::IPlugin { Q_OBJECT public: VcsProjectIntegrationPlugin(QObject *parent, const QVariantList & args); KDevelop::ProjectChangesModel* model(); private Q_SLOTS: void activated(const QModelIndex& idx); private: KDevelop::ProjectChangesModel* m_model; friend class VCSProjectToolViewFactory; // to access activated() slot }; #endif