summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/projectwelcomepage.h
diff options
context:
space:
mode:
authorDaniel Molkentin <daniel.molkentin@nokia.com>2011-07-11 20:25:00 +0200
committerEike Ziller <eike.ziller@nokia.com>2011-07-12 11:24:31 +0200
commit22d6dfa45abe3d8edcc3fb92a627ee06fd3e85a9 (patch)
tree95e621a3b16addd356f243a8315da55cdfbd30b2 /src/plugins/projectexplorer/projectwelcomepage.h
parentfd9232fca2b7c0283ee3d1c2c5e9e011ba547971 (diff)
downloadqt-creator-22d6dfa45abe3d8edcc3fb92a627ee06fd3e85a9.tar.gz
Welcome Screen: Fix regressions
- last session / current session semantics is back - Manage Sessions... button is back This commit changes the behaviour of currentSession() to return the session name and not the full path. SessionNodeImpl as the other user has been adjusted accordingly. Change-Id: I1dcfbef2fb4dacf3e3906871d816483c2bfb76da Reviewed-on: http://codereview.qt.nokia.com/1461 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/projectexplorer/projectwelcomepage.h')
-rw-r--r--src/plugins/projectexplorer/projectwelcomepage.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/plugins/projectexplorer/projectwelcomepage.h b/src/plugins/projectexplorer/projectwelcomepage.h
index f63009f898..50e3ef6859 100644
--- a/src/plugins/projectexplorer/projectwelcomepage.h
+++ b/src/plugins/projectexplorer/projectwelcomepage.h
@@ -50,27 +50,18 @@ class SessionManager;
namespace Internal {
-struct WelcomePageData {
- bool operator==(const WelcomePageData &rhs) const;
- bool operator!=(const WelcomePageData &rhs) const;
-
- QString previousSession;
- QString activeSession;
- QStringList sessionList;
- QList<QPair<QString, QString> > projectList; // pair of filename, displayname
-};
-
-
class SessionModel : public QAbstractListModel
{
Q_OBJECT
public:
- enum { DefaultSessionRole = Qt::UserRole+1, CurrentSessionRole };
+ enum { DefaultSessionRole = Qt::UserRole+1, LastSessionRole, ActiveSessionRole };
SessionModel(SessionManager* manager, QObject* parent = 0);
int rowCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
+ Q_SCRIPTABLE bool isDefaultVirgin() const;
+
public slots:
void resetSessions();
@@ -108,15 +99,15 @@ public:
QString title() const { return tr("Develop"); }
int priority() const { return 20; }
- void setWelcomePageData(const WelcomePageData &welcomePageData);
+ void reloadWelcomeScreenData();
signals:
void requestProject(const QString &project);
void requestSession(const QString &session);
void manageSessions();
-
private:
- WelcomePageData m_welcomePageData;
+ SessionModel *m_sessionModel;
+ ProjectModel *m_projectModel;
};
} // namespace Internal