Sorting to QML project file selector, and update when files change

Task-number: BAUHAUS-548
Reviewed-by: kkoehne
This commit is contained in:
Lasse Holmstedt
2010-04-13 10:58:30 +02:00
parent ccfc4de16e
commit c72043f578
2 changed files with 52 additions and 29 deletions

View File

@@ -32,6 +32,10 @@
#include "qmlprojectmanager_global.h"
#include <projectexplorer/runconfiguration.h>
#include <QWeakPointer>
#include <QComboBox>
QT_FORWARD_DECLARE_CLASS(QStringListModel);
namespace Core {
class IEditor;
@@ -79,12 +83,14 @@ private slots:
QString mainScript() const;
void setMainScript(const QString &scriptFile);
void updateFileComboBox();
void onViewerChanged();
void onViewerArgsChanged();
void onDebugServerAddressChanged();
void onDebugServerPortChanged();
protected:
QmlProjectRunConfiguration(Internal::QmlProjectTarget *parent, QmlProjectRunConfiguration *source);
virtual bool fromMap(const QVariantMap &map);
@@ -104,6 +110,10 @@ private:
QString m_qmlViewerArgs;
QString m_debugServerAddress;
uint m_debugServerPort;
QStringListModel *m_fileListModel;
// weakpointer is used to make sure we don't try to manipulate
// widget which was deleted already, as can be the case here.
QWeakPointer<QComboBox> m_fileListCombo;
Internal::QmlProjectTarget *m_projectTarget;