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:
Eberhard Graether
2017-02-13 20:55:37 +01:00
parent 637da119aa
commit d527991b46
7 changed files with 23 additions and 32 deletions
+1 -1
View File
@@ -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);
}
+18 -16
View File
@@ -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);
}
);
}
+1 -5
View File
@@ -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;
};