forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/master' into 4.14
Change-Id: I4b37b89cc1dd2c53217579ea554af0fb7994fa7e
This commit is contained in:
@@ -127,7 +127,7 @@ private:
|
||||
|
||||
// AndroidBuildApkWidget
|
||||
|
||||
class AndroidBuildApkWidget : public BuildStepConfigWidget
|
||||
class AndroidBuildApkWidget : public QWidget
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidBuildApkStep)
|
||||
|
||||
@@ -157,7 +157,7 @@ private:
|
||||
};
|
||||
|
||||
AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
|
||||
: BuildStepConfigWidget(step), m_step(step)
|
||||
: m_step(step)
|
||||
{
|
||||
auto vbox = new QVBoxLayout(this);
|
||||
vbox->addWidget(createSignPackageGroup());
|
||||
@@ -662,7 +662,7 @@ void AndroidBuildApkStep::showInGraphicalShell()
|
||||
Core::FileUtils::showInGraphicalShell(Core::ICore::dialogParent(), m_packagePath);
|
||||
}
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *AndroidBuildApkStep::createConfigWidget()
|
||||
QWidget *AndroidBuildApkStep::createConfigWidget()
|
||||
{
|
||||
return new AndroidBuildApkWidget(this);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
|
||||
bool init() override;
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
void processStarted() override;
|
||||
void processFinished(int exitCode, QProcess::ExitStatus status) override;
|
||||
bool verifyKeystorePassword();
|
||||
|
||||
@@ -473,9 +473,9 @@ void AndroidDeployQtStep::runCommand(const CommandLine &command)
|
||||
}
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *AndroidDeployQtStep::createConfigWidget()
|
||||
QWidget *AndroidDeployQtStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
setDisplayName(QString("<b>%1</b>").arg(displayName()));
|
||||
setSummaryText(displayName());
|
||||
|
||||
@@ -87,7 +87,7 @@ private:
|
||||
|
||||
bool runImpl();
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
|
||||
void processReadyReadStdOutput(DeployErrorCode &errorCode);
|
||||
void stdOutput(const QString &line);
|
||||
|
||||
@@ -196,6 +196,8 @@ void ClangEditorDocumentProcessor::updateCodeWarnings(
|
||||
uint documentRevision)
|
||||
{
|
||||
if (documentRevision == revision()) {
|
||||
if (m_invalidationState == InvalidationState::Scheduled)
|
||||
m_invalidationState = InvalidationState::Canceled;
|
||||
m_diagnosticManager.processNewDiagnostics(diagnostics, m_isProjectFile);
|
||||
const auto codeWarnings = m_diagnosticManager.takeExtraSelections();
|
||||
const auto fixitAvailableMarkers = m_diagnosticManager.takeFixItAvailableMarkers();
|
||||
@@ -298,11 +300,14 @@ TextEditor::QuickFixOperations ClangEditorDocumentProcessor::extraRefactoringOpe
|
||||
void ClangEditorDocumentProcessor::editorDocumentTimerRestarted()
|
||||
{
|
||||
m_updateBackendDocumentTimer.stop(); // Wait for the next call to run().
|
||||
m_invalidationState = InvalidationState::Scheduled;
|
||||
}
|
||||
|
||||
void ClangEditorDocumentProcessor::invalidateDiagnostics()
|
||||
{
|
||||
m_diagnosticManager.invalidateDiagnostics();
|
||||
if (m_invalidationState != InvalidationState::Canceled)
|
||||
m_diagnosticManager.invalidateDiagnostics();
|
||||
m_invalidationState = InvalidationState::Off;
|
||||
}
|
||||
|
||||
TextEditor::TextMarks ClangEditorDocumentProcessor::diagnosticTextMarksAt(uint line,
|
||||
|
||||
@@ -140,6 +140,7 @@ private:
|
||||
QFutureWatcher<void> m_parserWatcher;
|
||||
QTimer m_updateBackendDocumentTimer;
|
||||
unsigned m_parserRevision;
|
||||
enum class InvalidationState { Off, Scheduled, Canceled } m_invalidationState;
|
||||
|
||||
QVector<ClangBackEnd::TokenInfoContainer> m_tokenInfos;
|
||||
CppTools::SemanticHighlighter m_semanticHighlighter;
|
||||
|
||||
@@ -432,9 +432,9 @@ QString CMakeBuildStep::activeRunConfigTarget() const
|
||||
return rc ? rc->buildKey() : QString();
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *CMakeBuildStep::createConfigWidget()
|
||||
QWidget *CMakeBuildStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
auto updateDetails = [this] {
|
||||
ProcessParameters param;
|
||||
|
||||
@@ -89,7 +89,7 @@ private:
|
||||
bool init() override;
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
void doRun() override;
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
|
||||
QString defaultBuildTarget() const;
|
||||
|
||||
|
||||
@@ -1671,9 +1671,9 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
menu->addAction(action(UseToolTipsInBreakpointsView));
|
||||
menu->addAction(action(UseToolTipsInBreakpointsView)->action());
|
||||
Internal::addHideColumnActions(menu, ev.view());
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
|
||||
menu->popup(ev.globalPos());
|
||||
|
||||
@@ -2632,9 +2632,9 @@ bool BreakpointManager::contextMenuEvent(const ItemViewEvent &ev)
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
menu->addAction(action(UseToolTipsInBreakpointsView));
|
||||
menu->addAction(action(UseToolTipsInBreakpointsView)->action());
|
||||
Internal::addHideColumnActions(menu, ev.view());
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
|
||||
menu->popup(ev.globalPos());
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ CdbEngine::CdbEngine() :
|
||||
wh->addTypeFormats("QImage", imageFormats);
|
||||
wh->addTypeFormats("QImage *", imageFormats);
|
||||
|
||||
connect(action(CreateFullBacktrace), &QAction::triggered,
|
||||
connect(action(CreateFullBacktrace)->action(), &QAction::triggered,
|
||||
this, &CdbEngine::createFullBacktrace);
|
||||
connect(&m_process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
this, &CdbEngine::processFinished);
|
||||
@@ -216,7 +216,7 @@ CdbEngine::CdbEngine() :
|
||||
connect(action(UseDebuggingHelpers), &SavedAction::valueChanged,
|
||||
this, &CdbEngine::updateLocals);
|
||||
|
||||
if (action(UseCodeModel)->isChecked())
|
||||
if (action(UseCodeModel)->action()->isChecked())
|
||||
m_codeModelSnapshot = CppTools::CppModelManager::instance()->snapshot();
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
if (HostOsInfo::isWindowsHost()) {
|
||||
SavedAction *registerAction = action(RegisterForPostMortem);
|
||||
m_group.insert(registerAction, checkBoxRegisterForPostMortem);
|
||||
connect(registerAction, &QAction::toggled,
|
||||
connect(registerAction->action(), &QAction::toggled,
|
||||
checkBoxRegisterForPostMortem, &QAbstractButton::setChecked);
|
||||
} else {
|
||||
checkBoxRegisterForPostMortem->setVisible(false);
|
||||
|
||||
@@ -108,9 +108,9 @@ Console::Console()
|
||||
m_showDebugButtonAction->setCheckable(true);
|
||||
m_showDebugButtonAction->setChecked(true);
|
||||
m_showDebugButtonAction->setIcon(Utils::Icons::INFO_TOOLBAR.icon());
|
||||
connect(m_showDebugButtonAction, &Utils::SavedAction::toggled,
|
||||
connect(m_showDebugButtonAction->action(), &QAction::toggled,
|
||||
proxyModel, &ConsoleProxyModel::setShowLogs);
|
||||
m_showDebugButton->setDefaultAction(m_showDebugButtonAction);
|
||||
m_showDebugButton->setDefaultAction(m_showDebugButtonAction->action());
|
||||
|
||||
m_showWarningButton = new QToolButton(m_consoleWidget);
|
||||
|
||||
@@ -121,9 +121,9 @@ Console::Console()
|
||||
m_showWarningButtonAction->setCheckable(true);
|
||||
m_showWarningButtonAction->setChecked(true);
|
||||
m_showWarningButtonAction->setIcon(Utils::Icons::WARNING_TOOLBAR.icon());
|
||||
connect(m_showWarningButtonAction, &Utils::SavedAction::toggled,
|
||||
connect(m_showWarningButtonAction->action(), &QAction::toggled,
|
||||
proxyModel, &ConsoleProxyModel::setShowWarnings);
|
||||
m_showWarningButton->setDefaultAction(m_showWarningButtonAction);
|
||||
m_showWarningButton->setDefaultAction(m_showWarningButtonAction->action());
|
||||
|
||||
m_showErrorButton = new QToolButton(m_consoleWidget);
|
||||
|
||||
@@ -134,9 +134,9 @@ Console::Console()
|
||||
m_showErrorButtonAction->setCheckable(true);
|
||||
m_showErrorButtonAction->setChecked(true);
|
||||
m_showErrorButtonAction->setIcon(Utils::Icons::CRITICAL_TOOLBAR.icon());
|
||||
connect(m_showErrorButtonAction, &Utils::SavedAction::toggled,
|
||||
connect(m_showErrorButtonAction->action(), &QAction::toggled,
|
||||
proxyModel, &ConsoleProxyModel::setShowErrors);
|
||||
m_showErrorButton->setDefaultAction(m_showErrorButtonAction);
|
||||
m_showErrorButton->setDefaultAction(m_showErrorButtonAction->action());
|
||||
|
||||
m_spacer = new QWidget(m_consoleWidget);
|
||||
m_spacer->setMinimumWidth(30);
|
||||
|
||||
@@ -1197,7 +1197,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
|
||||
this, &DebuggerPluginPrivate::updateBreakMenuItem);
|
||||
|
||||
// Application interaction
|
||||
connect(action(SettingsDialog), &QAction::triggered,
|
||||
connect(action(SettingsDialog)->action(), &QAction::triggered,
|
||||
[] { ICore::showOptionsDialog(DEBUGGER_COMMON_SETTINGS_ID); });
|
||||
|
||||
m_perspective.useSubPerspectiveSwitcher(EngineManager::engineChooser());
|
||||
@@ -2047,7 +2047,7 @@ SavedAction *DebuggerPluginPrivate::action(int code)
|
||||
|
||||
QWidget *DebuggerPluginPrivate::addSearch(BaseTreeView *treeView)
|
||||
{
|
||||
QAction *act = action(UseAlternatingRowColors);
|
||||
QAction *act = action(UseAlternatingRowColors)->action();
|
||||
treeView->setAlternatingRowColors(act->isChecked());
|
||||
treeView->setProperty(PerspectiveState::savesHeaderKey(), true);
|
||||
connect(act, &QAction::toggled, treeView, &BaseTreeView::setAlternatingRowColors);
|
||||
|
||||
@@ -135,7 +135,7 @@ GdbEngine::GdbEngine()
|
||||
|
||||
connect(action(AutoDerefPointers), &SavedAction::valueChanged,
|
||||
this, &GdbEngine::reloadLocals);
|
||||
connect(action(CreateFullBacktrace), &QAction::triggered,
|
||||
connect(action(CreateFullBacktrace)->action(), &QAction::triggered,
|
||||
this, &GdbEngine::createFullBacktrace);
|
||||
connect(action(UseDebuggingHelpers), &SavedAction::valueChanged,
|
||||
this, &GdbEngine::reloadLocals);
|
||||
|
||||
@@ -89,7 +89,7 @@ LldbEngine::LldbEngine()
|
||||
|
||||
connect(action(AutoDerefPointers), &SavedAction::valueChanged,
|
||||
this, &LldbEngine::updateLocals);
|
||||
connect(action(CreateFullBacktrace), &QAction::triggered,
|
||||
connect(action(CreateFullBacktrace)->action(), &QAction::triggered,
|
||||
this, &LldbEngine::fetchFullBacktrace);
|
||||
connect(action(UseDebuggingHelpers), &SavedAction::valueChanged,
|
||||
this, &LldbEngine::updateLocals);
|
||||
|
||||
@@ -220,10 +220,10 @@ public:
|
||||
QMenu *menu = createStandardContextMenu();
|
||||
menu->addAction(m_clearContentsAction);
|
||||
menu->addAction(m_saveContentsAction); // X11 clipboard is unreliable for long texts
|
||||
menu->addAction(action(LogTimeStamps));
|
||||
menu->addAction(action(LogTimeStamps)->action());
|
||||
menu->addAction(m_reloadDebuggingHelpersAction);
|
||||
menu->addSeparator();
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
menu->exec(ev->globalPos());
|
||||
delete menu;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ bool ModulesModel::contextMenuEvent(const ItemViewEvent &ev)
|
||||
[this, modulePath] { engine->requestModuleSections(modulePath); });
|
||||
|
||||
Internal::addHideColumnActions(menu, ev.view());
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
|
||||
menu->popup(ev.globalPos());
|
||||
return true;
|
||||
|
||||
@@ -787,7 +787,7 @@ bool PeripheralRegisterHandler::contextMenuEvent(const ItemViewEvent &ev)
|
||||
}
|
||||
|
||||
Internal::addHideColumnActions(menu, ev.view());
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
menu->popup(ev.globalPos());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ QmlInspectorAgent::QmlInspectorAgent(QmlEngine *engine, QmlDebugConnection *conn
|
||||
: m_qmlEngine(engine)
|
||||
, m_inspectorToolsContext("Debugger.QmlInspector")
|
||||
, m_selectAction(new QAction(this))
|
||||
, m_showAppOnTopAction(action(ShowAppOnTop))
|
||||
, m_showAppOnTopAction(action(ShowAppOnTop)->action())
|
||||
{
|
||||
m_debugIdToIname.insert(WatchItem::InvalidId, "inspect");
|
||||
connect(action(ShowQmlObjectTree),
|
||||
|
||||
@@ -757,7 +757,7 @@ bool RegisterHandler::contextMenuEvent(const ItemViewEvent &ev)
|
||||
addFormatAction(tr("Binary"), BinaryFormat);
|
||||
|
||||
Internal::addHideColumnActions(menu, ev.view());
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
menu->popup(ev.globalPos());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ bool SourceFilesHandler::setData(const QModelIndex &idx, const QVariant &data, i
|
||||
[this, name] { m_engine->gotoLocation(FilePath::fromString(name)); });
|
||||
|
||||
Internal::addHideColumnActions(menu, ev.view());
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
menu->popup(ev.globalPos());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -70,10 +70,10 @@ StackHandler::StackHandler(DebuggerEngine *engine)
|
||||
setObjectName("StackModel");
|
||||
setHeader({tr("Level"), tr("Function"), tr("File"), tr("Line"), tr("Address") });
|
||||
|
||||
connect(action(ExpandStack), &QAction::triggered,
|
||||
this, &StackHandler::reloadFullStack);
|
||||
connect(action(MaximalStackDepth), &QAction::triggered,
|
||||
this, &StackHandler::reloadFullStack);
|
||||
connect(action(ExpandStack)->action(), &QAction::triggered,
|
||||
this, &StackHandler::reloadFullStack);
|
||||
connect(action(MaximalStackDepth)->action(), &QAction::triggered,
|
||||
this, &StackHandler::reloadFullStack);
|
||||
|
||||
// For now there's always only "the" current thread.
|
||||
rootItem()->appendChild(new ThreadDummyItem);
|
||||
@@ -390,13 +390,13 @@ bool StackHandler::contextMenuEvent(const ItemViewEvent &ev)
|
||||
frame = frameAt(row);
|
||||
const quint64 address = frame.address;
|
||||
|
||||
menu->addAction(action(ExpandStack));
|
||||
menu->addAction(action(ExpandStack)->action());
|
||||
|
||||
addAction(menu, tr("Copy Contents to Clipboard"), true, [this] { copyContentsToClipboard(); });
|
||||
addAction(menu, tr("Save as Task File..."), true, [this] { saveTaskFile(); });
|
||||
|
||||
if (m_engine->hasCapability(CreateFullBacktraceCapability))
|
||||
menu->addAction(action(CreateFullBacktrace));
|
||||
menu->addAction(action(CreateFullBacktrace)->action());
|
||||
|
||||
if (m_engine->hasCapability(AdditionalQmlStackCapability))
|
||||
addAction(menu, tr("Load QML Stack"), true, [this] { m_engine->loadAdditionalQmlStack(); });
|
||||
@@ -444,9 +444,9 @@ bool StackHandler::contextMenuEvent(const ItemViewEvent &ev)
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addAction(action(UseToolTipsInStackView));
|
||||
menu->addAction(action(UseToolTipsInStackView)->action());
|
||||
Internal::addHideColumnActions(menu, ev.view());
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
menu->popup(ev.globalPos());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ bool ThreadsHandler::setData(const QModelIndex &idx, const QVariant &data, int r
|
||||
if (ev.as<QContextMenuEvent>()) {
|
||||
auto menu = new QMenu;
|
||||
Internal::addHideColumnActions(menu, ev.view());
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
menu->popup(ev.globalPos());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1738,15 +1738,15 @@ bool WatchModel::contextMenuEvent(const ItemViewEvent &ev)
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
menu->addAction(action(UseDebuggingHelpers));
|
||||
menu->addAction(action(UseToolTipsInLocalsView));
|
||||
menu->addAction(action(AutoDerefPointers));
|
||||
menu->addAction(action(SortStructMembers));
|
||||
menu->addAction(action(UseDynamicType));
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(UseDebuggingHelpers)->action());
|
||||
menu->addAction(action(UseToolTipsInLocalsView)->action());
|
||||
menu->addAction(action(AutoDerefPointers)->action());
|
||||
menu->addAction(action(SortStructMembers)->action());
|
||||
menu->addAction(action(UseDynamicType)->action());
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
|
||||
Internal::addHideColumnActions(menu, ev.view());
|
||||
menu->addAction(action(SettingsDialog));
|
||||
menu->addAction(action(SettingsDialog)->action());
|
||||
connect(menu, &QMenu::aboutToHide, menu, &QObject::deleteLater);
|
||||
menu->popup(ev.globalPos());
|
||||
return true;
|
||||
|
||||
@@ -54,7 +54,7 @@ WatchTreeView::WatchTreeView(WatchType type)
|
||||
connect(this, &QTreeView::expanded, this, &WatchTreeView::expandNode);
|
||||
connect(this, &QTreeView::collapsed, this, &WatchTreeView::collapseNode);
|
||||
|
||||
connect(action(LogTimeStamps), &QAction::triggered,
|
||||
connect(action(LogTimeStamps)->action(), &QAction::triggered,
|
||||
this, &WatchTreeView::updateTimeColumn);
|
||||
}
|
||||
|
||||
|
||||
@@ -1194,7 +1194,7 @@ bool FakeVimPluginPrivate::initialize()
|
||||
readSettings();
|
||||
|
||||
Command *cmd = nullptr;
|
||||
cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim),
|
||||
cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim)->action(),
|
||||
INSTALL_HANDLER, Context(Core::Constants::C_GLOBAL), true);
|
||||
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V")));
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
IosBuildStep(BuildStepList *stepList, Utils::Id id);
|
||||
|
||||
private:
|
||||
BuildStepConfigWidget *createConfigWidget() final;
|
||||
QWidget *createConfigWidget() final;
|
||||
void setBaseArguments(const QStringList &args);
|
||||
void setExtraArguments(const QStringList &extraArgs);
|
||||
QStringList baseArguments() const;
|
||||
@@ -88,9 +88,9 @@ private:
|
||||
bool m_useDefaultArguments = true;
|
||||
};
|
||||
|
||||
BuildStepConfigWidget *IosBuildStep::createConfigWidget()
|
||||
QWidget *IosBuildStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
auto buildArgumentsLabel = new QLabel(tr("Base arguments:"), widget);
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
void updateDisplayNames();
|
||||
|
||||
bool init() final;
|
||||
BuildStepConfigWidget *createConfigWidget() final;
|
||||
QWidget *createConfigWidget() final;
|
||||
IDevice::ConstPtr device() const;
|
||||
IosDevice::ConstPtr iosdevice() const;
|
||||
IosSimulator::ConstPtr iossimulator() const;
|
||||
@@ -230,9 +230,9 @@ void IosDeployStep::handleErrorMsg(IosToolHandler *handler, const QString &msg)
|
||||
emit addOutput(msg, OutputFormat::ErrorMessage);
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *IosDeployStep::createConfigWidget()
|
||||
QWidget *IosDeployStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
widget->setObjectName("IosDeployStepWidget");
|
||||
setDisplayName(QString("<b>%1</b>").arg(displayName()));
|
||||
|
||||
@@ -203,9 +203,9 @@ QStringList IosDsymBuildStep::arguments() const
|
||||
}
|
||||
|
||||
|
||||
BuildStepConfigWidget *IosDsymBuildStep::createConfigWidget()
|
||||
QWidget *IosDsymBuildStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
auto commandLabel = new QLabel(tr("Command:"), widget);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class IosDsymBuildStep : public ProjectExplorer::AbstractProcessStep
|
||||
public:
|
||||
IosDsymBuildStep(ProjectExplorer::BuildStepList *parent, Utils::Id id);
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
void setArguments(const QStringList &args);
|
||||
QStringList arguments() const;
|
||||
QStringList defaultArguments() const;
|
||||
|
||||
@@ -70,9 +70,9 @@ NinjaBuildStep::NinjaBuildStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id
|
||||
&NinjaBuildStep::commandChanged);
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *NinjaBuildStep::createConfigWidget()
|
||||
QWidget *NinjaBuildStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget{this};
|
||||
auto widget = new QWidget;
|
||||
setDisplayName(tr("Build", "MesonProjectManager::MesonBuildStepConfigWidget display name."));
|
||||
|
||||
auto buildTargetsList = new QListWidget(widget);
|
||||
|
||||
@@ -38,7 +38,7 @@ class NinjaBuildStep final : public ProjectExplorer::AbstractProcessStep
|
||||
public:
|
||||
NinjaBuildStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() final;
|
||||
QWidget *createConfigWidget() final;
|
||||
Utils::CommandLine command();
|
||||
QStringList projectTargets();
|
||||
void setBuildTarget(const QString &targetName);
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
NimbleTaskStep(BuildStepList *parentList, Id id);
|
||||
|
||||
private:
|
||||
BuildStepConfigWidget *createConfigWidget() final;
|
||||
QWidget *createConfigWidget() final;
|
||||
|
||||
void setTaskName(const QString &name);
|
||||
|
||||
@@ -100,9 +100,9 @@ NimbleTaskStep::NimbleTaskStep(BuildStepList *parentList, Id id)
|
||||
m_taskArgs->setLabelText(tr("Task arguments:"));
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *NimbleTaskStep::createConfigWidget()
|
||||
QWidget *NimbleTaskStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
auto taskList = new QListView(widget);
|
||||
taskList->setFrameShape(QFrame::StyledPanel);
|
||||
|
||||
@@ -107,9 +107,9 @@ void NimCompilerBuildStep::setupOutputFormatter(OutputFormatter *formatter)
|
||||
AbstractProcessStep::setupOutputFormatter(formatter);
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *NimCompilerBuildStep::createConfigWidget()
|
||||
QWidget *NimCompilerBuildStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
setDisplayName(tr("Nim build step"));
|
||||
setSummaryText(tr("Nim build step"));
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
|
||||
private:
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
|
||||
bool fromMap(const QVariantMap &map) override;
|
||||
QVariantMap toMap() const override;
|
||||
|
||||
@@ -157,17 +157,15 @@ void BuildStep::cancel()
|
||||
doCancel();
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *BuildStep::createConfigWidget()
|
||||
QWidget *BuildStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
{
|
||||
LayoutBuilder builder(widget);
|
||||
for (BaseAspect *aspect : qAsConst(m_aspects)) {
|
||||
if (aspect->isVisible())
|
||||
aspect->addToLayout(builder.finishRow());
|
||||
connect(aspect, &BaseAspect::changed, this, &BuildStep::recreateSummary);
|
||||
}
|
||||
LayoutBuilder builder(widget);
|
||||
for (BaseAspect *aspect : qAsConst(m_aspects)) {
|
||||
if (aspect->isVisible())
|
||||
aspect->addToLayout(builder.finishRow());
|
||||
connect(aspect, &BaseAspect::changed, this, &BuildStep::recreateSummary);
|
||||
}
|
||||
|
||||
connect(buildConfiguration(), &BuildConfiguration::buildDirectoryChanged,
|
||||
@@ -483,10 +481,6 @@ BuildStep *BuildStepFactory::restore(BuildStepList *parent, const QVariantMap &m
|
||||
return bs;
|
||||
}
|
||||
|
||||
BuildStepConfigWidget::BuildStepConfigWidget(BuildStep *)
|
||||
{
|
||||
}
|
||||
|
||||
QString BuildStep::summaryText() const
|
||||
{
|
||||
if (m_summaryText.isEmpty())
|
||||
|
||||
@@ -50,12 +50,10 @@ class OutputFormatter;
|
||||
namespace ProjectExplorer {
|
||||
|
||||
class BuildConfiguration;
|
||||
class BuildStepConfigWidget;
|
||||
class BuildStepFactory;
|
||||
class BuildStepList;
|
||||
class BuildSystem;
|
||||
class DeployConfiguration;
|
||||
class Target;
|
||||
class Task;
|
||||
|
||||
// Documentation inside.
|
||||
@@ -72,7 +70,7 @@ public:
|
||||
virtual bool init() = 0;
|
||||
void run();
|
||||
void cancel();
|
||||
virtual BuildStepConfigWidget *createConfigWidget();
|
||||
virtual QWidget *createConfigWidget();
|
||||
|
||||
bool fromMap(const QVariantMap &map) override;
|
||||
QVariantMap toMap() const override;
|
||||
@@ -231,13 +229,6 @@ private:
|
||||
bool m_isRepeatable = true;
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT BuildStepConfigWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BuildStepConfigWidget(BuildStep *step);
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::BuildStep::OutputFormat)
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
~BuildStepsWidgetData();
|
||||
|
||||
BuildStep *step;
|
||||
BuildStepConfigWidget *widget;
|
||||
QWidget *widget;
|
||||
Utils::DetailsWidget *detailsWidget;
|
||||
ToolWidget *toolWidget;
|
||||
};
|
||||
|
||||
@@ -342,9 +342,9 @@ CommandLine MakeStep::effectiveMakeCommand(MakeCommandType type) const
|
||||
return cmd;
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *MakeStep::createConfigWidget()
|
||||
QWidget *MakeStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
auto targetsLabel = new QLabel(widget);
|
||||
targetsLabel->setText(tr("Targets:"));
|
||||
|
||||
@@ -34,8 +34,6 @@ namespace Utils { class Environment; }
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
||||
namespace Internal { class MakeStepConfigWidget; }
|
||||
|
||||
class PROJECTEXPLORER_EXPORT MakeStep : public ProjectExplorer::AbstractProcessStep
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -52,7 +50,7 @@ public:
|
||||
|
||||
bool init() override;
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
bool buildsTarget(const QString &target) const;
|
||||
void setBuildTarget(const QString &target, bool on);
|
||||
QStringList availableTargets() const;
|
||||
@@ -86,8 +84,6 @@ protected:
|
||||
virtual QStringList displayArguments() const;
|
||||
|
||||
private:
|
||||
friend class Internal::MakeStepConfigWidget;
|
||||
|
||||
static int defaultJobCount();
|
||||
QStringList jobArguments() const;
|
||||
|
||||
|
||||
@@ -49,11 +49,7 @@ using namespace Utils;
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
||||
ProcessParameters::ProcessParameters() :
|
||||
m_macroExpander(nullptr),
|
||||
m_commandMissing(false)
|
||||
{
|
||||
}
|
||||
ProcessParameters::ProcessParameters() = default;
|
||||
|
||||
/*!
|
||||
Sets the command to run.
|
||||
@@ -68,7 +64,6 @@ void ProcessParameters::setCommandLine(const CommandLine &cmdLine)
|
||||
effectiveArguments();
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Sets the \a workingDirectory for the process for a build configuration.
|
||||
|
||||
@@ -159,17 +154,17 @@ QString ProcessParameters::prettyCommand() const
|
||||
QString cmd = m_command.executable().toString();
|
||||
if (m_macroExpander)
|
||||
cmd = m_macroExpander->expand(cmd);
|
||||
return Utils::FilePath::fromString(cmd).fileName();
|
||||
return FilePath::fromString(cmd).fileName();
|
||||
}
|
||||
|
||||
QString ProcessParameters::prettyArguments() const
|
||||
{
|
||||
QString margs = effectiveArguments();
|
||||
QString workDir = effectiveWorkingDirectory().toString();
|
||||
Utils::QtcProcess::SplitError err;
|
||||
Utils::QtcProcess::Arguments args =
|
||||
Utils::QtcProcess::prepareArgs(margs, &err, Utils::HostOsInfo::hostOs(), &m_environment, &workDir);
|
||||
if (err != Utils::QtcProcess::SplitOk)
|
||||
QtcProcess::SplitError err;
|
||||
QtcProcess::Arguments args =
|
||||
QtcProcess::prepareArgs(margs, &err, HostOsInfo::hostOs(), &m_environment, &workDir);
|
||||
if (err != QtcProcess::SplitOk)
|
||||
return margs; // Sorry, too complex - just fall back.
|
||||
return args.toString();
|
||||
}
|
||||
@@ -189,7 +184,7 @@ QString ProcessParameters::summary(const QString &displayName) const
|
||||
|
||||
return QString::fromLatin1("<b>%1:</b> %2 %3")
|
||||
.arg(displayName,
|
||||
Utils::QtcProcess::quoteArg(prettyCommand()),
|
||||
QtcProcess::quoteArg(prettyCommand()),
|
||||
prettyArguments());
|
||||
}
|
||||
|
||||
@@ -200,7 +195,7 @@ QString ProcessParameters::summaryInWorkdir(const QString &displayName) const
|
||||
|
||||
return QString::fromLatin1("<b>%1:</b> %2 %3 in %4")
|
||||
.arg(displayName,
|
||||
Utils::QtcProcess::quoteArg(prettyCommand()),
|
||||
QtcProcess::quoteArg(prettyCommand()),
|
||||
prettyArguments(),
|
||||
QDir::toNativeSeparators(effectiveWorkingDirectory().toString()));
|
||||
}
|
||||
|
||||
@@ -73,12 +73,12 @@ private:
|
||||
Utils::FilePath m_workingDirectory;
|
||||
Utils::CommandLine m_command;
|
||||
Utils::Environment m_environment;
|
||||
Utils::MacroExpander *m_macroExpander;
|
||||
Utils::MacroExpander *m_macroExpander = nullptr;
|
||||
|
||||
mutable Utils::FilePath m_effectiveWorkingDirectory;
|
||||
mutable Utils::FilePath m_effectiveCommand;
|
||||
mutable QString m_effectiveArguments;
|
||||
mutable bool m_commandMissing;
|
||||
mutable bool m_commandMissing = false;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -72,7 +72,7 @@ using namespace Utils;
|
||||
namespace QbsProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class QbsBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||
class QbsBuildStepConfigWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -191,7 +191,7 @@ void QbsBuildStep::doRun()
|
||||
parseProject();
|
||||
}
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *QbsBuildStep::createConfigWidget()
|
||||
QWidget *QbsBuildStep::createConfigWidget()
|
||||
{
|
||||
return new QbsBuildStepConfigWidget(this);
|
||||
}
|
||||
@@ -544,7 +544,6 @@ void QbsBuildStep::dropSession()
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) :
|
||||
BuildStepConfigWidget(step),
|
||||
m_qbsStep(step),
|
||||
m_ignoreChange(false)
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
void doRun() override;
|
||||
void doCancel() override;
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
bool fromMap(const QVariantMap &map) override;
|
||||
QVariantMap toMap() const override;
|
||||
|
||||
|
||||
@@ -179,9 +179,9 @@ QbsBuildStepData QbsInstallStep::stepData() const
|
||||
return data;
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *QbsInstallStep::createConfigWidget()
|
||||
QWidget *QbsInstallStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
auto installRootValueLabel = new QLabel(installRoot());
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ private:
|
||||
bool init() override;
|
||||
void doRun() override;
|
||||
void doCancel() override;
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
|
||||
const QbsBuildConfiguration *buildConfig() const;
|
||||
void installDone(const ErrorInfo &error);
|
||||
|
||||
@@ -31,6 +31,23 @@ const TextEditor::Keywords &QmakeProjectManager::Internal::qmakeKeywords()
|
||||
{
|
||||
static TextEditor::Keywords keywords(
|
||||
QStringList{ // variables
|
||||
"ANDROID_ABIS",
|
||||
"ANDROID_API_VERSION",
|
||||
"ANDROID_APPLICATION_ARGUMENTS",
|
||||
"ANDROID_BUNDLED_JAR_DEPENDENCIES",
|
||||
"ANDROID_DEPLOYMENT_DEPENDENCIES",
|
||||
"ANDROID_DEPLOYMENT_SETTINGS_FILE",
|
||||
"ANDROID_EXTRA_LIBS",
|
||||
"ANDROID_EXTRA_PLUGINS",
|
||||
"ANDROID_FEATURES",
|
||||
"ANDROID_LIB_DEPENDENCIES",
|
||||
"ANDROID_MIN_SDK_VERSION",
|
||||
"ANDROID_PACKAGE_SOURCE_DIR",
|
||||
"ANDROID_PERMISSIONS",
|
||||
"ANDROID_TARGET_SDK_VERSION",
|
||||
"ANDROID_TARGET_ARCH",
|
||||
"ANDROID_VERSION_CODE",
|
||||
"ANDROID_VERSION_NAME",
|
||||
"ARGC",
|
||||
"ARGS",
|
||||
"BUILDS",
|
||||
|
||||
@@ -233,6 +233,7 @@ QmakePriFile::~QmakePriFile()
|
||||
|
||||
void QmakePriFile::scheduleUpdate()
|
||||
{
|
||||
QTC_ASSERT(m_buildSystem, return);
|
||||
QtSupport::ProFileCacheManager::instance()->discardFile(
|
||||
filePath().toString(), m_buildSystem->qmakeVfs());
|
||||
m_qmakeProFile->scheduleUpdate(QmakeProFile::ParseLater);
|
||||
|
||||
@@ -502,9 +502,9 @@ bool QMakeStep::fromMap(const QVariantMap &map)
|
||||
return BuildStep::fromMap(map);
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *QMakeStep::createConfigWidget()
|
||||
QWidget *QMakeStep::createConfigWidget()
|
||||
{
|
||||
auto widget = new BuildStepConfigWidget(this);
|
||||
auto widget = new QWidget;
|
||||
|
||||
auto label_0 = new QLabel(tr("qmake build configuration:"), widget);
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
bool init() override;
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
void doRun() override;
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
void setForced(bool b);
|
||||
|
||||
enum class ArgumentFlag {
|
||||
|
||||
@@ -53,11 +53,13 @@ void BindingModel::resetModel()
|
||||
{
|
||||
beginResetModel();
|
||||
clear();
|
||||
setHorizontalHeaderLabels(QStringList({ tr("Item"), tr("Property"), tr("Source Item"),
|
||||
tr("Source Property") }));
|
||||
setHorizontalHeaderLabels(
|
||||
QStringList({tr("Item"), tr("Property"), tr("Source Item"), tr("Source Property")}));
|
||||
|
||||
foreach (const ModelNode modelNode, m_selectedModelNodes)
|
||||
addModelNode(modelNode);
|
||||
if (connectionView()->isAttached()) {
|
||||
for (const ModelNode modelNode : connectionView()->selectedModelNodes())
|
||||
addModelNode(modelNode);
|
||||
}
|
||||
|
||||
endResetModel();
|
||||
}
|
||||
@@ -100,7 +102,6 @@ void BindingModel::bindingRemoved(const BindingProperty &bindingProperty)
|
||||
void BindingModel::selectionChanged(const QList<ModelNode> &selectedNodes)
|
||||
{
|
||||
m_handleDataChanged = false;
|
||||
m_selectedModelNodes = selectedNodes;
|
||||
resetModel();
|
||||
m_handleDataChanged = true;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,6 @@ private:
|
||||
void handleException();
|
||||
|
||||
private:
|
||||
QList<ModelNode> m_selectedModelNodes;
|
||||
ConnectionView *m_connectionView;
|
||||
bool m_lock = false;
|
||||
bool m_handleDataChanged = false;
|
||||
|
||||
@@ -128,11 +128,13 @@ void DynamicPropertiesModel::resetModel()
|
||||
{
|
||||
beginResetModel();
|
||||
clear();
|
||||
setHorizontalHeaderLabels(QStringList({ tr("Item"), tr("Property"), tr("Property Type"),
|
||||
tr("Property Value") }));
|
||||
setHorizontalHeaderLabels(
|
||||
QStringList({tr("Item"), tr("Property"), tr("Property Type"), tr("Property Value")}));
|
||||
|
||||
foreach (const ModelNode modelNode, m_selectedModelNodes)
|
||||
addModelNode(modelNode);
|
||||
if (connectionView()->isAttached()) {
|
||||
for (const ModelNode modelNode : connectionView()->selectedModelNodes())
|
||||
addModelNode(modelNode);
|
||||
}
|
||||
|
||||
endResetModel();
|
||||
}
|
||||
@@ -279,7 +281,6 @@ void DynamicPropertiesModel::bindingRemoved(const BindingProperty &bindingProper
|
||||
void DynamicPropertiesModel::selectionChanged(const QList<ModelNode> &selectedNodes)
|
||||
{
|
||||
m_handleDataChanged = false;
|
||||
m_selectedModelNodes = selectedNodes;
|
||||
resetModel();
|
||||
m_handleDataChanged = true;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,6 @@ private:
|
||||
void handleException();
|
||||
|
||||
private:
|
||||
QList<ModelNode> m_selectedModelNodes;
|
||||
ConnectionView *m_connectionView;
|
||||
bool m_lock = false;
|
||||
bool m_handleDataChanged = false;
|
||||
|
||||
@@ -242,6 +242,18 @@ void DebugView::selectedNodesChanged(const QList<ModelNode> &selectedNodes /*sel
|
||||
message << lineBreak;
|
||||
message << selectedNode.metaInfo().typeName();
|
||||
message << lineBreak;
|
||||
|
||||
message << "Node Source" << selectedNode.nodeSource();
|
||||
message << lineBreak;
|
||||
|
||||
message << "Is Component" << selectedNode.isComponent();
|
||||
message << lineBreak;
|
||||
|
||||
message << "Node Source Type" << selectedNode.nodeSourceType();
|
||||
message << lineBreak;
|
||||
|
||||
message << lineBreak;
|
||||
|
||||
for (const PropertyName &name : selectedNode.metaInfo().slotNames())
|
||||
message << name << " ";
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
bool hasSingleSelectedModelNode() const;
|
||||
bool isSelectedModelNode(const ModelNode &modelNode) const;
|
||||
|
||||
QList<ModelNode> selectedModelNodes() const;
|
||||
const QList<ModelNode> selectedModelNodes() const;
|
||||
ModelNode firstSelectedModelNode() const;
|
||||
ModelNode singleSelectedModelNode() const;
|
||||
|
||||
|
||||
@@ -453,7 +453,7 @@ bool AbstractView::isSelectedModelNode(const ModelNode &modelNode) const
|
||||
Sets the list of nodes to the actual selected nodes. Returns a list of the
|
||||
selected nodes.
|
||||
*/
|
||||
QList<ModelNode> AbstractView::selectedModelNodes() const
|
||||
const QList<ModelNode> AbstractView::selectedModelNodes() const
|
||||
{
|
||||
return toModelNodeList(model()->d->selectedNodes());
|
||||
}
|
||||
|
||||
@@ -213,11 +213,20 @@ QmlObjectNode QmlVisualNode::createQmlObjectNode(AbstractView *view,
|
||||
NodeHints hints = NodeHints::fromItemLibraryEntry(itemLibraryEntry);
|
||||
const PropertyName forceNonDefaultProperty = hints.forceNonDefaultProperty().toUtf8();
|
||||
|
||||
QmlObjectNode newNode = QmlItemNode::createQmlObjectNode(view, itemLibraryEntry, position, parentProperty);
|
||||
QmlObjectNode newNode = QmlItemNode::createQmlObjectNode(view,
|
||||
itemLibraryEntry,
|
||||
position,
|
||||
parentProperty);
|
||||
|
||||
if (!forceNonDefaultProperty.isEmpty()) {
|
||||
if (parentQmlItemNode.modelNode().metaInfo().hasProperty(forceNonDefaultProperty))
|
||||
const NodeMetaInfo metaInfo = parentQmlItemNode.modelNode().metaInfo();
|
||||
if (metaInfo.hasProperty(forceNonDefaultProperty)) {
|
||||
if (!metaInfo.propertyIsListProperty(forceNonDefaultProperty)
|
||||
&& parentQmlItemNode.modelNode().hasNodeProperty(forceNonDefaultProperty)) {
|
||||
parentQmlItemNode.removeProperty(forceNonDefaultProperty);
|
||||
}
|
||||
parentQmlItemNode.nodeListProperty(forceNonDefaultProperty).reparentHere(newNode);
|
||||
}
|
||||
}
|
||||
|
||||
return newNode;
|
||||
@@ -288,8 +297,18 @@ QmlObjectNode QmlVisualNode::createQmlObjectNode(AbstractView *view,
|
||||
newQmlObjectNode = createQmlObjectNodeFromSource(view, itemLibraryEntry.qmlSource(), position);
|
||||
}
|
||||
|
||||
if (parentProperty.isValid())
|
||||
parentProperty.reparentHere(newQmlObjectNode);
|
||||
if (parentProperty.isValid()) {
|
||||
const PropertyName propertyName = parentProperty.name();
|
||||
const ModelNode parentNode = parentProperty.parentModelNode();
|
||||
const NodeMetaInfo metaInfo = parentNode.metaInfo();
|
||||
|
||||
if (metaInfo.isValid() && !metaInfo.propertyIsListProperty(propertyName)
|
||||
&& parentProperty.isNodeProperty()) {
|
||||
parentNode.removeProperty(propertyName);
|
||||
}
|
||||
|
||||
parentNode.nodeAbstractProperty(propertyName).reparentHere(newQmlObjectNode);
|
||||
}
|
||||
|
||||
if (!newQmlObjectNode.isValid())
|
||||
return;
|
||||
|
||||
@@ -288,11 +288,8 @@ bool isListElementType(const QmlDesigner::TypeName &type)
|
||||
|
||||
bool isComponentType(const QmlDesigner::TypeName &type)
|
||||
{
|
||||
return type == "Component"
|
||||
|| type == "Qt.Component"
|
||||
|| type == "QtQuick.Component"
|
||||
|| type == "<cpp>.QQmlComponent"
|
||||
|| type == "QQmlComponent";
|
||||
return type == "Component" || type == "Qt.Component" || type == "QtQuick.Component"
|
||||
|| type == "QtQml.Component" || type == "<cpp>.QQmlComponent" || type == "QQmlComponent";
|
||||
}
|
||||
|
||||
bool isCustomParserType(const QmlDesigner::TypeName &type)
|
||||
|
||||
@@ -120,8 +120,9 @@ QString MakeInstallStep::displayName()
|
||||
return tr("Install into temporary host directory");
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *MakeInstallStep::createConfigWidget()
|
||||
QWidget *MakeInstallStep::createConfigWidget()
|
||||
{
|
||||
// Note: this intentionally skips the MakeStep::createConfigWidget() level.
|
||||
return BuildStep::createConfigWidget();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
private:
|
||||
bool fromMap(const QVariantMap &map) override;
|
||||
ProjectExplorer::BuildStepConfigWidget * createConfigWidget() override;
|
||||
QWidget *createConfigWidget() override;
|
||||
bool init() override;
|
||||
void finish(bool success) override;
|
||||
void stdError(const QString &line) override;
|
||||
|
||||
@@ -88,6 +88,7 @@ public:
|
||||
bool eventFilter(QObject *o, QEvent *e) override;
|
||||
|
||||
private:
|
||||
bool requestActivationCharProposal();
|
||||
void processProposalItem(AssistProposalItemInterface *proposalItem);
|
||||
void handlePrefixExpansion(const QString &newPrefix);
|
||||
void finalizeProposal();
|
||||
@@ -161,6 +162,19 @@ void CodeAssistantPrivate::invoke(AssistKind kind, IAssistProvider *provider)
|
||||
}
|
||||
}
|
||||
|
||||
bool CodeAssistantPrivate::requestActivationCharProposal()
|
||||
{
|
||||
if (m_assistKind == Completion && m_settings.m_completionTrigger != ManualCompletion) {
|
||||
if (CompletionAssistProvider *provider = identifyActivationSequence()) {
|
||||
if (isWaitingForProposal())
|
||||
cancelCurrentRequest();
|
||||
requestProposal(ActivationCharacter, Completion, provider);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void CodeAssistantPrivate::process()
|
||||
{
|
||||
if (!isConfigured())
|
||||
@@ -169,16 +183,8 @@ void CodeAssistantPrivate::process()
|
||||
stopAutomaticProposalTimer();
|
||||
|
||||
if (m_assistKind == TextEditor::Completion) {
|
||||
if (m_settings.m_completionTrigger != ManualCompletion) {
|
||||
if (CompletionAssistProvider *provider = identifyActivationSequence()) {
|
||||
if (isWaitingForProposal())
|
||||
cancelCurrentRequest();
|
||||
requestProposal(ActivationCharacter, Completion, provider);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
startAutomaticProposalTimer();
|
||||
if (!requestActivationCharProposal())
|
||||
startAutomaticProposalTimer();
|
||||
} else if (m_assistKind != FunctionHint){
|
||||
m_assistKind = TextEditor::Completion;
|
||||
}
|
||||
@@ -365,6 +371,8 @@ void CodeAssistantPrivate::processProposalItem(AssistProposalItemInterface *prop
|
||||
proposalItem->apply(manipulator, m_proposal->basePosition());
|
||||
destroyContext();
|
||||
m_editorWidget->encourageApply();
|
||||
if (!proposalItem->isSnippet())
|
||||
requestActivationCharProposal();
|
||||
}
|
||||
|
||||
void CodeAssistantPrivate::handlePrefixExpansion(const QString &newPrefix)
|
||||
@@ -404,7 +412,7 @@ void CodeAssistantPrivate::finalizeProposal()
|
||||
|
||||
bool CodeAssistantPrivate::isDisplayingProposal() const
|
||||
{
|
||||
return m_proposalWidget != nullptr;
|
||||
return m_proposalWidget != nullptr && m_proposalWidget->isVisible();
|
||||
}
|
||||
|
||||
bool CodeAssistantPrivate::isWaitingForProposal() const
|
||||
@@ -457,6 +465,8 @@ void CodeAssistantPrivate::notifyChange()
|
||||
m_proposalWidget->updateProposal(
|
||||
m_editorWidget->textAt(m_proposal->basePosition(),
|
||||
m_editorWidget->position() - m_proposal->basePosition()));
|
||||
if (!isDisplayingProposal())
|
||||
requestActivationCharProposal();
|
||||
} else {
|
||||
destroyContext();
|
||||
requestProposal(ExplicitlyInvoked, m_assistKind, m_requestProvider);
|
||||
|
||||
Reference in New Issue
Block a user