Skip to content

Commit

Permalink
clean code by codefactor
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <[email protected]>
  • Loading branch information
QQxiaoming committed Sep 29, 2024
1 parent 7bbb47f commit f81a93c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ extern QDateTime START_TIME;

class FloatingTab : public QDialog {
Q_OBJECT

public:
explicit FloatingTab(QWidget *parent = nullptr) : QDialog(parent) {
setWindowFlags(Qt::Window);
Expand All @@ -86,6 +87,7 @@ class FloatingTab : public QDialog {
doNotAskClose = true;
close();
}

protected:
void closeEvent(QCloseEvent *event) override {
if(doNotAskClose) {
Expand All @@ -100,6 +102,7 @@ class FloatingTab : public QDialog {
}
}
}

private:
bool doNotAskClose = false;
};
Expand Down

0 comments on commit f81a93c

Please sign in to comment.