summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-07-18 12:25:49 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-07-18 12:25:49 +0200
commitfb890228380aa65298277bbaa2720d8e68485cfa (patch)
tree8b03f595e52d074e77dd7839eb0bae13dd2c6693
parentf08c09013b95866dfc22ad6e39592899ed18c50b (diff)
#919: Fix bug with quotation marks in constants.
-rw-r--r--client/browser/src/mainwindow.cpp14
-rw-r--r--client/browser/src/mainwindow.h2
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();