src: Reviewed old files touched by bookmarks commit
* Removed some unused changes * Disabled "No IDE connected" message in status bar * Use threaded functor in status bar view
This commit is contained in:
@@ -4,9 +4,12 @@
|
||||
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_VERSION_NUMBER}")
|
||||
message(STATUS "Get Public Key for Coati version: ${VERSION_MAJOR}")
|
||||
|
||||
# message(STATUS "${CMAKE_SOURCE_DIR}/setup/RSA_keys/public-${VERSION_MAJOR}.pem")
|
||||
message(STATUS "${CMAKE_SOURCE_DIR}/setup/RSA_keys/public-0.pem") # explain in Readme.md how to get this to work first
|
||||
|
||||
# set(pubKeyFile "${CMAKE_SOURCE_DIR}/setup/RSA_keys/public-${VERSION_MAJOR}.pem")
|
||||
set(pubKeyFile "${CMAKE_SOURCE_DIR}/setup/RSA_keys/public-0.pem") # explain in Readme.md how to get this to work first
|
||||
|
||||
# message(STATUS "file: ${pubKeyFile}")
|
||||
|
||||
if(EXISTS ${pubKeyFile})
|
||||
|
||||
@@ -167,13 +167,6 @@ void IntermediateStorage::addError(const std::string& message, const FilePath& f
|
||||
));
|
||||
}
|
||||
|
||||
Id IntermediateStorage::addBookmark(const Bookmark& bookmark)
|
||||
{
|
||||
m_bookmarks.push_back(bookmark);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void IntermediateStorage::forEachNode(std::function<void(const Id /*id*/, const StorageNode& /*data*/)> callback) const
|
||||
{
|
||||
for (std::map<Id, std::shared_ptr<StorageNode>>::const_iterator it = m_nodeIdsToData.begin(); it != m_nodeIdsToData.end(); it++)
|
||||
|
||||
@@ -27,7 +27,6 @@ public:
|
||||
virtual void addComponentAccess(Id nodeId , int type);
|
||||
virtual void addCommentLocation(Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol);
|
||||
virtual void addError(const std::string& message, const FilePath& filePath, uint startLine, uint startCol, bool fatal, bool indexed);
|
||||
virtual Id addBookmark(const Bookmark& bookmark);
|
||||
|
||||
virtual void forEachNode(std::function<void(const Id /*id*/, const StorageNode& /*data*/)> callback) const;
|
||||
virtual void forEachFile(std::function<void(const StorageFile& /*data*/)> callback) const;
|
||||
@@ -66,7 +65,6 @@ private:
|
||||
std::vector<StorageComponentAccess> m_componentAccesses;
|
||||
std::vector<StorageCommentLocation> m_commentLocations;
|
||||
std::vector<StorageError> m_errors;
|
||||
std::vector<Bookmark> m_bookmarks;
|
||||
|
||||
Id m_nextId;
|
||||
};
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
#include "data/bookmark/Bookmark.h"
|
||||
#include "data/name/NameHierarchy.h"
|
||||
#include "data/StorageTypes.h"
|
||||
#include "utility/types.h"
|
||||
|
||||
@@ -44,7 +44,7 @@ QtStatusBar::QtStatusBar()
|
||||
|
||||
connect(&m_errorButton, SIGNAL(clicked()), this, SLOT(showErrors()));
|
||||
|
||||
m_ideStatusText.setText("No IDE connected");
|
||||
// m_ideStatusText.setText("No IDE connected"); // don't display this until all plugins support ping
|
||||
addWidget(&m_ideStatusText);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
|
||||
QtStatusBarView::QtStatusBarView(ViewLayout* viewLayout)
|
||||
: StatusBarView(viewLayout)
|
||||
, m_showMessageFunctor(std::bind(
|
||||
&QtStatusBarView::doShowMessage, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3))
|
||||
, m_setErrorCountFunctor(std::bind(&QtStatusBarView::doSetErrorCount, this, std::placeholders::_1))
|
||||
{
|
||||
m_widget = std::make_shared<QtStatusBar>();
|
||||
m_widget->show();
|
||||
@@ -37,25 +34,30 @@ void QtStatusBarView::refreshView()
|
||||
|
||||
void QtStatusBarView::showMessage(const std::string& message, bool isError, bool showLoader)
|
||||
{
|
||||
m_showMessageFunctor(message, isError, showLoader);
|
||||
m_onQtThread(
|
||||
[=]()
|
||||
{
|
||||
m_widget->setText(message, isError, showLoader);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void QtStatusBarView::setErrorCount(ErrorCountInfo errorCount)
|
||||
{
|
||||
m_setErrorCountFunctor(errorCount);
|
||||
m_onQtThread(
|
||||
[=]()
|
||||
{
|
||||
m_widget->setErrorCount(errorCount);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void QtStatusBarView::showIdeStatus(const std::string& message)
|
||||
{
|
||||
m_widget->setIdeStatus(message);
|
||||
}
|
||||
|
||||
void QtStatusBarView::doShowMessage(const std::string& message, bool isError, bool showLoader)
|
||||
{
|
||||
m_widget->setText(message, isError, showLoader);
|
||||
}
|
||||
|
||||
void QtStatusBarView::doSetErrorCount(ErrorCountInfo errorCount)
|
||||
{
|
||||
m_widget->setErrorCount(errorCount);
|
||||
m_onQtThread(
|
||||
[=]()
|
||||
{
|
||||
m_widget->setIdeStatus(message);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -28,11 +28,7 @@ public:
|
||||
virtual void showIdeStatus(const std::string& message);
|
||||
|
||||
private:
|
||||
void doShowMessage(const std::string& message, bool isError, bool showLoader);
|
||||
void doSetErrorCount(ErrorCountInfo errorCount);
|
||||
|
||||
QtThreadedFunctor<const std::string&, bool, bool> m_showMessageFunctor;
|
||||
QtThreadedFunctor<ErrorCountInfo> m_setErrorCountFunctor;
|
||||
QtThreadedLambdaFunctor m_onQtThread;
|
||||
|
||||
std::shared_ptr<QtStatusBar> m_widget;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user