src: Added more status messages and some fixes
* Elide status bar messages to avoid window resize window * Fixed status view clearing when switching projects * Refactored app setting loading * Replace newline characters with spaces in status view
This commit is contained in:
@@ -105,12 +105,15 @@ DialogView::IndexMode QtDialogView::startIndexingDialog(
|
||||
|
||||
void QtDialogView::updateIndexingDialog(size_t fileCount, size_t totalFileCount, std::string sourcePath)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Indexing files: [";
|
||||
ss << fileCount << "/";
|
||||
ss << totalFileCount << "] ";
|
||||
ss << sourcePath;
|
||||
MessageStatus(ss.str(), false, true).dispatch();
|
||||
if (sourcePath.size())
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Indexing files: [";
|
||||
ss << fileCount << "/";
|
||||
ss << totalFileCount << "] ";
|
||||
ss << sourcePath;
|
||||
MessageStatus(ss.str(), false, true).dispatch();
|
||||
}
|
||||
|
||||
m_onQtThread(
|
||||
[=]()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <QPushButton>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include "Application.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "settings/ColorScheme.h"
|
||||
#include "qt/view/QtViewWidgetWrapper.h"
|
||||
@@ -143,8 +144,10 @@ void QtLogView::setLoggingEnabled(bool enabled)
|
||||
|
||||
ApplicationSettings::getInstance()->setLoggingEnabled(enabled);
|
||||
ApplicationSettings::getInstance()->save();
|
||||
|
||||
Application::getInstance()->loadSettings();
|
||||
|
||||
MessageRefresh msg;
|
||||
msg.reloadSettings = true;
|
||||
msg.uiOnly = true;
|
||||
msg.dispatchImmediately();
|
||||
}
|
||||
@@ -153,8 +156,10 @@ void QtLogView::setAstLoggingEnabled(bool enabled)
|
||||
{
|
||||
ApplicationSettings::getInstance()->setVerboseIndexerLoggingEnabled(enabled);
|
||||
ApplicationSettings::getInstance()->save();
|
||||
|
||||
Application::getInstance()->loadSettings();
|
||||
|
||||
MessageRefresh msg;
|
||||
msg.reloadSettings = true;
|
||||
msg.uiOnly = true;
|
||||
msg.dispatchImmediately();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user