forked from qt-creator/qt-creator
iOS: Tr::tr
Change-Id: I547af218546927622414999e5b9019ab62916e7e Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -3,11 +3,12 @@
|
||||
|
||||
#include "simulatoroperationdialog.h"
|
||||
|
||||
#include "iostr.h"
|
||||
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/outputformatter.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFutureWatcher>
|
||||
#include <QLoggingCategory>
|
||||
@@ -15,19 +16,17 @@
|
||||
#include <QProgressBar>
|
||||
#include <QPushButton>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(iosCommon, "qtc.ios.common", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Ios::Internal {
|
||||
|
||||
static Q_LOGGING_CATEGORY(iosCommon, "qtc.ios.common", QtWarningMsg)
|
||||
|
||||
SimulatorOperationDialog::SimulatorOperationDialog(QWidget *parent) :
|
||||
// TODO: Maximize buttong only because of QTBUG-41932
|
||||
QDialog(parent,Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMaximizeButtonHint)
|
||||
{
|
||||
resize(580, 320);
|
||||
setModal(true);
|
||||
setWindowTitle(tr("Simulator Operation Status"));
|
||||
setWindowTitle(Tr::tr("Simulator Operation Status"));
|
||||
|
||||
auto messageEdit = new QPlainTextEdit;
|
||||
messageEdit->setReadOnly(true);
|
||||
@@ -100,13 +99,13 @@ void SimulatorOperationDialog::addMessage(const SimulatorInfo &siminfo,
|
||||
{
|
||||
QTC_CHECK(siminfo.identifier == response.simUdid);
|
||||
if (response.success) {
|
||||
addMessage(tr("%1, %2\nOperation %3 completed successfully.").arg(siminfo.name)
|
||||
addMessage(Tr::tr("%1, %2\nOperation %3 completed successfully.").arg(siminfo.name)
|
||||
.arg(siminfo.runtimeName).arg(context), Utils::StdOutFormat);
|
||||
} else {
|
||||
QString erroMsg = response.commandOutput.trimmed();
|
||||
QString message = tr("%1, %2\nOperation %3 failed.\nUDID: %4\nError: %5").arg(siminfo.name)
|
||||
QString message = Tr::tr("%1, %2\nOperation %3 failed.\nUDID: %4\nError: %5").arg(siminfo.name)
|
||||
.arg(siminfo.runtimeName).arg(context).arg(siminfo.identifier)
|
||||
.arg(erroMsg.isEmpty() ? tr("Unknown") : erroMsg);
|
||||
.arg(erroMsg.isEmpty() ? Tr::tr("Unknown") : erroMsg);
|
||||
addMessage(message, Utils::StdErrFormat);
|
||||
qCDebug(iosCommon) << message;
|
||||
}
|
||||
@@ -118,7 +117,7 @@ void SimulatorOperationDialog::updateInputs()
|
||||
m_buttonBox->button(QDialogButtonBox::Cancel)->setEnabled(!enableOk);
|
||||
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(enableOk);
|
||||
if (enableOk) {
|
||||
addMessage(tr("Done."), Utils::NormalMessageFormat);
|
||||
addMessage(Tr::tr("Done."), Utils::NormalMessageFormat);
|
||||
m_progressBar->setMaximum(1); // Stop progress bar.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user