forked from qt-creator/qt-creator
Fix lupdate issues
Change-Id: I7256c8aff5eb77b264b76ba24e79c26ab2924e84 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -79,43 +79,44 @@ static QString modeOption(TerminalMode m)
|
||||
|
||||
static QString msgCommChannelFailed(const QString &error)
|
||||
{
|
||||
return TerminalImpl::tr("Cannot set up communication channel: %1").arg(error);
|
||||
return QtcProcess::tr("Cannot set up communication channel: %1").arg(error);
|
||||
}
|
||||
|
||||
static QString msgPromptToClose()
|
||||
{
|
||||
// Shown in a terminal which might have a different character set on Windows.
|
||||
return TerminalImpl::tr("Press <RETURN> to close this window...");
|
||||
return QtcProcess::tr("Press <RETURN> to close this window...");
|
||||
}
|
||||
|
||||
static QString msgCannotCreateTempFile(const QString &why)
|
||||
{
|
||||
return TerminalImpl::tr("Cannot create temporary file: %1").arg(why);
|
||||
return QtcProcess::tr("Cannot create temporary file: %1").arg(why);
|
||||
}
|
||||
|
||||
static QString msgCannotWriteTempFile()
|
||||
{
|
||||
return TerminalImpl::tr("Cannot write temporary file. Disk full?");
|
||||
return QtcProcess::tr("Cannot write temporary file. Disk full?");
|
||||
}
|
||||
|
||||
static QString msgCannotCreateTempDir(const QString & dir, const QString &why)
|
||||
{
|
||||
return TerminalImpl::tr("Cannot create temporary directory \"%1\": %2").arg(dir, why);
|
||||
return QtcProcess::tr("Cannot create temporary directory \"%1\": %2").arg(dir, why);
|
||||
}
|
||||
|
||||
static QString msgUnexpectedOutput(const QByteArray &what)
|
||||
{
|
||||
return TerminalImpl::tr("Unexpected output from helper program (%1).").arg(QString::fromLatin1(what));
|
||||
return QtcProcess::tr("Unexpected output from helper program (%1).")
|
||||
.arg(QString::fromLatin1(what));
|
||||
}
|
||||
|
||||
static QString msgCannotChangeToWorkDir(const FilePath &dir, const QString &why)
|
||||
{
|
||||
return TerminalImpl::tr("Cannot change to working directory \"%1\": %2").arg(dir.toString(), why);
|
||||
return QtcProcess::tr("Cannot change to working directory \"%1\": %2").arg(dir.toString(), why);
|
||||
}
|
||||
|
||||
static QString msgCannotExecute(const QString & p, const QString &why)
|
||||
{
|
||||
return TerminalImpl::tr("Cannot execute \"%1\": %2").arg(p, why);
|
||||
return QtcProcess::tr("Cannot execute \"%1\": %2").arg(p, why);
|
||||
}
|
||||
|
||||
class TerminalProcessPrivate
|
||||
@@ -310,8 +311,8 @@ void TerminalImpl::start()
|
||||
if (!success) {
|
||||
delete d->m_pid;
|
||||
d->m_pid = nullptr;
|
||||
const QString msg = tr("The process \"%1\" could not be started: %2")
|
||||
.arg(cmdLine, winErrorMessage(GetLastError()));
|
||||
const QString msg = QtcProcess::tr("The process \"%1\" could not be started: %2")
|
||||
.arg(cmdLine, winErrorMessage(GetLastError()));
|
||||
cleanupAfterStartFailure(msg);
|
||||
return;
|
||||
}
|
||||
@@ -335,13 +336,14 @@ void TerminalImpl::start()
|
||||
pcmd = m_setup.m_commandLine.executable().toString();
|
||||
} else {
|
||||
if (perr != ProcessArgs::FoundMeta) {
|
||||
emitError(QProcess::FailedToStart, tr("Quoting error in command."));
|
||||
emitError(QProcess::FailedToStart, QtcProcess::tr("Quoting error in command."));
|
||||
return;
|
||||
}
|
||||
if (m_setup.m_terminalMode == TerminalMode::Debug) {
|
||||
// FIXME: QTCREATORBUG-2809
|
||||
emitError(QProcess::FailedToStart, tr("Debugging complex shell commands in a terminal"
|
||||
" is currently not supported."));
|
||||
emitError(QProcess::FailedToStart,
|
||||
QtcProcess::tr("Debugging complex shell commands in a terminal"
|
||||
" is currently not supported."));
|
||||
return;
|
||||
}
|
||||
pcmd = qEnvironmentVariable("SHELL", "/bin/sh");
|
||||
@@ -358,9 +360,10 @@ void TerminalImpl::start()
|
||||
&m_setup.m_environment,
|
||||
&m_setup.m_workingDirectory);
|
||||
if (qerr != ProcessArgs::SplitOk) {
|
||||
emitError(QProcess::FailedToStart, qerr == ProcessArgs::BadQuoting
|
||||
? tr("Quoting error in terminal command.")
|
||||
: tr("Terminal command may not be a shell command."));
|
||||
emitError(QProcess::FailedToStart,
|
||||
qerr == ProcessArgs::BadQuoting
|
||||
? QtcProcess::tr("Quoting error in terminal command.")
|
||||
: QtcProcess::tr("Terminal command may not be a shell command."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -414,8 +417,10 @@ void TerminalImpl::start()
|
||||
d->m_process.setReaperTimeout(m_setup.m_reaperTimeout);
|
||||
d->m_process.start();
|
||||
if (!d->m_process.waitForStarted()) {
|
||||
const QString msg = tr("Cannot start the terminal emulator \"%1\", change the setting in the "
|
||||
"Environment options.").arg(terminal.command);
|
||||
const QString msg
|
||||
= QtcProcess::tr("Cannot start the terminal emulator \"%1\", change the setting in the "
|
||||
"Environment options.")
|
||||
.arg(terminal.command);
|
||||
cleanupAfterStartFailure(msg);
|
||||
return;
|
||||
}
|
||||
@@ -542,7 +547,8 @@ QString TerminalImpl::stubServerListen()
|
||||
const QString stubServer = stubFifoDir + QLatin1String("/stub-socket");
|
||||
if (!d->m_stubServer.listen(stubServer)) {
|
||||
::rmdir(d->m_stubServerDir.constData());
|
||||
return tr("Cannot create socket \"%1\": %2").arg(stubServer, d->m_stubServer.errorString());
|
||||
return QtcProcess::tr("Cannot create socket \"%1\": %2")
|
||||
.arg(stubServer, d->m_stubServer.errorString());
|
||||
}
|
||||
return QString();
|
||||
#endif
|
||||
@@ -613,8 +619,9 @@ void TerminalImpl::readStubOutput()
|
||||
SYNCHRONIZE | PROCESS_QUERY_INFORMATION | PROCESS_TERMINATE,
|
||||
FALSE, d->m_processId);
|
||||
if (d->m_hInferior == NULL) {
|
||||
emitError(QProcess::FailedToStart, tr("Cannot obtain a handle to the inferior: %1")
|
||||
.arg(winErrorMessage(GetLastError())));
|
||||
emitError(QProcess::FailedToStart,
|
||||
QtcProcess::tr("Cannot obtain a handle to the inferior: %1")
|
||||
.arg(winErrorMessage(GetLastError())));
|
||||
// Uhm, and now what?
|
||||
continue;
|
||||
}
|
||||
@@ -623,8 +630,9 @@ void TerminalImpl::readStubOutput()
|
||||
DWORD chldStatus;
|
||||
|
||||
if (!GetExitCodeProcess(d->m_hInferior, &chldStatus))
|
||||
emitError(QProcess::UnknownError, tr("Cannot obtain exit status from inferior: %1")
|
||||
.arg(winErrorMessage(GetLastError())));
|
||||
emitError(QProcess::UnknownError,
|
||||
QtcProcess::tr("Cannot obtain exit status from inferior: %1")
|
||||
.arg(winErrorMessage(GetLastError())));
|
||||
cleanupInferior();
|
||||
emitFinished(chldStatus, QProcess::NormalExit);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user