[Gui] remove unnecessary Boolean comparisons

This commit is contained in:
Uwe
2022-06-15 03:47:55 +02:00
parent a289ec4a06
commit 0828d769e8
13 changed files with 22 additions and 22 deletions

View File

@@ -546,7 +546,7 @@ void Application::open(const char* FileName, const char* Module)
// in case of an automatically created empty document at startup
App::Document* act = App::GetApplication().getActiveDocument();
Gui::Document* gui = this->getDocument(act);
if (act && act->countObjects() == 0 && gui && gui->isModified() == false){
if (act && act->countObjects() == 0 && gui && !gui->isModified()){
Command::doCommand(Command::App, "App.closeDocument('%s')", act->getName());
qApp->processEvents(); // an update is needed otherwise the new view isn't shown
}
@@ -2410,7 +2410,7 @@ void Application::setStyleSheet(const QString& qssFile, bool tiledBackground)
// appear incorrect due to an outdated cache.
// See https://doc.qt.io/qt-5/qstyle.html#unpolish-1
// See https://forum.freecadweb.org/viewtopic.php?f=17&t=50783
if (d->startingUp == false) {
if (!d->startingUp) {
if (mdi->style())
mdi->style()->unpolish(qApp);
}