forked from qt-creator/qt-creator
QDS: Check terms in Assert Exporter Plugin
Remove "QML" or replace it with something else. Change-Id: I897e0c217fff705f3f5e045e532e2114f85d83bc Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Export QML</string>
|
<string>Export Components</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
@@ -158,7 +158,7 @@ void AssetExporter::beginExport()
|
|||||||
void AssetExporter::cancel()
|
void AssetExporter::cancel()
|
||||||
{
|
{
|
||||||
if (!m_cancelled) {
|
if (!m_cancelled) {
|
||||||
ExportNotification::addInfo(tr("Cancelling export."));
|
ExportNotification::addInfo(tr("Canceling export."));
|
||||||
m_assetDumper.reset();
|
m_assetDumper.reset();
|
||||||
m_cancelled = true;
|
m_cancelled = true;
|
||||||
}
|
}
|
||||||
@@ -227,13 +227,13 @@ void AssetExporter::notifyLoadError(AssetExporterView::LoadState state)
|
|||||||
errorStr = tr("Loading file is taking too long.");
|
errorStr = tr("Loading file is taking too long.");
|
||||||
break;
|
break;
|
||||||
case AssetExporterView::LoadState::QmlErrorState:
|
case AssetExporterView::LoadState::QmlErrorState:
|
||||||
errorStr = tr("Cannot parse. QML file has errors.");
|
errorStr = tr("Cannot parse. The file contains coding errors.");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qCDebug(loggerError) << "QML load error:" << errorStr;
|
qCDebug(loggerError) << "QML load error:" << errorStr;
|
||||||
ExportNotification::addError(tr("Loading QML failed. %1").arg(errorStr));
|
ExportNotification::addError(tr("Loading components failed. %1").arg(errorStr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssetExporter::notifyProgress(double value) const
|
void AssetExporter::notifyProgress(double value) const
|
||||||
@@ -250,13 +250,13 @@ void AssetExporter::onQmlFileLoaded()
|
|||||||
->documentManager()
|
->documentManager()
|
||||||
.currentDesignDocument();
|
.currentDesignDocument();
|
||||||
if (designDocument->hasQmlParseErrors()) {
|
if (designDocument->hasQmlParseErrors()) {
|
||||||
ExportNotification::addError(tr("Cannot export QML. Document \"%1\" have parsing errors.")
|
ExportNotification::addError(tr("Cannot export component. Document \"%1\" has parsing errors.")
|
||||||
.arg(designDocument->displayName()));
|
.arg(designDocument->displayName()));
|
||||||
} else {
|
} else {
|
||||||
exportComponent(m_view->rootModelNode());
|
exportComponent(m_view->rootModelNode());
|
||||||
QString error;
|
QString error;
|
||||||
if (!m_view->saveQmlFile(&error)) {
|
if (!m_view->saveQmlFile(&error)) {
|
||||||
ExportNotification::addError(tr("Error saving QML file. %1")
|
ExportNotification::addError(tr("Error saving component file. %1")
|
||||||
.arg(error.isEmpty()? tr("Unknown") : error));
|
.arg(error.isEmpty()? tr("Unknown") : error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -106,8 +106,8 @@ void AssetExporterPlugin::onExport()
|
|||||||
|
|
||||||
void AssetExporterPlugin::addActions()
|
void AssetExporterPlugin::addActions()
|
||||||
{
|
{
|
||||||
auto exportAction = new QAction(tr("Export QML"));
|
auto exportAction = new QAction(tr("Export Components"));
|
||||||
exportAction->setToolTip(tr("Export QML code of the current project."));
|
exportAction->setToolTip(tr("Export components in the current project."));
|
||||||
connect(exportAction, &QAction::triggered, this, &AssetExporterPlugin::onExport);
|
connect(exportAction, &QAction::triggered, this, &AssetExporterPlugin::onExport);
|
||||||
Core::Command *cmd = Core::ActionManager::registerAction(exportAction, Constants::EXPORT_QML);
|
Core::Command *cmd = Core::ActionManager::registerAction(exportAction, Constants::EXPORT_QML);
|
||||||
|
|
||||||
|
@@ -70,10 +70,10 @@ FilePathModel::~FilePathModel()
|
|||||||
{
|
{
|
||||||
if (m_preprocessWatcher && !m_preprocessWatcher->isCanceled() &&
|
if (m_preprocessWatcher && !m_preprocessWatcher->isCanceled() &&
|
||||||
!m_preprocessWatcher->isFinished()) {
|
!m_preprocessWatcher->isFinished()) {
|
||||||
ExportNotification::addInfo(tr("Canceling QML files preparation."));
|
ExportNotification::addInfo(tr("Canceling file preparation."));
|
||||||
m_preprocessWatcher->cancel();
|
m_preprocessWatcher->cancel();
|
||||||
m_preprocessWatcher->waitForFinished();
|
m_preprocessWatcher->waitForFinished();
|
||||||
qCDebug(loggerInfo) << "Canceling QML files preparation done.";
|
qCDebug(loggerInfo) << "Canceled file preparation.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user