diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-02-06 15:15:57 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-02-06 18:20:05 +0100 |
commit | de5ed4a043e320d3e0c1516238a4bad41d4444a5 (patch) | |
tree | c32d95d5fc628530cef8b46406064d4ed2f83118 /src/plugins/debugger/debuggerdialogs.h | |
parent | d47b1cdb53692aa377c3794fe082134088b23ec6 (diff) |
Debugger: Add "Recent:" combo for Start External/Remote.
- Add combo box listing the last 10 elements of history.
- Introduce parameter class for the dialogs that can stored/
retrieved as a QSettings array using template helpers.
- Give dialogs a static 'run()' method that returns
the DebuggerStartParameters to handle the history, move
code from the debugger plugin to the dialogs.
Change-Id: Ieb15f7c8ef9489f925b9d2f47ec09feebcf73826
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/debugger/debuggerdialogs.h')
-rw-r--r-- | src/plugins/debugger/debuggerdialogs.h | 70 |
1 files changed, 26 insertions, 44 deletions
diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h index d9d3096152..5b22dedb8d 100644 --- a/src/plugins/debugger/debuggerdialogs.h +++ b/src/plugins/debugger/debuggerdialogs.h @@ -43,11 +43,14 @@ class QModelIndex; class QPushButton; class QLineEdit; class QDialogButtonBox; +class QSettings; QT_END_NAMESPACE namespace ProjectExplorer { class Abi; } namespace Debugger { +class DebuggerStartParameters; + namespace Internal { namespace Ui { @@ -60,6 +63,8 @@ class StartRemoteEngineDialog; } // namespace Ui class ProcessListFilterModel; +class StartExternalParameters; +class StartRemoteParameters; class AttachCoreDialog : public QDialog { @@ -137,31 +142,25 @@ public: explicit StartExternalDialog(QWidget *parent); ~StartExternalDialog(); - QString executableFile() const; - void setExecutableFile(const QString &executable); + static bool run(QWidget *parent, QSettings *settings, DebuggerStartParameters *sp); - QString executableArguments() const; - void setExecutableArguments(const QString &args); +private slots: + void changed(); + void historyIndexChanged(int); - QString workingDirectory() const; - void setWorkingDirectory(const QString &str); +private: + StartExternalParameters parameters() const; + void setParameters(const StartExternalParameters &p); + void setHistory(const QList<StartExternalParameters> l); + + QString executableFile() const; + void setExecutableFile(const QString &executable); - int abiIndex() const; - void setAbiIndex(int); ProjectExplorer::Abi abi() const; QString debuggerCommand(); - bool breakAtMain() const; - - bool runInTerminal() const; - void setRunInTerminal(bool v); - bool isValid() const; -private slots: - void changed(); - -private: Ui::StartExternalDialog *m_ui; }; @@ -173,40 +172,23 @@ public: explicit StartRemoteDialog(QWidget *parent, bool enableStartScript); ~StartRemoteDialog(); - QString localExecutable() const; - void setLocalExecutable(const QString &executable); + static bool run(QWidget *parent, QSettings *settings, + bool useScript, DebuggerStartParameters *sp); - QString remoteChannel() const; - void setRemoteChannel(const QString &host); - - QString remoteArchitecture() const; - void setRemoteArchitecture(const QString &arch); - void setRemoteArchitectures(const QStringList &arches); - - QString overrideStartScript() const; - void setOverrideStartScript(const QString &scriptName); +private slots: + void updateState(); + void historyIndexChanged(int); - bool useServerStartScript() const; - void setUseServerStartScript(bool on); +private: + StartRemoteParameters parameters() const; + void setParameters(const StartRemoteParameters &); + void setHistory(const QList<StartRemoteParameters> &); - QString serverStartScript() const; - void setServerStartScript(const QString &scriptName); + void setRemoteArchitectures(const QStringList &list); - QString sysroot() const; - void setSysroot(const QString &sysroot); - - int abiIndex() const; - void setAbiIndex(int); ProjectExplorer::Abi abi() const; QString debuggerCommand() const; - void setDebugInfoLocation(const QString &location); - QString debugInfoLocation() const; - -private slots: - void updateState(); - -private: Ui::StartRemoteDialog *m_ui; }; |