forked from qt-creator/qt-creator
ProjectExplorer: Remove RunControl::bringApplicationToForeground
... and replace it by direct uses of ProcessHandle::activate(). Change-Id: I7beffba7bfbeff72a81b8699ff54a311a74ce1a3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -292,12 +292,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void raiseApplication()
|
|
||||||
{
|
|
||||||
QTC_ASSERT(runControl(), return);
|
|
||||||
runControl()->bringApplicationToForeground();
|
|
||||||
}
|
|
||||||
|
|
||||||
void scheduleResetLocation()
|
void scheduleResetLocation()
|
||||||
{
|
{
|
||||||
m_stackHandler.scheduleResetLocation();
|
m_stackHandler.scheduleResetLocation();
|
||||||
@@ -1323,7 +1317,7 @@ void DebuggerEngine::notifyInferiorPid(const ProcessHandle &pid)
|
|||||||
showMessage(tr("Taking notice of pid %1").arg(pid.pid()));
|
showMessage(tr("Taking notice of pid %1").arg(pid.pid()));
|
||||||
DebuggerStartMode sm = runParameters().startMode;
|
DebuggerStartMode sm = runParameters().startMode;
|
||||||
if (sm == StartInternal || sm == StartExternal || sm == AttachExternal)
|
if (sm == StartInternal || sm == StartExternal || sm == AttachExternal)
|
||||||
QTimer::singleShot(0, d, &DebuggerEnginePrivate::raiseApplication);
|
d->m_inferiorPid.activate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ void QmlEngine::handleLauncherStarted()
|
|||||||
{
|
{
|
||||||
// FIXME: The QmlEngine never calls notifyInferiorPid() triggering the
|
// FIXME: The QmlEngine never calls notifyInferiorPid() triggering the
|
||||||
// raising, so do it here manually for now.
|
// raising, so do it here manually for now.
|
||||||
runControl()->bringApplicationToForeground();
|
runControl()->applicationProcessHandle().activate();
|
||||||
d->noDebugOutputTimer.start();
|
d->noDebugOutputTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1348,18 +1348,6 @@ void RunControlPrivate::debugMessage(const QString &msg)
|
|||||||
qCDebug(statesLog()) << msg;
|
qCDebug(statesLog()) << msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
Brings the application determined by this RunControl's \c applicationProcessHandle
|
|
||||||
to the foreground.
|
|
||||||
|
|
||||||
The default implementation raises the application on Mac, and does
|
|
||||||
nothing elsewhere.
|
|
||||||
*/
|
|
||||||
void RunControl::bringApplicationToForeground()
|
|
||||||
{
|
|
||||||
d->applicationProcessHandle.activate();
|
|
||||||
}
|
|
||||||
|
|
||||||
void RunControl::appendMessage(const QString &msg, Utils::OutputFormat format)
|
void RunControl::appendMessage(const QString &msg, Utils::OutputFormat format)
|
||||||
{
|
{
|
||||||
emit appendMessageRequested(this, msg, format);
|
emit appendMessageRequested(this, msg, format);
|
||||||
@@ -1478,8 +1466,9 @@ void SimpleTargetRunner::stop()
|
|||||||
void SimpleTargetRunner::onProcessStarted()
|
void SimpleTargetRunner::onProcessStarted()
|
||||||
{
|
{
|
||||||
// Console processes only know their pid after being started
|
// Console processes only know their pid after being started
|
||||||
runControl()->setApplicationProcessHandle(m_launcher.applicationPID());
|
ProcessHandle pid = m_launcher.applicationPID();
|
||||||
runControl()->bringApplicationToForeground();
|
runControl()->setApplicationProcessHandle(pid);
|
||||||
|
pid.activate();
|
||||||
reportStarted();
|
reportStarted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -435,7 +435,6 @@ public:
|
|||||||
void setRunnable(const Runnable &runnable);
|
void setRunnable(const Runnable &runnable);
|
||||||
|
|
||||||
virtual void appendMessage(const QString &msg, Utils::OutputFormat format);
|
virtual void appendMessage(const QString &msg, Utils::OutputFormat format);
|
||||||
virtual void bringApplicationToForeground();
|
|
||||||
|
|
||||||
static bool showPromptToStopDialog(const QString &title, const QString &text,
|
static bool showPromptToStopDialog(const QString &title, const QString &text,
|
||||||
const QString &stopButtonText = QString(),
|
const QString &stopButtonText = QString(),
|
||||||
|
|||||||
Reference in New Issue
Block a user