C++: Add tool button in editor for "Analyze File"

Adds a button for analyze file to all text editors that have a C++
source file open.

Task-number: QTCREATORBUG-23348
Change-Id: If08f2969304ee0817f00c9ee5ff8c0d4f96f7f72
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Eike Ziller
2020-05-14 09:09:41 +02:00
parent 89c071f2bf
commit 7414a47825
6 changed files with 76 additions and 34 deletions

View File

@@ -35,6 +35,8 @@
#include <projectexplorer/runconfiguration.h>
#include <cpptools/projectinfo.h>
#include <utils/variant.h>
QT_BEGIN_NAMESPACE
class QFrame;
class QToolButton;
@@ -79,11 +81,14 @@ public:
void selectPerspective();
enum class FileSelection {
enum class FileSelectionType {
AllFiles,
CurrentFile,
AskUser,
};
using FileSelection = Utils::variant<FileSelectionType, Utils::FilePath>;
void startTool(FileSelection fileSelection);
void startTool(FileSelection fileSelection,
const RunSettings &runSettings,