diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2019-07-18 12:25:49 +0200 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2019-07-18 12:27:43 +0200 |
commit | 8a6f72ca9381223b02643dfe4361f96e3f4ce984 (patch) | |
tree | 3c163612d1a25d9eee44a0cb5a7810198a1761fa /client/browser | |
parent | b80fba23accc7ca7a2ae65336c4d0e7ecede6a8c (diff) |
#919: Fix bug with quotation marks in constants.
Diffstat (limited to 'client/browser')
-rw-r--r-- | client/browser/src/mainwindow.cpp | 14 | ||||
-rw-r--r-- | client/browser/src/mainwindow.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/client/browser/src/mainwindow.cpp b/client/browser/src/mainwindow.cpp index 6844e2a9..1d89a1a8 100644 --- a/client/browser/src/mainwindow.cpp +++ b/client/browser/src/mainwindow.cpp @@ -174,8 +174,8 @@ void MainWindow::slotLinkHandle(const QUrl &url) { m_output->clear(); } - if(urlScheme == "COMMAND_CONFIRM" || urlScheme == "COMMAND_CONFIRM_OUTPUT" || - urlScheme == "COMMAND_OUTPUT_CONFIRM" || urlScheme == "COMMAND_WITH_CONFIRMATION") + if(urlScheme == COMMAND_CONFIRM || urlScheme == COMMAND_CONFIRM_OUTPUT || + urlScheme == COMMAND_OUTPUT_CONFIRM || urlScheme == COMMAND_WITH_CONFIRMATION) { // For all command with confirmation links, show a popup box QMessageBox msgBox; @@ -192,7 +192,7 @@ void MainWindow::slotLinkHandle(const QUrl &url) if (msgBox.clickedButton() == execButton) { // 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")) { int w=MainWindow::width(), h=MainWindow::height(); @@ -205,10 +205,10 @@ void MainWindow::slotLinkHandle(const QUrl &url) 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 - if(urlScheme == "COMMAND_OUTPUT" && + if(urlScheme == COMMAND_OUTPUT && (! m_env.contains("ogactiveadmin") || m_env["ogactiveadmin"] != "true")) { int w=MainWindow::width(), h=MainWindow::height(); @@ -327,9 +327,9 @@ void MainWindow::slotProcessFinished(int code, QProcess::ExitStatus status) if(status==QProcess::NormalExit) { if(code > 0) - { + { m_output->setTextColor(QColor(Qt::darkRed)); - } + } print("\n"+tr(gettext("Fin del proceso. Valor de retorno: "))+QString::number(code)); } else diff --git a/client/browser/src/mainwindow.h b/client/browser/src/mainwindow.h index ed746a70..664d2f00 100644 --- a/client/browser/src/mainwindow.h +++ b/client/browser/src/mainwindow.h @@ -45,7 +45,7 @@ class MainWindow : public QMainWindow void slotWebLoadStarted(); void slotWebLoadFinished(bool ok); void slotWebLoadProgress(int progress); - void slotSslErrors(QNetworkReply* reply); + void slotSslErrors(QNetworkReply* reply); // Funciones que manejan cada vez que el proceso hace algo void slotProcessStarted(); |