Simplify mainwindow title logic: remove MainWindowTitleFormat enum

The MainWindow::setTitle() function was passed an enum, which depended
on whether existing_file is set or not. The check can be (and was!) done
directly in setTitle(). Therefore, remove the whole enum.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-12-11 17:43:53 +01:00 committed by Dirk Hohndel
parent 931bcc1966
commit 4ac5b9c965
3 changed files with 13 additions and 27 deletions

View file

@ -41,11 +41,6 @@ class LocationInformationWidget;
typedef std::pair<QByteArray, QVariant> WidgetProperty;
typedef QVector<WidgetProperty> PropertyList;
enum MainWindowTitleFormat {
MWTF_DEFAULT,
MWTF_FILENAME
};
class MainWindow : public QMainWindow {
Q_OBJECT
public:
@ -74,7 +69,7 @@ public:
DivePlannerWidget *divePlannerWidget();
PlannerSettingsWidget *divePlannerSettingsWidget();
LocationInformationWidget *locationInformationWidget();
void setTitle(enum MainWindowTitleFormat format = MWTF_FILENAME);
void setTitle();
void loadFiles(const QStringList files);
void importFiles(const QStringList importFiles);