forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.15'
Conflicts: src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp src/plugins/debugger/gdb/gdboptionspage.cpp Change-Id: I4149e860b6842ea63bff3a7eb9632b7a6c2919d8
This commit is contained in:
@@ -564,7 +564,7 @@ void AndroidDeployQtStep::stdError(const QString &line)
|
||||
if (newOutput.startsWith("warning", Qt::CaseInsensitive)
|
||||
|| newOutput.startsWith("note", Qt::CaseInsensitive))
|
||||
TaskHub::addTask(DeploymentTask(Task::Warning, newOutput));
|
||||
else
|
||||
else if (newOutput != QLatin1String("All files should be loaded. Notifying the device."))
|
||||
TaskHub::addTask(DeploymentTask(Task::Error, newOutput));
|
||||
}
|
||||
|
||||
|
||||
@@ -185,8 +185,8 @@ void TestSettingsWidget::onFrameworkItemChanged()
|
||||
} else {
|
||||
m_ui.frameworksWarn->setText(tr("Mixing test frameworks and test tools."));
|
||||
m_ui.frameworksWarn->setToolTip(tr("Mixing test frameworks and test tools can lead "
|
||||
"to duplicating run information when using e.g. "
|
||||
"'Run All Tests'."));
|
||||
"to duplicating run information when using "
|
||||
"\"Run All Tests\", for example."));
|
||||
}
|
||||
}
|
||||
m_ui.frameworksWarn->setVisible(!atLeastOneEnabled
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace Internal {
|
||||
|
||||
class DiagnosticMark : public TextEditor::TextMark
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(ClangTools::Internal::DiagnosticMark)
|
||||
public:
|
||||
explicit DiagnosticMark(const Diagnostic &diagnostic);
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class ParserPrivate
|
||||
{
|
||||
public:
|
||||
//! Get document from documentList
|
||||
CPlusPlus::Document::Ptr document(const Utils::FilePath &fileName) const;
|
||||
CPlusPlus::Document::Ptr document(const FilePath &fileName) const;
|
||||
|
||||
struct DocumentCache {
|
||||
unsigned treeRevision = 0;
|
||||
@@ -284,7 +284,7 @@ void Parser::updateDocuments(const QSet<FilePath> &documentPaths)
|
||||
updateDocumentsFromSnapshot(documentPaths, CppTools::CppModelManager::instance()->snapshot());
|
||||
}
|
||||
|
||||
void Parser::updateDocumentsFromSnapshot(const QSet<Utils::FilePath> &documentPaths,
|
||||
void Parser::updateDocumentsFromSnapshot(const QSet<FilePath> &documentPaths,
|
||||
const CPlusPlus::Snapshot &snapshot)
|
||||
{
|
||||
for (const FilePath &documentPath : documentPaths) {
|
||||
|
||||
@@ -76,16 +76,6 @@ BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc)
|
||||
buildDirectory = bc->buildDirectory();
|
||||
|
||||
cmakeBuildType = bc->cmakeBuildType();
|
||||
if (cmakeBuildType.isEmpty()) {
|
||||
// The empty build type might be just a case of loading of an existing project
|
||||
// that doesn't have the "CMake.Build.Type" aspect saved
|
||||
const CMakeConfig config = CMakeConfigItem::itemsFromArguments(initialCMakeArguments);
|
||||
if (!config.isEmpty()) {
|
||||
cmakeBuildType = QString::fromLatin1(CMakeConfigItem::valueOf("CMAKE_BUILD_TYPE", config));
|
||||
if (!cmakeBuildType.isEmpty())
|
||||
bc->setCMakeBuildType(cmakeBuildType);
|
||||
}
|
||||
}
|
||||
|
||||
environment = bc->environment();
|
||||
// Disable distributed building for configuration runs. CMake does not do those in parallel,
|
||||
|
||||
@@ -178,6 +178,16 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
m_configModel->flush(); // clear out config cache...;
|
||||
});
|
||||
|
||||
auto buildTypeAspect = bc->aspect<BuildTypeAspect>();
|
||||
connect(buildTypeAspect, &BaseAspect::changed, this, [this, buildTypeAspect]() {
|
||||
if (!m_buildConfiguration->isMultiConfig()) {
|
||||
CMakeConfig config;
|
||||
config << CMakeConfigItem("CMAKE_BUILD_TYPE", buildTypeAspect->value().toUtf8());
|
||||
|
||||
m_configModel->setBatchEditConfiguration(config);
|
||||
}
|
||||
});
|
||||
|
||||
auto qmlDebugAspect = bc->aspect<QtSupport::QmlDebuggingAspect>();
|
||||
connect(qmlDebugAspect, &QtSupport::QmlDebuggingAspect::changed, this, [this]() {
|
||||
updateButtonState();
|
||||
@@ -298,6 +308,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
Form {
|
||||
buildDirAspect, Break(),
|
||||
bc->aspect<InitialCMakeArgumentsAspect>(), Break(),
|
||||
bc->aspect<BuildTypeAspect>(), Break(),
|
||||
qmlDebugAspect
|
||||
},
|
||||
Space(10),
|
||||
@@ -740,7 +751,7 @@ static QStringList defaultInitialCMakeArguments(const Kit *k, const QString buil
|
||||
|
||||
// CMAKE_BUILD_TYPE:
|
||||
if (!buildType.isEmpty() && !CMakeGeneratorKitAspect::isMultiConfigGenerator(k)) {
|
||||
initialArgs.append(QString::fromLatin1("-DCMAKE_BUILD_TYPE:String=%1").arg(buildType));
|
||||
initialArgs.append(QString::fromLatin1("-DCMAKE_BUILD_TYPE:STRING=%1").arg(buildType));
|
||||
}
|
||||
|
||||
Internal::CMakeSpecificSettings *settings
|
||||
@@ -1246,12 +1257,56 @@ FilePath CMakeBuildConfiguration::sourceDirectory() const
|
||||
|
||||
QString CMakeBuildConfiguration::cmakeBuildType() const
|
||||
{
|
||||
return aspect<BuildTypeAspect>()->value();
|
||||
if (!isMultiConfig()) {
|
||||
auto configChanges = configurationChanges();
|
||||
auto it = std::find_if(configChanges.begin(), configChanges.end(),
|
||||
[](const CMakeConfigItem &item) { return item.key == "CMAKE_BUILD_TYPE";});
|
||||
if (it != configChanges.end())
|
||||
const_cast<CMakeBuildConfiguration*>(this)
|
||||
->setCMakeBuildType(QString::fromUtf8(it->value));
|
||||
}
|
||||
|
||||
QString cmakeBuildType = aspect<BuildTypeAspect>()->value();
|
||||
|
||||
const Utils::FilePath cmakeCacheTxt = buildDirectory().pathAppended("CMakeCache.txt");
|
||||
const bool hasCMakeCache = QFile::exists(cmakeCacheTxt.toString());
|
||||
CMakeConfig config;
|
||||
|
||||
if (cmakeBuildType == "Unknown") {
|
||||
// The "Unknown" type is the case of loading of an existing project
|
||||
// that doesn't have the "CMake.Build.Type" aspect saved
|
||||
if (hasCMakeCache) {
|
||||
QString errorMessage;
|
||||
config = CMakeBuildSystem::parseCMakeCacheDotTxt(cmakeCacheTxt, &errorMessage);
|
||||
} else {
|
||||
config = CMakeConfigItem::itemsFromArguments(initialCMakeArguments());
|
||||
}
|
||||
} else if (!hasCMakeCache) {
|
||||
config = CMakeConfigItem::itemsFromArguments(initialCMakeArguments());
|
||||
}
|
||||
|
||||
if (!config.isEmpty()) {
|
||||
cmakeBuildType = QString::fromUtf8(CMakeConfigItem::valueOf("CMAKE_BUILD_TYPE", config));
|
||||
const_cast<CMakeBuildConfiguration*>(this)
|
||||
->setCMakeBuildType(cmakeBuildType);
|
||||
}
|
||||
|
||||
return cmakeBuildType;
|
||||
}
|
||||
|
||||
void CMakeBuildConfiguration::setCMakeBuildType(const QString &cmakeBuildType)
|
||||
void CMakeBuildConfiguration::setCMakeBuildType(const QString &cmakeBuildType, bool quiet)
|
||||
{
|
||||
aspect<BuildTypeAspect>()->setValue(cmakeBuildType);
|
||||
if (quiet) {
|
||||
aspect<BuildTypeAspect>()->setValueQuietly(cmakeBuildType);
|
||||
aspect<BuildTypeAspect>()->update();
|
||||
} else {
|
||||
aspect<BuildTypeAspect>()->setValue(cmakeBuildType);
|
||||
}
|
||||
}
|
||||
|
||||
bool CMakeBuildConfiguration::isMultiConfig() const
|
||||
{
|
||||
return m_buildSystem->isMultiConfig();
|
||||
}
|
||||
|
||||
namespace Internal {
|
||||
@@ -1282,6 +1337,9 @@ SourceDirectoryAspect::SourceDirectoryAspect()
|
||||
BuildTypeAspect::BuildTypeAspect()
|
||||
{
|
||||
setSettingsKey("CMake.Build.Type");
|
||||
setLabelText(tr("Build type:"));
|
||||
setDisplayStyle(LineEditDisplay);
|
||||
setDefaultValue("Unknown");
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -75,7 +75,9 @@ public:
|
||||
Utils::FilePath sourceDirectory() const;
|
||||
|
||||
QString cmakeBuildType() const;
|
||||
void setCMakeBuildType(const QString &cmakeBuildType);
|
||||
void setCMakeBuildType(const QString &cmakeBuildType, bool quiet = false);
|
||||
|
||||
bool isMultiConfig() const;
|
||||
|
||||
signals:
|
||||
void errorOccurred(const QString &message);
|
||||
@@ -163,6 +165,7 @@ class BuildTypeAspect final : public Utils::StringAspect
|
||||
|
||||
public:
|
||||
BuildTypeAspect();
|
||||
using Utils::StringAspect::update;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -846,12 +846,20 @@ void CMakeBuildSystem::wireUpConnections()
|
||||
// No CMakeCache? Run with initial arguments!
|
||||
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to build directory change";
|
||||
const BuildDirParameters parameters(cmakeBuildConfiguration());
|
||||
const bool hasCMakeCache = QFile::exists(
|
||||
(parameters.buildDirectory / "CMakeCache.txt").toString());
|
||||
const FilePath cmakeCacheTxt = parameters.buildDirectory.pathAppended("CMakeCache.txt");
|
||||
const bool hasCMakeCache = QFile::exists(cmakeCacheTxt.toString());
|
||||
const auto options = ReparseParameters(
|
||||
hasCMakeCache
|
||||
? REPARSE_DEFAULT
|
||||
: (REPARSE_FORCE_INITIAL_CONFIGURATION | REPARSE_FORCE_CMAKE_RUN));
|
||||
if (hasCMakeCache) {
|
||||
QString errorMessage;
|
||||
const CMakeConfig config = CMakeBuildSystem::parseCMakeCacheDotTxt(cmakeCacheTxt, &errorMessage);
|
||||
if (!config.isEmpty() && errorMessage.isEmpty()) {
|
||||
QByteArray cmakeBuildTypeName = CMakeConfigItem::valueOf("CMAKE_BUILD_TYPE", config);
|
||||
cmakeBuildConfiguration()->setCMakeBuildType(QString::fromUtf8(cmakeBuildTypeName), true);
|
||||
}
|
||||
}
|
||||
setParametersAndRequestParse(BuildDirParameters(cmakeBuildConfiguration()), options);
|
||||
});
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@ void CorePlugin::warnAboutCrashReporing()
|
||||
? tr("%1 collects crash reports for the sole purpose of fixing bugs. "
|
||||
"To disable this feature go to %2.")
|
||||
: tr("%1 can collect crash reports for the sole purpose of fixing bugs. "
|
||||
"to enable this feature go to %2.");
|
||||
"To enable this feature go to %2.");
|
||||
|
||||
if (Utils::HostOsInfo::isMacHost()) {
|
||||
warnStr = warnStr.arg(Core::Constants::IDE_DISPLAY_NAME)
|
||||
|
||||
@@ -188,7 +188,7 @@ void FileUtils::removeFiles(const FilePaths &filePaths, bool deleteFromFS)
|
||||
continue;
|
||||
if (!file.remove()) {
|
||||
MessageManager::writeDisrupting(
|
||||
QCoreApplication::translate("Core::Internal", "Failed to remove file \"%1\")1.")
|
||||
QCoreApplication::translate("Core::Internal", "Failed to remove file \"%1\".")
|
||||
.arg(fp.toUserOutput()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearCrashReportsButton">
|
||||
<property name="text">
|
||||
<string>Clear local crash reports</string>
|
||||
<string>Clear Local Crash Reports</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -376,7 +376,7 @@ FilePaths VcsManager::promptToDelete(IVersionControl *vc, const FilePaths &fileP
|
||||
return fp.toUserOutput();
|
||||
}).join("</li><li>") + "</li></ul>";
|
||||
const QString title = tr("Version Control");
|
||||
const QString msg = tr("Remove the following files from from the version control system (%2)?"
|
||||
const QString msg = tr("Remove the following files from the version control system (%2)?"
|
||||
"%1Note: This might remove the local file.").arg(fileListForUi, vc->displayName());
|
||||
const QMessageBox::StandardButton button =
|
||||
QMessageBox::question(ICore::dialogParent(), title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||
|
||||
@@ -4556,7 +4556,7 @@ public:
|
||||
});
|
||||
|
||||
const auto mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->addWidget(new QLabel(tr("Please select the getters and/or setters "
|
||||
mainLayout->addWidget(new QLabel(tr("Select the getters and setters "
|
||||
"to be created.")));
|
||||
for (auto checkBox : checkBoxes) {
|
||||
if (checkBox)
|
||||
|
||||
@@ -126,7 +126,7 @@ bool CppQuickFixProjectsSettings::useCustomSettings()
|
||||
} else if (m_settingsFile != defaultLocation) {
|
||||
QMessageBox msgBox(Core::ICore::dialogParent());
|
||||
msgBox.setText(tr("Quick Fix settings are saved in a file. Existing settings file "
|
||||
"'%1' found. Should this file be used or a "
|
||||
"\"%1\" found. Should this file be used or a "
|
||||
"new one be created?")
|
||||
.arg(m_settingsFile.toString()));
|
||||
QPushButton *cancel = msgBox.addButton(QMessageBox::Cancel);
|
||||
|
||||
@@ -427,8 +427,8 @@ DebuggerSettings::DebuggerSettings()
|
||||
|
||||
usePseudoTracepoints.setSettingsKey(debugModeGroup, "UsePseudoTracepoints");
|
||||
usePseudoTracepoints.setLabelText(/*GdbOptionsPage::*/tr("Use pseudo message tracepoints"));
|
||||
usePseudoTracepoints.setToolTip(/*GdbOptionsPage::*/tr(
|
||||
"Uses python to extend the ordinary GDB breakpoint class."));
|
||||
usePseudoTracepoints.setToolTip(
|
||||
/*GdbOptionsPage::*/ tr("Uses Python to extend the ordinary GDB breakpoint class."));
|
||||
usePseudoTracepoints.setDefaultValue(true);
|
||||
|
||||
useToolTipsInMainEditor.setSettingsKey(debugModeGroup, "UseToolTips");
|
||||
|
||||
@@ -643,7 +643,7 @@ QVariant RegisterGroup::data(int column, int role) const
|
||||
break;
|
||||
|
||||
case Qt::ToolTipRole:
|
||||
return RegisterHandler::tr("Registers group");
|
||||
return RegisterHandler::tr("A group of registers.");
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
#include <texteditor/textstyles.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QTextEdit>
|
||||
|
||||
using namespace LanguageServerProtocol;
|
||||
@@ -122,8 +125,19 @@ void DiagnosticManager::showDiagnostics(const DocumentUri &uri)
|
||||
const VersionedDiagnostics &versionedDiagnostics = m_diagnostics.value(uri);
|
||||
const int docRevision = doc->document()->revision();
|
||||
if (versionedDiagnostics.version.value_or(docRevision) == docRevision) {
|
||||
const auto icon = QIcon::fromTheme("edit-copy", Utils::Icons::COPY.icon());
|
||||
const QString tooltip = tr("Copy to Clipboard");
|
||||
for (const Diagnostic &diagnostic : versionedDiagnostics.diagnostics) {
|
||||
doc->addMark(new TextMark(filePath, diagnostic, m_clientId));
|
||||
QAction *action = new QAction();
|
||||
action->setIcon(icon);
|
||||
action->setToolTip(tooltip);
|
||||
QObject::connect(action, &QAction::triggered, [text = diagnostic.message()]() {
|
||||
QApplication::clipboard()->setText(text);
|
||||
});
|
||||
auto mark = new TextMark(filePath, diagnostic, m_clientId);
|
||||
mark->setActions({action});
|
||||
|
||||
doc->addMark(mark);
|
||||
extraSelections << toDiagnosticsSelections(diagnostic, doc->document());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace LanguageClient {
|
||||
|
||||
class DiagnosticManager
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(LanguageClient::DiagnosticManager)
|
||||
public:
|
||||
explicit DiagnosticManager(const Utils::Id &clientId);
|
||||
~DiagnosticManager();
|
||||
|
||||
@@ -84,10 +84,10 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useIndenter">
|
||||
<property name="toolTip">
|
||||
<string>If available, use a different margin. For example, the ColumnLimit from the clang-format plugin.</string>
|
||||
<string>If available, use a different margin. For example, the ColumnLimit from the ClangFormat plugin.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use context specific margin</string>
|
||||
<string>Use context-specific margin</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Export QML</string>
|
||||
<string>Export Components</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
|
||||
@@ -158,7 +158,7 @@ void AssetExporter::beginExport()
|
||||
void AssetExporter::cancel()
|
||||
{
|
||||
if (!m_cancelled) {
|
||||
ExportNotification::addInfo(tr("Cancelling export."));
|
||||
ExportNotification::addInfo(tr("Canceling export."));
|
||||
m_assetDumper.reset();
|
||||
m_cancelled = true;
|
||||
}
|
||||
@@ -227,13 +227,13 @@ void AssetExporter::notifyLoadError(AssetExporterView::LoadState state)
|
||||
errorStr = tr("Loading file is taking too long.");
|
||||
break;
|
||||
case AssetExporterView::LoadState::QmlErrorState:
|
||||
errorStr = tr("Cannot parse. QML file has errors.");
|
||||
errorStr = tr("Cannot parse. The file contains coding errors.");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
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
|
||||
@@ -250,13 +250,13 @@ void AssetExporter::onQmlFileLoaded()
|
||||
->documentManager()
|
||||
.currentDesignDocument();
|
||||
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()));
|
||||
} else {
|
||||
exportComponent(m_view->rootModelNode());
|
||||
QString 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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,8 +106,8 @@ void AssetExporterPlugin::onExport()
|
||||
|
||||
void AssetExporterPlugin::addActions()
|
||||
{
|
||||
auto exportAction = new QAction(tr("Export QML"));
|
||||
exportAction->setToolTip(tr("Export QML code of the current project."));
|
||||
auto exportAction = new QAction(tr("Export Components"));
|
||||
exportAction->setToolTip(tr("Export components in the current project."));
|
||||
connect(exportAction, &QAction::triggered, this, &AssetExporterPlugin::onExport);
|
||||
Core::Command *cmd = Core::ActionManager::registerAction(exportAction, Constants::EXPORT_QML);
|
||||
|
||||
|
||||
@@ -70,10 +70,10 @@ FilePathModel::~FilePathModel()
|
||||
{
|
||||
if (m_preprocessWatcher && !m_preprocessWatcher->isCanceled() &&
|
||||
!m_preprocessWatcher->isFinished()) {
|
||||
ExportNotification::addInfo(tr("Canceling QML files preparation."));
|
||||
ExportNotification::addInfo(tr("Canceling file preparation."));
|
||||
m_preprocessWatcher->cancel();
|
||||
m_preprocessWatcher->waitForFinished();
|
||||
qCDebug(loggerInfo) << "Canceling QML files preparation done.";
|
||||
qCDebug(loggerInfo) << "Canceled file preparation.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="targetIdLabel">
|
||||
<property name="text">
|
||||
<string>Selected item</string>
|
||||
<string>Selected component</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -156,7 +156,7 @@ const char addToGroupItemDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMe
|
||||
const char removeGroupItemDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu",
|
||||
"Remove GroupItem");
|
||||
|
||||
const char addItemToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add Item");
|
||||
const char addItemToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add Component");
|
||||
const char addTabBarToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add Tab Bar");
|
||||
const char increaseIndexToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Increase Index");
|
||||
const char decreaseIndexToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Decrease Index");
|
||||
@@ -171,22 +171,22 @@ const char layoutFillHeightDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContext
|
||||
const char flowAssignEffectDisplayName[] = "Assign FlowEffect ";
|
||||
const char flowAssignCustomEffectDisplayName[] = "Assign Custom FlowEffect ";
|
||||
|
||||
const char raiseToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Raise selected item.");
|
||||
const char lowerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Lower selected item.");
|
||||
const char raiseToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Raise selected component.");
|
||||
const char lowerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Lower selected component.");
|
||||
|
||||
const char resetSizeToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset size and use implicit size.");
|
||||
const char resetPositionTooltip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset position and use implicit position.");
|
||||
|
||||
const char anchorsFillToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fill selected item to parent.");
|
||||
const char anchorsResetToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset anchors for selected item.");
|
||||
const char anchorsFillToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fill selected component to parent.");
|
||||
const char anchorsResetToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Reset anchors for selected component.");
|
||||
|
||||
const char layoutColumnLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected items in column layout.");
|
||||
const char layoutRowLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected items in row layout.");
|
||||
const char layoutGridLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected items in grid layout.");
|
||||
const char layoutColumnLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected components in column layout.");
|
||||
const char layoutRowLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected components in row layout.");
|
||||
const char layoutGridLayoutToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Layout selected components in grid layout.");
|
||||
|
||||
const char increaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Increase index of stacked container.");
|
||||
const char decreaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Decrease index of stacked container.");
|
||||
const char addItemToStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add item to stacked container.");
|
||||
const char addItemToStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add component to stacked container.");
|
||||
const char addFlowActionToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add flow action.");
|
||||
|
||||
const char editListModelDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu",
|
||||
|
||||
@@ -633,7 +633,7 @@ void addSignalHandlerOrGotoImplementation(const SelectionContext &selectionState
|
||||
|
||||
if (!qmlObjectNode.isValid()) {
|
||||
QString title = QCoreApplication::translate("ModelNodeOperations", "Go to Implementation");
|
||||
QString description = QCoreApplication::translate("ModelNodeOperations", "Invalid item.");
|
||||
QString description = QCoreApplication::translate("ModelNodeOperations", "Invalid component.");
|
||||
Core::AsynchronousMessageBox::warning(title, description);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -87,13 +87,13 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
|
||||
m_noSnappingAction->setIcon(Icons::NO_SNAPPING.icon());
|
||||
registerActionAsCommand(m_noSnappingAction, Constants::FORMEDITOR_NO_SNAPPING, QKeySequence(Qt::Key_T));
|
||||
|
||||
m_snappingAndAnchoringAction = layoutActionGroup->addAction(tr("Snap to parent or sibling items and generate anchors."));
|
||||
m_snappingAndAnchoringAction = layoutActionGroup->addAction(tr("Snap to parent or sibling components and generate anchors."));
|
||||
m_snappingAndAnchoringAction->setCheckable(true);
|
||||
m_snappingAndAnchoringAction->setChecked(true);
|
||||
m_snappingAndAnchoringAction->setIcon(Icons::NO_SNAPPING_AND_ANCHORING.icon());
|
||||
registerActionAsCommand(m_snappingAndAnchoringAction, Constants::FORMEDITOR_NO_SNAPPING_AND_ANCHORING, QKeySequence(Qt::Key_W));
|
||||
|
||||
m_snappingAction = layoutActionGroup->addAction(tr("Snap to parent or sibling items but do not generate anchors."));
|
||||
m_snappingAction = layoutActionGroup->addAction(tr("Snap to parent or sibling components but do not generate anchors."));
|
||||
m_snappingAction->setCheckable(true);
|
||||
m_snappingAction->setChecked(true);
|
||||
m_snappingAction->setIcon(Icons::SNAPPING.icon());
|
||||
@@ -108,7 +108,7 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
|
||||
upperActions.append(separatorAction);
|
||||
|
||||
m_showBoundingRectAction = new QAction(Utils::Icons::BOUNDING_RECT.icon(),
|
||||
tr("Show bounding rectangles and stripes for empty items."),
|
||||
tr("Show bounding rectangles and stripes for empty components."),
|
||||
this);
|
||||
m_showBoundingRectAction->setCheckable(true);
|
||||
m_showBoundingRectAction->setChecked(false);
|
||||
@@ -123,14 +123,14 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
|
||||
upperActions.append(separatorAction);
|
||||
|
||||
m_rootWidthAction = new LineEditAction(tr("Override Width"), this);
|
||||
m_rootWidthAction->setToolTip(tr("Override width of root item."));
|
||||
m_rootWidthAction->setToolTip(tr("Override width of root component."));
|
||||
connect(m_rootWidthAction.data(), &LineEditAction::textChanged,
|
||||
this, &FormEditorWidget::changeRootItemWidth);
|
||||
addAction(m_rootWidthAction.data());
|
||||
upperActions.append(m_rootWidthAction.data());
|
||||
|
||||
m_rootHeightAction = new LineEditAction(tr("Override Height"), this);
|
||||
m_rootHeightAction->setToolTip(tr("Override height of root item."));
|
||||
m_rootHeightAction->setToolTip(tr("Override height of root component."));
|
||||
connect(m_rootHeightAction.data(), &LineEditAction::textChanged,
|
||||
this, &FormEditorWidget::changeRootItemHeight);
|
||||
addAction(m_rootHeightAction.data());
|
||||
|
||||
@@ -58,16 +58,15 @@ QVariant ItemLibraryAddImportModel::data(const QModelIndex &index, int role) con
|
||||
if (!index.isValid() || index.row() >= m_importList.count())
|
||||
return {};
|
||||
|
||||
QString importUrl = m_importList[index.row()].url();
|
||||
|
||||
Import import = m_importList[index.row()];
|
||||
if (m_roleNames[role] == "importUrl")
|
||||
return importUrl;
|
||||
return m_importList[index.row()].toString(true, true);
|
||||
|
||||
if (m_roleNames[role] == "importVisible")
|
||||
return m_searchText.isEmpty() || importUrl.isEmpty() || m_importFilterList.contains(importUrl);
|
||||
return m_searchText.isEmpty() || import.url().isEmpty() || m_importFilterList.contains(import.url());
|
||||
|
||||
if (m_roleNames[role] == "isSeparator")
|
||||
return importUrl.isEmpty();
|
||||
return import.isEmpty();
|
||||
|
||||
qWarning() << Q_FUNC_INFO << "invalid role requested";
|
||||
|
||||
@@ -132,13 +131,11 @@ void ItemLibraryAddImportModel::update(const QList<Import> &possibleImports)
|
||||
// create import sections
|
||||
bool previousIsPriority = false;
|
||||
for (const Import &import : std::as_const(filteredImports)) {
|
||||
if (import.isLibraryImport()) {
|
||||
bool currentIsPriority = m_priorityImports.contains(import.url());
|
||||
if (previousIsPriority && !currentIsPriority)
|
||||
m_importList.append(Import::empty()); // empty import acts as a separator
|
||||
m_importList.append(import);
|
||||
previousIsPriority = currentIsPriority;
|
||||
}
|
||||
}
|
||||
|
||||
endResetModel();
|
||||
|
||||
@@ -319,7 +319,7 @@ void ItemLibraryAssetImportDialog::updateImport(const ModelNode &updateNode,
|
||||
if (options.isEmpty() || sourcePath.isEmpty()) {
|
||||
errorMsg = QCoreApplication::translate(
|
||||
"ModelNodeOperations",
|
||||
"Asset import data file '%1' is invalid.").arg(jsonFileName);
|
||||
"Asset import data file \"%1\" is invalid.").arg(jsonFileName);
|
||||
} else {
|
||||
QFileInfo sourceInfo{sourcePath};
|
||||
if (!sourceInfo.exists()) {
|
||||
@@ -334,7 +334,7 @@ void ItemLibraryAssetImportDialog::updateImport(const ModelNode &updateNode,
|
||||
initialPath = compFileInfo.absolutePath();
|
||||
QStringList selectedFiles = QFileDialog::getOpenFileNames(
|
||||
Core::ICore::dialogParent(),
|
||||
tr("Locate 3D Asset '%1'").arg(sourceInfo.fileName()),
|
||||
tr("Locate 3D Asset \"%1\"").arg(sourceInfo.fileName()),
|
||||
initialPath, sourceInfo.fileName());
|
||||
if (!selectedFiles.isEmpty()
|
||||
&& QFileInfo{selectedFiles[0]}.fileName() == sourceInfo.fileName()) {
|
||||
@@ -361,7 +361,7 @@ void ItemLibraryAssetImportDialog::updateImport(const ModelNode &updateNode,
|
||||
|
||||
} else {
|
||||
errorMsg = QCoreApplication::translate(
|
||||
"ModelNodeOperations", "Unable to locate source scene '%1'.")
|
||||
"ModelNodeOperations", "Unable to locate source scene \"%1\".")
|
||||
.arg(sourceInfo.fileName());
|
||||
}
|
||||
}
|
||||
@@ -370,7 +370,7 @@ void ItemLibraryAssetImportDialog::updateImport(const ModelNode &updateNode,
|
||||
}
|
||||
} else {
|
||||
errorMsg = QCoreApplication::translate("ModelNodeOperations",
|
||||
"Opening asset import data file '%1' failed.")
|
||||
"Opening asset import data file \"%1\" failed.")
|
||||
.arg(jsonFileName);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -50,6 +50,9 @@ QString ItemLibraryImport::importName() const
|
||||
if (importUrl() == "QtQuick")
|
||||
return tr("Default Components");
|
||||
|
||||
if (m_import.isFileImport())
|
||||
return m_import.toString(true, true);
|
||||
|
||||
return importUrl().replace('.', ' ');
|
||||
}
|
||||
|
||||
@@ -64,6 +67,9 @@ QString ItemLibraryImport::importUrl() const
|
||||
if (m_sectionType == SectionType::Unimported)
|
||||
return unimportedComponentsTitle();
|
||||
|
||||
if (m_import.isFileImport())
|
||||
return m_import.file();
|
||||
|
||||
return m_import.url();
|
||||
}
|
||||
|
||||
@@ -168,6 +174,11 @@ bool ItemLibraryImport::hasCategories() const
|
||||
return m_categoryModel.rowCount() > 0;
|
||||
}
|
||||
|
||||
bool ItemLibraryImport::hasSingleCategory() const
|
||||
{
|
||||
return m_categoryModel.rowCount() == 1;
|
||||
}
|
||||
|
||||
void ItemLibraryImport::sortCategorySections()
|
||||
{
|
||||
m_categoryModel.sortCategorySections();
|
||||
|
||||
@@ -65,6 +65,7 @@ public:
|
||||
bool importUsed() const;
|
||||
bool importRemovable() const;
|
||||
bool hasCategories() const;
|
||||
bool hasSingleCategory() const;
|
||||
ItemLibraryCategory *getCategorySection(const QString &categoryName) const;
|
||||
|
||||
void addCategory(ItemLibraryCategory *category);
|
||||
|
||||
@@ -214,10 +214,15 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
|
||||
// create import sections
|
||||
QHash<QString, ItemLibraryImport *> importHash;
|
||||
for (const Import &import : model->imports()) {
|
||||
if (import.isLibraryImport() && import.url() != projectName) {
|
||||
if (import.url() != projectName) {
|
||||
bool addNew = true;
|
||||
bool isQuick3DAsset = import.url().startsWith("Quick3DAssets.");
|
||||
QString importUrl = isQuick3DAsset ? ItemLibraryImport::quick3DAssetsTitle() : import.url();
|
||||
QString importUrl = import.url();
|
||||
if (isQuick3DAsset)
|
||||
importUrl = ItemLibraryImport::quick3DAssetsTitle();
|
||||
else if (import.isFileImport())
|
||||
importUrl = import.toString(true, true).remove("\"");
|
||||
|
||||
ItemLibraryImport *oldImport = importHash.value(importUrl);
|
||||
if (oldImport && oldImport->sectionType() == ItemLibraryImport::SectionType::Quick3DAssets
|
||||
&& isQuick3DAsset) {
|
||||
@@ -280,28 +285,36 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
|
||||
QString catName = entry.category();
|
||||
if (isUsable) {
|
||||
if (catName == ItemLibraryImport::userComponentsTitle()) {
|
||||
// create an import section for user components
|
||||
importSection = importByUrl(ItemLibraryImport::userComponentsTitle());
|
||||
if (!importSection) {
|
||||
importSection = new ItemLibraryImport(
|
||||
{}, this, ItemLibraryImport::SectionType::User);
|
||||
m_importList.append(importSection);
|
||||
importSection->setImportExpanded(loadExpandedState(catName));
|
||||
if (entry.requiredImport().isEmpty()) { // user components
|
||||
importSection = importHash[ItemLibraryImport::userComponentsTitle()];
|
||||
if (!importSection) {
|
||||
importSection = new ItemLibraryImport(
|
||||
{}, this, ItemLibraryImport::SectionType::User);
|
||||
m_importList.append(importSection);
|
||||
importHash.insert(ItemLibraryImport::userComponentsTitle(), importSection);
|
||||
importSection->setImportExpanded(loadExpandedState(catName));
|
||||
}
|
||||
} else { // directory import
|
||||
importSection = importHash[entry.requiredImport()];
|
||||
|
||||
}
|
||||
} else if (catName == "My Quick3D Components") {
|
||||
importSection = importByUrl(ItemLibraryImport::quick3DAssetsTitle());
|
||||
importSection = importHash[ItemLibraryImport::quick3DAssetsTitle()];
|
||||
} else {
|
||||
if (catName.startsWith("Qt Quick - "))
|
||||
catName = catName.mid(11); // remove "Qt Quick - "
|
||||
importSection = importByUrl(entry.requiredImport());
|
||||
|
||||
importSection = importHash[entry.requiredImport().isEmpty() ? "QtQuick"
|
||||
: entry.requiredImport()];
|
||||
}
|
||||
} else {
|
||||
catName = ItemLibraryImport::unimportedComponentsTitle();
|
||||
importSection = importByUrl(catName);
|
||||
importSection = importHash[catName];
|
||||
if (!importSection) {
|
||||
importSection = new ItemLibraryImport(
|
||||
{}, this, ItemLibraryImport::SectionType::Unimported);
|
||||
m_importList.append(importSection);
|
||||
importHash.insert(ItemLibraryImport::unimportedComponentsTitle(), importSection);
|
||||
importSection->setImportExpanded(loadExpandedState(catName));
|
||||
}
|
||||
}
|
||||
@@ -316,8 +329,10 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
|
||||
if (!categorySection) {
|
||||
categorySection = new ItemLibraryCategory(catName, importSection);
|
||||
importSection->addCategory(categorySection);
|
||||
if (importSection->sectionType() == ItemLibraryImport::SectionType::Default)
|
||||
if (importSection->sectionType() == ItemLibraryImport::SectionType::Default
|
||||
&& !importSection->hasSingleCategory()) {
|
||||
categorySection->setExpanded(loadExpandedState(categorySection->categoryName()));
|
||||
}
|
||||
}
|
||||
|
||||
// create item
|
||||
|
||||
@@ -91,7 +91,7 @@ bool fitsToTargetProperty(const NodeAbstractProperty &targetProperty,
|
||||
|
||||
static inline QString msgUnknownItem(const QString &t)
|
||||
{
|
||||
return NavigatorTreeModel::tr("Unknown item: %1").arg(t);
|
||||
return NavigatorTreeModel::tr("Unknown component: %1").arg(t);
|
||||
}
|
||||
|
||||
static void removePosition(const ModelNode &node)
|
||||
@@ -250,20 +250,20 @@ QVariant NavigatorTreeModel::data(const QModelIndex &index, int role) const
|
||||
if (role == Qt::CheckStateRole)
|
||||
return currentQmlObjectNode.isAliasExported() ? Qt::Checked : Qt::Unchecked;
|
||||
else if (role == Qt::ToolTipRole && !modelNodeForIndex(index).isRootNode())
|
||||
return tr("Toggles whether this item is exported as an "
|
||||
"alias property of the root item.");
|
||||
return tr("Toggles whether this component is exported as an "
|
||||
"alias property of the root component.");
|
||||
} else if (index.column() == ColumnType::Visibility) { // visible
|
||||
if (role == Qt::CheckStateRole)
|
||||
return m_view->isNodeInvisible(modelNode) ? Qt::Unchecked : Qt::Checked;
|
||||
else if (role == Qt::ToolTipRole && !modelNodeForIndex(index).isRootNode())
|
||||
return tr("Toggles the visibility of this item in the form editor.\n"
|
||||
"This is independent of the visibility property in QML.");
|
||||
return tr("Toggles the visibility of this component in the form editor.\n"
|
||||
"This is independent of the visibility property.");
|
||||
} else if (index.column() == ColumnType::Lock) { // lock
|
||||
if (role == Qt::CheckStateRole)
|
||||
return modelNode.locked() ? Qt::Checked : Qt::Unchecked;
|
||||
else if (role == Qt::ToolTipRole && !modelNodeForIndex(index).isRootNode())
|
||||
return tr("Toggles whether this item is locked.\n"
|
||||
"Locked items cannot be modified or selected.");
|
||||
return tr("Toggles whether this component is locked.\n"
|
||||
"Locked components cannot be modified or selected.");
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
|
||||
@@ -126,7 +126,7 @@ QList<QToolButton *> NavigatorWidget::createToolBarWidgets()
|
||||
filter->setPopupMode(QToolButton::InstantPopup);
|
||||
filter->setProperty("noArrow", true);
|
||||
auto filterMenu = new QMenu(filter);
|
||||
auto filterAction = new QAction(tr("Show only visible items."), nullptr);
|
||||
auto filterAction = new QAction(tr("Show Only Visible Components"), nullptr);
|
||||
filterAction->setCheckable(true);
|
||||
|
||||
bool filterFlag = DesignerSettings::getValue(DesignerSettingsKey::NAVIGATOR_SHOW_ONLY_VISIBLE_ITEMS).toBool();
|
||||
@@ -135,7 +135,7 @@ QList<QToolButton *> NavigatorWidget::createToolBarWidgets()
|
||||
connect(filterAction, &QAction::toggled, this, &NavigatorWidget::filterToggled);
|
||||
filterMenu->addAction(filterAction);
|
||||
|
||||
auto reverseAction = new QAction(tr("Reverse item order."), nullptr);
|
||||
auto reverseAction = new QAction(tr("Reverse Component Order"), nullptr);
|
||||
reverseAction->setCheckable(true);
|
||||
|
||||
bool reverseFlag = DesignerSettings::getValue(DesignerSettingsKey::NAVIGATOR_REVERSE_ITEM_ORDER).toBool();
|
||||
|
||||
@@ -163,9 +163,9 @@ void PropertyEditorView::changeValue(const QString &name)
|
||||
value->setValue(m_selectedNode.id());
|
||||
m_locked = false;
|
||||
if (!QmlDesigner::ModelNode::isValidId(newId))
|
||||
Core::AsynchronousMessageBox::warning(tr("Invalid Id"), tr("%1 is an invalid id.").arg(newId));
|
||||
Core::AsynchronousMessageBox::warning(tr("Invalid ID"), tr("%1 is an invalid ID.").arg(newId));
|
||||
else
|
||||
Core::AsynchronousMessageBox::warning(tr("Invalid Id"), tr("%1 already exists.").arg(newId));
|
||||
Core::AsynchronousMessageBox::warning(tr("Invalid ID"), tr("%1 already exists.").arg(newId));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -323,7 +323,7 @@ void PropertyEditorView::exportPopertyAsAlias(const QString &name)
|
||||
PropertyName propertyName = aliasName.toUtf8();
|
||||
if (rootModelNode().hasProperty(propertyName)) {
|
||||
Core::AsynchronousMessageBox::warning(tr("Cannot Export Property as Alias"),
|
||||
tr("Property %1 does already exist for root item.").arg(aliasName));
|
||||
tr("Property %1 does already exist for root component.").arg(aliasName));
|
||||
return;
|
||||
}
|
||||
rootModelNode().bindingProperty(propertyName).setDynamicTypeNameAndExpression("alias", id + "." + name);
|
||||
|
||||
@@ -109,7 +109,7 @@ void StatesEditorView::removeState(int nodeId)
|
||||
|
||||
if (!lockedTargets.empty()) {
|
||||
Utils::sort(lockedTargets);
|
||||
QString detailedText = QString("<b>" + tr("Locked items:") + "</b><br>");
|
||||
QString detailedText = QString("<b>" + tr("Locked components:") + "</b><br>");
|
||||
|
||||
for (const auto &id : qAsConst(lockedTargets))
|
||||
detailedText.append("- " + id + "<br>");
|
||||
@@ -120,7 +120,7 @@ void StatesEditorView::removeState(int nodeId)
|
||||
msgBox.setTextFormat(Qt::RichText);
|
||||
msgBox.setIcon(QMessageBox::Question);
|
||||
msgBox.setWindowTitle(tr("Remove State"));
|
||||
msgBox.setText(QString(tr("Removing this state will modify locked items.") + "<br><br>%1")
|
||||
msgBox.setText(QString(tr("Removing this state will modify locked components.") + "<br><br>%1")
|
||||
.arg(detailedText));
|
||||
msgBox.setInformativeText(tr("Continue by removing the state?"));
|
||||
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
QString alias() const { return m_alias; }
|
||||
QStringList importPaths() const { return m_importPathList; }
|
||||
|
||||
QString toString(bool skipAlias = false) const;
|
||||
QString toString(bool skipAlias = false, bool skipVersion = false) const;
|
||||
QString toImportString() const;
|
||||
|
||||
bool operator==(const Import &other) const;
|
||||
|
||||
@@ -366,7 +366,7 @@ void MetaInfoReader::syncItemLibraryEntries()
|
||||
try {
|
||||
m_metaInfo.itemLibraryInfo()->addEntries(m_bufferedEntries, m_overwriteDuplicates);
|
||||
} catch (const InvalidMetaInfoException &) {
|
||||
addError(tr("Invalid or duplicate item library entry %1").arg(m_currentEntry.name()), currentSourceLocation());
|
||||
addError(tr("Invalid or duplicate library entry %1").arg(m_currentEntry.name()), currentSourceLocation());
|
||||
}
|
||||
m_bufferedEntries.clear();
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ Import::Import(const QString &url, const QString &file, const QString &version,
|
||||
{
|
||||
}
|
||||
|
||||
QString Import::toString(bool skipAlias) const
|
||||
QString Import::toString(bool skipAlias, bool skipVersion) const
|
||||
{
|
||||
QString result;
|
||||
|
||||
@@ -75,7 +75,7 @@ QString Import::toString(bool skipAlias) const
|
||||
else
|
||||
return QString();
|
||||
|
||||
if (hasVersion())
|
||||
if (hasVersion() && !skipVersion)
|
||||
result += QLatin1Char(' ') + version();
|
||||
|
||||
if (hasAlias() && !skipAlias)
|
||||
|
||||
@@ -870,14 +870,20 @@ static void removeUsedImports(QHash<QString, ImportKey> &filteredPossibleImportK
|
||||
filteredPossibleImportKeys.remove(import.info.path());
|
||||
}
|
||||
|
||||
static QList<QmlDesigner::Import> generatePossibleFileImports(const QString &path)
|
||||
static QList<QmlDesigner::Import> generatePossibleFileImports(const QString &path,
|
||||
const QList<QmlJS::Import> &usedImports)
|
||||
{
|
||||
QSet<QString> usedImportsSet;
|
||||
for (const QmlJS::Import &i : usedImports)
|
||||
usedImportsSet.insert(i.info.path());
|
||||
|
||||
QList<QmlDesigner::Import> possibleImports;
|
||||
|
||||
foreach (const QString &subDir, QDir(path).entryList(QDir::Dirs | QDir::NoDot | QDir::NoDotDot)) {
|
||||
QDir dir(path + "/" + subDir);
|
||||
if (!dir.entryInfoList(QStringList("*.qml"), QDir::Files).isEmpty()
|
||||
&& dir.entryInfoList(QStringList("qmldir"), QDir::Files).isEmpty()) {
|
||||
&& dir.entryInfoList(QStringList("qmldir"), QDir::Files).isEmpty()
|
||||
&& !usedImportsSet.contains(dir.path())) {
|
||||
QmlDesigner::Import import = QmlDesigner::Import::createFileImport(subDir);
|
||||
possibleImports.append(import);
|
||||
}
|
||||
@@ -914,7 +920,7 @@ void TextToModelMerger::setupPossibleImports(const QmlJS::Snapshot &snapshot, co
|
||||
|
||||
QList<QmlDesigner::Import> possibleImports = generatePossibleLibraryImports(filteredPossibleImportKeys);
|
||||
|
||||
possibleImports.append(generatePossibleFileImports(document()->path()));
|
||||
possibleImports.append(generatePossibleFileImports(document()->path(), imports->all()));
|
||||
|
||||
if (m_rewriterView->isAttached())
|
||||
m_rewriterView->model()->setPossibleImports(possibleImports);
|
||||
|
||||
@@ -80,6 +80,7 @@ void DesignerSettings::fromSettings(QSettings *settings)
|
||||
restoreValue(settings, DesignerSettingsKey::SIMPLE_COLOR_PALETTE_CONTENT, QStringList());
|
||||
restoreValue(settings, DesignerSettingsKey::ALWAYS_DESIGN_MODE, true);
|
||||
restoreValue(settings, DesignerSettingsKey::DISABLE_ITEM_LIBRARY_UPDATE_TIMER, true);
|
||||
restoreValue(settings, DesignerSettingsKey::OPEN_QMLPROJECT_IN_QDS, false);
|
||||
|
||||
settings->endGroup();
|
||||
settings->endGroup();
|
||||
|
||||
@@ -70,6 +70,7 @@ const char ENABLE_TIMELINEVIEW[] = "EnableTimelineView";
|
||||
const char SIMPLE_COLOR_PALETTE_CONTENT[] = "SimpleColorPaletteContent";
|
||||
const char ALWAYS_DESIGN_MODE[] = "AlwaysDesignMode";
|
||||
const char DISABLE_ITEM_LIBRARY_UPDATE_TIMER[] = "DisableItemLibraryUpdateTimer";
|
||||
const char OPEN_QMLPROJECT_IN_QDS[] = "OpenQmlprojectInQDS"; /* This key value is used in QmlProjectManager */
|
||||
}
|
||||
|
||||
class QMLDESIGNERCORE_EXPORT DesignerSettings : public QHash<QByteArray, QVariant>
|
||||
|
||||
@@ -99,18 +99,18 @@ void GenerateResource::generateMenuEntry()
|
||||
return;
|
||||
temp.close();
|
||||
|
||||
auto rccBinary = QtSupport::QtKitAspect::qtVersion(currentProject->activeTarget()->kit())->hostBinPath();
|
||||
rccBinary = rccBinary.pathAppended(Utils::HostOsInfo::withExecutableSuffix("rcc"));
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(
|
||||
currentProject->activeTarget()->kit());
|
||||
QString rccBinary = qtVersion->rccCommand();
|
||||
|
||||
QProcess rccProcess;
|
||||
rccProcess.setProgram(rccBinary.toString());
|
||||
rccProcess.setWorkingDirectory(projectPath);
|
||||
|
||||
const QStringList arguments1 = {"--project", "--output", temp.fileName()};
|
||||
const QStringList arguments2 = {"--binary", "--output", resourceFileName, temp.fileName()};
|
||||
|
||||
for (const auto &arguments : {arguments1, arguments2}) {
|
||||
rccProcess.start(rccBinary.toString(), arguments);
|
||||
rccProcess.start(rccBinary, arguments);
|
||||
if (!rccProcess.waitForStarted()) {
|
||||
Core::MessageManager::writeDisrupting(
|
||||
QCoreApplication::translate("QmlDesigner::GenerateResource",
|
||||
@@ -125,7 +125,7 @@ void GenerateResource::generateMenuEntry()
|
||||
Core::MessageManager::writeDisrupting(
|
||||
QCoreApplication::translate("QmlDesigner::GenerateResource",
|
||||
"A timeout occurred running \"%1\"")
|
||||
.arg(rccBinary.toString() + arguments.join(" ")));
|
||||
.arg(rccBinary + " " + arguments.join(" ")));
|
||||
return ;
|
||||
|
||||
}
|
||||
@@ -138,14 +138,14 @@ void GenerateResource::generateMenuEntry()
|
||||
if (rccProcess.exitStatus() != QProcess::NormalExit) {
|
||||
Core::MessageManager::writeDisrupting(
|
||||
QCoreApplication::translate("QmlDesigner::GenerateResource", "\"%1\" crashed.")
|
||||
.arg(rccBinary.toString() + arguments.join(" ")));
|
||||
.arg(rccBinary + " " + arguments.join(" ")));
|
||||
return;
|
||||
}
|
||||
if (rccProcess.exitCode() != 0) {
|
||||
Core::MessageManager::writeDisrupting(
|
||||
QCoreApplication::translate("QmlDesigner::GenerateResource",
|
||||
"\"%1\" failed (exit code %2).")
|
||||
.arg(rccBinary.toString() + " " + arguments.join(" "))
|
||||
.arg(rccBinary + " " + arguments.join(" "))
|
||||
.arg(rccProcess.exitCode()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -178,6 +178,8 @@ DesignerSettings SettingsPageWidget::settings() const
|
||||
m_ui.featureTimelineEditorCheckBox->isChecked());
|
||||
settings.insert(DesignerSettingsKey::ALWAYS_DESIGN_MODE,
|
||||
m_ui.designerAlwaysDesignModeCheckBox->isChecked());
|
||||
settings.insert(DesignerSettingsKey::OPEN_QMLPROJECT_IN_QDS,
|
||||
m_ui.openQmlprojectInQDSCheckBox->isChecked());
|
||||
|
||||
return settings;
|
||||
}
|
||||
@@ -247,10 +249,13 @@ void SettingsPageWidget::setSettings(const DesignerSettings &settings)
|
||||
DesignerSettingsKey::ALWAYS_DESIGN_MODE).toBool());
|
||||
m_ui.featureTimelineEditorCheckBox->setChecked(settings.value(
|
||||
DesignerSettingsKey::ENABLE_TIMELINEVIEW).toBool());
|
||||
m_ui.openQmlprojectInQDSCheckBox->setChecked(settings.value(
|
||||
DesignerSettingsKey::OPEN_QMLPROJECT_IN_QDS).toBool());
|
||||
|
||||
if (settings.value(DesignerSettingsKey::STANDALONE_MODE).toBool()) {
|
||||
m_ui.debugGroupBox->hide();
|
||||
m_ui.featureTimelineEditorCheckBox->hide();
|
||||
m_ui.openQmlprojectInQDSCheckBox->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>960</width>
|
||||
<height>840</height>
|
||||
<width>973</width>
|
||||
<height>862</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -32,7 +32,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="snapMarginLabel">
|
||||
<property name="text">
|
||||
<string>Parent item padding:</string>
|
||||
<string>Parent component padding:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -46,7 +46,7 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="itemSpacingLabel">
|
||||
<property name="text">
|
||||
<string>Sibling item spacing:</string>
|
||||
<string>Sibling component spacing:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -105,7 +105,7 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Root Item Init Size</string>
|
||||
<string>Root Component Init Size</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<item row="0" column="0">
|
||||
@@ -247,7 +247,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Utils::PathChooser" name="fallbackPuppetPathLineEdit">
|
||||
<widget class="Utils::PathChooser" name="fallbackPuppetPathLineEdit" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -288,7 +288,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Utils::PathChooser" name="puppetBuildPathLineEdit">
|
||||
<widget class="Utils::PathChooser" name="puppetBuildPathLineEdit" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -348,7 +348,7 @@
|
||||
<string>Also warns in the code editor about QML features that are not properly supported by the Qt Quick Designer.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Warn about unsupported features of Qt Quick Designer in the code editor</string>
|
||||
<string>Warn about unsupported features of .ui.qml files in code editor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -358,7 +358,7 @@
|
||||
<string>Warns about QML features that are not properly supported by the Qt Quick Designer.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Warn about unsupported features in the Qt Quick Designer</string>
|
||||
<string>Warn about unsupported features in .ui.qml files</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -416,6 +416,13 @@
|
||||
<string>Features</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="designerAlwaysDesignModeCheckBox">
|
||||
<property name="text">
|
||||
<string>Always open ui.qml files in Design mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="featureTimelineEditorCheckBox">
|
||||
<property name="text">
|
||||
@@ -423,10 +430,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="designerAlwaysDesignModeCheckBox">
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="openQmlprojectInQDSCheckBox">
|
||||
<property name="text">
|
||||
<string>Always open ui.qml files in Design mode</string>
|
||||
<string>Open "Qt Quick Prototype" projects (.qmlproject) in Qt Design Studio</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -169,7 +169,7 @@ QString ComponentNameDialog::isValid() const
|
||||
return tr("Invalid path");
|
||||
|
||||
if (QDir(ui->pathEdit->path()).exists(compName + u".qml"))
|
||||
return tr("Component exists already");
|
||||
return tr("Component already exists");
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ static Utils::FilePath getMultilanguageDatabaseFilePath(ProjectExplorer::Target
|
||||
{
|
||||
if (target) {
|
||||
auto filePath = target->project()->projectDirectory().pathAppended(
|
||||
"multilanguage-experimental-v5.db");
|
||||
"multilanguage-experimental-v6.db");
|
||||
if (filePath.exists())
|
||||
return filePath;
|
||||
}
|
||||
|
||||
@@ -53,11 +53,14 @@
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/checkablemessagebox.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMessageBox>
|
||||
#include <QRegularExpression>
|
||||
#include <QTextCodec>
|
||||
#include <QLoggingCategory>
|
||||
#include <QTimer>
|
||||
|
||||
using namespace Core;
|
||||
using namespace ProjectExplorer;
|
||||
@@ -79,6 +82,64 @@ QmlProject::QmlProject(const Utils::FilePath &fileName)
|
||||
|
||||
setNeedsBuildConfigurations(false);
|
||||
setBuildSystemCreator([](Target *t) { return new QmlBuildSystem(t); });
|
||||
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
const QString qdsStandaloneEntry = "QML/Designer/StandAloneMode"; //entry from qml settings
|
||||
const QString qdsInstallationEntry = "QML/Designer/DesignStudioInstallation"; //set in installer
|
||||
|
||||
const bool isDesigner = settings->value(qdsStandaloneEntry, false).toBool();
|
||||
|
||||
if (!isDesigner) {
|
||||
const QString qdsPath = settings->value(qdsInstallationEntry).toString();
|
||||
const bool foundQDS = Utils::FilePath::fromString(qdsPath).exists();
|
||||
|
||||
if (foundQDS) {
|
||||
auto lambda = [fileName, qdsPath]() {
|
||||
const QString projectName = fileName.fileName();
|
||||
const QString doNotShowAgainKey = "OpenInQDSApp"; //entry that is used only here
|
||||
const QString openInQDSKey = "QML/Designer/OpenQmlprojectInQDS"; //entry from qml settings
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
const bool shouldAskAgain = Utils::CheckableMessageBox::shouldAskAgain(settings,
|
||||
doNotShowAgainKey);
|
||||
bool openInQDS = false;
|
||||
|
||||
if (shouldAskAgain) {
|
||||
bool dontShow = false;
|
||||
const auto dialogResult =
|
||||
Utils::CheckableMessageBox::question(Core::ICore::dialogParent(),
|
||||
projectName,
|
||||
tr("Would you like to open the project in Qt Design Studio?"),
|
||||
tr("Do not show this dialog anymore."),
|
||||
&dontShow);
|
||||
openInQDS = (dialogResult == QDialogButtonBox::Yes);
|
||||
|
||||
if (dontShow) {
|
||||
Utils::CheckableMessageBox::doNotAskAgain(settings, doNotShowAgainKey);
|
||||
settings->setValue(openInQDSKey, openInQDS);
|
||||
}
|
||||
} else {
|
||||
openInQDS = settings->value(openInQDSKey, false).toBool();
|
||||
}
|
||||
|
||||
if (openInQDS) {
|
||||
bool qdsStarted = false;
|
||||
//-a and -client arguments help to append project to open design studio application
|
||||
if (Utils::HostOsInfo::isMacHost())
|
||||
qdsStarted = QProcess::startDetached("/usr/bin/open", {"-a", qdsPath, fileName.toString()});
|
||||
else
|
||||
qdsStarted = QProcess::startDetached(qdsPath, {"-client", fileName.toString()});
|
||||
|
||||
if (!qdsStarted) {
|
||||
QMessageBox::warning(Core::ICore::dialogParent(),
|
||||
projectName,
|
||||
tr("Failed to start Qt Design Studio."));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
QTimer::singleShot(0, this, lambda);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QmlBuildSystem::QmlBuildSystem(Target *target)
|
||||
|
||||
@@ -171,7 +171,7 @@ private:
|
||||
mutable std::unique_ptr<MacroExpander> m_expander;
|
||||
};
|
||||
|
||||
enum HostBinaries { Designer, Linguist, Uic, QScxmlc };
|
||||
enum HostBinaries { Designer, Linguist, Rcc, Uic, QScxmlc };
|
||||
|
||||
class BaseQtVersionPrivate
|
||||
{
|
||||
@@ -232,6 +232,7 @@ public:
|
||||
|
||||
FilePath m_qmakeCommand;
|
||||
|
||||
QString m_rccCommand;
|
||||
QString m_uicCommand;
|
||||
QString m_designerCommand;
|
||||
QString m_linguistCommand;
|
||||
@@ -1015,12 +1016,10 @@ QString BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const
|
||||
if (q->qtVersion() < QtVersionNumber(5, 0, 0)) {
|
||||
baseDir = q->binPath().toString();
|
||||
} else {
|
||||
q->ensureMkSpecParsed();
|
||||
switch (binary) {
|
||||
case Designer:
|
||||
case Linguist:
|
||||
baseDir = m_mkspecValues.value("QT.designer.bins");
|
||||
break;
|
||||
case Rcc:
|
||||
case Uic:
|
||||
case QScxmlc:
|
||||
baseDir = q->hostBinPath().toString();
|
||||
@@ -1050,6 +1049,14 @@ QString BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const
|
||||
else
|
||||
possibleCommands << HostOsInfo::withExecutableSuffix("linguist");
|
||||
break;
|
||||
case Rcc:
|
||||
if (HostOsInfo::isWindowsHost()) {
|
||||
possibleCommands << "rcc.exe";
|
||||
} else {
|
||||
const QString majorString = QString::number(q->qtVersion().majorVersion);
|
||||
possibleCommands << ("rcc-qt" + majorString) << ("rcc" + majorString) << "rcc";
|
||||
}
|
||||
break;
|
||||
case Uic:
|
||||
if (HostOsInfo::isWindowsHost()) {
|
||||
possibleCommands << "uic.exe";
|
||||
@@ -1072,6 +1079,16 @@ QString BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString BaseQtVersion::rccCommand() const
|
||||
{
|
||||
if (!isValid())
|
||||
return QString();
|
||||
if (!d->m_rccCommand.isNull())
|
||||
return d->m_rccCommand;
|
||||
d->m_rccCommand = d->findHostBinary(Rcc);
|
||||
return d->m_rccCommand;
|
||||
}
|
||||
|
||||
QString BaseQtVersion::uicCommand() const
|
||||
{
|
||||
if (!isValid())
|
||||
@@ -1148,12 +1165,10 @@ void BaseQtVersion::parseMkSpec(ProFileEvaluator *evaluator) const
|
||||
else if (value == "qt_framework")
|
||||
d->m_frameworkBuild = true;
|
||||
}
|
||||
const QString designerBins = "QT.designer.bins";
|
||||
const QString qmlBins = "QT.qml.bins";
|
||||
const QString declarativeBins = "QT.declarative.bins";
|
||||
const QString libinfix = MKSPEC_VALUE_LIBINFIX;
|
||||
const QString ns = MKSPEC_VALUE_NAMESPACE;
|
||||
d->m_mkspecValues.insert(designerBins, evaluator->value(designerBins));
|
||||
d->m_mkspecValues.insert(qmlBins, evaluator->value(qmlBins));
|
||||
d->m_mkspecValues.insert(declarativeBins, evaluator->value(declarativeBins));
|
||||
d->m_mkspecValues.insert(libinfix, evaluator->value(libinfix));
|
||||
|
||||
@@ -131,6 +131,7 @@ public:
|
||||
bool isInSourceDirectory(const Utils::FilePath &filePath);
|
||||
bool isSubProject(const Utils::FilePath &filePath) const;
|
||||
|
||||
QString rccCommand() const;
|
||||
// used by UiCodeModelSupport
|
||||
QString uicCommand() const;
|
||||
QString designerCommand() const;
|
||||
|
||||
@@ -31,7 +31,7 @@ CheckBox {
|
||||
id: do_not_show_checkBox
|
||||
width: 268
|
||||
height: 40
|
||||
text: qsTr("Don't show this again")
|
||||
text: qsTr("Do not show this again")
|
||||
spacing: 12
|
||||
|
||||
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useIndenter">
|
||||
<property name="toolTip">
|
||||
<string>If available, use a different margin. For example, the ColumnLimit from the clang-format plugin.</string>
|
||||
<string>If available, use a different margin. For example, the ColumnLimit from the ClangFormat plugin.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use context specific margin</string>
|
||||
<string>Use context-specific margin</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -272,7 +272,7 @@ void TextEditorActionHandlerPrivate::createActions()
|
||||
[] (TextEditorWidget *w) { w->circularPaste(); }, false, tr("Paste from Clipboard History"),
|
||||
QKeySequence(tr("Ctrl+Shift+V")), G_EDIT_COPYPASTE, editMenu);
|
||||
m_modifyingActions << registerAction(NO_FORMAT_PASTE,
|
||||
[] (TextEditorWidget *w) { w->pasteWithoutFormat(); }, false, tr("Paste without Formatting"),
|
||||
[] (TextEditorWidget *w) { w->pasteWithoutFormat(); }, false, tr("Paste Without Formatting"),
|
||||
QKeySequence(Core::useMacShortcuts ? tr("Cmd+Opt+Shift+V") : QString()), G_EDIT_COPYPASTE, editMenu);
|
||||
|
||||
// register "Edit -> Advanced" Menu Actions
|
||||
|
||||
@@ -104,11 +104,11 @@ FormatDescriptions TextEditorSettingsPrivate::initialFormats()
|
||||
formatDescr.emplace_back(C_SEARCH_RESULT, tr("Search Result"),
|
||||
tr("Highlighted search results inside the editor."),
|
||||
FormatDescription::ShowBackgroundControl);
|
||||
formatDescr.emplace_back(C_SEARCH_RESULT_ALT1, tr("Search Result (alternative 1)"),
|
||||
formatDescr.emplace_back(C_SEARCH_RESULT_ALT1, tr("Search Result (Alternative 1)"),
|
||||
tr("Highlighted search results inside the editor.\n"
|
||||
"Used to mark read accesses to C++ symbols."),
|
||||
FormatDescription::ShowBackgroundControl);
|
||||
formatDescr.emplace_back(C_SEARCH_RESULT_ALT2, tr("Search Result (alternative 2)"),
|
||||
formatDescr.emplace_back(C_SEARCH_RESULT_ALT2, tr("Search Result (Alternative 2)"),
|
||||
tr("Highlighted search results inside the editor.\n"
|
||||
"Used to mark write accesses to C++ symbols."),
|
||||
FormatDescription::ShowBackgroundControl);
|
||||
|
||||
Reference in New Issue
Block a user