]> git.lyx.org Git - lyx.git/blobdiff - src/support/Systemcall.cpp
Add `override` specifiers to improve code maintainability
[lyx.git] / src / support / Systemcall.cpp
index d0ff9ae993f1111bad555976db32d16d992f3d24..815223d378bb9e843c1da22c88070d63eecee316 100644 (file)
@@ -59,22 +59,22 @@ class ProgressDummy : public ProgressInterface
 public:
        ProgressDummy() {}
 
-       void processStarted(QString const &) {}
-       void processFinished(QString const &) {}
-       void appendMessage(QString const &) {}
-       void appendError(QString const &) {}
-       void clearMessages() {}
-       void lyxerrFlush() {}
-
-       void lyxerrConnect() {}
-       void lyxerrDisconnect() {}
-
-       void warning(QString const &, QString const &) {}
-       void toggleWarning(QString const &, QString const &, QString const &) {}
-       void error(QString const &, QString const &, QString const &) {}
-       void information(QString const &, QString const &) {}
+       void processStarted(QString const &) override {}
+       void processFinished(QString const &) override {}
+       void appendMessage(QString const &) override {}
+       void appendError(QString const &) override {}
+       void clearMessages() override {}
+       void lyxerrFlush() override {}
+
+       void lyxerrConnect() override {}
+       void lyxerrDisconnect() override {}
+
+       void warning(QString const &, QString const &) override {}
+       void toggleWarning(QString const &, QString const &, QString const &) override {}
+       void error(QString const &, QString const &, QString const &) override {}
+       void information(QString const &, QString const &) override {}
        int prompt(docstring const &, docstring const &, int default_but, int,
-                  docstring const &, docstring const &) { return default_but; }
+                  docstring const &, docstring const &) override { return default_but; }
 };
 
 
@@ -440,7 +440,7 @@ bool SystemcallPrivate::waitWhile(State waitwhile, bool process_events, int time
                        while (!timedout) {
                                if (process_->waitForFinished(timeout))
                                        return true;
-                               bool stop = queryStopCommand(cmd_);
+                               bool const stop = queryStopCommand(cmd_);
                                // The command may have finished in the meantime
                                if (process_->state() == QProcess::NotRunning)
                                        return true;
@@ -475,7 +475,7 @@ bool SystemcallPrivate::waitWhile(State waitwhile, bool process_events, int time
                        return false;
 
                if (timer.elapsed() > timeout) {
-                       bool stop = queryStopCommand(cmd_);
+                       bool const stop = queryStopCommand(cmd_);
                        // The command may have finished in the meantime
                        if (process_->state() == QProcess::NotRunning)
                                break;