forked from qt-creator/qt-creator
WelcomePage: Add tooltip for sessions
The tooltip allows renaming, cloning and deleting and shows included projects. The following method was added to Session: QStringList projectsForSessionName(const QString &session) const; I moved the SessionNameInputDialog into the header to reuse it. I added new roles to SessionModel (ProjectsPathRole, ProjectsDisplayRole). The following slots were added to SessionModel to expose the backend functionality: void cloneSession(const QString &session); void deleteSession(const QString &session); void renameSession(const QString &session); Change-Id: I0182a26dc63b4f051ea948756decd5413c832c60 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -85,26 +85,6 @@ void SessionValidator::fixup(QString &input) const
|
||||
input = copy;
|
||||
}
|
||||
|
||||
|
||||
class SessionNameInputDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SessionNameInputDialog(const QStringList &sessions, QWidget *parent = 0);
|
||||
|
||||
void setValue(const QString &value);
|
||||
QString value() const;
|
||||
bool isSwitchToRequested() const;
|
||||
|
||||
private slots:
|
||||
void clicked(QAbstractButton *button);
|
||||
|
||||
private:
|
||||
QLineEdit *m_newSessionLineEdit;
|
||||
QPushButton *m_switchToButton;
|
||||
bool m_usedSwitchTo;
|
||||
};
|
||||
|
||||
SessionNameInputDialog::SessionNameInputDialog(const QStringList &sessions, QWidget *parent)
|
||||
: QDialog(parent), m_usedSwitchTo(false)
|
||||
{
|
||||
@@ -299,5 +279,3 @@ void SessionDialog::switchToSession()
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#include "sessiondialog.moc"
|
||||
|
||||
Reference in New Issue
Block a user