mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25:36 +08:00
Ref T103, verify important files/directories
* utility function in CDirectoryUtils * deployed in main/application
This commit is contained in:
committed by
Mathew Sutcliffe
parent
d25be35868
commit
07b096b398
@@ -263,9 +263,23 @@ namespace BlackGui
|
||||
bool CGuiApplication::cmdLineErrorMessage(const QString &errorMessage, bool retry) const
|
||||
{
|
||||
const QString helpText(beautifyHelpMessage(this->m_parser.helpText()));
|
||||
constexpr int MaxLength = 60;
|
||||
|
||||
QString htmlMsg;
|
||||
if (errorMessage.length() > MaxLength)
|
||||
{
|
||||
htmlMsg = "<html><head/><body><h4>" + errorMessage.left(MaxLength) + "..." + "</h4>" +
|
||||
"Details: " + errorMessage + "<br><br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmlMsg = "<html><head/><body><h4>" + errorMessage + "</h4>";
|
||||
}
|
||||
htmlMsg += helpText + "</body></html>";
|
||||
|
||||
const int r = QMessageBox::warning(nullptr,
|
||||
QGuiApplication::applicationDisplayName(),
|
||||
"<html><head/><body><h2>" + errorMessage + "</h2><br>" + helpText + "</body></html>", QMessageBox::Abort, retry ? QMessageBox::Retry : QMessageBox::NoButton);
|
||||
htmlMsg, QMessageBox::Abort, retry ? QMessageBox::Retry : QMessageBox::NoButton);
|
||||
return (r == QMessageBox::Retry);
|
||||
}
|
||||
|
||||
@@ -279,7 +293,7 @@ namespace BlackGui
|
||||
const QString msgsHtml = msgs.toHtml(msgs.size() > 1 ? propertiesMulti : propertiesSingle);
|
||||
const int r = QMessageBox::critical(nullptr,
|
||||
QGuiApplication::applicationDisplayName(),
|
||||
"<html><head/><body>" + msgsHtml + "<br><br>" + helpText + "</body></html>", QMessageBox::Abort, retry ? QMessageBox::Retry : QMessageBox::NoButton);
|
||||
"<html><head><body>" + msgsHtml + "<br><br>" + helpText + "</body></html>", QMessageBox::Abort, retry ? QMessageBox::Retry : QMessageBox::NoButton);
|
||||
return (r == QMessageBox::Retry);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user