From eaf99819eac1e2897de52acd21cf6af75f3db8ac Mon Sep 17 00:00:00 2001
From: hjk <hjk121@nokiamail.com>
Date: Mon, 28 Oct 2013 18:19:38 +0100
Subject: [PATCH] DebuggerDialogs: Remember debugger path history

Change-Id: I02e6b7ff5e2280cabb0f23de942941756f7bf3a0
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
---
 src/plugins/debugger/debuggerdialogs.cpp     | 4 ++--
 src/plugins/debugger/debuggeroptionspage.cpp | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index 8f80194ce8d..b1db49211d9 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -248,7 +248,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
     d->localExecutablePathChooser = new PathChooser(this);
     d->localExecutablePathChooser->setExpectedKind(PathChooser::File);
     d->localExecutablePathChooser->setPromptDialogTitle(tr("Select Executable"));
-    d->localExecutablePathChooser->lineEdit()->setHistoryCompleter(QLatin1String("LocalExecutable"));
+    d->localExecutablePathChooser->setHistoryCompleter(QLatin1String("LocalExecutable"));
 
     d->arguments = new FancyLineEdit(this);
     d->arguments->setHistoryCompleter(QLatin1String("CommandlineArguments"));
@@ -256,7 +256,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
     d->workingDirectory = new PathChooser(this);
     d->workingDirectory->setExpectedKind(PathChooser::ExistingDirectory);
     d->workingDirectory->setPromptDialogTitle(tr("Select Working Directory"));
-    d->workingDirectory->lineEdit()->setHistoryCompleter(QLatin1String("WorkingDirectory"));
+    d->workingDirectory->setHistoryCompleter(QLatin1String("WorkingDirectory"));
 
     d->runInTerminalCheckBox = new QCheckBox(this);
 
diff --git a/src/plugins/debugger/debuggeroptionspage.cpp b/src/plugins/debugger/debuggeroptionspage.cpp
index 3c5aa436c60..884edf439fd 100644
--- a/src/plugins/debugger/debuggeroptionspage.cpp
+++ b/src/plugins/debugger/debuggeroptionspage.cpp
@@ -85,6 +85,7 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget(DebuggerItemModel *model) :
     m_binaryChooser = new PathChooser(this);
     m_binaryChooser->setExpectedKind(PathChooser::ExistingCommand);
     m_binaryChooser->setMinimumWidth(400);
+    m_binaryChooser->setHistoryCompleter(QLatin1String("DebuggerPaths"));
 
     m_cdbLabel = new QLabel(this);
     m_cdbLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
-- 
GitLab