Browse Source

Reversed logic in if else statement

Felix Turo 3 years ago
parent
commit
1992fcc02c
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/database/adbsetup.cpp

+ 4 - 4
src/database/adbsetup.cpp

@@ -274,15 +274,15 @@ bool createDatabase()
 
     aDB->updateLayout();
 
-    if (!errors.isEmpty()) {
+    if (errors.isEmpty()) {
+        LOG << "Database succesfully created.";
+        return true;
+    } else {
         LOG << "Database creation has failed. The following error(s) have ocurred: ";
         for (const auto &error : qAsConst(errors)) {
             LOG << error.type() << error.text();
         }
         return false;
-    } else {
-        LOG << "Database succesfully created.";
-        return true;
     }
 }