mainwindow: show active project filename in the titlebar

This commit is contained in:
itsmattkc
2020-04-01 13:19:18 +11:00
parent 1363d2b94c
commit 061f7ac20d
6 changed files with 34 additions and 9 deletions
+11
View File
@@ -106,6 +106,17 @@ const QString &Project::filename() const
return filename_;
}
QString Project::pretty_filename() const
{
QString fn = filename();
if (fn.isEmpty()) {
return tr("(untitled)");
} else {
return fn;
}
}
void Project::set_filename(const QString &s)
{
filename_ = s;