summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/qtoptionspage.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-08-07 14:10:36 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-08-07 14:10:36 +0200
commitdebb3961c2aaaf9104d6b19b4fc92e16b7c4da0c (patch)
treeae5a53b1e7860e4e377bfee45f26148c1b94f91c /src/plugins/qt4projectmanager/qtoptionspage.h
parent50fb8bfb033dadb90084f7a3b5bbddec4e5dd1a1 (diff)
downloadqt-creator-debb3961c2aaaf9104d6b19b4fc92e16b7c4da0c.tar.gz
Debugger: Improve the helper build mechanism on the settings page.
- Give the controls a tooltip listing file details (date) - Make building a QtConcurrent task - Make log window scroll to bottom and pop up on error - Make the build code pass on error messages about copying the source files to the log file - Clean up the building code string-wise, use QLatin1String and translate messages, cache the icons
Diffstat (limited to 'src/plugins/qt4projectmanager/qtoptionspage.h')
-rw-r--r--src/plugins/qt4projectmanager/qtoptionspage.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/plugins/qt4projectmanager/qtoptionspage.h b/src/plugins/qt4projectmanager/qtoptionspage.h
index 57275795fe..dc2bb3a946 100644
--- a/src/plugins/qt4projectmanager/qtoptionspage.h
+++ b/src/plugins/qt4projectmanager/qtoptionspage.h
@@ -32,6 +32,8 @@
#include <coreplugin/dialogs/ioptionspage.h>
#include <QtGui/QWidget>
+#include <QtGui/QPixmap>
+#include <QtGui/QIcon>
QT_BEGIN_NAMESPACE
class QTreeWidgetItem;
@@ -46,6 +48,24 @@ namespace Ui {
class QtVersionManager;
}
+// A task suitable to be run by QtConcurrent to build the helpers.
+// It may outlive the settings page if someone quickly cancels it,
+// so, it maintains a copy of the QtVersion and emits finished() by name.
+class DebuggingHelperBuildTask : public QObject {
+ Q_OBJECT
+public:
+ explicit DebuggingHelperBuildTask(const QtVersion &version);
+ virtual ~DebuggingHelperBuildTask();
+
+ void run();
+
+signals:
+ void finished(const QString &versionName, const QString &output);
+
+private:
+ QtVersion *m_version;
+};
+
class QtOptionsPageWidget : public QWidget
{
Q_OBJECT
@@ -57,11 +77,17 @@ public:
void finish();
private:
+ const QPixmap m_debuggingHelperOkPixmap;
+ const QPixmap m_debuggingHelperErrorPixmap;
+ const QIcon m_debuggingHelperOkIcon;
+ const QIcon m_debuggingHelperErrorIcon;
+
void showEnvironmentPage(QTreeWidgetItem * item);
void fixQtVersionName(int index);
- int indexForWidget(QWidget *debuggingHelperWidget) const;
- int indexForTreeItem(QTreeWidgetItem *item) const;
+ int indexForTreeItem(const QTreeWidgetItem *item) const;
QTreeWidgetItem *treeItemForIndex(int index) const;
+ QtVersion *currentVersion() const;
+ void updateDebuggingHelperStateLabel(const QtVersion *version = 0);
Internal::Ui::QtVersionManager *m_ui;
QList<QtVersion *> m_versions;
@@ -89,6 +115,7 @@ private slots:
void msvcVersionChanged();
void buildDebuggingHelper();
void showDebuggingBuildLog();
+ void debuggingHelperBuildFinished(const QString &name, const QString &output);
};
class QtOptionsPage : public Core::IOptionsPage
@@ -105,7 +132,7 @@ public:
void apply();
void finish() { }
private:
- QtOptionsPageWidget *m_widget;
+ QtOptionsPageWidget *m_widget;
};
} //namespace Internal