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:
@@ -41,6 +41,7 @@ Edge.cpp ERROR: Nodes are not plain copies.
|
|||||||
INFO: Indexer - indexing source file: input.cc
|
INFO: Indexer - indexing source file: input.cc
|
||||||
INFO: Indexer - indexing source file: input.cc
|
INFO: Indexer - indexing source file: input.cc
|
||||||
INFO: Indexer - indexing source file: input.cc
|
INFO: Indexer - indexing source file: input.cc
|
||||||
|
INFO: send MessageStatus Enabled console and file logging.
|
||||||
INFO: send TestMessage
|
INFO: send TestMessage
|
||||||
INFO: send TestMessage
|
INFO: send TestMessage
|
||||||
INFO: send TestMessage
|
INFO: send TestMessage
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "utility/logging/FileLogger.h"
|
#include "utility/logging/FileLogger.h"
|
||||||
#include "utility/logging/logging.h"
|
#include "utility/logging/logging.h"
|
||||||
#include "utility/logging/LogManager.h"
|
#include "utility/logging/LogManager.h"
|
||||||
|
#include "utility/messaging/type/MessageStatus.h"
|
||||||
#include "utility/ResourcePaths.h"
|
#include "utility/ResourcePaths.h"
|
||||||
#include "utility/ScopedFunctor.h"
|
#include "utility/ScopedFunctor.h"
|
||||||
#include "utility/UserPaths.h"
|
#include "utility/UserPaths.h"
|
||||||
@@ -49,11 +50,14 @@ void prefillJavaRuntimePath()
|
|||||||
std::vector<FilePath> paths = javaPathDetector->getPaths();
|
std::vector<FilePath> paths = javaPathDetector->getPaths();
|
||||||
if (!paths.empty())
|
if (!paths.empty())
|
||||||
{
|
{
|
||||||
|
MessageStatus("Run Java runtime path detection, found: " + paths.front().str());
|
||||||
|
|
||||||
settings->setJavaPath(paths.front().str());
|
settings->setJavaPath(paths.front().str());
|
||||||
settings->save();
|
settings->save();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
MessageStatus("Run Java runtime path detection, no path found.");
|
||||||
std::cout << "no javapath" << std::endl;
|
std::cout << "no javapath" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,6 +72,8 @@ void prefillCxxHeaderPaths()
|
|||||||
std::vector<FilePath> paths = cxxHeaderDetector->getPaths();
|
std::vector<FilePath> paths = cxxHeaderDetector->getPaths();
|
||||||
if (!paths.empty())
|
if (!paths.empty())
|
||||||
{
|
{
|
||||||
|
MessageStatus("Run C/C++ header path detection, found " + std::to_string(paths.size()) + " paths");
|
||||||
|
|
||||||
settings->setHeaderSearchPaths(paths);
|
settings->setHeaderSearchPaths(paths);
|
||||||
settings->save();
|
settings->save();
|
||||||
}
|
}
|
||||||
@@ -83,6 +89,8 @@ void prefillCxxFrameworkPaths()
|
|||||||
std::vector<FilePath> paths = cxxFrameworkDetector->getPaths();
|
std::vector<FilePath> paths = cxxFrameworkDetector->getPaths();
|
||||||
if (!paths.empty())
|
if (!paths.empty())
|
||||||
{
|
{
|
||||||
|
MessageStatus("Run C/C++ framework path detection, found " + std::to_string(paths.size()) + " paths");
|
||||||
|
|
||||||
settings->setFrameworkSearchPaths(paths);
|
settings->setFrameworkSearchPaths(paths);
|
||||||
settings->save();
|
settings->save();
|
||||||
}
|
}
|
||||||
@@ -101,6 +109,8 @@ int main(int argc, char *argv[])
|
|||||||
Version version = Version::fromString(GIT_VERSION_NUMBER);
|
Version version = Version::fromString(GIT_VERSION_NUMBER);
|
||||||
QApplication::setApplicationVersion(version.toDisplayString().c_str());
|
QApplication::setApplicationVersion(version.toDisplayString().c_str());
|
||||||
|
|
||||||
|
MessageStatus("Starting Coati " + version.toDisplayString()).dispatch();
|
||||||
|
|
||||||
CommandLineParser commandLineParser(argc, argv, version.toString());
|
CommandLineParser commandLineParser(argc, argv, version.toString());
|
||||||
if (commandLineParser.exitApplication())
|
if (commandLineParser.exitApplication())
|
||||||
{
|
{
|
||||||
@@ -199,6 +209,8 @@ int main(int argc, char *argv[])
|
|||||||
const std::vector<FilePath> storedIndexingFiles = ApplicationStateMonitor::getStoredIndexingFiles();
|
const std::vector<FilePath> storedIndexingFiles = ApplicationStateMonitor::getStoredIndexingFiles();
|
||||||
if (storedIndexingFiles.size() > 0)
|
if (storedIndexingFiles.size() > 0)
|
||||||
{
|
{
|
||||||
|
MessageStatus("The application crashed during last project indexing. Please follow the instructions to help us fix this problem.").dispatch();
|
||||||
|
|
||||||
ApplicationStateMonitor::clearStoredIndexingFiles();
|
ApplicationStateMonitor::clearStoredIndexingFiles();
|
||||||
if (storedIndexingFiles.size() > 1)
|
if (storedIndexingFiles.size() > 1)
|
||||||
{
|
{
|
||||||
|
|||||||
+11
-7
@@ -70,6 +70,8 @@ void Application::destroyInstance()
|
|||||||
|
|
||||||
void Application::loadSettings()
|
void Application::loadSettings()
|
||||||
{
|
{
|
||||||
|
MessageStatus("Load settings: " + UserPaths::getAppSettingsPath()).dispatch();
|
||||||
|
|
||||||
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
|
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
|
||||||
settings->load(FilePath(UserPaths::getAppSettingsPath()));
|
settings->load(FilePath(UserPaths::getAppSettingsPath()));
|
||||||
|
|
||||||
@@ -162,13 +164,13 @@ void Application::createAndLoadProject(const FilePath& projectSettingsFilePath)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG_ERROR_STREAM(<< "Failed to load project.");
|
LOG_ERROR_STREAM(<< "Failed to load project.");
|
||||||
MessageStatus("Failed to load project.", true).dispatch();
|
MessageStatus("Failed to load project: " + projectSettingsFilePath.str(), true).dispatch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
LOG_ERROR_STREAM(<< "Failed to load project.");
|
LOG_ERROR_STREAM(<< "Failed to load project.");
|
||||||
MessageStatus("Failed to load project.", true).dispatch();
|
MessageStatus("Failed to load project: " + projectSettingsFilePath.str(), true).dispatch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,6 +200,8 @@ void Application::handleMessage(MessageActivateWindow* message)
|
|||||||
|
|
||||||
void Application::handleMessage(MessageEnteredLicense* message)
|
void Application::handleMessage(MessageEnteredLicense* message)
|
||||||
{
|
{
|
||||||
|
MessageStatus("Found valid license key, unlocked application.").dispatch();
|
||||||
|
|
||||||
m_isInTrial = false;
|
m_isInTrial = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,8 +219,6 @@ void Application::handleMessage(MessageLoadProject* message)
|
|||||||
{
|
{
|
||||||
TRACE("app load project");
|
TRACE("app load project");
|
||||||
|
|
||||||
loadSettings();
|
|
||||||
|
|
||||||
FilePath projectSettingsFilePath(message->projectSettingsFilePath);
|
FilePath projectSettingsFilePath(message->projectSettingsFilePath);
|
||||||
if (projectSettingsFilePath.empty())
|
if (projectSettingsFilePath.empty())
|
||||||
{
|
{
|
||||||
@@ -241,9 +243,9 @@ void Application::handleMessage(MessageRefresh* message)
|
|||||||
{
|
{
|
||||||
TRACE("app refresh");
|
TRACE("app refresh");
|
||||||
|
|
||||||
if (message->reloadSettings)
|
if (message->loadStyle)
|
||||||
{
|
{
|
||||||
loadSettings();
|
loadStyle(ApplicationSettings::getInstance()->getColorSchemePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_hasGUI)
|
if (m_hasGUI)
|
||||||
@@ -259,8 +261,10 @@ void Application::handleMessage(MessageRefresh* message)
|
|||||||
|
|
||||||
void Application::handleMessage(MessageSwitchColorScheme* message)
|
void Application::handleMessage(MessageSwitchColorScheme* message)
|
||||||
{
|
{
|
||||||
|
MessageStatus("Switch color scheme: " + message->colorSchemePath.str()).dispatch();
|
||||||
|
|
||||||
loadStyle(message->colorSchemePath);
|
loadStyle(message->colorSchemePath);
|
||||||
MessageRefresh().refreshUiOnly().keepSettings().dispatch();
|
MessageRefresh().refreshUiOnly().noReloadStyle().dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::startMessagingAndScheduling()
|
void Application::startMessagingAndScheduling()
|
||||||
|
|||||||
@@ -117,12 +117,8 @@ LicenseChecker::LicenseChecker()
|
|||||||
|
|
||||||
void LicenseChecker::handleMessage(MessageDispatchWhenLicenseValid* message)
|
void LicenseChecker::handleMessage(MessageDispatchWhenLicenseValid* message)
|
||||||
{
|
{
|
||||||
MessageStatus("preparing...", false, true).dispatch();
|
|
||||||
|
|
||||||
LicenseState state = checkCurrentLicense();
|
LicenseState state = checkCurrentLicense();
|
||||||
|
|
||||||
MessageStatus("ready").dispatch();
|
|
||||||
|
|
||||||
if (state == LICENSE_VALID)
|
if (state == LICENSE_VALID)
|
||||||
{
|
{
|
||||||
message->content->dispatch();
|
message->content->dispatch();
|
||||||
|
|||||||
@@ -308,6 +308,8 @@ bool Project::requestIndex(bool forceRefresh, bool needsFullRefresh)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MessageStatus((fullRefresh ? "Reindexing Project" : "Refreshing Project"), false, true).dispatch();
|
||||||
|
|
||||||
buildIndex(filesToClean, filesToIndex, fullRefresh);
|
buildIndex(filesToClean, filesToIndex, fullRefresh);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -139,6 +139,12 @@ void CodeController::handleMessage(MessageActivateTokens* message)
|
|||||||
size_t referenceCount = m_collection->getTokenLocationCount();
|
size_t referenceCount = m_collection->getTokenLocationCount();
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|
||||||
|
if (message->unknownNames.size())
|
||||||
|
{
|
||||||
|
ss << "Activate \"" << message->unknownNames[0] << "\": ";
|
||||||
|
}
|
||||||
|
|
||||||
ss << message->tokenIds.size() << ' ';
|
ss << message->tokenIds.size() << ' ';
|
||||||
ss << (message->tokenIds.size() == 1 ? "result" : "results");
|
ss << (message->tokenIds.size() == 1 ? "result" : "results");
|
||||||
|
|
||||||
@@ -270,8 +276,8 @@ void CodeController::handleMessage(MessageScrollToLine* message)
|
|||||||
if (message->isModified)
|
if (message->isModified)
|
||||||
{
|
{
|
||||||
MessageStatus(
|
MessageStatus(
|
||||||
"The file was modified, please refresh. Showing source location: " + message->filePath.str()
|
"Showing source location: " + message->filePath.str()
|
||||||
+ " : " + std::to_string(message->line),
|
+ " : " + std::to_string(message->line) + ". The file was modified, please refresh.",
|
||||||
true
|
true
|
||||||
).dispatch();
|
).dispatch();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ void IDECommunicationController::handleSetActiveTokenMessage(
|
|||||||
|
|
||||||
if (selectedLocationIds.size() > 0)
|
if (selectedLocationIds.size() > 0)
|
||||||
{
|
{
|
||||||
MessageStatus("Activating a source location from plug-in succeeded.").dispatch();
|
MessageStatus("Activating source location from plug-in succeeded: " + message.fileLocation + ", row: " +
|
||||||
|
std::to_string(message.row) + ", col: " + std::to_string(message.column)).dispatch();
|
||||||
|
|
||||||
MessageDispatchWhenLicenseValid(
|
MessageDispatchWhenLicenseValid(
|
||||||
std::make_shared<MessageActivateTokenLocations>(selectedLocationIds)
|
std::make_shared<MessageActivateTokenLocations>(selectedLocationIds)
|
||||||
).dispatch();
|
).dispatch();
|
||||||
@@ -180,7 +182,7 @@ void IDECommunicationController::handlePing(const NetworkProtocolHelper::PingMes
|
|||||||
}
|
}
|
||||||
// TODO: add the other ides
|
// TODO: add the other ides
|
||||||
|
|
||||||
std::string message = ideName + " instance detected";
|
std::string message = ideName + " instance detected via plugin port";
|
||||||
|
|
||||||
MessageStatus(message, false, false).dispatch();
|
MessageStatus(message, false, false).dispatch();
|
||||||
MessageDispatchWhenLicenseValid(msg).dispatch();
|
MessageDispatchWhenLicenseValid(msg).dispatch();
|
||||||
@@ -195,7 +197,7 @@ void IDECommunicationController::handleMessage(MessageIDECreateCDB* message)
|
|||||||
{
|
{
|
||||||
std::string networkMessage = NetworkProtocolHelper::buildCreateCDBMessage();
|
std::string networkMessage = NetworkProtocolHelper::buildCreateCDBMessage();
|
||||||
|
|
||||||
MessageStatus("Requesting IDE to create CDB.").dispatch();
|
MessageStatus("Requesting IDE to create Compilation Database via plug-in.").dispatch();
|
||||||
|
|
||||||
sendMessage(networkMessage);
|
sendMessage(networkMessage);
|
||||||
}
|
}
|
||||||
@@ -204,10 +206,10 @@ void IDECommunicationController::handleMessage(MessageMoveIDECursor* message)
|
|||||||
{
|
{
|
||||||
std::string networkMessage = NetworkProtocolHelper::buildSetIDECursorMessage(
|
std::string networkMessage = NetworkProtocolHelper::buildSetIDECursorMessage(
|
||||||
message->FilePosition, message->Row, message->Column
|
message->FilePosition, message->Row, message->Column
|
||||||
);
|
);
|
||||||
|
|
||||||
MessageStatus(
|
MessageStatus(
|
||||||
"Jumping the external tool to the following location: " + message->FilePosition + ", row: " +
|
"Jump to source location via plug-in: " + message->FilePosition + ", row: " +
|
||||||
std::to_string(message->Row) + ", col: " + std::to_string(message->Column)
|
std::to_string(message->Row) + ", col: " + std::to_string(message->Column)
|
||||||
).dispatch();
|
).dispatch();
|
||||||
|
|
||||||
|
|||||||
@@ -57,12 +57,10 @@ void StatusBarController::handleMessage(MessageStatus* message)
|
|||||||
|
|
||||||
void StatusBarController::setStatus(const std::string& status, bool isError, bool showLoader)
|
void StatusBarController::setStatus(const std::string& status, bool isError, bool showLoader)
|
||||||
{
|
{
|
||||||
std::string str = utility::replace(status, "\n", " ");
|
if (!status.empty())
|
||||||
|
|
||||||
if (!str.empty())
|
|
||||||
{
|
{
|
||||||
LOG_INFO_STREAM(<< "STATUS " << str);
|
LOG_INFO_STREAM(<< "STATUS " << status);
|
||||||
|
|
||||||
getView()->showMessage(str, isError, showLoader);
|
getView()->showMessage(status, isError, showLoader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,13 +20,12 @@ StatusView* StatusController::getView() const
|
|||||||
|
|
||||||
void StatusController::clear()
|
void StatusController::clear()
|
||||||
{
|
{
|
||||||
m_status.clear();
|
|
||||||
getView()->clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatusController::handleMessage(MessageClearStatusView* message)
|
void StatusController::handleMessage(MessageClearStatusView* message)
|
||||||
{
|
{
|
||||||
clear();
|
m_status.clear();
|
||||||
|
getView()->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatusController::handleMessage(MessageShowStatus* message)
|
void StatusController::handleMessage(MessageShowStatus* message)
|
||||||
@@ -36,6 +35,11 @@ void StatusController::handleMessage(MessageShowStatus* message)
|
|||||||
|
|
||||||
void StatusController::handleMessage(MessageStatus* message)
|
void StatusController::handleMessage(MessageStatus* message)
|
||||||
{
|
{
|
||||||
|
if (!message->status.size())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<Status> status;
|
std::vector<Status> status;
|
||||||
status.push_back(Status(message->status, message->isError));
|
status.push_back(Status(message->status, message->isError));
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ public:
|
|||||||
~StatusController();
|
~StatusController();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_enabled;
|
|
||||||
StatusView* getView() const;
|
StatusView* getView() const;
|
||||||
|
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "utility/logging/LogMessage.h"
|
#include "utility/logging/LogMessage.h"
|
||||||
#include "utility/logging/logging.h"
|
#include "utility/logging/logging.h"
|
||||||
|
#include "utility/messaging/type/MessageStatus.h"
|
||||||
#include "utility/Version.h"
|
#include "utility/Version.h"
|
||||||
|
|
||||||
std::shared_ptr<LogManager> LogManager::createInstance()
|
std::shared_ptr<LogManager> LogManager::createInstance()
|
||||||
@@ -31,11 +32,21 @@ LogManager::~LogManager()
|
|||||||
|
|
||||||
void LogManager::setLoggingEnabled(bool enabled)
|
void LogManager::setLoggingEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
m_loggingEnabled = enabled;
|
if (m_loggingEnabled != enabled)
|
||||||
if (m_loggingEnabled)
|
|
||||||
{
|
{
|
||||||
LOG_INFO("Enabled logging for Coati " + Version::getApplicationVersion().toDisplayString());
|
if (enabled)
|
||||||
|
{
|
||||||
|
LOG_INFO("Enabled logging for Coati " + Version::getApplicationVersion().toDisplayString());
|
||||||
|
MessageStatus("Enabled console and file logging.").dispatch();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_INFO("Disabled logging");
|
||||||
|
MessageStatus("Disabled console and file logging.").dispatch();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_loggingEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogManager::addLogger(std::shared_ptr<Logger> logger)
|
void LogManager::addLogger(std::shared_ptr<Logger> logger)
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
|
|
||||||
#include "utility/messaging/Message.h"
|
#include "utility/messaging/Message.h"
|
||||||
|
|
||||||
class MessageRefresh: public Message<MessageRefresh>
|
class MessageRefresh
|
||||||
|
: public Message<MessageRefresh>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MessageRefresh()
|
MessageRefresh()
|
||||||
: uiOnly(false)
|
: uiOnly(false)
|
||||||
, all(false)
|
, all(false)
|
||||||
, reloadSettings(true)
|
, loadStyle(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,9 +31,9 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageRefresh& keepSettings()
|
MessageRefresh& noReloadStyle()
|
||||||
{
|
{
|
||||||
reloadSettings = false;
|
loadStyle = false;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +51,8 @@ public:
|
|||||||
|
|
||||||
bool uiOnly;
|
bool uiOnly;
|
||||||
bool all;
|
bool all;
|
||||||
bool reloadSettings;
|
|
||||||
|
bool loadStyle;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MESSAGE_REFRESH_H
|
#endif // MESSAGE_REFRESH_H
|
||||||
|
|||||||
@@ -2,13 +2,14 @@
|
|||||||
#define MESSAGE_STATUS_H
|
#define MESSAGE_STATUS_H
|
||||||
|
|
||||||
#include "utility/messaging/Message.h"
|
#include "utility/messaging/Message.h"
|
||||||
|
#include "utility/utilityString.h"
|
||||||
|
|
||||||
class MessageStatus
|
class MessageStatus
|
||||||
: public Message<MessageStatus>
|
: public Message<MessageStatus>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MessageStatus(const std::string& status, bool isError = false, bool showLoader = false)
|
MessageStatus(const std::string& status, bool isError = false, bool showLoader = false)
|
||||||
: status(status)
|
: status(utility::replace(status, "\n", " "))
|
||||||
, isError(isError)
|
, isError(isError)
|
||||||
, showLoader(showLoader)
|
, showLoader(showLoader)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ QtStatusBar::QtStatusBar()
|
|||||||
|
|
||||||
m_text.setFlat(true);
|
m_text.setFlat(true);
|
||||||
m_text.setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
m_text.setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||||
addWidget(&m_text);
|
addWidget(&m_text, 1);
|
||||||
setText("", false, false);
|
setText("", false, false);
|
||||||
|
|
||||||
connect(&m_text, SIGNAL(clicked()), this, SLOT(showStatus()));
|
connect(&m_text, SIGNAL(clicked()), this, SLOT(showStatus()));
|
||||||
@@ -52,11 +52,11 @@ void QtStatusBar::setText(const std::string& text, bool isError, bool showLoader
|
|||||||
{
|
{
|
||||||
if (isError)
|
if (isError)
|
||||||
{
|
{
|
||||||
m_text.setStyleSheet("QPushButton { color: #D00000; margin-right: 0; spacing: none; }");
|
m_text.setStyleSheet("QPushButton { color: #D00000; margin-right: 0; spacing: none; text-align: left; }");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_text.setStyleSheet("QPushButton { color: #000000; margin-right: 0; spacing: none; }");
|
m_text.setStyleSheet("QPushButton { color: #000000; margin-right: 0; spacing: none; text-align: left; }");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showLoader)
|
if (showLoader)
|
||||||
@@ -68,7 +68,7 @@ void QtStatusBar::setText(const std::string& text, bool isError, bool showLoader
|
|||||||
m_loader.hide();
|
m_loader.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_text.setText(text.c_str());
|
m_text.setText(m_text.fontMetrics().elidedText(QString::fromStdString(text), Qt::ElideRight, m_text.width()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtStatusBar::setErrorCount(ErrorCountInfo errorCount)
|
void QtStatusBar::setErrorCount(ErrorCountInfo errorCount)
|
||||||
|
|||||||
@@ -105,12 +105,15 @@ DialogView::IndexMode QtDialogView::startIndexingDialog(
|
|||||||
|
|
||||||
void QtDialogView::updateIndexingDialog(size_t fileCount, size_t totalFileCount, std::string sourcePath)
|
void QtDialogView::updateIndexingDialog(size_t fileCount, size_t totalFileCount, std::string sourcePath)
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
if (sourcePath.size())
|
||||||
ss << "Indexing files: [";
|
{
|
||||||
ss << fileCount << "/";
|
std::stringstream ss;
|
||||||
ss << totalFileCount << "] ";
|
ss << "Indexing files: [";
|
||||||
ss << sourcePath;
|
ss << fileCount << "/";
|
||||||
MessageStatus(ss.str(), false, true).dispatch();
|
ss << totalFileCount << "] ";
|
||||||
|
ss << sourcePath;
|
||||||
|
MessageStatus(ss.str(), false, true).dispatch();
|
||||||
|
}
|
||||||
|
|
||||||
m_onQtThread(
|
m_onQtThread(
|
||||||
[=]()
|
[=]()
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
#include "settings/ApplicationSettings.h"
|
#include "settings/ApplicationSettings.h"
|
||||||
#include "settings/ColorScheme.h"
|
#include "settings/ColorScheme.h"
|
||||||
#include "qt/view/QtViewWidgetWrapper.h"
|
#include "qt/view/QtViewWidgetWrapper.h"
|
||||||
@@ -143,8 +144,10 @@ void QtLogView::setLoggingEnabled(bool enabled)
|
|||||||
|
|
||||||
ApplicationSettings::getInstance()->setLoggingEnabled(enabled);
|
ApplicationSettings::getInstance()->setLoggingEnabled(enabled);
|
||||||
ApplicationSettings::getInstance()->save();
|
ApplicationSettings::getInstance()->save();
|
||||||
|
|
||||||
|
Application::getInstance()->loadSettings();
|
||||||
|
|
||||||
MessageRefresh msg;
|
MessageRefresh msg;
|
||||||
msg.reloadSettings = true;
|
|
||||||
msg.uiOnly = true;
|
msg.uiOnly = true;
|
||||||
msg.dispatchImmediately();
|
msg.dispatchImmediately();
|
||||||
}
|
}
|
||||||
@@ -153,8 +156,10 @@ void QtLogView::setAstLoggingEnabled(bool enabled)
|
|||||||
{
|
{
|
||||||
ApplicationSettings::getInstance()->setVerboseIndexerLoggingEnabled(enabled);
|
ApplicationSettings::getInstance()->setVerboseIndexerLoggingEnabled(enabled);
|
||||||
ApplicationSettings::getInstance()->save();
|
ApplicationSettings::getInstance()->save();
|
||||||
|
|
||||||
|
Application::getInstance()->loadSettings();
|
||||||
|
|
||||||
MessageRefresh msg;
|
MessageRefresh msg;
|
||||||
msg.reloadSettings = true;
|
|
||||||
msg.uiOnly = true;
|
msg.uiOnly = true;
|
||||||
msg.dispatchImmediately();
|
msg.dispatchImmediately();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -643,6 +643,10 @@ void QtProjectWizzard::createProject()
|
|||||||
forceRefreshProject = true;
|
forceRefreshProject = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageStatus("Created project: " + path.str()).dispatch();
|
||||||
|
}
|
||||||
|
|
||||||
MessageDispatchWhenLicenseValid(
|
MessageDispatchWhenLicenseValid(
|
||||||
std::make_shared<MessageLoadProject>(path, forceRefreshProject)
|
std::make_shared<MessageLoadProject>(path, forceRefreshProject)
|
||||||
@@ -666,6 +670,8 @@ void QtProjectWizzard::savePreferences()
|
|||||||
MessagePluginPortChange().dispatch();
|
MessagePluginPortChange().dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Application::getInstance()->loadSettings();
|
||||||
|
|
||||||
if (appSettingsChanged)
|
if (appSettingsChanged)
|
||||||
{
|
{
|
||||||
Project* currentProject = Application::getInstance()->getCurrentProject().get();
|
Project* currentProject = Application::getInstance()->getCurrentProject().get();
|
||||||
|
|||||||
Reference in New Issue
Block a user