Преглед на файлове

QCMakeCacheView: no else after return

Daniel Pfeifer преди 9 години
родител
ревизия
ad42eb33b6
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 5 3
      Source/QtDialog/QCMakeCacheView.cxx

+ 5 - 3
Source/QtDialog/QCMakeCacheView.cxx

@@ -554,14 +554,16 @@ QWidget* QCMakeCacheModelDelegate::createEditor(
     QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this,
                      SLOT(setFileDialogFlag(bool)));
     return editor;
-  } else if (type == QCMakeProperty::FILEPATH) {
+  }
+  if (type == QCMakeProperty::FILEPATH) {
     QCMakeFilePathEditor* editor =
       new QCMakeFilePathEditor(p, var.data(Qt::DisplayRole).toString());
     QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this,
                      SLOT(setFileDialogFlag(bool)));
     return editor;
-  } else if (type == QCMakeProperty::STRING &&
-             var.data(QCMakeCacheModel::StringsRole).isValid()) {
+  }
+  if (type == QCMakeProperty::STRING &&
+      var.data(QCMakeCacheModel::StringsRole).isValid()) {
     QCMakeComboBox* editor = new QCMakeComboBox(
       p, var.data(QCMakeCacheModel::StringsRole).toStringList());
     editor->setFrame(false);