#919: Fix bug with quotation marks in constants.

remotes/github/master
Ramón M. Gómez 2019-07-18 12:25:49 +02:00
parent 1b0403f99e
commit 59c8a0f3a7
2 changed files with 8 additions and 8 deletions

View File

@ -174,8 +174,8 @@ void MainWindow::slotLinkHandle(const QUrl &url)
{ {
m_output->clear(); m_output->clear();
} }
if(urlScheme == "COMMAND_CONFIRM" || urlScheme == "COMMAND_CONFIRM_OUTPUT" || if(urlScheme == COMMAND_CONFIRM || urlScheme == COMMAND_CONFIRM_OUTPUT ||
urlScheme == "COMMAND_OUTPUT_CONFIRM" || urlScheme == "COMMAND_WITH_CONFIRMATION") urlScheme == COMMAND_OUTPUT_CONFIRM || urlScheme == COMMAND_WITH_CONFIRMATION)
{ {
// For all command with confirmation links, show a popup box // For all command with confirmation links, show a popup box
QMessageBox msgBox; QMessageBox msgBox;
@ -192,7 +192,7 @@ void MainWindow::slotLinkHandle(const QUrl &url)
if (msgBox.clickedButton() == execButton) if (msgBox.clickedButton() == execButton)
{ {
// For command with confirmation and output link, show an output window to non-admin user // For command with confirmation and output link, show an output window to non-admin user
if((urlScheme == "COMMAND_CONFIRM_OUTPUT" || urlScheme == "COMMAND_OUTPUT_CONFIRM") && if((urlScheme == COMMAND_CONFIRM_OUTPUT || urlScheme == COMMAND_OUTPUT_CONFIRM) &&
(! m_env.contains("ogactiveadmin") || m_env["ogactiveadmin"] != "true")) (! m_env.contains("ogactiveadmin") || m_env["ogactiveadmin"] != "true"))
{ {
int w=MainWindow::width(), h=MainWindow::height(); int w=MainWindow::width(), h=MainWindow::height();
@ -205,10 +205,10 @@ void MainWindow::slotLinkHandle(const QUrl &url)
executeCommand(urlString.remove(0, urlScheme.length()+1)); executeCommand(urlString.remove(0, urlScheme.length()+1));
} }
} }
else if(urlScheme == "COMMAND" || urlScheme == "COMMAND_OUTPUT") else if(urlScheme == COMMAND || urlScheme == COMMAND_OUTPUT)
{ {
// For command with output link, show an output window to non-admin user // For command with output link, show an output window to non-admin user
if(urlScheme == "COMMAND_OUTPUT" && if(urlScheme == COMMAND_OUTPUT &&
(! m_env.contains("ogactiveadmin") || m_env["ogactiveadmin"] != "true")) (! m_env.contains("ogactiveadmin") || m_env["ogactiveadmin"] != "true"))
{ {
int w=MainWindow::width(), h=MainWindow::height(); int w=MainWindow::width(), h=MainWindow::height();
@ -327,9 +327,9 @@ void MainWindow::slotProcessFinished(int code, QProcess::ExitStatus status)
if(status==QProcess::NormalExit) if(status==QProcess::NormalExit)
{ {
if(code > 0) if(code > 0)
{ {
m_output->setTextColor(QColor(Qt::darkRed)); m_output->setTextColor(QColor(Qt::darkRed));
} }
print("\n"+tr(gettext("Fin del proceso. Valor de retorno: "))+QString::number(code)); print("\n"+tr(gettext("Fin del proceso. Valor de retorno: "))+QString::number(code));
} }
else else

View File

@ -45,7 +45,7 @@ class MainWindow : public QMainWindow
void slotWebLoadStarted(); void slotWebLoadStarted();
void slotWebLoadFinished(bool ok); void slotWebLoadFinished(bool ok);
void slotWebLoadProgress(int progress); void slotWebLoadProgress(int progress);
void slotSslErrors(QNetworkReply* reply); void slotSslErrors(QNetworkReply* reply);
// Funciones que manejan cada vez que el proceso hace algo // Funciones que manejan cada vez que el proceso hace algo
void slotProcessStarted(); void slotProcessStarted();