src: switched to using only wstring for status message
This commit is contained in:
@@ -9,7 +9,7 @@ DialogView::~DialogView()
|
||||
{
|
||||
}
|
||||
|
||||
void DialogView::showUnknownProgressDialog(const std::string& title, const std::string& message)
|
||||
void DialogView::showUnknownProgressDialog(const std::wstring& title, const std::wstring& message)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ void DialogView::hideUnknownProgressDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void DialogView::showProgressDialog(const std::string& title, const std::string& message, size_t progress)
|
||||
void DialogView::showProgressDialog(const std::wstring& title, const std::wstring& message, size_t progress)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ public:
|
||||
DialogView(StorageAccess* storageAccess);
|
||||
virtual ~DialogView();
|
||||
|
||||
virtual void showUnknownProgressDialog(const std::string& title, const std::string& message);
|
||||
virtual void showUnknownProgressDialog(const std::wstring& title, const std::wstring& message);
|
||||
virtual void hideUnknownProgressDialog();
|
||||
|
||||
virtual void showProgressDialog(const std::string& title, const std::string& message, size_t progress);
|
||||
virtual void showProgressDialog(const std::wstring& title, const std::wstring& message, size_t progress);
|
||||
virtual void hideProgressDialog();
|
||||
|
||||
virtual void startIndexingDialog(
|
||||
|
||||
@@ -18,7 +18,7 @@ TaskCleanStorage::TaskCleanStorage(
|
||||
void TaskCleanStorage::doEnter(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
Application::getInstance()->getDialogView()->showUnknownProgressDialog(
|
||||
"Clearing Files", std::to_string(m_filePaths.size()) + " Files");
|
||||
L"Clearing Files", std::to_wstring(m_filePaths.size()) + L" Files");
|
||||
|
||||
m_start = utility::durationStart();
|
||||
|
||||
@@ -33,7 +33,7 @@ Task::TaskState TaskCleanStorage::doUpdate(std::shared_ptr<Blackboard> blackboar
|
||||
m_storage->clearFileElements(m_filePaths, [=](int progress)
|
||||
{
|
||||
Application::getInstance()->getDialogView()->showProgressDialog(
|
||||
"Clearing", std::to_string(m_filePaths.size()) + " Files", progress);
|
||||
L"Clearing", std::to_wstring(m_filePaths.size()) + L" Files", progress);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ Task::TaskState TaskFinishParsing::doUpdate(std::shared_ptr<Blackboard> blackboa
|
||||
|
||||
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
||||
|
||||
dialogView->showUnknownProgressDialog("Finish Indexing", "Optimizing database");
|
||||
dialogView->showUnknownProgressDialog(L"Finish Indexing", L"Optimizing database");
|
||||
m_storage->optimizeMemory();
|
||||
|
||||
dialogView->showUnknownProgressDialog("Finish Indexing", "Building caches");
|
||||
dialogView->showUnknownProgressDialog(L"Finish Indexing", L"Building caches");
|
||||
m_storage->buildCaches();
|
||||
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "Application.h"
|
||||
|
||||
TaskShowUnknownProgressDialog::TaskShowUnknownProgressDialog(
|
||||
const std::string& title,
|
||||
const std::string& message
|
||||
const std::wstring& title,
|
||||
const std::wstring& message
|
||||
)
|
||||
: m_title(title)
|
||||
, m_message(message)
|
||||
|
||||
@@ -10,8 +10,8 @@ class TaskShowUnknownProgressDialog
|
||||
{
|
||||
public:
|
||||
TaskShowUnknownProgressDialog(
|
||||
const std::string& title,
|
||||
const std::string& message
|
||||
const std::wstring& title,
|
||||
const std::wstring& message
|
||||
);
|
||||
|
||||
virtual ~TaskShowUnknownProgressDialog();
|
||||
@@ -22,8 +22,8 @@ private:
|
||||
virtual void doExit(std::shared_ptr<Blackboard> blackboard);
|
||||
virtual void doReset(std::shared_ptr<Blackboard> blackboard);
|
||||
|
||||
const std::string m_title;
|
||||
const std::string m_message;
|
||||
const std::wstring m_title;
|
||||
const std::wstring m_message;
|
||||
};
|
||||
|
||||
#endif // TASK_SHOW_UNKNOWN_PROGRESS_DIALOG_H
|
||||
|
||||
@@ -245,7 +245,7 @@ void Project::refresh(RefreshMode refreshMode, DialogView* dialogView)
|
||||
}
|
||||
}
|
||||
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Processing Files");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Processing Files");
|
||||
ScopedFunctor dialogHider([&dialogView](){
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
});
|
||||
@@ -333,7 +333,7 @@ void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
|
||||
MessageStatus(L"Preparing Indexing", false, true).dispatch();
|
||||
MessageClearErrorCount().dispatch();
|
||||
|
||||
dialogView->showUnknownProgressDialog("Preparing Indexing", "Setting up Indexers");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Indexing", L"Setting up Indexers");
|
||||
|
||||
std::shared_ptr<TaskGroupSequence> taskSequential = std::make_shared<TaskGroupSequence>();
|
||||
|
||||
@@ -440,7 +440,7 @@ void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
|
||||
);
|
||||
// add task that notifies the user of what's going on
|
||||
taskSequential->addTask( // we don't need to hide this dialog again, because it's overridden by other dialogs later on.
|
||||
std::make_shared<TaskShowUnknownProgressDialog>("Finish Indexing", "Saving\nRemaining Data")
|
||||
std::make_shared<TaskShowUnknownProgressDialog>(L"Finish Indexing", L"Saving\nRemaining Data")
|
||||
);
|
||||
|
||||
// add task that injects the remaining intermediate storages into the persistent storage
|
||||
|
||||
@@ -30,9 +30,9 @@ QtDialogView::~QtDialogView()
|
||||
m_resultReady = true;
|
||||
}
|
||||
|
||||
void QtDialogView::showUnknownProgressDialog(const std::string& title, const std::string& message)
|
||||
void QtDialogView::showUnknownProgressDialog(const std::wstring& title, const std::wstring& message)
|
||||
{
|
||||
MessageStatus(title + ": " + message, false, true).dispatch();
|
||||
MessageStatus(title + L": " + message, false, true).dispatch();
|
||||
|
||||
m_onQtThread2(
|
||||
[=]()
|
||||
@@ -56,7 +56,7 @@ void QtDialogView::hideUnknownProgressDialog()
|
||||
setParentWindow(nullptr);
|
||||
}
|
||||
|
||||
void QtDialogView::showProgressDialog(const std::string& title, const std::string& message, size_t progress)
|
||||
void QtDialogView::showProgressDialog(const std::wstring& title, const std::wstring& message, size_t progress)
|
||||
{
|
||||
m_onQtThread(
|
||||
[=]()
|
||||
@@ -81,11 +81,11 @@ void QtDialogView::showProgressDialog(const std::string& title, const std::strin
|
||||
|
||||
if (sendStatusMessage)
|
||||
{
|
||||
MessageStatus(title + ": " + message + " [" + std::to_string(progress) + "%]", false, true).dispatch();
|
||||
MessageStatus(title + L": " + message + L" [" + std::to_wstring(progress) + L"%]", false, true).dispatch();
|
||||
}
|
||||
|
||||
window->updateTitle(title.c_str());
|
||||
window->updateMessage(message.c_str());
|
||||
window->updateTitle(QString::fromStdWString(title));
|
||||
window->updateMessage(QString::fromStdWString(message));
|
||||
window->updateProgress(progress);
|
||||
|
||||
setUIBlocked(true);
|
||||
@@ -143,7 +143,7 @@ void QtDialogView::startIndexingDialog(
|
||||
connect(timer.get(), &QTimer::timeout,
|
||||
[=]()
|
||||
{
|
||||
showUnknownProgress("Preparing Indexing", "Processing Files", true);
|
||||
showUnknownProgress(L"Preparing Indexing", L"Processing Files", true);
|
||||
}
|
||||
);
|
||||
timer->start(200);
|
||||
@@ -348,7 +348,7 @@ void QtDialogView::setParentWindow(QtWindow* window)
|
||||
);
|
||||
}
|
||||
|
||||
void QtDialogView::showUnknownProgress(const std::string& title, const std::string& message, bool stacked)
|
||||
void QtDialogView::showUnknownProgress(const std::wstring& title, const std::wstring& message, bool stacked)
|
||||
{
|
||||
QtIndexingDialog* window = nullptr;
|
||||
|
||||
@@ -369,8 +369,8 @@ void QtDialogView::showUnknownProgress(const std::string& title, const std::stri
|
||||
window->setupUnknownProgress();
|
||||
}
|
||||
|
||||
window->updateTitle(title.c_str());
|
||||
window->updateMessage(message.c_str());
|
||||
window->updateTitle(QString::fromStdWString(title));
|
||||
window->updateMessage(QString::fromStdWString(message));
|
||||
|
||||
setUIBlocked(true);
|
||||
}
|
||||
@@ -418,7 +418,7 @@ void QtDialogView::handleMessage(MessageInterruptTasks* message)
|
||||
QtIndexingDialog* window = dynamic_cast<QtIndexingDialog*>(m_windowStack.getTopWindow());
|
||||
if (window && window->getType() == QtIndexingDialog::DIALOG_INDEXING)
|
||||
{
|
||||
showUnknownProgressDialog("Interrupting Indexing", "Waiting for indexer\nthreads to finish");
|
||||
showUnknownProgressDialog(L"Interrupting Indexing", L"Waiting for indexer\nthreads to finish");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -29,10 +29,10 @@ public:
|
||||
QtDialogView(QtMainWindow* mainWindow, StorageAccess* storageAccess);
|
||||
virtual ~QtDialogView();
|
||||
|
||||
virtual void showUnknownProgressDialog(const std::string& title, const std::string& message) override;
|
||||
virtual void showUnknownProgressDialog(const std::wstring& title, const std::wstring& message) override;
|
||||
virtual void hideUnknownProgressDialog() override;
|
||||
|
||||
virtual void showProgressDialog(const std::string& title, const std::string& message, size_t progress) override;
|
||||
virtual void showProgressDialog(const std::wstring& title, const std::wstring& message, size_t progress) override;
|
||||
virtual void hideProgressDialog() override;
|
||||
|
||||
virtual void startIndexingDialog(
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
void setParentWindow(QtWindow* window);
|
||||
|
||||
private slots:
|
||||
void showUnknownProgress(const std::string& title, const std::string& message, bool stacked);
|
||||
void showUnknownProgress(const std::wstring& title, const std::wstring& message, bool stacked);
|
||||
void hideUnknownProgress();
|
||||
|
||||
void setUIBlocked(bool blocked);
|
||||
|
||||
@@ -265,7 +265,7 @@ void QtIndexingDialog::setupProgress()
|
||||
finishSetup();
|
||||
}
|
||||
|
||||
void QtIndexingDialog::updateMessage(QString message)
|
||||
void QtIndexingDialog::updateMessage(const QString& message)
|
||||
{
|
||||
if (m_messageLabel)
|
||||
{
|
||||
@@ -273,13 +273,13 @@ void QtIndexingDialog::updateMessage(QString message)
|
||||
}
|
||||
}
|
||||
|
||||
std::string QtIndexingDialog::getMessage() const
|
||||
std::wstring QtIndexingDialog::getMessage() const
|
||||
{
|
||||
if (m_messageLabel)
|
||||
{
|
||||
return m_messageLabel->text().toStdString();
|
||||
return m_messageLabel->text().toStdWString();
|
||||
}
|
||||
return "";
|
||||
return L"";
|
||||
}
|
||||
|
||||
void QtIndexingDialog::updateProgress(size_t progress)
|
||||
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
void setupUnknownProgress();
|
||||
void setupProgress();
|
||||
|
||||
void updateMessage(QString message);
|
||||
std::string getMessage() const;
|
||||
void updateMessage(const QString& message);
|
||||
std::wstring getMessage() const;
|
||||
void updateProgress(size_t progress);
|
||||
size_t getProgress() const;
|
||||
void updateIndexingProgress(size_t fileCount, size_t totalFileCount, const FilePath& sourcePath);
|
||||
|
||||
@@ -205,7 +205,7 @@ void QtWindow::moveToCenter()
|
||||
}
|
||||
}
|
||||
|
||||
void QtWindow::updateTitle(QString title)
|
||||
void QtWindow::updateTitle(const QString& title)
|
||||
{
|
||||
if (m_title)
|
||||
{
|
||||
@@ -213,13 +213,13 @@ void QtWindow::updateTitle(QString title)
|
||||
}
|
||||
}
|
||||
|
||||
std::string QtWindow::getTitle() const
|
||||
std::wstring QtWindow::getTitle() const
|
||||
{
|
||||
if (m_title)
|
||||
{
|
||||
return m_title->text().toStdString();
|
||||
return m_title->text().toStdWString();
|
||||
}
|
||||
return "";
|
||||
return L"";
|
||||
}
|
||||
|
||||
void QtWindow::updateSubTitle(QString subTitle)
|
||||
|
||||
@@ -34,8 +34,8 @@ public:
|
||||
|
||||
void moveToCenter();
|
||||
|
||||
void updateTitle(QString title);
|
||||
std::string getTitle() const;
|
||||
void updateTitle(const QString& title);
|
||||
std::wstring getTitle() const;
|
||||
void updateSubTitle(QString subTitle);
|
||||
|
||||
void updateNextButton(QString text);
|
||||
|
||||
@@ -236,7 +236,7 @@ std::vector<FilePath> QtProjectWizzardContentPathSourceMaven::getFilePaths() con
|
||||
});
|
||||
|
||||
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Maven\nGenerating Source Files");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Maven\nGenerating Source Files");
|
||||
const bool success = utility::mavenGenerateSources(mavenPath, mavenProjectRoot);
|
||||
if (!success)
|
||||
{
|
||||
@@ -250,7 +250,7 @@ std::vector<FilePath> QtProjectWizzardContentPathSourceMaven::getFilePaths() con
|
||||
}
|
||||
else
|
||||
{
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Maven\nFetching Source Directories");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Maven\nFetching Source Directories");
|
||||
const std::vector<FilePath> sourceDirectories = utility::mavenGetAllDirectoriesFromEffectivePom(
|
||||
mavenPath,
|
||||
mavenProjectRoot,
|
||||
@@ -382,7 +382,7 @@ std::vector<FilePath> QtProjectWizzardContentPathSourceGradle::getFilePaths() co
|
||||
|
||||
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
||||
{
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Gradle\nFetching Source Directories");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Gradle\nFetching Source Directories");
|
||||
const std::vector<FilePath> sourceDirectories = utility::gradleGetAllSourceDirectories(
|
||||
gradleProjectRoot,
|
||||
settings->getShouldIndexGradleTests()
|
||||
|
||||
@@ -212,7 +212,7 @@ std::vector<FilePath> QtProjectWizzardContentPathsSource::getFilePaths() const
|
||||
});
|
||||
|
||||
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
||||
dialogView->showUnknownProgressDialog("Processing", "Gathering Source Files");
|
||||
dialogView->showUnknownProgressDialog(L"Processing", L"Gathering Source Files");
|
||||
|
||||
FileManager fileManager;
|
||||
fileManager.update(
|
||||
@@ -534,7 +534,7 @@ void QtProjectWizzardContentPathsHeaderSearch::validateIncludesButtonClicked()
|
||||
|
||||
{
|
||||
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
||||
dialogView->showUnknownProgressDialog("Processing", "Gathering Source Files");
|
||||
dialogView->showUnknownProgressDialog(L"Processing", L"Gathering Source Files");
|
||||
ScopedFunctor dialogHider([&dialogView](){
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
});
|
||||
@@ -570,7 +570,7 @@ void QtProjectWizzardContentPathsHeaderSearch::validateIncludesButtonClicked()
|
||||
[&](const float progress)
|
||||
{
|
||||
Application::getInstance()->getDialogView()->showProgressDialog(
|
||||
"Processing", std::to_string(int(progress * sourceFilePaths.size())) + " Files", int(progress * 100.0f)
|
||||
L"Processing", std::to_wstring(int(progress * sourceFilePaths.size())) + L" Files", int(progress * 100.0f)
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -597,7 +597,7 @@ void QtProjectWizzardContentPathsHeaderSearch::finishedSelectDetectIncludesRootP
|
||||
std::vector<FilePath> headerSearchPaths;
|
||||
{
|
||||
dialogView->setParentWindow(m_window);
|
||||
dialogView->showUnknownProgressDialog("Processing", "Gathering Source Files");
|
||||
dialogView->showUnknownProgressDialog(L"Processing", L"Gathering Source Files");
|
||||
ScopedFunctor dialogHider([&dialogView]() {
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
});
|
||||
@@ -631,7 +631,7 @@ void QtProjectWizzardContentPathsHeaderSearch::finishedSelectDetectIncludesRootP
|
||||
[&](const float progress)
|
||||
{
|
||||
Application::getInstance()->getDialogView()->showProgressDialog(
|
||||
"Processing", std::to_string(int(progress * sourceFilePaths.size())) + " Files", int(progress * 100.0f)
|
||||
L"Processing", std::to_wstring(int(progress * sourceFilePaths.size())) + L" Files", int(progress * 100.0f)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -137,7 +137,7 @@ std::vector<FilePath> SourceGroupJava::doGetClassPath() const
|
||||
std::set<FilePath> SourceGroupJava::fetchRootDirectories() const
|
||||
{
|
||||
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Gathering Root\nDirectories");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Gathering Root\nDirectories");
|
||||
|
||||
ScopedFunctor dialogHider([&dialogView](){
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
|
||||
@@ -76,7 +76,7 @@ std::vector<FilePath> SourceGroupJavaGradle::getAllSourcePaths() const
|
||||
if (m_settings->getGradleProjectFilePathExpandedAndAbsolute().exists())
|
||||
{
|
||||
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Gradle\nFetching Source Directories");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Gradle\nFetching Source Directories");
|
||||
|
||||
const FilePath projectRootPath = m_settings->getGradleProjectFilePathExpandedAndAbsolute().getParentDirectory();
|
||||
sourcePaths = utility::gradleGetAllSourceDirectories(projectRootPath, m_settings->getShouldIndexGradleTests());
|
||||
@@ -98,7 +98,7 @@ bool SourceGroupJavaGradle::prepareGradleData()
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
});
|
||||
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Gradle\nExporting Dependencies");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Gradle\nExporting Dependencies");
|
||||
|
||||
bool success = utility::gradleCopyDependencies(
|
||||
projectRootPath,
|
||||
|
||||
@@ -76,7 +76,7 @@ std::vector<FilePath> SourceGroupJavaMaven::getAllSourcePaths() const
|
||||
if (m_settings && m_settings->getMavenProjectFilePathExpandedAndAbsolute().exists())
|
||||
{
|
||||
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Maven\nFetching Source Directories");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Maven\nFetching Source Directories");
|
||||
|
||||
const FilePath mavenPath(ApplicationSettings::getInstance()->getMavenPath());
|
||||
const FilePath projectRootPath = m_settings->getMavenProjectFilePathExpandedAndAbsolute().getParentDirectory();
|
||||
@@ -95,7 +95,7 @@ bool SourceGroupJavaMaven::prepareMavenData()
|
||||
const FilePath projectRootPath = m_settings->getMavenProjectFilePathExpandedAndAbsolute().getParentDirectory();
|
||||
|
||||
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Maven\nGenerating Source Files");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Maven\nGenerating Source Files");
|
||||
|
||||
ScopedFunctor dialogHider([&dialogView](){
|
||||
dialogView->hideUnknownProgressDialog();
|
||||
@@ -115,7 +115,7 @@ bool SourceGroupJavaMaven::prepareMavenData()
|
||||
|
||||
if (success)
|
||||
{
|
||||
dialogView->showUnknownProgressDialog("Preparing Project", "Maven\nExporting Dependencies");
|
||||
dialogView->showUnknownProgressDialog(L"Preparing Project", L"Maven\nExporting Dependencies");
|
||||
|
||||
success = utility::mavenCopyDependencies(
|
||||
mavenPath, projectRootPath, m_settings->getMavenDependenciesDirectoryExpandedAndAbsolute()
|
||||
|
||||
@@ -83,8 +83,9 @@ namespace utility
|
||||
if (utility::isPrefix("[ERROR]", utility::trim(output)))
|
||||
{
|
||||
// TODO: move error handling to caller of this function
|
||||
const std::string dialogMessage =
|
||||
"The following error occurred while executing a Gradle command:\n\n" + utility::replace(output, "\r\n", "\n");
|
||||
const std::wstring dialogMessage =
|
||||
L"The following error occurred while executing a Gradle command:\n\n" +
|
||||
utility::decodeFromUtf8(utility::replace(output, "\r\n", "\n"));
|
||||
MessageStatus(dialogMessage, true, false).dispatch();
|
||||
Application::getInstance()->handleDialog(dialogMessage);
|
||||
|
||||
@@ -111,8 +112,9 @@ namespace utility
|
||||
if (utility::isPrefix("[ERROR]", utility::trim(output)))
|
||||
{
|
||||
// TODO: move error handling to caller of this function
|
||||
const std::string dialogMessage =
|
||||
"The following error occurred while executing a Gradle command:\n\n" + utility::replace(output, "\r\n", "\n");
|
||||
const std::wstring dialogMessage =
|
||||
L"The following error occurred while executing a Gradle command:\n\n" +
|
||||
utility::decodeFromUtf8(utility::replace(output, "\r\n", "\n"));
|
||||
MessageStatus(dialogMessage, true, false).dispatch();
|
||||
Application::getInstance()->handleDialog(dialogMessage);
|
||||
|
||||
|
||||
@@ -90,8 +90,9 @@ namespace utility
|
||||
if (utility::isPrefix("[ERROR]", utility::trim(line)))
|
||||
{
|
||||
// TODO: move error handling to caller of this function
|
||||
const std::string dialogMessage =
|
||||
"The following error occurred while executing a Maven command:\n\n" + utility::replace(line, "\r\n", "\n");
|
||||
const std::wstring dialogMessage =
|
||||
L"The following error occurred while executing a Maven command:\n\n" +
|
||||
utility::decodeFromUtf8(utility::replace(line, "\r\n", "\n"));
|
||||
MessageStatus(dialogMessage, true, false).dispatch();
|
||||
Application::getInstance()->handleDialog(dialogMessage);
|
||||
return false;
|
||||
@@ -114,8 +115,9 @@ namespace utility
|
||||
if (outputAccess->getLineCount() > 0 && utility::isPrefix("Error", utility::trim(outputAccess->getLine(1))))
|
||||
{
|
||||
// TODO: move error handling to caller of this function
|
||||
const std::string dialogMessage =
|
||||
"The following error occurred while executing a Maven command:\n\n" + utility::replace(outputAccess->getText(), "\r\n", "\n");
|
||||
const std::wstring dialogMessage =
|
||||
L"The following error occurred while executing a Maven command:\n\n" +
|
||||
utility::decodeFromUtf8(utility::replace(outputAccess->getText(), "\r\n", "\n"));
|
||||
|
||||
MessageStatus(dialogMessage, true, false).dispatch();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user