* added radio buttons to start indexing dialog * don't block task scheduler thread while start indexing dialog is visible * don't force whole project refresh on settings change * added help button to start indexing dialog explaining indexing modes * disable unavailable modes when project needs full refresh * improved label texts on indexing dialogs * added --incomplete flag to index command of commandline API * fixed deletion of window stack elements
This commit is contained in:
@@ -249,9 +249,14 @@ License CommandLineParser::getLicense()
|
||||
return m_license;
|
||||
}
|
||||
|
||||
void CommandLineParser::force()
|
||||
void CommandLineParser::fullRefresh()
|
||||
{
|
||||
m_force = true;
|
||||
m_refreshMode = REFRESH_ALL_FILES;
|
||||
}
|
||||
|
||||
void CommandLineParser::incompleteRefresh()
|
||||
{
|
||||
m_refreshMode = REFRESH_UPDATED_AND_INCOMPLETE_FILES;
|
||||
}
|
||||
|
||||
const FilePath& CommandLineParser::getProjectFilePath() const
|
||||
@@ -259,9 +264,9 @@ const FilePath& CommandLineParser::getProjectFilePath() const
|
||||
return m_projectFile;
|
||||
}
|
||||
|
||||
bool CommandLineParser::getFullProjectRefresh() const
|
||||
RefreshMode CommandLineParser::getRefreshMode() const
|
||||
{
|
||||
return m_force;
|
||||
return m_refreshMode;
|
||||
}
|
||||
|
||||
} // namespace cmd
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "boost/program_options.hpp"
|
||||
|
||||
#include "License.h"
|
||||
#include "project/RefreshInfo.h"
|
||||
#include "utility/file/FilePath.h"
|
||||
|
||||
namespace po = boost::program_options;
|
||||
@@ -37,7 +38,8 @@ public:
|
||||
bool startedWithLicense();
|
||||
bool hasError();
|
||||
|
||||
void force();
|
||||
void fullRefresh();
|
||||
void incompleteRefresh();
|
||||
|
||||
std::string getError();
|
||||
License getLicense();
|
||||
@@ -45,7 +47,7 @@ public:
|
||||
|
||||
const FilePath& getProjectFilePath() const;
|
||||
void setProjectFile(const FilePath& filepath);
|
||||
bool getFullProjectRefresh() const;
|
||||
RefreshMode getRefreshMode() const;
|
||||
|
||||
private:
|
||||
void addCommand(std::unique_ptr<Command> command);
|
||||
@@ -57,7 +59,7 @@ private:
|
||||
std::vector<std::shared_ptr<Command>> m_commands;
|
||||
|
||||
const std::string m_version;
|
||||
bool m_force{false};
|
||||
RefreshMode m_refreshMode = REFRESH_UPDATED_FILES;
|
||||
bool m_quit{false};
|
||||
bool m_withoutGUI{false};
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ void CommandIndex::setup()
|
||||
po::options_description options("Config Options");
|
||||
options.add_options()
|
||||
("help,h", "Print this help message")
|
||||
("incomplete,i", "Also reindex incomplete files (files with errors)")
|
||||
("full,f", "Index full project (omit to only index new/changed files)")
|
||||
("project-file", po::value<std::string>(), "Project file to index (.srctrlprj)")
|
||||
;
|
||||
@@ -53,7 +54,11 @@ ReturnStatus CommandIndex::parse(std::vector<std::string>& args)
|
||||
|
||||
if (vm.count("full"))
|
||||
{
|
||||
m_parser->force();
|
||||
m_parser->fullRefresh();
|
||||
}
|
||||
else if (vm.count("incomplete"))
|
||||
{
|
||||
m_parser->incompleteRefresh();
|
||||
}
|
||||
|
||||
if (vm.count("project-file"))
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef MESSAGE_LOAD_PROJECT_H
|
||||
#define MESSAGE_LOAD_PROJECT_H
|
||||
|
||||
#include "project/RefreshInfo.h"
|
||||
|
||||
#include "utility/file/FilePath.h"
|
||||
#include "utility/messaging/Message.h"
|
||||
|
||||
@@ -8,9 +10,10 @@ class MessageLoadProject
|
||||
: public Message<MessageLoadProject>
|
||||
{
|
||||
public:
|
||||
MessageLoadProject(const FilePath& filePath, bool forceRefresh)
|
||||
MessageLoadProject(const FilePath& filePath, bool settingsChanged = false, RefreshMode refreshMode = REFRESH_NONE)
|
||||
: projectSettingsFilePath(filePath)
|
||||
, forceRefresh(forceRefresh)
|
||||
, settingsChanged(settingsChanged)
|
||||
, refreshMode(refreshMode)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -21,11 +24,14 @@ public:
|
||||
|
||||
virtual void print(std::ostream& os) const
|
||||
{
|
||||
os << projectSettingsFilePath.str() << ", forceRefresh: " << std::boolalpha << forceRefresh;
|
||||
os << projectSettingsFilePath.str();
|
||||
os << ", settingsChanged: " << std::boolalpha << settingsChanged;
|
||||
os << ", refreshMode: " << refreshMode;
|
||||
}
|
||||
|
||||
const FilePath projectSettingsFilePath;
|
||||
const bool forceRefresh;
|
||||
const bool settingsChanged;
|
||||
const RefreshMode refreshMode;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_LOAD_PROJECT_H
|
||||
|
||||
Reference in New Issue
Block a user