Merge Profiles and Session windows into a single window

ProfilesWindow and SessionWindow were two independent top-level windows,
coordinated through a QPointer and manual show/create-or-reuse logic, with
duplicated Help menus and a path where Quit didn't actually quit if a
SessionWindow happened to be open. ProfilesWindow is now an embedded QWidget
shown as a permanent, unclosable "Profiles" tab inside SessionWindow's tab
widget; SessionWindow is the app's sole top-level window. Double-clicking a
profile opens a session tab in the same window instead of finding-or-creating
a second one, and closing all session tabs falls back to the Profiles tab
rather than closing the app.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-07 15:59:53 -06:00
co-authored by Claude Sonnet 5
parent 4b4b7d68f2
commit a89748be67
5 changed files with 82 additions and 86 deletions
+4 -1
View File
@@ -7,23 +7,26 @@
#include <QMainWindow>
class QTabWidget;
class ProfilesWindow;
class SessionWindow : public QMainWindow
{
Q_OBJECT
public:
explicit SessionWindow(const Profile& profile, QWidget* parent = nullptr);
explicit SessionWindow(QWidget* parent = nullptr);
void openProfile(const Profile& profile);
private:
QTabWidget* m_tabs;
ProfilesWindow* m_profilesWidget;
SessionUiPreferences m_preferences;
void addSessionTab(const Profile& profile);
void updateTabTitle(SessionTab* tab, const QString& title);
void loadUiPreferences();
void saveUiPreferences() const;
int sessionTabCount() const;
};
#endif