forked from qt-creator/qt-creator
ProjectExplorer: Move consts that are used in a single file out of header
+ inline where used only once. Change-Id: I08c60551afde1d36a2c8d5005c1ea7e52ba0515b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
c82c742d8d
commit
4290081831
@@ -85,6 +85,7 @@ static void replaceAllChildWidgets(QLayout *layout, const QList<QWidget *> &newC
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const char SETTINGS_KEY[] = "ProjectExplorer/AppOutput/Zoom";
|
const char SETTINGS_KEY[] = "ProjectExplorer/AppOutput/Zoom";
|
||||||
|
const char C_APP_OUTPUT[] = "ProjectExplorer.ApplicationOutput";
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
@@ -425,7 +426,7 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
|
|||||||
}
|
}
|
||||||
// Create new
|
// Create new
|
||||||
static int counter = 0;
|
static int counter = 0;
|
||||||
Core::Id contextId = Core::Id(Constants::C_APP_OUTPUT).withSuffix(counter++);
|
Core::Id contextId = Core::Id(C_APP_OUTPUT).withSuffix(counter++);
|
||||||
Core::Context context(contextId);
|
Core::Context context(contextId);
|
||||||
Core::OutputWindow *ow = new Core::OutputWindow(context, m_tabWidget);
|
Core::OutputWindow *ow = new Core::OutputWindow(context, m_tabWidget);
|
||||||
ow->setWindowTitle(tr("Application Output Window"));
|
ow->setWindowTitle(tr("Application Output Window"));
|
||||||
|
@@ -57,6 +57,7 @@ using namespace ProjectExplorer::Internal;
|
|||||||
namespace {
|
namespace {
|
||||||
const int MAX_LINECOUNT = 100000;
|
const int MAX_LINECOUNT = 100000;
|
||||||
const char SETTINGS_KEY[] = "ProjectExplorer/CompileOutput/Zoom";
|
const char SETTINGS_KEY[] = "ProjectExplorer/CompileOutput/Zoom";
|
||||||
|
const char C_COMPILE_OUTPUT[] = "ProjectExplorer.CompileOutput";
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
@@ -148,7 +149,7 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
|
|||||||
m_zoomOutButton(new QToolButton),
|
m_zoomOutButton(new QToolButton),
|
||||||
m_escapeCodeHandler(new Utils::AnsiEscapeCodeHandler)
|
m_escapeCodeHandler(new Utils::AnsiEscapeCodeHandler)
|
||||||
{
|
{
|
||||||
Core::Context context(Constants::C_COMPILE_OUTPUT);
|
Core::Context context(C_COMPILE_OUTPUT);
|
||||||
m_outputWindow = new CompileOutputTextEdit(context);
|
m_outputWindow = new CompileOutputTextEdit(context);
|
||||||
m_outputWindow->setWindowTitle(displayName());
|
m_outputWindow->setWindowTitle(displayName());
|
||||||
m_outputWindow->setWindowIcon(Icons::WINDOW.icon());
|
m_outputWindow->setWindowIcon(Icons::WINDOW.icon());
|
||||||
|
@@ -34,10 +34,11 @@
|
|||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
const char BUILD_STEP_LIST_COUNT[] = "ProjectExplorer.BuildConfiguration.BuildStepListCount";
|
const char BUILD_STEP_LIST_COUNT[] = "ProjectExplorer.BuildConfiguration.BuildStepListCount";
|
||||||
const char BUILD_STEP_LIST_PREFIX[] = "ProjectExplorer.BuildConfiguration.BuildStepList.";
|
const char BUILD_STEP_LIST_PREFIX[] = "ProjectExplorer.BuildConfiguration.BuildStepList.";
|
||||||
|
const char DEFAULT_DEPLOYCONFIGURATION_ID[] = "ProjectExplorer.DefaultDeployConfiguration";
|
||||||
|
|
||||||
DeployConfiguration::DeployConfiguration(Target *target, Core::Id id) :
|
DeployConfiguration::DeployConfiguration(Target *target, Core::Id id) :
|
||||||
ProjectConfiguration(target, id)
|
ProjectConfiguration(target, id)
|
||||||
@@ -204,12 +205,12 @@ QList<Core::Id> DefaultDeployConfigurationFactory::availableCreationIds(Target *
|
|||||||
{
|
{
|
||||||
if (!canHandle(parent))
|
if (!canHandle(parent))
|
||||||
return QList<Core::Id>();
|
return QList<Core::Id>();
|
||||||
return QList<Core::Id>() << Core::Id(Constants::DEFAULT_DEPLOYCONFIGURATION_ID);
|
return QList<Core::Id>() << Core::Id(DEFAULT_DEPLOYCONFIGURATION_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DefaultDeployConfigurationFactory::displayNameForId(Core::Id id) const
|
QString DefaultDeployConfigurationFactory::displayNameForId(Core::Id id) const
|
||||||
{
|
{
|
||||||
if (id == Constants::DEFAULT_DEPLOYCONFIGURATION_ID)
|
if (id == DEFAULT_DEPLOYCONFIGURATION_ID)
|
||||||
//: Display name of the default deploy configuration
|
//: Display name of the default deploy configuration
|
||||||
return DeployConfigurationFactory::tr("Deploy Configuration");
|
return DeployConfigurationFactory::tr("Deploy Configuration");
|
||||||
return QString();
|
return QString();
|
||||||
@@ -219,7 +220,7 @@ bool DefaultDeployConfigurationFactory::canCreate(Target *parent, Core::Id id) c
|
|||||||
{
|
{
|
||||||
if (!canHandle(parent))
|
if (!canHandle(parent))
|
||||||
return false;
|
return false;
|
||||||
return id == Constants::DEFAULT_DEPLOYCONFIGURATION_ID;
|
return id == DEFAULT_DEPLOYCONFIGURATION_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeployConfiguration *DefaultDeployConfigurationFactory::create(Target *parent, Core::Id id)
|
DeployConfiguration *DefaultDeployConfigurationFactory::create(Target *parent, Core::Id id)
|
||||||
@@ -264,3 +265,5 @@ bool DefaultDeployConfigurationFactory::canHandle(Target *parent) const
|
|||||||
return false;
|
return false;
|
||||||
return DeviceTypeKitInformation::deviceTypeId(parent->kit()) == Constants::DESKTOP_DEVICE_TYPE;
|
return DeviceTypeKitInformation::deviceTypeId(parent->kit()) == Constants::DESKTOP_DEVICE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace ProjectExplorer
|
||||||
|
@@ -46,6 +46,10 @@
|
|||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
const char KITINFORMATION_ID_V1[] = "PE.Profile.ToolChain";
|
||||||
|
const char KITINFORMATION_ID_V2[] = "PE.Profile.ToolChains";
|
||||||
|
const char KITINFORMATION_ID_V3[] = "PE.Profile.ToolChainsV3";
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// SysRootKitInformation:
|
// SysRootKitInformation:
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -195,8 +199,8 @@ QList<Task> ToolChainKitInformation::validate(const Kit *k) const
|
|||||||
|
|
||||||
void ToolChainKitInformation::upgrade(Kit *k)
|
void ToolChainKitInformation::upgrade(Kit *k)
|
||||||
{
|
{
|
||||||
const Core::Id oldIdV1 = Constants::KITINFORMATION_ID_V1;
|
const Core::Id oldIdV1 = KITINFORMATION_ID_V1;
|
||||||
const Core::Id oldIdV2 = Constants::KITINFORMATION_ID_V2;
|
const Core::Id oldIdV2 = KITINFORMATION_ID_V2;
|
||||||
|
|
||||||
// upgrade <=4.1 to 4.2 (keep old settings around for now)
|
// upgrade <=4.1 to 4.2 (keep old settings around for now)
|
||||||
{
|
{
|
||||||
@@ -373,7 +377,7 @@ QSet<Core::Id> ToolChainKitInformation::availableFeatures(const Kit *k) const
|
|||||||
|
|
||||||
Core::Id ToolChainKitInformation::id()
|
Core::Id ToolChainKitInformation::id()
|
||||||
{
|
{
|
||||||
return Constants::KITINFORMATION_ID_V3;
|
return KITINFORMATION_ID_V3;
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolChain *ToolChainKitInformation::toolChain(const Kit *k, Core::Id language)
|
ToolChain *ToolChainKitInformation::toolChain(const Kit *k, Core::Id language)
|
||||||
|
@@ -166,6 +166,78 @@ using namespace ProjectExplorer::Internal;
|
|||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
namespace Constants {
|
||||||
|
const int P_MODE_SESSION = 85;
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
const char NEWSESSION[] = "ProjectExplorer.NewSession";
|
||||||
|
const char NEWPROJECT[] = "ProjectExplorer.NewProject";
|
||||||
|
const char LOAD[] = "ProjectExplorer.Load";
|
||||||
|
const char UNLOAD[] = "ProjectExplorer.Unload";
|
||||||
|
const char UNLOADCM[] = "ProjectExplorer.UnloadCM";
|
||||||
|
const char CLEARSESSION[] = "ProjectExplorer.ClearSession";
|
||||||
|
const char BUILDPROJECTONLY[] = "ProjectExplorer.BuildProjectOnly";
|
||||||
|
const char BUILDCM[] = "ProjectExplorer.BuildCM";
|
||||||
|
const char BUILDDEPENDCM[] = "ProjectExplorer.BuildDependenciesCM";
|
||||||
|
const char BUILDSESSION[] = "ProjectExplorer.BuildSession";
|
||||||
|
const char REBUILDPROJECTONLY[] = "ProjectExplorer.RebuildProjectOnly";
|
||||||
|
const char REBUILD[] = "ProjectExplorer.Rebuild";
|
||||||
|
const char REBUILDCM[] = "ProjectExplorer.RebuildCM";
|
||||||
|
const char REBUILDDEPENDCM[] = "ProjectExplorer.RebuildDependenciesCM";
|
||||||
|
const char REBUILDSESSION[] = "ProjectExplorer.RebuildSession";
|
||||||
|
const char DEPLOYPROJECTONLY[] = "ProjectExplorer.DeployProjectOnly";
|
||||||
|
const char DEPLOY[] = "ProjectExplorer.Deploy";
|
||||||
|
const char DEPLOYCM[] = "ProjectExplorer.DeployCM";
|
||||||
|
const char DEPLOYSESSION[] = "ProjectExplorer.DeploySession";
|
||||||
|
const char CLEANPROJECTONLY[] = "ProjectExplorer.CleanProjectOnly";
|
||||||
|
const char CLEAN[] = "ProjectExplorer.Clean";
|
||||||
|
const char CLEANCM[] = "ProjectExplorer.CleanCM";
|
||||||
|
const char CLEANDEPENDCM[] = "ProjectExplorer.CleanDependenciesCM";
|
||||||
|
const char CLEANSESSION[] = "ProjectExplorer.CleanSession";
|
||||||
|
const char CANCELBUILD[] = "ProjectExplorer.CancelBuild";
|
||||||
|
const char RUN[] = "ProjectExplorer.Run";
|
||||||
|
const char RUNWITHOUTDEPLOY[] = "ProjectExplorer.RunWithoutDeploy";
|
||||||
|
const char RUNCONTEXTMENU[] = "ProjectExplorer.RunContextMenu";
|
||||||
|
const char ADDNEWFILE[] = "ProjectExplorer.AddNewFile";
|
||||||
|
const char ADDEXISTINGFILES[] = "ProjectExplorer.AddExistingFiles";
|
||||||
|
const char ADDEXISTINGDIRECTORY[] = "ProjectExplorer.AddExistingDirectory";
|
||||||
|
const char ADDNEWSUBPROJECT[] = "ProjectExplorer.AddNewSubproject";
|
||||||
|
const char REMOVEPROJECT[] = "ProjectExplorer.RemoveProject";
|
||||||
|
const char OPENFILE[] = "ProjectExplorer.OpenFile";
|
||||||
|
const char SEARCHONFILESYSTEM[] = "ProjectExplorer.SearchOnFileSystem";
|
||||||
|
const char SHOWINGRAPHICALSHELL[] = "ProjectExplorer.ShowInGraphicalShell";
|
||||||
|
const char OPENTERMIANLHERE[] = "ProjectExplorer.OpenTerminalHere";
|
||||||
|
const char REMOVEFILE[] = "ProjectExplorer.RemoveFile";
|
||||||
|
const char DUPLICATEFILE[] = "ProjectExplorer.DuplicateFile";
|
||||||
|
const char DELETEFILE[] = "ProjectExplorer.DeleteFile";
|
||||||
|
const char RENAMEFILE[] = "ProjectExplorer.RenameFile";
|
||||||
|
const char DIFFFILE[] = "ProjectExplorer.DiffFile";
|
||||||
|
const char SETSTARTUP[] = "ProjectExplorer.SetStartup";
|
||||||
|
const char PROJECTTREE_COLLAPSE_ALL[] = "ProjectExplorer.CollapseAll";
|
||||||
|
|
||||||
|
const char SELECTTARGET[] = "ProjectExplorer.SelectTarget";
|
||||||
|
const char SELECTTARGETQUICK[] = "ProjectExplorer.SelectTargetQuick";
|
||||||
|
|
||||||
|
// Action priorities
|
||||||
|
const int P_ACTION_RUN = 100;
|
||||||
|
const int P_ACTION_BUILDPROJECT = 80;
|
||||||
|
|
||||||
|
// Context
|
||||||
|
const char C_PROJECTEXPLORER[] = "Project Explorer";
|
||||||
|
|
||||||
|
// Menus
|
||||||
|
const char M_RECENTPROJECTS[] = "ProjectExplorer.Menu.Recent";
|
||||||
|
const char M_UNLOADPROJECTS[] = "ProjectExplorer.Menu.Unload";
|
||||||
|
const char M_SESSION[] = "ProjectExplorer.Menu.Session";
|
||||||
|
|
||||||
|
// Menu groups
|
||||||
|
const char G_BUILD_RUN[] = "ProjectExplorer.Group.Run";
|
||||||
|
const char G_BUILD_CANCEL[] = "ProjectExplorer.Group.BuildCancel";
|
||||||
|
|
||||||
|
const char RUNMENUCONTEXTMENU[] = "Project.RunMenu";
|
||||||
|
|
||||||
|
} // namespace Constants
|
||||||
|
|
||||||
static Target *activeTarget()
|
static Target *activeTarget()
|
||||||
{
|
{
|
||||||
Project *project = ProjectTree::currentProject();
|
Project *project = ProjectTree::currentProject();
|
||||||
@@ -1250,7 +1322,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return projectFilePath.toString();
|
return projectFilePath.toString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTPROJECT_BUILDPATH,
|
expander->registerVariable("CurrentProject:BuildPath",
|
||||||
tr("Full build path of the current project's active build configuration."),
|
tr("Full build path of the current project's active build configuration."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
BuildConfiguration *bc = activeBuildConfiguration();
|
BuildConfiguration *bc = activeBuildConfiguration();
|
||||||
@@ -1285,7 +1357,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return kit ? kit->id().toString() : QString();
|
return kit ? kit->id().toString() : QString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTDEVICE_HOSTADDRESS,
|
expander->registerVariable("CurrentDevice:HostAddress",
|
||||||
tr("The host address of the device in the currently active kit."),
|
tr("The host address of the device in the currently active kit."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
Kit *kit = currentKit();
|
Kit *kit = currentKit();
|
||||||
@@ -1293,7 +1365,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return device ? device->sshParameters().host : QString();
|
return device ? device->sshParameters().host : QString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTDEVICE_SSHPORT,
|
expander->registerVariable("CurrentDevice:SshPort",
|
||||||
tr("The SSH port of the device in the currently active kit."),
|
tr("The SSH port of the device in the currently active kit."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
Kit *kit = currentKit();
|
Kit *kit = currentKit();
|
||||||
@@ -1301,7 +1373,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return device ? QString::number(device->sshParameters().port) : QString();
|
return device ? QString::number(device->sshParameters().port) : QString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTDEVICE_USERNAME,
|
expander->registerVariable("CurrentDevice:UserName",
|
||||||
tr("The username with which to log into the device in the currently active kit."),
|
tr("The username with which to log into the device in the currently active kit."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
Kit *kit = currentKit();
|
Kit *kit = currentKit();
|
||||||
@@ -1310,7 +1382,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTDEVICE_PRIVATEKEYFILE,
|
expander->registerVariable("CurrentDevice:PrivateKeyFile",
|
||||||
tr("The private key file with which to authenticate when logging into the device "
|
tr("The private key file with which to authenticate when logging into the device "
|
||||||
"in the currently active kit."),
|
"in the currently active kit."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
@@ -1336,7 +1408,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return QString();
|
return QString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerFileVariables(Constants::VAR_CURRENTRUN_EXECUTABLE_PREFIX,
|
expander->registerFileVariables("CurrentRun:Executable",
|
||||||
tr("The currently active run configuration's executable (if applicable)"),
|
tr("The currently active run configuration's executable (if applicable)"),
|
||||||
[this]() -> QString {
|
[this]() -> QString {
|
||||||
if (Target *target = activeTarget()) {
|
if (Target *target = activeTarget()) {
|
||||||
@@ -1346,8 +1418,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
},
|
});
|
||||||
true);
|
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTBUILD_TYPE,
|
expander->registerVariable(Constants::VAR_CURRENTBUILD_TYPE,
|
||||||
tr("The currently active build configuration's type."),
|
tr("The currently active build configuration's type."),
|
||||||
|
@@ -32,84 +32,24 @@ namespace Constants {
|
|||||||
|
|
||||||
// Modes and their priorities
|
// Modes and their priorities
|
||||||
const char MODE_SESSION[] = "Project";
|
const char MODE_SESSION[] = "Project";
|
||||||
const int P_MODE_SESSION = 85;
|
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
const char NEWSESSION[] = "ProjectExplorer.NewSession";
|
|
||||||
const char NEWPROJECT[] = "ProjectExplorer.NewProject";
|
|
||||||
const char LOAD[] = "ProjectExplorer.Load";
|
|
||||||
const char UNLOAD[] = "ProjectExplorer.Unload";
|
|
||||||
const char UNLOADCM[] = "ProjectExplorer.UnloadCM";
|
|
||||||
const char CLEARSESSION[] = "ProjectExplorer.ClearSession";
|
|
||||||
const char BUILDPROJECTONLY[] = "ProjectExplorer.BuildProjectOnly";
|
|
||||||
const char BUILD[] = "ProjectExplorer.Build";
|
const char BUILD[] = "ProjectExplorer.Build";
|
||||||
const char BUILDCM[] = "ProjectExplorer.BuildCM";
|
|
||||||
const char BUILDDEPENDCM[] = "ProjectExplorer.BuildDependenciesCM";
|
|
||||||
const char BUILDSESSION[] = "ProjectExplorer.BuildSession";
|
|
||||||
const char REBUILDPROJECTONLY[] = "ProjectExplorer.RebuildProjectOnly";
|
|
||||||
const char REBUILD[] = "ProjectExplorer.Rebuild";
|
|
||||||
const char REBUILDCM[] = "ProjectExplorer.RebuildCM";
|
|
||||||
const char REBUILDDEPENDCM[] = "ProjectExplorer.RebuildDependenciesCM";
|
|
||||||
const char REBUILDSESSION[] = "ProjectExplorer.RebuildSession";
|
|
||||||
const char DEPLOYPROJECTONLY[] = "ProjectExplorer.DeployProjectOnly";
|
|
||||||
const char DEPLOY[] = "ProjectExplorer.Deploy";
|
|
||||||
const char DEPLOYCM[] = "ProjectExplorer.DeployCM";
|
|
||||||
const char DEPLOYSESSION[] = "ProjectExplorer.DeploySession";
|
|
||||||
const char PUBLISH[] = "ProjectExplorer.Publish";
|
|
||||||
const char CLEANPROJECTONLY[] = "ProjectExplorer.CleanProjectOnly";
|
|
||||||
const char CLEAN[] = "ProjectExplorer.Clean";
|
|
||||||
const char CLEANCM[] = "ProjectExplorer.CleanCM";
|
|
||||||
const char CLEANDEPENDCM[] = "ProjectExplorer.CleanDependenciesCM";
|
|
||||||
const char CLEANSESSION[] = "ProjectExplorer.CleanSession";
|
|
||||||
const char CANCELBUILD[] = "ProjectExplorer.CancelBuild";
|
|
||||||
const char RUN[] = "ProjectExplorer.Run";
|
|
||||||
const char RUNWITHOUTDEPLOY[] = "ProjectExplorer.RunWithoutDeploy";
|
|
||||||
const char RUNCONTEXTMENU[] = "ProjectExplorer.RunContextMenu";
|
|
||||||
const char STOP[] = "ProjectExplorer.Stop";
|
const char STOP[] = "ProjectExplorer.Stop";
|
||||||
const char ADDNEWFILE[] = "ProjectExplorer.AddNewFile";
|
|
||||||
const char ADDEXISTINGFILES[] = "ProjectExplorer.AddExistingFiles";
|
|
||||||
const char ADDEXISTINGDIRECTORY[] = "ProjectExplorer.AddExistingDirectory";
|
|
||||||
const char ADDNEWSUBPROJECT[] = "ProjectExplorer.AddNewSubproject";
|
|
||||||
const char REMOVEPROJECT[] = "ProjectExplorer.RemoveProject";
|
|
||||||
const char OPENFILE[] = "ProjectExplorer.OpenFile";
|
|
||||||
const char SEARCHONFILESYSTEM[] = "ProjectExplorer.SearchOnFileSystem";
|
|
||||||
const char SHOWINGRAPHICALSHELL[] = "ProjectExplorer.ShowInGraphicalShell";
|
|
||||||
const char OPENTERMIANLHERE[] = "ProjectExplorer.OpenTerminalHere";
|
|
||||||
const char REMOVEFILE[] = "ProjectExplorer.RemoveFile";
|
|
||||||
const char DUPLICATEFILE[] = "ProjectExplorer.DuplicateFile";
|
|
||||||
const char DELETEFILE[] = "ProjectExplorer.DeleteFile";
|
|
||||||
const char RENAMEFILE[] = "ProjectExplorer.RenameFile";
|
|
||||||
const char SETSTARTUP[] = "ProjectExplorer.SetStartup";
|
|
||||||
const char PROJECTTREE_COLLAPSE_ALL[] = "ProjectExplorer.CollapseAll";
|
|
||||||
|
|
||||||
const char SELECTTARGET[] = "ProjectExplorer.SelectTarget";
|
|
||||||
const char SELECTTARGETQUICK[] = "ProjectExplorer.SelectTargetQuick";
|
|
||||||
|
|
||||||
// Action priorities
|
|
||||||
const int P_ACTION_RUN = 100;
|
|
||||||
const int P_ACTION_BUILDPROJECT = 80;
|
|
||||||
|
|
||||||
// Context
|
// Context
|
||||||
const char C_PROJECTEXPLORER[] = "Project Explorer";
|
|
||||||
const char C_PROJECT_TREE[] = "ProjectExplorer.ProjectTreeContext";
|
const char C_PROJECT_TREE[] = "ProjectExplorer.ProjectTreeContext";
|
||||||
const char C_APP_OUTPUT[] = "ProjectExplorer.ApplicationOutput";
|
|
||||||
const char C_COMPILE_OUTPUT[] = "ProjectExplorer.CompileOutput";
|
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
const char M_RECENTPROJECTS[] = "ProjectExplorer.Menu.Recent";
|
|
||||||
const char M_UNLOADPROJECTS[] = "ProjectExplorer.Menu.Unload";
|
|
||||||
const char M_BUILDPROJECT[] = "ProjectExplorer.Menu.Build";
|
const char M_BUILDPROJECT[] = "ProjectExplorer.Menu.Build";
|
||||||
const char M_DEBUG[] = "ProjectExplorer.Menu.Debug";
|
const char M_DEBUG[] = "ProjectExplorer.Menu.Debug";
|
||||||
const char M_DEBUG_STARTDEBUGGING[] = "ProjectExplorer.Menu.Debug.StartDebugging";
|
const char M_DEBUG_STARTDEBUGGING[] = "ProjectExplorer.Menu.Debug.StartDebugging";
|
||||||
const char M_SESSION[] = "ProjectExplorer.Menu.Session";
|
|
||||||
|
|
||||||
// Menu groups
|
// Menu groups
|
||||||
const char G_BUILD_BUILD[] = "ProjectExplorer.Group.Build";
|
const char G_BUILD_BUILD[] = "ProjectExplorer.Group.Build";
|
||||||
const char G_BUILD_DEPLOY[] = "ProjectExplorer.Group.Deploy";
|
const char G_BUILD_DEPLOY[] = "ProjectExplorer.Group.Deploy";
|
||||||
const char G_BUILD_REBUILD[] = "ProjectExplorer.Group.Rebuild";
|
const char G_BUILD_REBUILD[] = "ProjectExplorer.Group.Rebuild";
|
||||||
const char G_BUILD_CLEAN[] = "ProjectExplorer.Group.Clean";
|
const char G_BUILD_CLEAN[] = "ProjectExplorer.Group.Clean";
|
||||||
const char G_BUILD_RUN[] = "ProjectExplorer.Group.Run";
|
|
||||||
const char G_BUILD_CANCEL[] = "ProjectExplorer.Group.BuildCancel";
|
|
||||||
|
|
||||||
// Context menus
|
// Context menus
|
||||||
const char M_SESSIONCONTEXT[] = "Project.Menu.Session";
|
const char M_SESSIONCONTEXT[] = "Project.Menu.Session";
|
||||||
@@ -141,11 +81,6 @@ const char G_FILE_OPEN[] = "ProjectFile.Group.Open";
|
|||||||
const char G_FILE_OTHER[] = "ProjectFile.Group.Other";
|
const char G_FILE_OTHER[] = "ProjectFile.Group.Other";
|
||||||
const char G_FILE_CONFIG[] = "ProjectFile.Group.Config";
|
const char G_FILE_CONFIG[] = "ProjectFile.Group.Config";
|
||||||
|
|
||||||
const char RUNMENUCONTEXTMENU[] = "Project.RunMenu";
|
|
||||||
|
|
||||||
// File factory
|
|
||||||
const char FILE_FACTORY_ID[] = "ProjectExplorer.FileFactoryId";
|
|
||||||
|
|
||||||
// Mime types
|
// Mime types
|
||||||
const char C_SOURCE_MIMETYPE[] = "text/x-csrc";
|
const char C_SOURCE_MIMETYPE[] = "text/x-csrc";
|
||||||
const char C_HEADER_MIMETYPE[] = "text/x-chdr";
|
const char C_HEADER_MIMETYPE[] = "text/x-chdr";
|
||||||
@@ -176,10 +111,6 @@ const char TASK_CATEGORY_COMPILE[] = "Task.Category.Compile";
|
|||||||
const char TASK_CATEGORY_BUILDSYSTEM[] = "Task.Category.Buildsystem";
|
const char TASK_CATEGORY_BUILDSYSTEM[] = "Task.Category.Buildsystem";
|
||||||
const char TASK_CATEGORY_DEPLOYMENT[] = "Task.Category.Deploy";
|
const char TASK_CATEGORY_DEPLOYMENT[] = "Task.Category.Deploy";
|
||||||
|
|
||||||
// Task mark categories
|
|
||||||
const char TASK_MARK_WARNING[] = "Task.Mark.Warning";
|
|
||||||
const char TASK_MARK_ERROR[] = "Task.Mark.Error";
|
|
||||||
|
|
||||||
// Wizard categories
|
// Wizard categories
|
||||||
const char QT_PROJECT_WIZARD_CATEGORY[] = "H.Project";
|
const char QT_PROJECT_WIZARD_CATEGORY[] = "H.Project";
|
||||||
const char QT_PROJECT_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Other Project");
|
const char QT_PROJECT_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Other Project");
|
||||||
@@ -202,9 +133,6 @@ const char BUILDSTEPS_CLEAN[] = "ProjectExplorer.BuildSteps.Clean";
|
|||||||
const char BUILDSTEPS_BUILD[] = "ProjectExplorer.BuildSteps.Build";
|
const char BUILDSTEPS_BUILD[] = "ProjectExplorer.BuildSteps.Build";
|
||||||
const char BUILDSTEPS_DEPLOY[] = "ProjectExplorer.BuildSteps.Deploy";
|
const char BUILDSTEPS_DEPLOY[] = "ProjectExplorer.BuildSteps.Deploy";
|
||||||
|
|
||||||
// Deploy Configuration id:
|
|
||||||
const char DEFAULT_DEPLOYCONFIGURATION_ID[] = "ProjectExplorer.DefaultDeployConfiguration";
|
|
||||||
|
|
||||||
// Language
|
// Language
|
||||||
|
|
||||||
// Keep these short: These constants are exposed to the MacroExplorer!
|
// Keep these short: These constants are exposed to the MacroExplorer!
|
||||||
@@ -234,7 +162,6 @@ const int DESKTOP_PORT_END = 31000;
|
|||||||
|
|
||||||
// Variable Names:
|
// Variable Names:
|
||||||
const char VAR_CURRENTPROJECT_PREFIX[] = "CurrentProject";
|
const char VAR_CURRENTPROJECT_PREFIX[] = "CurrentProject";
|
||||||
const char VAR_CURRENTPROJECT_BUILDPATH[] = "CurrentProject:BuildPath";
|
|
||||||
const char VAR_CURRENTPROJECT_NAME[] = "CurrentProject:Name";
|
const char VAR_CURRENTPROJECT_NAME[] = "CurrentProject:Name";
|
||||||
const char VAR_CURRENTKIT_NAME[] = "CurrentKit:Name";
|
const char VAR_CURRENTKIT_NAME[] = "CurrentKit:Name";
|
||||||
const char VAR_CURRENTKIT_FILESYSTEMNAME[] = "CurrentKit:FileSystemName";
|
const char VAR_CURRENTKIT_FILESYSTEMNAME[] = "CurrentKit:FileSystemName";
|
||||||
@@ -243,19 +170,6 @@ const char VAR_CURRENTBUILD_NAME[] = "CurrentBuild:Name";
|
|||||||
const char VAR_CURRENTBUILD_TYPE[] = "CurrentBuild:Type";
|
const char VAR_CURRENTBUILD_TYPE[] = "CurrentBuild:Type";
|
||||||
const char VAR_CURRENTBUILD_ENV[] = "CurrentBuild:Env";
|
const char VAR_CURRENTBUILD_ENV[] = "CurrentBuild:Env";
|
||||||
const char VAR_CURRENTRUN_NAME[] = "CurrentRun:Name";
|
const char VAR_CURRENTRUN_NAME[] = "CurrentRun:Name";
|
||||||
const char VAR_CURRENTRUN_ENV[] = "CurrentRun:Env";
|
|
||||||
const char VAR_CURRENTRUN_EXECUTABLE_PREFIX[] = "CurrentRun:Executable";
|
|
||||||
const char VAR_CURRENTDEVICE_HOSTADDRESS[] = "CurrentDevice:HostAddress";
|
|
||||||
const char VAR_CURRENTDEVICE_SSHPORT[] = "CurrentDevice:SshPort";
|
|
||||||
const char VAR_CURRENTDEVICE_USERNAME[] = "CurrentDevice:UserName";
|
|
||||||
const char VAR_CURRENTDEVICE_PRIVATEKEYFILE[] = "CurrentDevice:PrivateKeyFile";
|
|
||||||
|
|
||||||
const char HIDE_FILE_FILTER_SETTING[] = "GenericProject/FileFilter";
|
|
||||||
const char HIDE_FILE_FILTER_DEFAULT[] = "Makefile*; *.o; *.lo; *.la; *.obj; *~; *.files;"
|
|
||||||
" *.config; *.creator; *.user*; *.includes; *.autosave";
|
|
||||||
|
|
||||||
const char SHOW_FILE_FILTER_SETTING[] = "GenericProject/ShowFileFilter";
|
|
||||||
const char SHOW_FILE_FILTER_DEFAULT[] = "*.c; *.cc; *.cpp; *.cp; *.cxx; *.c++; *.h; *.hh; *.hpp; *.hxx;";
|
|
||||||
|
|
||||||
// JsonWizard:
|
// JsonWizard:
|
||||||
const char PAGE_ID_PREFIX[] = "PE.Wizard.Page.";
|
const char PAGE_ID_PREFIX[] = "PE.Wizard.Page.";
|
||||||
@@ -282,10 +196,5 @@ const char FILEOVERLAY_H[]=":/projectexplorer/images/fileoverlay_h.png";
|
|||||||
const char FILEOVERLAY_SCXML[]=":/projectexplorer/images/fileoverlay_scxml.png";
|
const char FILEOVERLAY_SCXML[]=":/projectexplorer/images/fileoverlay_scxml.png";
|
||||||
const char FILEOVERLAY_UNKNOWN[]=":/projectexplorer/images/fileoverlay_unknown.png";
|
const char FILEOVERLAY_UNKNOWN[]=":/projectexplorer/images/fileoverlay_unknown.png";
|
||||||
|
|
||||||
// Kit Information
|
|
||||||
const char KITINFORMATION_ID_V1[] = "PE.Profile.ToolChain";
|
|
||||||
const char KITINFORMATION_ID_V2[] = "PE.Profile.ToolChains";
|
|
||||||
const char KITINFORMATION_ID_V3[] = "PE.Profile.ToolChainsV3";
|
|
||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
@@ -225,7 +225,7 @@ void RunConfiguration::ctor()
|
|||||||
BuildConfiguration *bc = target()->activeBuildConfiguration();
|
BuildConfiguration *bc = target()->activeBuildConfiguration();
|
||||||
return bc ? bc->macroExpander() : target()->macroExpander();
|
return bc ? bc->macroExpander() : target()->macroExpander();
|
||||||
});
|
});
|
||||||
expander->registerPrefix(Constants::VAR_CURRENTRUN_ENV, tr("Variables in the current run environment"),
|
expander->registerPrefix("CurrentRun:Env", tr("Variables in the current run environment"),
|
||||||
[this](const QString &var) {
|
[this](const QString &var) {
|
||||||
const auto envAspect = extraAspect<EnvironmentAspect>();
|
const auto envAspect = extraAspect<EnvironmentAspect>();
|
||||||
return envAspect ? envAspect->environment().value(var) : QString();
|
return envAspect ? envAspect->environment().value(var) : QString();
|
||||||
|
@@ -43,6 +43,10 @@
|
|||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
const char HIDE_FILE_FILTER_DEFAULT[] = "Makefile*; *.o; *.lo; *.la; *.obj; *~; *.files;"
|
||||||
|
" *.config; *.creator; *.user*; *.includes; *.autosave";
|
||||||
|
const char SHOW_FILE_FILTER_DEFAULT[] = "*.c; *.cc; *.cpp; *.cp; *.cxx; *.c++; *.h; *.hh; *.hpp; *.hxx;";
|
||||||
|
|
||||||
Tree::~Tree()
|
Tree::~Tree()
|
||||||
{
|
{
|
||||||
qDeleteAll(childDirectories);
|
qDeleteAll(childDirectories);
|
||||||
@@ -550,11 +554,11 @@ SelectableFilesWidget::SelectableFilesWidget(QWidget *parent) :
|
|||||||
m_progressLabel(new QLabel)
|
m_progressLabel(new QLabel)
|
||||||
{
|
{
|
||||||
const QString showFilter
|
const QString showFilter
|
||||||
= Core::ICore::settings()->value(QLatin1String(Constants::SHOW_FILE_FILTER_SETTING),
|
= Core::ICore::settings()->value("GenericProject/ShowFileFilter",
|
||||||
QLatin1String(Constants::SHOW_FILE_FILTER_DEFAULT)).toString();
|
QLatin1String(SHOW_FILE_FILTER_DEFAULT)).toString();
|
||||||
const QString hideFilter
|
const QString hideFilter
|
||||||
= Core::ICore::settings()->value(QLatin1String(Constants::HIDE_FILE_FILTER_SETTING),
|
= Core::ICore::settings()->value("GenericProject/FileFilter",
|
||||||
QLatin1String(Constants::HIDE_FILE_FILTER_DEFAULT)).toString();
|
QLatin1String(HIDE_FILE_FILTER_DEFAULT)).toString();
|
||||||
|
|
||||||
auto layout = new QGridLayout(this);
|
auto layout = new QGridLayout(this);
|
||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
|
@@ -31,7 +31,11 @@
|
|||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/theme/theme.h>
|
#include <utils/theme/theme.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
// Task mark categories
|
||||||
|
const char TASK_MARK_WARNING[] = "Task.Mark.Warning";
|
||||||
|
const char TASK_MARK_ERROR[] = "Task.Mark.Error";
|
||||||
|
|
||||||
static TaskHub *m_instance = nullptr;
|
static TaskHub *m_instance = nullptr;
|
||||||
QVector<Core::Id> TaskHub::m_registeredCategories;
|
QVector<Core::Id> TaskHub::m_registeredCategories;
|
||||||
@@ -40,9 +44,9 @@ static Core::Id categoryForType(Task::TaskType type)
|
|||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Task::Error:
|
case Task::Error:
|
||||||
return Constants::TASK_MARK_ERROR;
|
return TASK_MARK_ERROR;
|
||||||
case Task::Warning:
|
case Task::Warning:
|
||||||
return Constants::TASK_MARK_WARNING;
|
return TASK_MARK_WARNING;
|
||||||
default:
|
default:
|
||||||
return Core::Id();
|
return Core::Id();
|
||||||
}
|
}
|
||||||
@@ -101,12 +105,12 @@ TaskHub::TaskHub()
|
|||||||
m_instance = this;
|
m_instance = this;
|
||||||
qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task");
|
qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task");
|
||||||
qRegisterMetaType<QList<ProjectExplorer::Task> >("QList<ProjectExplorer::Task>");
|
qRegisterMetaType<QList<ProjectExplorer::Task> >("QList<ProjectExplorer::Task>");
|
||||||
TaskMark::setCategoryColor(Constants::TASK_MARK_ERROR,
|
TaskMark::setCategoryColor(TASK_MARK_ERROR,
|
||||||
Utils::Theme::ProjectExplorer_TaskError_TextMarkColor);
|
Utils::Theme::ProjectExplorer_TaskError_TextMarkColor);
|
||||||
TaskMark::setCategoryColor(Constants::TASK_MARK_WARNING,
|
TaskMark::setCategoryColor(TASK_MARK_WARNING,
|
||||||
Utils::Theme::ProjectExplorer_TaskWarn_TextMarkColor);
|
Utils::Theme::ProjectExplorer_TaskWarn_TextMarkColor);
|
||||||
TaskMark::setDefaultToolTip(Constants::TASK_MARK_ERROR, tr("Error"));
|
TaskMark::setDefaultToolTip(TASK_MARK_ERROR, tr("Error"));
|
||||||
TaskMark::setDefaultToolTip(Constants::TASK_MARK_WARNING, tr("Warning"));
|
TaskMark::setDefaultToolTip(TASK_MARK_WARNING, tr("Warning"));
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskHub::~TaskHub()
|
TaskHub::~TaskHub()
|
||||||
@@ -194,3 +198,5 @@ void TaskHub::requestPopup()
|
|||||||
{
|
{
|
||||||
emit m_instance->popupRequested(Core::IOutputPane::NoModeSwitch);
|
emit m_instance->popupRequested(Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace ProjectExplorer
|
||||||
|
Reference in New Issue
Block a user