GithubHelp home page GithubHelp logo

cppinsightsplugin's Introduction

CPP Insights plugin for Qt Creator

This plugin aims simplifying usage of CppInsights inside the QtCreator. The LLVM backend of CppInsights supports compile commands json file via -p "folder" argument and this plugin utilizes this mechanism to generate cpp files.

Usage

CMake can generate the compile commands file by enabling CMAKE_EXPORT_COMPILE_COMMANDS. compile_commands.json is then generated at the build folder.

When CppInsights plugin is enabled in QtCreator, a tab named CppInsights appear in the Options/C++. In this tab, the name of the insights executable and mime types are expected.

Options

If configuration is provided, in the project explorer right clicking on the cpp files, the context menu provides "Cpp Insights compile" menu item. When clicked, it compiles the selected file and outputs the generated cpp file in a new text editor.

Context Menu

Compiling

You will have to install the same Qt version (ie: 5.14 MSVC 2017 64 bit for 4.11.0) that was used to build the Qt creator version you are targeting for the plugin.
You can check this in the "about" menu of Qt creator.

  • Download and extract the Qt creator sources from the official website

  • Compile them using the correct Qt kit (Optional on linux, you can point to the official binary release which should be in your home folder by default)

  • You don't need to install it when compiled

    To compile the plugin you have 2 options:

Qmake

  • Specify the path of source and binaries for Qt creator using QTC_SOURCE and QTC_BUILD vars
  • QTC_SOURCE must point to the sources you extracted
  • QTC_BUILD must point to your build folder (or binary release on Linux)
  • Example command: qmake QTC_SOURCE=~/src/qt-creator-opensource-src-4.11.0 QTC_BUILD=~/qtcreator-4.11.0 .

Qt Creator

  • Specify the path of source and binaries for Qt creator by editing the CppInsightsPlugin.pro file
  • You have to change the QTCREATOR_SOURCES and IDE_BUILD_TREE vars

Installing

If you compiled the plugin, it will be installed automatically.

If you downloaded a binary release, the paths are as follow:
  • Unix: ~/.local/share/data/QtProject/qtcreator/plugins/<version>
  • OSX: ~/Library/Application Support/QtProject/Qt Creator/plugins/<version>
  • Windows: %LOCALAPPDATA%\QtProject\qtcreator\plugins\<version>
    Replace <version> with your Qt Creator version (ie: 4.11.0)

cppinsightsplugin's People

Contributors

bilgili avatar

Stargazers

PeterLiu avatar  avatar M. Galib Uludag avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.