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:
@@ -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